babylon.quarks - v1.0.0
    Preparing search index...

    Interface BehaviorPlugin

    How a behavior type is registered in BehaviorTypes: its name, class, editor fields and JSON reader.

    interface BehaviorPlugin {
        constructor: Constructable<Behavior>;
        params: ParameterPair[];
        type: string;
        loadJSON(json: BehaviorJSON, particleSystem: IParticleSystem): Behavior;
    }
    Index
    constructor: Constructable<Behavior>

    The behavior's class.

    params: ParameterPair[]

    The fields an editor shows, with the kinds of value each takes.

    type: string

    The name the behavior's JSON uses as type.

    • Reads the behavior from its JSON, for the system particleSystem. It is also called, twice per save, by BehaviorToJSON to find the fields at their defaults, so it must only read: no registration with the system, no resources that need freeing.

      Parameters

      Returns Behavior