object, ( r )
Specifies a script molecule as callback. Certain special effect requires adjustment when the camera/view location changes during runtime. For example, lens flare effect need correct screen position of each flare during rendering. This should be accomplished within the callback.
For lens flare effect, the callback is passed the following object as params.
var params = {lensFlares: [ {x: 100, y: 100, rotation: rad }, // size and rotaion of each flare {x: 100, y: 100, rotation: rad }, ... ], positionScreen: {x: 0, y: 0} }; // effect position on screen
Implementer should update these values within the callback to achieve the best effect.
start(scene);
Start this effect.
scene | (object) a scene. (see Camera Molecule.scene.) Nor required if a callback has been given. |
N/A
stop(scene);
Stop this effect.
scene | (object) a scene. (see Camera Molecule.scene.) Nor required if a callback has been given. |
N/A