Creates an instance of WorldEntity.
The name of the entity.
The properties of the world entity.
Optional
actionThe action function that defines the entity's behavior.
Optional
barOptional
beatOptional
durationOptional
hThe height of the entity's canvas.
The name of the entity.
The properties of the world entity.
Optional
sceneOptional
startOptional
tickOptional
transitionOptional
transitionOptional
wThe width of the entity's canvas.
Adds a block to the world.
The block to add.
Optional
startTime: numberThe optional start time of the block within the scene (in milliseconds).
Optional
duration: numberThe optional duration of the block within the scene (in milliseconds).
The WorldEntity instance for chaining.
Adds multiple blocks to the world.
Rest
...blocks: ICompositeEntity<any>[]The blocks to add.
The WorldEntity instance for chaining.
Adds a collision detector to the entity.
The key of the target block.
The key of the source block.
The collision detection function.
The callback function to be executed when a collision is detected.
Copies the entity's canvas to the target canvas and applies post-processors.
The target canvas to copy to.
The Sequence instance.
Finds a block within the entity by its key.
The key of the block to find.
The block if found, otherwise undefined.
Adds an event listener for when a bar is complete.
The Entity instance for chaining.
Adds an event listener for when a beat occurs.
The Entity instance for chaining.
Adds an event listener for when a tick occurs.
The Entity instance for chaining.
WorldEntity represents a scrollable world with a viewport. It extends Canvas2DEntity and provides methods for adding blocks, managing collisions, and scrolling the viewport.
Export
WorldEntity