An Effect is a named object that defines a standard appearance style, e.g. “blinn”, “translucent” and “env”.
It provides a mapping from a geometryType, e.g. “rigid” and “skinned”, to an object that can prepare a renderable so that it can be drawn. Typically the prepare function will reference shaders and techniques it has requested to be loaded.
The renderers register a number of Effects during their create() methods.
This abstraction allows custom effect types to be registered for custom geometry types.
The Effect object requires:
Create a named Effect.
var effect = Effect.create(name);
For a given geometry type add a prepare object that can process a renderable of that type.
See also Effect Registration.
Deletes the geometryType stored with the given name.
Returns the prepare object associated with the geometryType.
var prepareObject = effect.get("rigid"); prepareObject.prepare(geometryInstance);
Returns a prepareObject previously registered with the add() method.