@onerjs/core 8.49.4 → 8.49.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cameras/geospatialCameraMovement.js +19 -19
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +14 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FlowGraph/flowGraph.js +6 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.d.ts +10 -0
- package/FlowGraph/flowGraphEventBlock.js +24 -0
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/FlowGraph/flowGraphParser.js +23 -4
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/serialization.js +36 -14
- package/FlowGraph/serialization.js.map +1 -1
- package/Meshes/transformNode.d.ts +1 -0
- package/Meshes/transformNode.js +26 -26
- package/Meshes/transformNode.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +8 -1
- package/Particles/gpuParticleSystem.js +25 -8
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/webgl2ParticleSystem.js +2 -2
- package/Particles/webgl2ParticleSystem.js.map +1 -1
- package/Physics/v2/characterController.js +1 -1
- package/Physics/v2/characterController.js.map +1 -1
- package/Shaders/gpuRenderParticles.vertex.js +14 -2
- package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
- package/package.json +1 -1
package/Meshes/transformNode.js
CHANGED
|
@@ -83,22 +83,22 @@ export class TransformNode extends Node {
|
|
|
83
83
|
this._absoluteRotationQuaternion = Quaternion.Identity();
|
|
84
84
|
this._pivotMatrix = Matrix.Identity();
|
|
85
85
|
/** @internal */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
86
|
+
this._eulerCacheRotation = new Vector3(0, 0, 0, (res, vector) => {
|
|
87
|
+
if (this._rotationQuaternion) {
|
|
88
|
+
if ("x" in res) {
|
|
89
|
+
vector._x = res.x;
|
|
90
|
+
}
|
|
91
|
+
if ("y" in res) {
|
|
92
|
+
vector._y = res.y;
|
|
93
|
+
}
|
|
94
|
+
if ("z" in res) {
|
|
95
|
+
vector._z = res.z;
|
|
96
|
+
}
|
|
97
|
+
Quaternion.FromEulerVectorToRef(vector, this._rotationQuaternion);
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
return false;
|
|
101
|
+
});
|
|
102
102
|
/** @internal */
|
|
103
103
|
this._postMultiplyPivotMatrix = false;
|
|
104
104
|
this._isWorldMatrixFrozen = false;
|
|
@@ -149,15 +149,15 @@ export class TransformNode extends Node {
|
|
|
149
149
|
*/
|
|
150
150
|
get rotation() {
|
|
151
151
|
if (this._rotationQuaternion) {
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
this._rotationQuaternion.toEulerAnglesToRef(this._eulerCacheRotation);
|
|
153
|
+
return this._eulerCacheRotation;
|
|
154
154
|
}
|
|
155
155
|
return this._rotation;
|
|
156
156
|
}
|
|
157
157
|
set rotation(newRotation) {
|
|
158
158
|
if (this._rotationQuaternion) {
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Quaternion.FromEulerVectorToRef(newRotation, this._rotationQuaternion);
|
|
160
|
+
this._eulerCacheRotation.copyFrom(newRotation);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
this._rotation = newRotation;
|
|
@@ -186,8 +186,8 @@ export class TransformNode extends Node {
|
|
|
186
186
|
//reset the rotation vector.
|
|
187
187
|
if (quaternion) {
|
|
188
188
|
this._rotation.setAll(0.0);
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
quaternion.toEulerAnglesToRef(this._eulerCacheRotation);
|
|
190
|
+
this._eulerCacheRotation._isDirty = false;
|
|
191
191
|
}
|
|
192
192
|
this._markAsDirtyInternal();
|
|
193
193
|
}
|
|
@@ -950,9 +950,9 @@ export class TransformNode extends Node {
|
|
|
950
950
|
if (this._infiniteDistance) {
|
|
951
951
|
if (!this.parent && camera) {
|
|
952
952
|
const cameraWorldMatrix = camera.getWorldMatrix();
|
|
953
|
-
const
|
|
953
|
+
const m = cameraWorldMatrix.m;
|
|
954
954
|
translation = TransformNode._TmpTranslation;
|
|
955
|
-
translation.copyFromFloats(this._position.x +
|
|
955
|
+
translation.copyFromFloats(this._position.x + m[12], this._position.y + m[13], this._position.z + m[14]);
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
// Scaling
|
|
@@ -971,8 +971,8 @@ export class TransformNode extends Node {
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
if (isDirty) {
|
|
974
|
-
|
|
975
|
-
|
|
974
|
+
this._rotationQuaternion.toEulerAnglesToRef(this._eulerCacheRotation);
|
|
975
|
+
this._eulerCacheRotation._isDirty = false;
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
else {
|