Nidza - canvas2d Object Scene Oriented library Work in progress - Adding rotation

Опубликовано: 31 Май 2026
на канале: javascript fanatic
9
2

Source code link :
https://github.com/zlatnaspirala/nidza

or

`npm i nidza`


2d canvas engine - Scene Object oriented engine without classic auto update like calling requestAnimationFrame or timers. There is no events for drawen elements. Nidza is exclusively for draws staff. Objective is CPU low price of usage. You can move object or start any animation but on finish there is no any draw calls. This is main objective task to make autoupdater with releasing on target/object reach. Project object is also adding all of kind composition video/webcam/images/text in same time and place.

Nidza will be texture generator for matrix-engine but still this project is indipendent because can be used for any other project.

You can generate images
Use like texture in 3d space
Use it like web site features
Draw logo animation
How it works
Create object of instance Nidza. var testNidza = new Nidza(); This object containe all necessary staff, everything related to the nidza engine.

Now we create generic new objects with:

let myFirstNidzaObjectOptions = {
id: "welcomeText",
size: {
width: 250,
height: 250
}
};
testNidza.createNidzaIndentity(myFirstNidzaObjectOptions);
This func createNidzaIndentity created one new canvas element (with width and height from options) in base. I called NidzaIndentity. Every indentity use own canvas element and represent independent app part.

Now to draw really something we use:

testNidza.access.welcomeText.addTextComponent({
text: "Generate images from code",
position: {
x: 20,
y: 40
},
dimension: {
width: 100,
height: 100
}
});