sakurafx-typescript
v1.0.3
Published
sakuraFx
Downloads
1
Maintainers
Readme
sakuraFx-typescript
Animation based on WebGL.
It is Sakura for TypeScript version.
fork from gryng02
Install pnpm add -D sakurafx-typescript
In html
<canvas id="sakura"></canvas>
In TypeScript
//import
import sakura from "sakurafx-typescript";
//get canvas
const canvas = document.getElementById("sakura")
//initialization and get render
const render = sakura(canvas)
//creat animation callback
function callback(){
render() //render
requestAnimationFrame(callback) //call self in next frame
}
callback()