Skip to content

The base maker

Makers can be extendable, and the base maker is makeObject. This is the base of all other makers in kiboom, and probably should be the base maker of your own makers.

makeObject() returns a new game object, with these default components:

These are the typical transform components of a game object in other engines, like Unity.

const myObject = makeObject({
pos: vec2(100, 100),
scale: vec2(2, 2),
anchor: "center",
rotate: 90,
z: 1,
tags: [ "entity" ],
});

If you will set in all your game objects the same components, why don’t use a base for all? This is the idea of makeObject, and all other makers in kiboom.