0.9.0 • Published 2 years ago

impacto v0.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Impacto

Table of Contents

Description

Impacto is a simple render engine for HTML5 canvas. If you have any questions please ask in Discussions (Forum)

Get Started

To get started, you need to install Impacto by NPM Package:

npm install impacto

Use the lib in your project:

import Impacto from "impacto"; // Import the Impacto lib

// Create a simple scene 
class MyScene extends Impacto.Scene {
	start() {
		const myRect = new Impacto.GameObjects.Rectangle(400, 300, 50, 50, "#ff0000"); // Create a red rectangle at position (400x, 300y) with size (50x, 50y)
		this.addChild(myRect); // Add the rectangle to the scene
	}

	update() {
		this.rect2.setAngle(this.rect2.angle + 1); // Rotate the rectangle
	}
}

const game = new Impacto.Game({
	width: 800, // Width of the canvas
	height: 600, // Height of the canvas
	backgroundColor: "#f0f0f0", // Background color of the canvas
	scene: MyScene, // The scene to be rendered
});

For more information about the Impacto API, please check the Doc or check the examples.

0.9.0

2 years ago

0.9.0-0

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago