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.
wire-frame-landscape
Advanced tools
Readme
This project is an animation configurable using Html5 canvas. You can change the size, the colors, the animation of the edges and add animations like rotation.
you can add it to your project with git
$ git clone git@github.com:nenlaith/wire-frame-landscape.git
or with npm
$ npm install --save wire-frame-landscape
To create a new wire frame, you need to call the create
with the ID of the canvas wrapper or the HTMLElement
and a framerate.
let wfl = WFL.create("canvas-wrapper", 42);
After creating the instance of a wire frame, it is already set up with default parameters but you can change them to.
setLineWidth(lineWidth: integer)
SetColors(backgroundColor: string, wireColor: string)
: the parameters can be html color code (ex: "#3c003d"
) or HTML color names ( "white"
, "blue"
etc... )
setRotation(roll: float, pitch: float, yaw: float)
setDimensions(width: number, height: number)
setDimensionsType(type: string, params: object)
: they are only two types: STATIC
and FILL
. when using STATIC
, you need to set the dimensions with setDimensions()
. Even if the wrapper's size, the animation will keep the same size. If you want to use FILL
you need to provide the params object.
params = {
x: number,
y: number,
multiplier: number
}
the multiplier
is used to extend the size of the wire frame.
setPosition(x: number, y: number)
setPositionType(type: string)
: they are only two types: STATIC
and CENTER
. When using STATIC
, you need to set the position with setPosition()
. Even if the wrapper's size, the animation will keep the same position. the CENTER
keep automatically the wire frame at the center of the canvas.
The library will contain a set of animations which can control the behaviour of rotation, position, colors, dimensions. They are stored in the WFL.Animation
object.
linearSingleRotation(rotationAxis :string, from: number, to: number, speed: number)
The library will contain a set of animations which can control the behaviour of the edges. They are stored in the WFL.Magnitude
object.
randomSawtoothWave(amplitude_min: number, amplitude_max: number, speed: number)
let wfl = WFL.create("canvas-wrapper", 42);
wfl.setSplittings(17, 17)
.setColors("white", "blue")
.setLineWidth(5)
.setRotation(Math.PI / 7, - Math.PI / 7, Math.PI / 7.0)
.setDimensionsType("FILL", { x: 1, y: 1, multiplier: 2 })
.setAmplitudeFunction(WFL.Magnitude.randomSawtoothWave(-30, 30, 30 / 1500))
.addAnimation(WFL.Animation.linearSingleRotation("yaw", - Math.PI / 4.0, Math.PI / 4.0, ( Math.PI / 2.0 ) / 50000))
.addAnimation(WFL.Animation.linearSingleRotation("roll", 0, Math.PI / 10.0, ( Math.PI / 10.0 ) / 10000))
.start();
FAQs
a visual effect using html5 canvas
The npm package wire-frame-landscape receives a total of 1 weekly downloads. As such, wire-frame-landscape popularity was classified as not popular.
We found that wire-frame-landscape 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.