Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@graspologic/animation
Advanced tools
Provides a set of utilities for animating @graspologic/renderer
primitives.
import { createAnimationUtil, AnimationUtil } from '@graspologic/animation'
import { GraphRenderer } from '@graspologic/renderer'
// ...
// Create an instance of the animation util that can be re-used
const utils: AnimationUtil = createAnimationUtil()
/**
* Randomizes the renderer's nodes/edges positions and colors
*/
export function randomizeRenderer(renderer: GraphRenderer) {
for (const node of renderer.scene.nodes()) {
const x = Math.random()
const y = Math.random()
const z = Math.random()
// Animates the nodes color from it's previous color to 0xFF00BBFF over 1000ms
utils.animatePosition(node, 'position', [x, y, z], 1000)
// Animates the nodes color from it's previous color to 0xFF00BBFF over 500ms
utils.animateColor(node, 'color', 0xff00bbff, 500)
}
for (const edge of renderer.scene.edges()) {
const sourceX = Math.random()
const sourceY = Math.random()
const sourceZ = Math.random()
const targetX = Math.random()
const targetY = Math.random()
const targetZ = Math.random()
// Animates the edge's sourcePosition to the new source position over 2000ms
utils.animatePosition(
edge,
'sourcePosition',
[sourceX, sourceY, sourceZ],
2000,
)
// Animates the edge's targetPosition immediately, since no duration was passed in
utils.animatePosition(edge, 'targetPosition', [targetX, targetY, targetZ])
}
}
See the API documentation or examples for additional examples.
FAQs
Graphical primitives
The npm package @graspologic/animation receives a total of 123 weekly downloads. As such, @graspologic/animation popularity was classified as not popular.
We found that @graspologic/animation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.