UNPKG

@awayjs/scene

Version:
94 lines 2.66 kB
import { Point, Vector3D, EventBase } from '@awayjs/core'; import { ContainerNode, INode, ITraversable, View, IContainer } from '@awayjs/view'; import { IMaterial } from '@awayjs/renderer'; /** * A MouseEvent is dispatched when a mouse event occurs over a mouseEnabled object in View. * TODO: we don't have screenZ data, tho this should be easy to implement */ export declare class PointerEvent extends EventBase { _iParentEvent: PointerEvent; commonAncestor: INode; /** * The horizontal coordinate at which the event occurred in view coordinates. */ screenX: number; /** * The vertical coordinate at which the event occurred in view coordinates. */ screenY: number; /** * The view object inside which the event took place. */ view: View; /** * The container inside which the event took place. */ containerNode: ContainerNode; /** * The entity of the picker inside which the event took place. */ rootNode: INode; /** * The traversable owner inside which the event took place. */ traversable: ITraversable; /** * The material of the 3d element inside which the event took place. */ material: IMaterial; /** * The uv coordinate inside the draw primitive where the event took place. */ uv: Point; /** * The index of the elements where the event took place. */ elementIndex: number; /** * The position in object space where the event took place */ position: Vector3D; /** * The normal in object space where the event took place */ normal: Vector3D; /** * Indicates whether the Control key is active (true) or inactive (false). */ ctrlKey: boolean; /** * Indicates whether the Alt key is active (true) or inactive (false). */ altKey: boolean; /** * Indicates whether the Shift key is active (true) or inactive (false). */ shiftKey: boolean; /** * Create a new MouseEvent object. * @param type The type of the MouseEvent. */ constructor(type: string); /** * @inheritDoc */ get bubbles(): boolean; /** * @inheritDoc */ stopPropagation(): void; /** * @inheritDoc */ stopImmediatePropagation(): void; /** * The position in scene space where the event took place */ get scenePosition(): Vector3D; /** * The normal in scene space where the event took place */ get sceneNormal(): Vector3D; _dispatchEvent(dispatcher: INode, target: IContainer): void; } //# sourceMappingURL=PointerEvent.d.ts.map