Built in Excalibur Components


Tag components are useful when you want to flag an entity with something, for example "offscreen". A good way to think about it is to use a flag for a non-default state.

const entity = new ex.Entity()
entity.addComponent(new ex.TagComponent('offscreen'))

console.log(entity.tags) // ['offscreen']


The Excalibur TransformComponent component primarily keeps track of the z-index position, rotation, and scale of an entity.

Additionally it keeps track of the coordinate plane which is whether it draws to the CoordPlane.Screen or part of the CoordPlane.World. The default is drawing in CoordPlane.World which shifts the entities in "world space" by the position of the current Camera If you are drawing in CoordPlane.Screen the entity is not influenced by the camera, for example an entity at (0, 0) will always be at the top left of the screen regardless of what happens to the current Camera.