UNPKG

@awayjs/view

Version:
74 lines (73 loc) 2.84 kB
import { __extends } from "tslib"; import { AbstractionBase, AbstractMethodError } from '@awayjs/core'; /** * @class RenderableListItem */ var _Pick_PickableBase = /** @class */ (function (_super) { __extends(_Pick_PickableBase, _super); function _Pick_PickableBase() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._orientedBoxBoundsDirty = true; _this._orientedSphereBoundsDirty = true; return _this; } Object.defineProperty(_Pick_PickableBase.prototype, "pickable", { get: function () { return this._useWeak ? this._asset.deref() : this._asset; }, enumerable: false, configurable: true }); /** * * @param renderable * @param sourceEntity * @param surface * @param renderer */ _Pick_PickableBase.prototype.init = function (pickable, entity) { _super.prototype.init.call(this, pickable, entity, true); pickable._pickObjects[entity.id] = this; }; _Pick_PickableBase.prototype.onInvalidate = function () { _super.prototype.onInvalidate.call(this); this._orientedBoxBoundsDirty = true; this._orientedSphereBoundsDirty = true; }; _Pick_PickableBase.prototype.onClear = function () { var pickable = this.pickable; if (pickable) delete pickable._pickObjects[this._pool.id]; this._orientedBoxBounds = null; this._orientedBoxBoundsDirty = true; this._orientedSphereBounds = null; this._orientedSphereBoundsDirty = true; _super.prototype.onClear.call(this); }; _Pick_PickableBase.prototype.hitTestPoint = function (x, y, z) { throw new AbstractMethodError(); }; _Pick_PickableBase.prototype.getBoxBounds = function (matrix3D, strokeFlag, cache, target) { if (matrix3D === void 0) { matrix3D = null; } if (strokeFlag === void 0) { strokeFlag = true; } if (cache === void 0) { cache = null; } if (target === void 0) { target = null; } return target; }; _Pick_PickableBase.prototype.getSphereBounds = function (center, matrix3D, strokeFlag, cache, target) { if (matrix3D === void 0) { matrix3D = null; } if (strokeFlag === void 0) { strokeFlag = true; } if (cache === void 0) { cache = null; } if (target === void 0) { target = null; } return target; }; _Pick_PickableBase.prototype.testCollision = function (collision, closestFlag) { throw new AbstractMethodError(); }; _Pick_PickableBase.prototype._onInvalidateElements = function () { this._orientedBoxBoundsDirty = true; this._orientedSphereBoundsDirty = true; }; return _Pick_PickableBase; }(AbstractionBase)); export { _Pick_PickableBase };