
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@redsift/d3-rs-reveal
Advanced tools
d3-rs-reveal
generate a SVG based transition to reveal an image. Typically large images take time to download and present leaving the user with an unsatisfying experience. This module used animated SVG filters and preview images to blend the transition between the low resolution preview and the full resolution asset when available.
View @redsift/d3-rs-reveal on Codepen
You may use your browser's throttling tools and cache to simulate different load and reload scenarios.
<script src="//static.redsift.io/reusable/d3-rs-reveal/latest/d3-rs-reveal.umd-es2015.min.js"></script>
<script>
var reveal = d3_rs_reveal.html()
.placeholder(placeholder)
.imgWidth(imgWidth)
.imgHeight(imgHeight)
.img(img);
d3.select('body').call(reveal);
</script>
import { reveal } from "@redsift/d3-rs-reveal";
let eml = reveal.html();
...
var reveal = require("@redsift/d3-rs-reveal");
var eml = reveal.html();
...
The supplied preview filter was build to hide heavy compression artefacts so the preview can be exported with extreme levels of compression. At these levels, it becomes practical to base64 and inline the image data.
$ convert photo-src.jpg -resize 256 -blur 1.1 -quality 10 -profile sRGB_v4_ICC_preference.icc -strip photo-dest_0x.jpg
$ base64 photo-dest_0x.jpg
Note that the color profile is converted to sRGB before being stripped from the image. A full discussion on image processing is beyond the scope of this module. gulp-compressedimages provides a tuned pipeline for generating these images in common sizes.
Formats such as WEBP can reduce the size of the assets while maintaining quality. Unfortunately testing for browser support for the codec required some work. A helper is exposed on this module checkSupported
. It returns a promise that can be supplied to the img
parameter and transformed to the URL of the desired asset.
import { reveal, checkSupported } from "@redsift/d3-rs-reveal";
let imageReveal = reveal()
.placeholder(placeholder)
.imgWidth(imgWidth)
.imgHeight(imgHeight)
.img(checkSupported.then(s => `./hero${s.retina ? '_2x' : ''}.${s.webp ? 'webp' : 'jpg'}`))
Property | Description | Transition | Preview |
---|---|---|---|
classed | String SVG custom class | N |
FAQs
Performs an animated transition between images.
The npm package @redsift/d3-rs-reveal receives a total of 3 weekly downloads. As such, @redsift/d3-rs-reveal popularity was classified as not popular.
We found that @redsift/d3-rs-reveal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.