SceneEvent
Lens Studio v1.0.0+
Scripting Name: SceneEvent
Inherits from IEventParameters
Child Classes: CameraBackEvent
, CameraFrontEvent
, DelayedCallbackEvent
, FaceTrackingEvent
, LateUpdateEvent
, SceneObjectEvent
, SurfaceTrackingResetEvent
, TurnOffEvent
, TurnOnEvent
, UpdateEvent
, WorldTrackingMeshesAddedEvent
, WorldTrackingMeshesRemovedEvent
, WorldTrackingMeshesUpdatedEvent
Description
The base class for scenewide events. SceneEvents can be created using ScriptComponent’s createEvent method.
Methods
bind(function evCallback)
: void
Binds a callback function to this event.
getTypeName()
: String
Returns the typename of the SceneEvent.
Properties
enabled
: Boolean
If true, the event is able to trigger. If false, the event will not trigger.
Inherited Methods
getTypeName()
: String
Returns the name of this object’s type.
isOfType(String type)
: Boolean
Returns true if the object matches or derives from the passed in type.
Examples
// Bind a function to the MouthOpened event
function onMouthOpen(eventData)
{
print("mouth was opened");
}
var event = script.createEvent("MouthOpenedEvent");
event.bind(onMouthOpen);
Still Looking for help?
Visit Support