David `Deltakosh` Catuhe 4 vuotta sitten
vanhempi
commit
f8d20f6b1e

+ 2 - 1
dist/preview release/babylon.d.ts

@@ -51441,7 +51441,8 @@ declare module BABYLON.Debug {
         private _getLinesForBonesNoLength;
         /** function to revert the mesh and scene back to the initial state. */
         private _revert;
-        private getAbsoluteRestPose;
+        /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+        private _getAbsoluteBindPoseToRef;
         /** function to build and bind sphere joint points and spur bone representations. */
         private _buildSpheresAndSpurs;
         private _buildLocalAxes;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.js


+ 24 - 11
dist/preview release/babylon.max.js

@@ -30134,12 +30134,13 @@ var SkeletonViewer = /** @class */ (function () {
             this.scene.animationsEnabled = animationState;
         }
     };
-    SkeletonViewer.prototype.getAbsoluteRestPose = function (bone, matrix) {
+    /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+    SkeletonViewer.prototype._getAbsoluteBindPoseToRef = function (bone, matrix) {
         if (bone === null || bone._index === -1) {
             matrix.copyFrom(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"].Identity());
             return;
         }
-        this.getAbsoluteRestPose(bone.getParent(), matrix);
+        this._getAbsoluteBindPoseToRef(bone.getParent(), matrix);
         bone.getBindPose().multiplyToRef(matrix, matrix);
         return;
     };
@@ -30175,15 +30176,15 @@ var SkeletonViewer = /** @class */ (function () {
                 if (bone._index === -1 || (!this_1._boneIndices.has(bone.getIndex()) && !this_1.options.useAllBones)) {
                     return "continue";
                 }
-                var boneAbsoluteRestTransform = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"]();
-                this_1.getAbsoluteRestPose(bone, boneAbsoluteRestTransform);
+                var boneAbsoluteBindPoseTransform = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"]();
+                this_1._getAbsoluteBindPoseToRef(bone, boneAbsoluteBindPoseTransform);
                 var anchorPoint = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"]();
-                boneAbsoluteRestTransform.decompose(undefined, undefined, anchorPoint);
+                boneAbsoluteBindPoseTransform.decompose(undefined, undefined, anchorPoint);
                 bone.children.forEach(function (bc, i) {
-                    var childAbsoluteRestTransform = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"]();
-                    bc.getRestPose().multiplyToRef(boneAbsoluteRestTransform, childAbsoluteRestTransform);
+                    var childAbsoluteBindPoseTransform = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"]();
+                    bc.getBindPose().multiplyToRef(boneAbsoluteBindPoseTransform, childAbsoluteBindPoseTransform);
                     var childPoint = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"]();
-                    childAbsoluteRestTransform.decompose(undefined, undefined, childPoint);
+                    childAbsoluteBindPoseTransform.decompose(undefined, undefined, childPoint);
                     var distanceFromParent = _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"].Distance(anchorPoint, childPoint);
                     if (distanceFromParent > longestBoneLength_1) {
                         longestBoneLength_1 = distanceFromParent;
@@ -30309,10 +30310,10 @@ var SkeletonViewer = /** @class */ (function () {
             if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {
                 continue;
             }
-            var boneAbsoluteRestTransform = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"]();
+            var boneAbsoluteBindPoseTransform = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Matrix"]();
             var boneOrigin = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"]();
-            this.getAbsoluteRestPose(bone, boneAbsoluteRestTransform);
-            boneAbsoluteRestTransform.decompose(undefined, undefined, boneOrigin);
+            this._getAbsoluteBindPoseToRef(bone, boneAbsoluteBindPoseTransform);
+            boneAbsoluteBindPoseTransform.decompose(undefined, undefined, boneOrigin);
             var m = bone.getBindPose().getRotationMatrix();
             var boneAxisX = _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"].TransformCoordinates(new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"](0 + size, 0, 0), m);
             var boneAxisY = _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"].TransformCoordinates(new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__["Vector3"](0, 0 + size, 0), m);
@@ -37473,6 +37474,18 @@ var NativeEngine = /** @class */ (function (_super) {
             maxMSAASamples: 1
         };
         _Misc_tools__WEBPACK_IMPORTED_MODULE_5__["Tools"].Log("Babylon Native (v" + _Engines_engine__WEBPACK_IMPORTED_MODULE_1__["Engine"].Version + ") launched");
+        _Misc_tools__WEBPACK_IMPORTED_MODULE_5__["Tools"].LoadScript = function (scriptUrl, onSuccess, onError, scriptId) {
+            _Misc_tools__WEBPACK_IMPORTED_MODULE_5__["Tools"].LoadFile(scriptUrl, function (data) {
+                Function(data).apply(null);
+                if (onSuccess) {
+                    onSuccess();
+                }
+            }, undefined, undefined, false, function (request, exception) {
+                if (onError) {
+                    onError("LoadScript Error", exception);
+                }
+            });
+        };
         // Wrappers
         if (typeof URL === "undefined") {
             window.URL = {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 4 - 2
dist/preview release/babylon.module.d.ts

@@ -53500,7 +53500,8 @@ declare module "babylonjs/Debug/skeletonViewer" {
         private _getLinesForBonesNoLength;
         /** function to revert the mesh and scene back to the initial state. */
         private _revert;
-        private getAbsoluteRestPose;
+        /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+        private _getAbsoluteBindPoseToRef;
         /** function to build and bind sphere joint points and spur bone representations. */
         private _buildSpheresAndSpurs;
         private _buildLocalAxes;
@@ -131727,7 +131728,8 @@ declare module BABYLON.Debug {
         private _getLinesForBonesNoLength;
         /** function to revert the mesh and scene back to the initial state. */
         private _revert;
-        private getAbsoluteRestPose;
+        /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+        private _getAbsoluteBindPoseToRef;
         /** function to build and bind sphere joint points and spur bone representations. */
         private _buildSpheresAndSpurs;
         private _buildLocalAxes;

+ 2 - 1
dist/preview release/documentation.d.ts

@@ -51441,7 +51441,8 @@ declare module BABYLON.Debug {
         private _getLinesForBonesNoLength;
         /** function to revert the mesh and scene back to the initial state. */
         private _revert;
-        private getAbsoluteRestPose;
+        /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+        private _getAbsoluteBindPoseToRef;
         /** function to build and bind sphere joint points and spur bone representations. */
         private _buildSpheresAndSpurs;
         private _buildLocalAxes;

+ 4 - 2
dist/preview release/viewer/babylon.module.d.ts

@@ -53500,7 +53500,8 @@ declare module "babylonjs/Debug/skeletonViewer" {
         private _getLinesForBonesNoLength;
         /** function to revert the mesh and scene back to the initial state. */
         private _revert;
-        private getAbsoluteRestPose;
+        /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+        private _getAbsoluteBindPoseToRef;
         /** function to build and bind sphere joint points and spur bone representations. */
         private _buildSpheresAndSpurs;
         private _buildLocalAxes;
@@ -131727,7 +131728,8 @@ declare module BABYLON.Debug {
         private _getLinesForBonesNoLength;
         /** function to revert the mesh and scene back to the initial state. */
         private _revert;
-        private getAbsoluteRestPose;
+        /** function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy. */
+        private _getAbsoluteBindPoseToRef;
         /** function to build and bind sphere joint points and spur bone representations. */
         private _buildSpheresAndSpurs;
         private _buildLocalAxes;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
dist/preview release/viewer/babylon.viewer.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js