Use EventRef
s to reference the events on animation etc.
To actually listen for events and produce messages in response, use on : EventRef -> Decoder msg -> Attribute msg
from AFrame.Events
.
ref : String -> EventRef
Constructor for custom events' references.
animationBegin : EventRef
Animation began. Event detail contains name
of animation.
animationComplete : EventRef
Animation completed. Event detail contains name
of animation.
animationCompleteWithId : EventRef
Animation completed if animation has an ID (e.g., animation_ "click"
).
modelLoaded : EventRef
glTF model has been loaded into the scene.
modelError : EventRef
glTF model could not be loaded.
materialTextureLoaded : EventRef
Texture loaded onto material.
materialVideoLoadedData : EventRef
Video data loaded and is going to play.
materialVideoEnded : EventRef
For video textures, emitted when the video has reached its end (may not work with loop).
raycasterIntersected : EventRef
Emitted on the intersected entity. Entity is intersecting with a raycaster. Event detail will contain el
, the raycasting entity, and intersection
, and .getIntersection
(el) function which can be used to obtain current intersection data.
raycasterIntersectedCleared : EventRef
Emitted on the intersected entity. Entity is no longer intersecting with a raycaster. Event detail will contain el
, the raycasting entity.
raycasterIntersection : EventRef
Emitted on the raycasting entity. Raycaster is intersecting with one or more entities. Event detail will contain els
, an array with the intersected entities, and intersections
, and .getIntersection (el)
function which can be used to obtain current intersection data.
raycasterIntersectionCleared : EventRef
Emitted on the raycasting entity. Raycaster is no longer intersecting with one or more entities. Event detail will contain clearedEls
, an array with the formerly intersected entities.
textFontSet : EventRef
Emitted when the font source has been loaded.
soundLoaded : EventRef
Triggered when sound file is loaded. Event detail will contain the sound’s name
and id
.
soundEnded : EventRef
Triggered when sound finishes playing. Event detail will contain the sound’s name
and id
.
deviceOrientationPermissionGranted : EventRef
User has granted access to DeviceOrientation events
deviceOrientationPermissionRejected : EventRef
User or browser has denied access to DeviceOrientation events
deviceOrientationPermissionRequested : EventRef
Application has requested permission to access DeviceOrientation events
click : EventRef
Emitted on both cursor and intersected entity if a currently intersected entity is clicked (whether by mouse or by fuse).
fusing : EventRef
Emitted on both cursor and intersected entity when fuse-based cursor starts counting down.
mouseDown : EventRef
Emitted on both cursor and intersected entity (if any) on mousedown
on the canvas element.
mouseEnter : EventRef
Emitted on both cursor and intersected entity (if any) when cursor intersects with an entity.
mouseLeave : EventRef
Emitted on both cursor and intersected entity (if any) when cursor no longer intersects with previously intersected entity.
mouseUp : EventRef
Emitted on both cursor and intersected entity (if any) on mouseup on the canvas element.
buttonDown : EventRef
buttonUp : EventRef
buttonChanged : EventRef
Any touch or press of a button fires this.
touchStart : EventRef
Touch sensitive button touched.
touchEnd : EventRef
Touch sensitive button released.
trackPadDown : EventRef
trackPadUp : EventRef
trackPadTouchStart : EventRef
trackPadTouchEnd : EventRef
trackPadChanged : EventRef
trackPadMoved : EventRef
triggerDown : EventRef
triggerUp : EventRef
triggerTouchStart : EventRef
triggerTouchEnd : EventRef
triggerChanged : EventRef
thumbstickDown : EventRef
thumbstickUp : EventRef
thumbstickTouchStart : EventRef
thumbstickTouchEnd : EventRef
thumbstickChanged : EventRef
thumbstickMoved : EventRef
gripDown : EventRef
The hand is closed into a fist without thumb raised.
gripUp : EventRef
The hand is no longer closed into a fist without thumb raised.
gripTouchStart : EventRef
gripTouchEnd : EventRef
gripChanged : EventRef
aButtonDown : EventRef
aButtonUp : EventRef
aButtonTouchStart : EventRef
aButtonTouchEnd : EventRef
aButtonChanged : EventRef
bButtonDown : EventRef
bButtonUp : EventRef
bButtonTouchStart : EventRef
bButtonTouchEnd : EventRef
bButtonChanged : EventRef
xButtonDown : EventRef
xButtonUp : EventRef
xButtonTouchStart : EventRef
xButtonTouchEnd : EventRef
xButtonChanged : EventRef
yButtonDown : EventRef
yButtonUp : EventRef
yButtonTouchStart : EventRef
yButtonTouchEnd : EventRef
yButtonChanged : EventRef
surfaceDown : EventRef
surfaceUp : EventRef
surfaceTouchStart : EventRef
surfaceTouchEnd : EventRef
surfaceChanged : EventRef
menuDown : EventRef
menuUp : EventRef
menuChanged : EventRef
systemDown : EventRef
systemUp : EventRef
systemChanged : EventRef
pointUp : EventRef
The hand is touching or pressing the trigger only.
pointDown : EventRef
The hand is no longer touching or pressing the trigger only.
thumbUp : EventRef
The hand is closed into a fist with thumb raised.
thumbDown : EventRef
The hand is no longer closed into a fist with thumb raised.
pointingStart : EventRef
The hand is pointing with index finger without thumb raised.
pointingEnd : EventRef
The hand is no longer pointing without thumb raised.
pistolStart : EventRef
The hand is pointing with index finger and thumb raised.
pistolEnd : EventRef
The hand is no longer pointing with thumb raised.
axisMove : EventRef
Axis changed (e.g., for thumbstick, touchpad). Contains axis
and axesChanged
in the event detail. axis
is an array of values from -1.0
(left, down) to 1.0
(right, up).
controllerConnected : EventRef
Controller connected and set up.
controllerDisconnected : EventRef
Controller disconnected.
controllerModelReady : EventRef
The model file is loaded and completed parsing.
toString : EventRef -> String
stringify : List EventRef -> String