@babylonjs/core 6.14.0 → 6.14.2
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/Debug/physicsViewer.js +4 -0
- package/Debug/physicsViewer.js.map +1 -1
- package/Engines/Processors/shaderProcessor.d.ts +2 -1
- package/Engines/Processors/shaderProcessor.js +1 -0
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/engine.d.ts +1 -0
- package/Engines/engine.js +12 -0
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.js +12 -11
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +1 -0
- package/Engines/thinEngine.js +24 -6
- package/Engines/thinEngine.js.map +1 -1
- package/Inputs/scene.inputManager.js +4 -4
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +3 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/effectRenderer.d.ts +2 -0
- package/Materials/effectRenderer.js +4 -2
- package/Materials/effectRenderer.js.map +1 -1
- package/Materials/materialPluginBase.d.ts +7 -2
- package/Materials/materialPluginBase.js +11 -2
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/materialPluginEvent.d.ts +1 -0
- package/Materials/materialPluginEvent.js.map +1 -1
- package/Materials/materialPluginManager.d.ts +1 -1
- package/Materials/materialPluginManager.js +34 -6
- package/Materials/materialPluginManager.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.js +6 -6
- package/Materials/meshDebugPluginMaterial.js.map +1 -1
- package/Materials/standardMaterial.js +3 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.color.d.ts +3 -3
- package/Maths/math.color.js +3 -3
- package/Maths/math.color.js.map +1 -1
- package/Misc/customAnimationFrameRequester.d.ts +4 -0
- package/Misc/customAnimationFrameRequester.js.map +1 -1
- package/package.json +1 -1
package/Engines/thinEngine.d.ts
CHANGED
|
@@ -614,6 +614,7 @@ export declare class ThinEngine {
|
|
|
614
614
|
* @param renderFunction defines the function to be removed. If not provided all functions will be removed.
|
|
615
615
|
*/
|
|
616
616
|
stopRenderLoop(renderFunction?: () => void): void;
|
|
617
|
+
protected _cancelFrame(): void;
|
|
617
618
|
/** @internal */
|
|
618
619
|
_renderLoop(): void;
|
|
619
620
|
/**
|
package/Engines/thinEngine.js
CHANGED
|
@@ -34,13 +34,13 @@ export class ThinEngine {
|
|
|
34
34
|
*/
|
|
35
35
|
// Not mixed with Version for tooling purpose.
|
|
36
36
|
static get NpmPackage() {
|
|
37
|
-
return "babylonjs@6.14.
|
|
37
|
+
return "babylonjs@6.14.2";
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Returns the current version of the framework
|
|
41
41
|
*/
|
|
42
42
|
static get Version() {
|
|
43
|
-
return "6.14.
|
|
43
|
+
return "6.14.2";
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Returns a string describing the current engine
|
|
@@ -1092,11 +1092,32 @@ export class ThinEngine {
|
|
|
1092
1092
|
stopRenderLoop(renderFunction) {
|
|
1093
1093
|
if (!renderFunction) {
|
|
1094
1094
|
this._activeRenderLoops.length = 0;
|
|
1095
|
+
this._cancelFrame();
|
|
1095
1096
|
return;
|
|
1096
1097
|
}
|
|
1097
1098
|
const index = this._activeRenderLoops.indexOf(renderFunction);
|
|
1098
1099
|
if (index >= 0) {
|
|
1099
1100
|
this._activeRenderLoops.splice(index, 1);
|
|
1101
|
+
if (this._activeRenderLoops.length == 0) {
|
|
1102
|
+
this._cancelFrame();
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
_cancelFrame() {
|
|
1107
|
+
if (this._renderingQueueLaunched && this._frameHandler) {
|
|
1108
|
+
this._renderingQueueLaunched = false;
|
|
1109
|
+
if (!IsWindowObjectExist()) {
|
|
1110
|
+
if (typeof cancelAnimationFrame === "function") {
|
|
1111
|
+
return cancelAnimationFrame(this._frameHandler);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
else {
|
|
1115
|
+
const { cancelAnimationFrame } = this.getHostWindow() || window;
|
|
1116
|
+
if (typeof cancelAnimationFrame === "function") {
|
|
1117
|
+
return cancelAnimationFrame(this._frameHandler);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
return clearTimeout(this._frameHandler);
|
|
1100
1121
|
}
|
|
1101
1122
|
}
|
|
1102
1123
|
/** @internal */
|
|
@@ -4712,10 +4733,7 @@ export class ThinEngine {
|
|
|
4712
4733
|
}
|
|
4713
4734
|
}
|
|
4714
4735
|
else {
|
|
4715
|
-
const {
|
|
4716
|
-
if (typeof requestPostAnimationFrame === "function") {
|
|
4717
|
-
return requestPostAnimationFrame(func);
|
|
4718
|
-
}
|
|
4736
|
+
const { requestAnimationFrame } = requester || window;
|
|
4719
4737
|
if (typeof requestAnimationFrame === "function") {
|
|
4720
4738
|
return requestAnimationFrame(func);
|
|
4721
4739
|
}
|