@kayelaa/canvas API - v0.2.15
    Preparing search index...

    Variable selfConst

    self: typeof self = ...

    Special symbol used with useRef to get a stable reference to the current entity's underlying LEA KaylaRectEntity.

    Pass this symbol directly as the initial value to useRef(self) — it is replaced with the actual entity instance once mounted.

    Do NOT use this symbol anywhere else — it's only meaningful as the argument to useRef.

    const entity = useRef(self);

    useTick(dt => {
    entity.current.pos.x += 150 * dt;
    entity.current.setFlag("invulnerable", true);
    });

    // Later — access raw LEA entity methods
    entity.current.getRect(); // or other LEA-specific stuff
    • useRef — the hook that accepts this symbol
    • useEntity — alternative that directly returns the ref (no symbol needed)
    • useRect — usually more convenient for day-to-day position/size work