|
@@ -13838,6 +13838,166 @@ _Cameras_cameraInputsManager__WEBPACK_IMPORTED_MODULE_1__["CameraInputTypes"]["F
|
|
|
|
|
|
/***/ }),
|
|
/***/ }),
|
|
|
|
|
|
|
|
+/***/ "./Cameras/Inputs/followCameraMouseWheelInput.ts":
|
|
|
|
+/*!*******************************************************!*\
|
|
|
|
+ !*** ./Cameras/Inputs/followCameraMouseWheelInput.ts ***!
|
|
|
|
+ \*******************************************************/
|
|
|
|
+/*! exports provided: FollowCameraMouseWheelInput */
|
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
+
|
|
|
|
+"use strict";
|
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
|
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FollowCameraMouseWheelInput", function() { return FollowCameraMouseWheelInput; });
|
|
|
|
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
|
|
|
|
+/* harmony import */ var _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Misc/decorators */ "./Misc/decorators.ts");
|
|
|
|
+/* harmony import */ var _Cameras_cameraInputsManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Cameras/cameraInputsManager */ "./Cameras/cameraInputsManager.ts");
|
|
|
|
+/* harmony import */ var _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Events/pointerEvents */ "./Events/pointerEvents.ts");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Manage the mouse wheel inputs to control a follow camera.
|
|
|
|
+ * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
|
|
|
|
+ */
|
|
|
|
+var FollowCameraMouseWheelInput = /** @class */ (function () {
|
|
|
|
+ function FollowCameraMouseWheelInput() {
|
|
|
|
+ /**
|
|
|
|
+ * Moue wheel controls zoom. (Moue wheel modifies camera.radius value.)
|
|
|
|
+ */
|
|
|
|
+ this.axisControlRadius = true;
|
|
|
|
+ /**
|
|
|
|
+ * Moue wheel controls height. (Moue wheel modifies camera.heightOffset value.)
|
|
|
|
+ */
|
|
|
|
+ this.axisControlHeight = false;
|
|
|
|
+ /**
|
|
|
|
+ * Moue wheel controls angle. (Moue wheel modifies camera.rotationOffset value.)
|
|
|
|
+ */
|
|
|
|
+ this.axisControlRotation = false;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or Set the mouse wheel precision or how fast is the camera moves in
|
|
|
|
+ * relation to mouseWheel events.
|
|
|
|
+ */
|
|
|
|
+ this.wheelPrecision = 3.0;
|
|
|
|
+ /**
|
|
|
|
+ * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
|
|
|
|
+ * It defines the percentage of current camera.radius to use as delta when wheel is used.
|
|
|
|
+ */
|
|
|
|
+ this.wheelDeltaPercentage = 0;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Attach the input controls to a specific dom element to get the input from.
|
|
|
|
+ * @param element Defines the element the controls should be listened from
|
|
|
|
+ * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
|
|
|
|
+ */
|
|
|
|
+ FollowCameraMouseWheelInput.prototype.attachControl = function (element, noPreventDefault) {
|
|
|
|
+ var _this = this;
|
|
|
|
+ this._wheel = function (p, s) {
|
|
|
|
+ // sanity check - this should be a PointerWheel event.
|
|
|
|
+ if (p.type !== _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_3__["PointerEventTypes"].POINTERWHEEL) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var event = p.event;
|
|
|
|
+ var delta = 0;
|
|
|
|
+ // Chrome, Safari: event.deltaY
|
|
|
|
+ // IE: event.wheelDelta
|
|
|
|
+ // Firefox: event.detail (inverted)
|
|
|
|
+ var wheelDelta = Math.max(-1, Math.min(1, (event.deltaY || event.wheelDelta || -event.detail)));
|
|
|
|
+ if (_this.wheelDeltaPercentage) {
|
|
|
|
+ console.assert((_this.axisControlRadius +
|
|
|
|
+ _this.axisControlHeight +
|
|
|
|
+ _this.axisControlRotation) <= 1, "wheelDeltaPercentage only usable when mouse wheel " +
|
|
|
|
+ "controlls ONE axis. " +
|
|
|
|
+ "Currently enabled: " +
|
|
|
|
+ "axisControlRadius: " + _this.axisControlRadius +
|
|
|
|
+ ", axisControlHeightOffset: " + _this.axisControlHeight +
|
|
|
|
+ ", axisControlRotationOffset: " + _this.axisControlRotation);
|
|
|
|
+ if (_this.axisControlRadius) {
|
|
|
|
+ delta =
|
|
|
|
+ wheelDelta * 0.01 * _this.wheelDeltaPercentage *
|
|
|
|
+ _this.camera.radius;
|
|
|
|
+ }
|
|
|
|
+ else if (_this.axisControlHeight) {
|
|
|
|
+ delta =
|
|
|
|
+ wheelDelta * 0.01 * _this.wheelDeltaPercentage *
|
|
|
|
+ _this.camera.heightOffset;
|
|
|
|
+ }
|
|
|
|
+ else if (_this.axisControlRotation) {
|
|
|
|
+ delta =
|
|
|
|
+ wheelDelta * 0.01 * _this.wheelDeltaPercentage *
|
|
|
|
+ _this.camera.rotationOffset;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ delta = wheelDelta * _this.wheelPrecision;
|
|
|
|
+ }
|
|
|
|
+ if (delta) {
|
|
|
|
+ if (_this.axisControlRadius) {
|
|
|
|
+ _this.camera.radius += delta;
|
|
|
|
+ }
|
|
|
|
+ else if (_this.axisControlHeight) {
|
|
|
|
+ _this.camera.heightOffset += delta;
|
|
|
|
+ }
|
|
|
|
+ else if (_this.axisControlRotation) {
|
|
|
|
+ _this.camera.rotationOffset += delta;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (event.preventDefault) {
|
|
|
|
+ if (!noPreventDefault) {
|
|
|
|
+ event.preventDefault();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_3__["PointerEventTypes"].POINTERWHEEL);
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
|
+ * @param element Defines the element to stop listening the inputs from
|
|
|
|
+ */
|
|
|
|
+ FollowCameraMouseWheelInput.prototype.detachControl = function (element) {
|
|
|
|
+ if (this._observer && element) {
|
|
|
|
+ this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
|
|
+ this._observer = null;
|
|
|
|
+ this._wheel = null;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
|
|
+ * Gets the class name of the current intput.
|
|
|
|
+ * @returns the class name
|
|
|
|
+ */
|
|
|
|
+ FollowCameraMouseWheelInput.prototype.getClassName = function () {
|
|
|
|
+ return "ArcRotateCameraMouseWheelInput";
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
|
|
+ * Get the friendly name associated with the input class.
|
|
|
|
+ * @returns the input friendly name
|
|
|
|
+ */
|
|
|
|
+ FollowCameraMouseWheelInput.prototype.getSimpleName = function () {
|
|
|
|
+ return "mousewheel";
|
|
|
|
+ };
|
|
|
|
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
|
|
+ ], FollowCameraMouseWheelInput.prototype, "axisControlRadius", void 0);
|
|
|
|
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
|
|
+ ], FollowCameraMouseWheelInput.prototype, "axisControlHeight", void 0);
|
|
|
|
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
|
|
+ ], FollowCameraMouseWheelInput.prototype, "axisControlRotation", void 0);
|
|
|
|
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
|
|
+ ], FollowCameraMouseWheelInput.prototype, "wheelPrecision", void 0);
|
|
|
|
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
|
|
+ ], FollowCameraMouseWheelInput.prototype, "wheelDeltaPercentage", void 0);
|
|
|
|
+ return FollowCameraMouseWheelInput;
|
|
|
|
+}());
|
|
|
|
+
|
|
|
|
+_Cameras_cameraInputsManager__WEBPACK_IMPORTED_MODULE_2__["CameraInputTypes"]["FollowCameraMouseWheelInput"] = FollowCameraMouseWheelInput;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
/***/ "./Cameras/Inputs/freeCameraDeviceOrientationInput.ts":
|
|
/***/ "./Cameras/Inputs/freeCameraDeviceOrientationInput.ts":
|
|
/*!************************************************************!*\
|
|
/*!************************************************************!*\
|
|
!*** ./Cameras/Inputs/freeCameraDeviceOrientationInput.ts ***!
|
|
!*** ./Cameras/Inputs/freeCameraDeviceOrientationInput.ts ***!
|
|
@@ -22283,7 +22443,7 @@ var FollowCamera = /** @class */ (function (_super) {
|
|
_this.maxCameraSpeed = 20;
|
|
_this.maxCameraSpeed = 20;
|
|
_this.lockedTarget = lockedTarget;
|
|
_this.lockedTarget = lockedTarget;
|
|
_this.inputs = new _followCameraInputsManager__WEBPACK_IMPORTED_MODULE_6__["FollowCameraInputsManager"](_this);
|
|
_this.inputs = new _followCameraInputsManager__WEBPACK_IMPORTED_MODULE_6__["FollowCameraInputsManager"](_this);
|
|
- _this.inputs.addKeyboard();
|
|
|
|
|
|
+ _this.inputs.addKeyboard().addMouseWheel();
|
|
return _this;
|
|
return _this;
|
|
// Uncomment the following line when the relevant handlers have been implemented.
|
|
// Uncomment the following line when the relevant handlers have been implemented.
|
|
// this.inputs.addKeyboard().addMouseWheel().addPointers().addVRDeviceOrientation();
|
|
// this.inputs.addKeyboard().addMouseWheel().addPointers().addVRDeviceOrientation();
|
|
@@ -22458,6 +22618,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
|
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
|
|
/* harmony import */ var _cameraInputsManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cameraInputsManager */ "./Cameras/cameraInputsManager.ts");
|
|
/* harmony import */ var _cameraInputsManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cameraInputsManager */ "./Cameras/cameraInputsManager.ts");
|
|
/* harmony import */ var _Inputs_followCameraKeyboardMoveInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Inputs/followCameraKeyboardMoveInput */ "./Cameras/Inputs/followCameraKeyboardMoveInput.ts");
|
|
/* harmony import */ var _Inputs_followCameraKeyboardMoveInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Inputs/followCameraKeyboardMoveInput */ "./Cameras/Inputs/followCameraKeyboardMoveInput.ts");
|
|
|
|
+/* harmony import */ var _Inputs_followCameraMouseWheelInput__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Inputs/followCameraMouseWheelInput */ "./Cameras/Inputs/followCameraMouseWheelInput.ts");
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -22488,7 +22650,7 @@ var FollowCameraInputsManager = /** @class */ (function (_super) {
|
|
* @returns the current input manager
|
|
* @returns the current input manager
|
|
*/
|
|
*/
|
|
FollowCameraInputsManager.prototype.addMouseWheel = function () {
|
|
FollowCameraInputsManager.prototype.addMouseWheel = function () {
|
|
- console.warn("MouseWheel support not yet implemented for FollowCamera.");
|
|
|
|
|
|
+ this.add(new _Inputs_followCameraMouseWheelInput__WEBPACK_IMPORTED_MODULE_3__["FollowCameraMouseWheelInput"]());
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
@@ -43547,7 +43709,7 @@ var HighlightLayer = /** @class */ (function (_super) {
|
|
if (!meshExcluded) {
|
|
if (!meshExcluded) {
|
|
this._excludedMeshes[mesh.uniqueId] = {
|
|
this._excludedMeshes[mesh.uniqueId] = {
|
|
mesh: mesh,
|
|
mesh: mesh,
|
|
- beforeRender: mesh.onBeforeRenderObservable.add(function (mesh) {
|
|
|
|
|
|
+ beforeBind: mesh.onBeforeBindObservable.add(function (mesh) {
|
|
mesh.getEngine().setStencilBuffer(false);
|
|
mesh.getEngine().setStencilBuffer(false);
|
|
}),
|
|
}),
|
|
afterRender: mesh.onAfterRenderObservable.add(function (mesh) {
|
|
afterRender: mesh.onAfterRenderObservable.add(function (mesh) {
|
|
@@ -43566,8 +43728,8 @@ var HighlightLayer = /** @class */ (function (_super) {
|
|
}
|
|
}
|
|
var meshExcluded = this._excludedMeshes[mesh.uniqueId];
|
|
var meshExcluded = this._excludedMeshes[mesh.uniqueId];
|
|
if (meshExcluded) {
|
|
if (meshExcluded) {
|
|
- if (meshExcluded.beforeRender) {
|
|
|
|
- mesh.onBeforeRenderObservable.remove(meshExcluded.beforeRender);
|
|
|
|
|
|
+ if (meshExcluded.beforeBind) {
|
|
|
|
+ mesh.onBeforeBindObservable.remove(meshExcluded.beforeBind);
|
|
}
|
|
}
|
|
if (meshExcluded.afterRender) {
|
|
if (meshExcluded.afterRender) {
|
|
mesh.onAfterRenderObservable.remove(meshExcluded.afterRender);
|
|
mesh.onAfterRenderObservable.remove(meshExcluded.afterRender);
|
|
@@ -43610,7 +43772,7 @@ var HighlightLayer = /** @class */ (function (_super) {
|
|
mesh: mesh,
|
|
mesh: mesh,
|
|
color: color,
|
|
color: color,
|
|
// Lambda required for capture due to Observable this context
|
|
// Lambda required for capture due to Observable this context
|
|
- observerHighlight: mesh.onBeforeRenderObservable.add(function (mesh) {
|
|
|
|
|
|
+ observerHighlight: mesh.onBeforeBindObservable.add(function (mesh) {
|
|
if (_this._excludedMeshes && _this._excludedMeshes[mesh.uniqueId]) {
|
|
if (_this._excludedMeshes && _this._excludedMeshes[mesh.uniqueId]) {
|
|
_this._defaultStencilReference(mesh);
|
|
_this._defaultStencilReference(mesh);
|
|
}
|
|
}
|
|
@@ -43638,7 +43800,7 @@ var HighlightLayer = /** @class */ (function (_super) {
|
|
var meshHighlight = this._meshes[mesh.uniqueId];
|
|
var meshHighlight = this._meshes[mesh.uniqueId];
|
|
if (meshHighlight) {
|
|
if (meshHighlight) {
|
|
if (meshHighlight.observerHighlight) {
|
|
if (meshHighlight.observerHighlight) {
|
|
- mesh.onBeforeRenderObservable.remove(meshHighlight.observerHighlight);
|
|
|
|
|
|
+ mesh.onBeforeBindObservable.remove(meshHighlight.observerHighlight);
|
|
}
|
|
}
|
|
if (meshHighlight.observerDefault) {
|
|
if (meshHighlight.observerDefault) {
|
|
mesh.onAfterRenderObservable.remove(meshHighlight.observerDefault);
|
|
mesh.onAfterRenderObservable.remove(meshHighlight.observerDefault);
|
|
@@ -43679,7 +43841,7 @@ var HighlightLayer = /** @class */ (function (_super) {
|
|
var meshHighlight = this._meshes[id];
|
|
var meshHighlight = this._meshes[id];
|
|
if (meshHighlight && meshHighlight.mesh) {
|
|
if (meshHighlight && meshHighlight.mesh) {
|
|
if (meshHighlight.observerHighlight) {
|
|
if (meshHighlight.observerHighlight) {
|
|
- meshHighlight.mesh.onBeforeRenderObservable.remove(meshHighlight.observerHighlight);
|
|
|
|
|
|
+ meshHighlight.mesh.onBeforeBindObservable.remove(meshHighlight.observerHighlight);
|
|
}
|
|
}
|
|
if (meshHighlight.observerDefault) {
|
|
if (meshHighlight.observerDefault) {
|
|
meshHighlight.mesh.onAfterRenderObservable.remove(meshHighlight.observerDefault);
|
|
meshHighlight.mesh.onAfterRenderObservable.remove(meshHighlight.observerDefault);
|
|
@@ -43692,8 +43854,8 @@ var HighlightLayer = /** @class */ (function (_super) {
|
|
for (var id in this._excludedMeshes) {
|
|
for (var id in this._excludedMeshes) {
|
|
var meshHighlight = this._excludedMeshes[id];
|
|
var meshHighlight = this._excludedMeshes[id];
|
|
if (meshHighlight) {
|
|
if (meshHighlight) {
|
|
- if (meshHighlight.beforeRender) {
|
|
|
|
- meshHighlight.mesh.onBeforeRenderObservable.remove(meshHighlight.beforeRender);
|
|
|
|
|
|
+ if (meshHighlight.beforeBind) {
|
|
|
|
+ meshHighlight.mesh.onBeforeBindObservable.remove(meshHighlight.beforeBind);
|
|
}
|
|
}
|
|
if (meshHighlight.afterRender) {
|
|
if (meshHighlight.afterRender) {
|
|
meshHighlight.mesh.onAfterRenderObservable.remove(meshHighlight.afterRender);
|
|
meshHighlight.mesh.onAfterRenderObservable.remove(meshHighlight.afterRender);
|
|
@@ -84073,6 +84235,19 @@ var Mesh = /** @class */ (function (_super) {
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(Mesh.prototype, "onBeforeBindObservable", {
|
|
|
|
+ /**
|
|
|
|
+ * An event triggered before binding the mesh
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ if (!this._onBeforeBindObservable) {
|
|
|
|
+ this._onBeforeBindObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
|
|
|
|
+ }
|
|
|
|
+ return this._onBeforeBindObservable;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
Object.defineProperty(Mesh.prototype, "onAfterRenderObservable", {
|
|
Object.defineProperty(Mesh.prototype, "onAfterRenderObservable", {
|
|
/**
|
|
/**
|
|
* An event triggered after rendering the mesh
|
|
* An event triggered after rendering the mesh
|
|
@@ -85199,6 +85374,9 @@ var Mesh = /** @class */ (function (_super) {
|
|
}
|
|
}
|
|
// Bind
|
|
// Bind
|
|
var fillMode = scene.forcePointsCloud ? _Materials_material__WEBPACK_IMPORTED_MODULE_13__["Material"].PointFillMode : (scene.forceWireframe ? _Materials_material__WEBPACK_IMPORTED_MODULE_13__["Material"].WireFrameFillMode : this._effectiveMaterial.fillMode);
|
|
var fillMode = scene.forcePointsCloud ? _Materials_material__WEBPACK_IMPORTED_MODULE_13__["Material"].PointFillMode : (scene.forceWireframe ? _Materials_material__WEBPACK_IMPORTED_MODULE_13__["Material"].WireFrameFillMode : this._effectiveMaterial.fillMode);
|
|
|
|
+ if (this._onBeforeBindObservable) {
|
|
|
|
+ this._onBeforeBindObservable.notifyObservers(this);
|
|
|
|
+ }
|
|
if (!hardwareInstancedRendering) { // Binding will be done later because we need to add more info to the VB
|
|
if (!hardwareInstancedRendering) { // Binding will be done later because we need to add more info to the VB
|
|
this._bind(subMesh, effect, fillMode);
|
|
this._bind(subMesh, effect, fillMode);
|
|
}
|
|
}
|
|
@@ -85586,6 +85764,9 @@ var Mesh = /** @class */ (function (_super) {
|
|
if (this._onBeforeDrawObservable) {
|
|
if (this._onBeforeDrawObservable) {
|
|
this._onBeforeDrawObservable.clear();
|
|
this._onBeforeDrawObservable.clear();
|
|
}
|
|
}
|
|
|
|
+ if (this._onBeforeBindObservable) {
|
|
|
|
+ this._onBeforeBindObservable.clear();
|
|
|
|
+ }
|
|
if (this._onBeforeRenderObservable) {
|
|
if (this._onBeforeRenderObservable) {
|
|
this._onBeforeRenderObservable.clear();
|
|
this._onBeforeRenderObservable.clear();
|
|
}
|
|
}
|
|
@@ -111676,7 +111857,7 @@ var SolidParticleSystem = /** @class */ (function () {
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
// custom beforeUpdate
|
|
// custom beforeUpdate
|
|
- this.beforeUpdateParticles();
|
|
|
|
|
|
+ this.beforeUpdateParticles(start, end, update);
|
|
var rotMatrix = _Maths_math__WEBPACK_IMPORTED_MODULE_0__["Tmp"].Matrix[0];
|
|
var rotMatrix = _Maths_math__WEBPACK_IMPORTED_MODULE_0__["Tmp"].Matrix[0];
|
|
var invertedMatrix = _Maths_math__WEBPACK_IMPORTED_MODULE_0__["Tmp"].Matrix[1];
|
|
var invertedMatrix = _Maths_math__WEBPACK_IMPORTED_MODULE_0__["Tmp"].Matrix[1];
|
|
var mesh = this.mesh;
|
|
var mesh = this.mesh;
|
|
@@ -111838,7 +112019,7 @@ var SolidParticleSystem = /** @class */ (function () {
|
|
var tmpVertex = tempVectors[0];
|
|
var tmpVertex = tempVectors[0];
|
|
tmpVertex.copyFrom(shape[pt]);
|
|
tmpVertex.copyFrom(shape[pt]);
|
|
if (this._computeParticleVertex) {
|
|
if (this._computeParticleVertex) {
|
|
- this.updateParticleVertex(tmpVertex);
|
|
|
|
|
|
+ this.updateParticleVertex(particle, tmpVertex, pt);
|
|
}
|
|
}
|
|
// positions
|
|
// positions
|
|
var vertexX = tmpVertex.x * particleScaling.x - scaledPivot.x;
|
|
var vertexX = tmpVertex.x * particleScaling.x - scaledPivot.x;
|
|
@@ -111995,7 +112176,7 @@ var SolidParticleSystem = /** @class */ (function () {
|
|
mesh._boundingInfo = new _Culling_boundingInfo__WEBPACK_IMPORTED_MODULE_7__["BoundingInfo"](minimum, maximum, mesh._worldMatrix);
|
|
mesh._boundingInfo = new _Culling_boundingInfo__WEBPACK_IMPORTED_MODULE_7__["BoundingInfo"](minimum, maximum, mesh._worldMatrix);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.afterUpdateParticles();
|
|
|
|
|
|
+ this.afterUpdateParticles(start, end, update);
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
@@ -112230,7 +112411,7 @@ var SolidParticleSystem = /** @class */ (function () {
|
|
* @example : just set a vertex particle position
|
|
* @example : just set a vertex particle position
|
|
* @returns the updated vertex
|
|
* @returns the updated vertex
|
|
*/
|
|
*/
|
|
- SolidParticleSystem.prototype.updateParticleVertex = function (vertex) {
|
|
|
|
|
|
+ SolidParticleSystem.prototype.updateParticleVertex = function (particle, vertex, pt) {
|
|
return vertex;
|
|
return vertex;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
@@ -112240,7 +112421,7 @@ var SolidParticleSystem = /** @class */ (function () {
|
|
* @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
|
|
* @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
|
|
* @param update the boolean update value actually passed to setParticles()
|
|
* @param update the boolean update value actually passed to setParticles()
|
|
*/
|
|
*/
|
|
- SolidParticleSystem.prototype.beforeUpdateParticles = function () {
|
|
|
|
|
|
+ SolidParticleSystem.prototype.beforeUpdateParticles = function (start, stop, update) {
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* This will be called by `setParticles()` after all the other treatments and just before the actual mesh update.
|
|
* This will be called by `setParticles()` after all the other treatments and just before the actual mesh update.
|
|
@@ -112250,7 +112431,7 @@ var SolidParticleSystem = /** @class */ (function () {
|
|
* @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
|
|
* @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
|
|
* @param update the boolean update value actually passed to setParticles()
|
|
* @param update the boolean update value actually passed to setParticles()
|
|
*/
|
|
*/
|
|
- SolidParticleSystem.prototype.afterUpdateParticles = function () {
|
|
|
|
|
|
+ SolidParticleSystem.prototype.afterUpdateParticles = function (start, stop, update) {
|
|
};
|
|
};
|
|
return SolidParticleSystem;
|
|
return SolidParticleSystem;
|
|
}());
|
|
}());
|
|
@@ -126636,7 +126817,7 @@ var UtilityLayerRenderer = /** @class */ (function () {
|
|
};
|
|
};
|
|
UtilityLayerRenderer.prototype._updateCamera = function () {
|
|
UtilityLayerRenderer.prototype._updateCamera = function () {
|
|
if (this.originalScene.activeCameras.length > 1) {
|
|
if (this.originalScene.activeCameras.length > 1) {
|
|
- this.utilityLayerScene.activeCamera = this.originalScene.activeCameras[0];
|
|
|
|
|
|
+ this.utilityLayerScene.activeCamera = this.originalScene.activeCameras[this.originalScene.activeCameras.length - 1];
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
this.utilityLayerScene.activeCamera = this.originalScene.activeCamera;
|
|
this.utilityLayerScene.activeCamera = this.originalScene.activeCamera;
|