Entities · interface
CursorHost
What a cursor needs from the world it belongs to.
Explained in Entities.
interface CursorHostimport type { CursorHost } from '@driftengine/entities';In depth
An interface rather than the World class, because a cursor importing the world and the world
importing the cursor is a cycle — and because what a cursor actually needs is two functions.
Methods
store
store(type: ComponentType): ComponentStore| Parameter | Type | Description |
|---|---|---|
type | ComponentType |
releaseCursor
releaseCursor(cursor: QueryCursor): void| Parameter | Type | Description |
|---|---|---|
cursor | QueryCursor |