Wunderlust

Two.js

JavaScript API for two-dimensional web drawing

Worth exploring

Update a rectangle’s rotation in the drawing loop

Why it works
One API for several renderers lets you try the same drawing in different output contexts.
Watch out
Choose the renderer for your drawing needs and test the result in the browser.

What it is

The same API draws with WebGL, Canvas 2D, or SVG renderers. The repository example creates a rectangle and updates its rotation.

What it’s for

Developers can build an animated 2D drawing and select a renderer for their project.

Benefits

  • Shared API across renderers
  • Shape updates

More like this

SVG.jsMotion & animationVanta.jsMotion & animationLottie for WebMotion & animationWebGL Fluid Simulation3D & WebGLLiquid Glass JSUI componentsTheatre.jsMotion & animation

Featured on Wunderlust

Is this yours? Show it’s in the stash.

Featured on Wunderlust

Open the stash

Open in Wunderlust