shamansir / elm-aframe / AFrame.EventRefs

Event Reference

Use EventRefs 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.


type EventRef

ref : String -> EventRef

Constructor for custom events' references.

Animation

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").

Model

modelLoaded : EventRef

glTF model has been loaded into the scene.

modelError : EventRef

glTF model could not be loaded.

Material

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).

Raycaster

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.

Text

textFontSet : EventRef

Emitted when the font source has been loaded.

Sound

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.

Device Orientation

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

Controls : Cursor & Mouse

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.

Controls : Generic Button

buttonDown : EventRef

buttonUp : EventRef

buttonChanged : EventRef

Any touch or press of a button fires this.

Controls : Generic Touch

touchStart : EventRef

Touch sensitive button touched.

touchEnd : EventRef

Touch sensitive button released.

Controls : Trackpad

trackPadDown : EventRef

trackPadUp : EventRef

trackPadTouchStart : EventRef

trackPadTouchEnd : EventRef

trackPadChanged : EventRef

trackPadMoved : EventRef

Controls : Trigger

triggerDown : EventRef

triggerUp : EventRef

triggerTouchStart : EventRef

triggerTouchEnd : EventRef

triggerChanged : EventRef

Controls : Thumbstick

thumbstickDown : EventRef

thumbstickUp : EventRef

thumbstickTouchStart : EventRef

thumbstickTouchEnd : EventRef

thumbstickChanged : EventRef

thumbstickMoved : EventRef

Controls : Grip

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

Controls : A Button

aButtonDown : EventRef

aButtonUp : EventRef

aButtonTouchStart : EventRef

aButtonTouchEnd : EventRef

aButtonChanged : EventRef

Controls : B Button

bButtonDown : EventRef

bButtonUp : EventRef

bButtonTouchStart : EventRef

bButtonTouchEnd : EventRef

bButtonChanged : EventRef

Controls : X Button

xButtonDown : EventRef

xButtonUp : EventRef

xButtonTouchStart : EventRef

xButtonTouchEnd : EventRef

xButtonChanged : EventRef

Controls : Y Button

yButtonDown : EventRef

yButtonUp : EventRef

yButtonTouchStart : EventRef

yButtonTouchEnd : EventRef

yButtonChanged : EventRef

Controls : Surface

surfaceDown : EventRef

surfaceUp : EventRef

surfaceTouchStart : EventRef

surfaceTouchEnd : EventRef

surfaceChanged : EventRef

Controls : Menu

menuDown : EventRef

menuUp : EventRef

menuChanged : EventRef

Controls : System

systemDown : EventRef

systemUp : EventRef

systemChanged : EventRef

Controls : Fingers

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.

Controls : Axis

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).

Controller

controllerConnected : EventRef

Controller connected and set up.

controllerDisconnected : EventRef

Controller disconnected.

controllerModelReady : EventRef

The model file is loaded and completed parsing.

Stringify

toString : EventRef -> String

stringify : List EventRef -> String