API Reference

Class List

pc.ElementInputEvent

Represents an input event fired on a pc.ElementComponent. When an event is raised on an ElementComponent it bubbles up to its parent ElementComponents unless we call stopPropagation().

Summary

Properties

elementThe ElementComponent that this event was originally raised on.
eventThe MouseEvent or TouchEvent that was originally raised.

Methods

stopPropagationStop propagation of the event to parent pc.ElementComponents.

Details

Constructor

ElementInputEvent(event, element, camera)

Create an instance of a pc.ElementInputEvent.

Parameters

eventMouseEvent, TouchEventThe MouseEvent or TouchEvent that was originally raised.
elementpc.ElementComponentThe ElementComponent that this event was originally raised on.
camerapc.CameraComponentThe CameraComponent that this event was originally raised via.

Properties

pc.ElementComponentelement

The ElementComponent that this event was originally raised on.

MouseEvent, TouchEventevent

The MouseEvent or TouchEvent that was originally raised.

Methods

stopPropagation()

Stop propagation of the event to parent pc.ElementComponents. This also stops propagation of the event to other event listeners of the original DOM Event.