Skip to content

API Variable component

github-actions[bot] edited this page Nov 28, 2026 · 5 revisions

Variable: component

const component: (id, options?) => <T>(value, _context) => void = behavior;

Defined in: src/engine/core/registry.ts:289

Class decorator for built-in engine components. Same as @behavior.

Class decorator: register a GameBehavior under a stable id used by scene files.

Parameters

id

string

options?

ComponentOptions

Returns

<T>(value, _context) => void

Clone this wiki locally