
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
This library provides a way to project 3D angles from a gyroscope (e.g. from a smartphone) onto a 2D plane. Basically it "converts" the alpha and beta values to x and y coordinates.
The library needs to be aware of the plane size (in pixels) and the distance between the center of the plane and the center of the gyroscope. The distance is also defined in pixels.
import { GyroPlane } from 'gyro-plane'
const width = window.innerWidth
const height = window.innerHeight
// Assume the distance between gyroscope and screen to be two times the width
const distance = width * 2
let gyro = new GyroPlane({
width: window.innerWidth,
height: window.innerHeight,
distance: distance
})
// Update the orientation values from a gyroscope.
gyro.updateOrientation({ alpha: 30, beta: -25.6 })
// To get the calculated coordinates, you have to call this function.
const coordinates = gyro.getScreenCoordinates()
// => { x: 80, y: 130 }
FAQs
Transform angle values from a gyroscope to 2D coordinates.
We found that gyro-plane demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.