Grids
A component that manages grid instances. Each grid is associated with a unique world. 📕 Tutorial. 📘 API.
Extends
Implements
Properties
enabled
enabled:
boolean
=true
Overrides
list
list:
Map
<string
,SimpleGrid
>
A map of world UUIDs to their corresponding grid instances.
onDisposed
readonly
onDisposed:Event
<unknown
>
Implementation of
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
Parameter | Type | Description |
---|---|---|
world | World | The world to create the grid for. |
Returns
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
Parameter | Type | Description |
---|---|---|
world | World | The 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
Returns
void
Implementation of
isConfigurable()
isConfigurable():
this is Configurable<any, any>
Whether is component is Configurable.
Returns
this is Configurable<any, any>
Inherited from
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable