Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
parallax-effect
Advanced tools
Readme
Parallax effect in javascript using face tracking, can be a good improvement for 3d scenes. This library uses TFJS with WASM backend on CPU, so your GPU will be free. Supports lazy loading.
Inspired by @lucknknock C# demo
Run npm install parallax-effect
and import it as ES module
import * as Parallax from '../dist/parallax-effect.mjs';
Parallax.init( view => {
console.log( view );
} );
or add it in script tag
<script src="https://cdn.jsdelivr.net/npm/parallax-effect/dist/parallax-effect.min.js"></script>
<script>
Parallax.init( view => {
console.log( view );
} );
</script>
View in code below is a 3d vector with components similar to spherical coordinates: x/y in range [-1, 1] and proportional to angle, z is proportional to distance from camera to head. Also you can check for successfull init or change default settings: smoothing, default distance between eyes to change z, threshold in blazeface model or change tfjs source links from jsdelivr to unpkg / own server.
Parallax.init(
view => {
console.log( view.x, view.y, view.z );
}, {
smoothEye: 0.8, // smoothing eye (x, y)
smoothDist: 0.25, // smoothing distance (z)
defautDist: 0.12, // parameter for distance estimation
threshold = 0.85 // blazeface detection probability
}
).then( rafId => {
console.log( 'cancelAnimationFrame(' + rafId + ')' );
}).catch( errorMessage => {
console.log( errorMessage );
} );
Feel free to make issues or/and contribute.
FAQs
Parallax effect for web using face tracking. Image-based 3d display with tfjs.
The npm package parallax-effect receives a total of 0 weekly downloads. As such, parallax-effect popularity was classified as not popular.
We found that parallax-effect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.