@babylonjs/core 5.48.0 → 5.48.1
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/Bones/skeleton.js +1 -1
- package/Bones/skeleton.js.map +1 -1
- package/Debug/physicsViewer.js +4 -0
- package/Debug/physicsViewer.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +0 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/engine.d.ts +3 -1
- package/Engines/engine.js +14 -5
- package/Engines/engine.js.map +1 -1
- package/Engines/engineStore.d.ts +6 -0
- package/Engines/engineStore.js +6 -0
- package/Engines/engineStore.js.map +1 -1
- package/Engines/nativeEngine.d.ts +3 -2
- package/Engines/nativeEngine.js +9 -5
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +4 -3
- package/Engines/thinEngine.js +11 -13
- package/Engines/thinEngine.js.map +1 -1
- package/Helpers/environmentHelper.d.ts +1 -0
- package/Helpers/environmentHelper.js +6 -5
- package/Helpers/environmentHelper.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +1 -0
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +1 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.js +8 -8
- package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
- package/Materials/Textures/thinTexture.d.ts +4 -2
- package/Materials/Textures/thinTexture.js +5 -2
- package/Materials/Textures/thinTexture.js.map +1 -1
- package/Materials/material.js +5 -0
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.js +1 -1
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/materialPluginBase.js +3 -0
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/pushMaterial.d.ts +2 -1
- package/Materials/pushMaterial.js +4 -0
- package/Materials/pushMaterial.js.map +1 -1
- package/Maths/math.color.d.ts +20 -12
- package/Maths/math.color.js +85 -31
- package/Maths/math.color.js.map +1 -1
- package/Misc/decorators.js +2 -2
- package/Misc/decorators.js.map +1 -1
- package/Misc/fileTools.js +3 -0
- package/Misc/fileTools.js.map +1 -1
- package/Misc/khronosTextureContainer2.d.ts +3 -3
- package/Misc/khronosTextureContainer2.js +4 -3
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/observable.d.ts +18 -1
- package/Misc/observable.js +28 -2
- package/Misc/observable.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +3 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/physicsAggregate.js +1 -1
- package/Physics/v2/physicsAggregate.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +12 -0
- package/Physics/v2/physicsBody.js +19 -0
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/physicsShape.d.ts +24 -4
- package/Physics/v2/physicsShape.js +24 -13
- package/Physics/v2/physicsShape.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +1 -1
- package/scene.js +47 -46
- package/scene.js.map +1 -1
package/Engines/thinEngine.d.ts
CHANGED
|
@@ -189,6 +189,8 @@ export declare class ThinEngine {
|
|
|
189
189
|
* Returns the version of the engine
|
|
190
190
|
*/
|
|
191
191
|
get version(): number;
|
|
192
|
+
private _isDisposed;
|
|
193
|
+
get isDisposed(): boolean;
|
|
192
194
|
/**
|
|
193
195
|
* Gets or sets the epsilon value used by collision engine
|
|
194
196
|
*/
|
|
@@ -417,7 +419,7 @@ export declare class ThinEngine {
|
|
|
417
419
|
*/
|
|
418
420
|
adaptToDeviceRatio: boolean;
|
|
419
421
|
/** @internal */
|
|
420
|
-
|
|
422
|
+
protected _lastDevicePixelRatio: number;
|
|
421
423
|
/** @internal */
|
|
422
424
|
_transformTextureUrl: Nullable<(url: string) => string>;
|
|
423
425
|
/**
|
|
@@ -487,11 +489,10 @@ export declare class ThinEngine {
|
|
|
487
489
|
*/
|
|
488
490
|
get snapshotRenderingMode(): number;
|
|
489
491
|
set snapshotRenderingMode(mode: number);
|
|
490
|
-
protected _useExactSrgbConversions: boolean;
|
|
491
492
|
/**
|
|
492
493
|
* Gets a boolean indicating if the exact sRGB conversions or faster approximations are used for converting to and from linear space.
|
|
493
494
|
*/
|
|
494
|
-
|
|
495
|
+
readonly useExactSrgbConversions: boolean;
|
|
495
496
|
/**
|
|
496
497
|
* Creates a new snapshot at the next frame using the current snapshotRenderingMode
|
|
497
498
|
*/
|
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@5.48.
|
|
37
|
+
return "babylonjs@5.48.1";
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Returns the current version of the framework
|
|
41
41
|
*/
|
|
42
42
|
static get Version() {
|
|
43
|
-
return "5.48.
|
|
43
|
+
return "5.48.1";
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Returns a string describing the current engine
|
|
@@ -67,6 +67,9 @@ export class ThinEngine {
|
|
|
67
67
|
get version() {
|
|
68
68
|
return this._webGLVersion;
|
|
69
69
|
}
|
|
70
|
+
get isDisposed() {
|
|
71
|
+
return this._isDisposed;
|
|
72
|
+
}
|
|
70
73
|
/**
|
|
71
74
|
* Gets or sets the relative url used to load shaders if using the engine in non-minified mode
|
|
72
75
|
*/
|
|
@@ -235,12 +238,6 @@ export class ThinEngine {
|
|
|
235
238
|
set snapshotRenderingMode(mode) {
|
|
236
239
|
this._snapshotRenderingMode = mode;
|
|
237
240
|
}
|
|
238
|
-
/**
|
|
239
|
-
* Gets a boolean indicating if the exact sRGB conversions or faster approximations are used for converting to and from linear space.
|
|
240
|
-
*/
|
|
241
|
-
get useExactSrgbConversions() {
|
|
242
|
-
return this._useExactSrgbConversions;
|
|
243
|
-
}
|
|
244
241
|
/**
|
|
245
242
|
* Creates a new snapshot at the next frame using the current snapshotRenderingMode
|
|
246
243
|
*/
|
|
@@ -283,6 +280,7 @@ export class ThinEngine {
|
|
|
283
280
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
284
281
|
/** @internal */
|
|
285
282
|
this._name = "WebGL";
|
|
283
|
+
this._isDisposed = false;
|
|
286
284
|
/**
|
|
287
285
|
* Gets or sets a boolean that indicates if textures must be forced to power of 2 size even if not required
|
|
288
286
|
*/
|
|
@@ -423,7 +421,6 @@ export class ThinEngine {
|
|
|
423
421
|
/** @internal */
|
|
424
422
|
this._isWebGPU = false;
|
|
425
423
|
this._snapshotRenderingMode = 0;
|
|
426
|
-
this._useExactSrgbConversions = false;
|
|
427
424
|
this._viewportCached = { x: 0, y: 0, z: 0, w: 0 };
|
|
428
425
|
this._unpackFlipYCached = null;
|
|
429
426
|
/**
|
|
@@ -450,7 +447,7 @@ export class ThinEngine {
|
|
|
450
447
|
this._audioContext = (_g = (_f = options.audioEngineOptions) === null || _f === void 0 ? void 0 : _f.audioContext) !== null && _g !== void 0 ? _g : null;
|
|
451
448
|
this._audioDestination = (_j = (_h = options.audioEngineOptions) === null || _h === void 0 ? void 0 : _h.audioDestination) !== null && _j !== void 0 ? _j : null;
|
|
452
449
|
this.premultipliedAlpha = (_k = options.premultipliedAlpha) !== null && _k !== void 0 ? _k : true;
|
|
453
|
-
this.
|
|
450
|
+
this.useExactSrgbConversions = (_l = options.useExactSrgbConversions) !== null && _l !== void 0 ? _l : false;
|
|
454
451
|
this._doNotHandleContextLost = !!options.doNotHandleContextLost;
|
|
455
452
|
this._isStencilEnable = options.stencil ? true : false;
|
|
456
453
|
// Viewport
|
|
@@ -1079,7 +1076,7 @@ export class ThinEngine {
|
|
|
1079
1076
|
*/
|
|
1080
1077
|
stopRenderLoop(renderFunction) {
|
|
1081
1078
|
if (!renderFunction) {
|
|
1082
|
-
this._activeRenderLoops =
|
|
1079
|
+
this._activeRenderLoops.length = 0;
|
|
1083
1080
|
return;
|
|
1084
1081
|
}
|
|
1085
1082
|
const index = this._activeRenderLoops.indexOf(renderFunction);
|
|
@@ -1091,7 +1088,7 @@ export class ThinEngine {
|
|
|
1091
1088
|
_renderLoop() {
|
|
1092
1089
|
if (!this._contextWasLost) {
|
|
1093
1090
|
let shouldRender = true;
|
|
1094
|
-
if (!this.renderEvenInBackground && this._windowIsBackground) {
|
|
1091
|
+
if (this._isDisposed || (!this.renderEvenInBackground && this._windowIsBackground)) {
|
|
1095
1092
|
shouldRender = false;
|
|
1096
1093
|
}
|
|
1097
1094
|
if (shouldRender) {
|
|
@@ -3438,7 +3435,7 @@ export class ThinEngine {
|
|
|
3438
3435
|
*/
|
|
3439
3436
|
updateTextureSamplingMode(samplingMode, texture, generateMipMaps = false) {
|
|
3440
3437
|
const target = this._getTextureTarget(texture);
|
|
3441
|
-
const filters = this._getSamplingParameters(samplingMode, texture.
|
|
3438
|
+
const filters = this._getSamplingParameters(samplingMode, texture.useMipMaps || generateMipMaps);
|
|
3442
3439
|
this._setTextureParameterInteger(target, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);
|
|
3443
3440
|
this._setTextureParameterInteger(target, this._gl.TEXTURE_MIN_FILTER, filters.min);
|
|
3444
3441
|
if (generateMipMaps) {
|
|
@@ -4079,6 +4076,7 @@ export class ThinEngine {
|
|
|
4079
4076
|
*/
|
|
4080
4077
|
dispose() {
|
|
4081
4078
|
var _a;
|
|
4079
|
+
this._isDisposed = true;
|
|
4082
4080
|
this.stopRenderLoop();
|
|
4083
4081
|
// Clear observables
|
|
4084
4082
|
if (this.onBeforeTextureInitObservable) {
|