@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/engine.js
CHANGED
|
@@ -839,7 +839,7 @@ export class Engine extends ThinEngine {
|
|
|
839
839
|
_renderLoop() {
|
|
840
840
|
if (!this._contextWasLost) {
|
|
841
841
|
let shouldRender = true;
|
|
842
|
-
if (!this.renderEvenInBackground && this._windowIsBackground) {
|
|
842
|
+
if (this.isDisposed || (!this.renderEvenInBackground && this._windowIsBackground)) {
|
|
843
843
|
shouldRender = false;
|
|
844
844
|
}
|
|
845
845
|
if (shouldRender) {
|
|
@@ -1163,13 +1163,17 @@ export class Engine extends ThinEngine {
|
|
|
1163
1163
|
/**
|
|
1164
1164
|
* Wraps an external web gl texture in a Babylon texture.
|
|
1165
1165
|
* @param texture defines the external texture
|
|
1166
|
+
* @param hasMipMaps defines whether the external texture has mip maps (default: false)
|
|
1167
|
+
* @param samplingMode defines the sampling mode for the external texture (default: 3)
|
|
1166
1168
|
* @returns the babylon internal texture
|
|
1167
1169
|
*/
|
|
1168
|
-
wrapWebGLTexture(texture) {
|
|
1170
|
+
wrapWebGLTexture(texture, hasMipMaps = false, samplingMode = 3) {
|
|
1169
1171
|
const hardwareTexture = new WebGLHardwareTexture(texture, this._gl);
|
|
1170
1172
|
const internalTexture = new InternalTexture(this, InternalTextureSource.Unknown, true);
|
|
1171
1173
|
internalTexture._hardwareTexture = hardwareTexture;
|
|
1172
1174
|
internalTexture.isReady = true;
|
|
1175
|
+
internalTexture.useMipMaps = hasMipMaps;
|
|
1176
|
+
this.updateTextureSamplingMode(samplingMode, internalTexture);
|
|
1173
1177
|
return internalTexture;
|
|
1174
1178
|
}
|
|
1175
1179
|
/**
|
|
@@ -1317,7 +1321,7 @@ export class Engine extends ThinEngine {
|
|
|
1317
1321
|
this._virtualScenes[0].dispose();
|
|
1318
1322
|
}
|
|
1319
1323
|
// Release audio engine
|
|
1320
|
-
if (
|
|
1324
|
+
if (EngineStore.Instances.length === 1 && Engine.audioEngine) {
|
|
1321
1325
|
Engine.audioEngine.dispose();
|
|
1322
1326
|
Engine.audioEngine = null;
|
|
1323
1327
|
}
|
|
@@ -1347,9 +1351,14 @@ export class Engine extends ThinEngine {
|
|
|
1347
1351
|
}
|
|
1348
1352
|
super.dispose();
|
|
1349
1353
|
// Remove from Instances
|
|
1350
|
-
const index =
|
|
1354
|
+
const index = EngineStore.Instances.indexOf(this);
|
|
1351
1355
|
if (index >= 0) {
|
|
1352
|
-
|
|
1356
|
+
EngineStore.Instances.splice(index, 1);
|
|
1357
|
+
}
|
|
1358
|
+
// no more engines left in the engine store? Notify!
|
|
1359
|
+
if (!Engine.Instances.length) {
|
|
1360
|
+
EngineStore.OnEnginesDisposedObservable.notifyObservers(this);
|
|
1361
|
+
EngineStore.OnEnginesDisposedObservable.clear();
|
|
1353
1362
|
}
|
|
1354
1363
|
// Observables
|
|
1355
1364
|
this.onResizeObservable.clear();
|