-
-
Notifications
You must be signed in to change notification settings - Fork 105
hu M2D
pmgl edited this page Nov 6, 2023
·
1 revision
micro 2D is a simplified API for accelerated 2D rendering. It is based on Pixi.js. It is currently very minimal but it will grow in the future. If you are looking for a stable, feature-complete 2D API, look into Pixi.js instead.
Setting up the scene:
scene = new M2D.Scene()
sprite = new M2D.Sprite("icon",32,32)
scene.add(sprite)
camera = new M2D.Camera()
In your function draw()
, simply call screen.render
, passing your scene and camera as arguments:
screen.render(scene,camera)