UNPKG

@awayjs/scene

Version:
44 lines (43 loc) 1.44 kB
import { __extends } from "tslib"; import { EventBase } from '@awayjs/core'; import FrameScriptManager from '../managers/FrameScriptManager'; /** * A FocusEvent is dispatched when a entity is focused */ var FocusEvent = /** @class */ (function (_super) { __extends(FocusEvent, _super); /** * Create a new MouseEvent object. * @param type The type of the MouseEvent. */ function FocusEvent(type) { return _super.call(this, type) || this; } /** * Creates a copy of the MouseEvent object and sets the value of each property to match that of the original. */ FocusEvent.prototype.clone = function () { var result = new FocusEvent(this.type); /* TODO: Debug / test - look into isDefaultPrevented if (isDefaultPrevented()) result.preventDefault(); */ result.view = this.view; result.entity = this.entity; return result; }; FocusEvent.prototype._dispatchEvent = function (dispatcher) { dispatcher.container.dispatchEvent(this); FrameScriptManager.execute_queue(); }; /** * Defines the value of the type property of a focusIn3d event object. */ FocusEvent.FOCUS_IN = 'focusIn3d'; /** * Defines the value of the type property of a focusOut3d event object. */ FocusEvent.FOCUS_OUT = 'focusOut3d'; return FocusEvent; }(EventBase)); export { FocusEvent };