weasel API - v0.8.0
    Preparing search index...

    Interface AffordanceExperimental

    A single interactive piece of chrome. Pure functions; the kit composes multiple affordances into a single RenderLayer per tool via composeAffordanceLayer.

    Affordances declare interactive regions in a target's local frame. The framework (composeAffordanceLayer) composes the target's bounds transform (rotation around the AABB center, when present) for both paint and hit-test, so the affordance never touches rotation, view.scale, or world↔screen math.

    interface Affordance {
        id: string;
        decorate?(state: ChromeState, view: View): DrawCommand[];
        regions(state: ChromeState): readonly AffordanceRegion<unknown>[];
    }
    Index

    Properties

    Methods

    Properties

    id: string

    Stable id for debug overlays + visibility maps.

    Methods