Skip to main content

Grids

A component that manages grid instances. Each grid is associated with a unique world. 📕 Tutorial. 📘 API.

Extends​

Implements​

Properties​

enabled​

enabled: boolean = true

Component.enabled

Overrides​

Component . enabled


list​

list: Map<string, SimpleGrid>

A map of world UUIDs to their corresponding grid instances.


onDisposed​

readonly onDisposed: Event<unknown>

Disposable.onDisposed

Implementation of​

Disposable . onDisposed


uuid​

static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489"

A unique identifier for the component. This UUID is used to register the component within the Components system.

Methods​

create()​

create(world): SimpleGrid

Creates a new grid for the given world. Throws an error if a grid already exists for the world.

Parameters​

ParameterTypeDescription
worldWorldThe world to create the grid for.

Returns​

SimpleGrid

The newly created grid.

Throws​

Will throw an error if a grid already exists for the given world.


delete()​

delete(world): void

Deletes the grid associated with the given world. If a grid does not exist for the given world, this method does nothing.

Parameters​

ParameterTypeDescription
worldWorldThe world for which to delete the grid.

Returns​

void

Remarks​

This method will dispose of the grid and remove it from the internal list. If the world is disposed before calling this method, the grid will be automatically deleted.


dispose()​

dispose(): void

Disposable.dispose

Returns​

void

Implementation of​

Disposable . dispose


isConfigurable()​

isConfigurable(): this is Configurable<any, any>

Whether is component is Configurable.

Returns​

this is Configurable<any, any>

Inherited from​

Component . isConfigurable


isDisposeable()​

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns​

this is Disposable

Inherited from​

Component . isDisposeable


isHideable()​

isHideable(): this is Hideable

Whether is component is Hideable.

Returns​

this is Hideable

Inherited from​

Component . isHideable


isResizeable()​

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns​

this is Resizeable

Inherited from​

Component . isResizeable


isSerializable()​

isSerializable(): this is Serializable<any, Record<string, any>>

Whether is component is Serializable.

Returns​

this is Serializable<any, Record<string, any>>

Inherited from​

Component . isSerializable


isUpdateable()​

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns​

this is Updateable

Inherited from​

Component . isUpdateable