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

    Interface EmitterShapePlugin

    How an emitter shape is registered in EmitterShapes: its name, class, editor fields and JSON reader.

    interface EmitterShapePlugin {
        constructor: Constructable<EmitterShape>;
        params: ParameterPair[];
        type: string;
        loadJSON(json: ShapeJSON, meta: JsonMetaData): EmitterShape;
    }
    Index

    The shape's class.

    params: ParameterPair[]

    The fields an editor shows, with the kinds of value each takes: each name is a field of the shape and a key of its JSON.

    type: string

    The name the shape's JSON uses as type.

    • Reads the shape from its JSON, resolving references (a mesh) through meta. It is also called, twice per save, by EmitterToJSON to find the fields at their defaults, so it must only read: no registration, no resources that need freeing.

      Parameters

      Returns EmitterShape