Entities · interface

CursorHost

What a cursor needs from the world it belongs to.

Explained in Entities.

interface CursorHost
import 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
ParameterTypeDescription
typeComponentType

releaseCursor

releaseCursor(cursor: QueryCursor): void
ParameterTypeDescription
cursorQueryCursor