@babylonjs/core 5.47.0 → 5.48.0
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/camera.js +5 -0
- package/Cameras/camera.js.map +1 -1
- package/Engines/Extensions/engine.alpha.js +7 -0
- package/Engines/Extensions/engine.alpha.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.alpha.js +8 -0
- package/Engines/WebGPU/Extensions/engine.alpha.js.map +1 -1
- package/Engines/engine.d.ts +1 -3
- package/Engines/engine.js +27 -33
- package/Engines/engine.js.map +1 -1
- package/Engines/thinEngine.d.ts +44 -30
- package/Engines/thinEngine.js +42 -57
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +10 -56
- package/Engines/webgpuEngine.js +15 -31
- package/Engines/webgpuEngine.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +8 -8
- package/Physics/v2/IPhysicsEnginePlugin.js +6 -6
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +4 -4
- package/Physics/v2/physicsBody.js +6 -6
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/physicsConstraint.js +1 -1
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/index.d.ts +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.js +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +255 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +805 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -0
- package/PostProcesses/screenSpaceReflectionPostProcess.d.ts +1 -0
- package/PostProcesses/screenSpaceReflectionPostProcess.js +1 -0
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/Rendering/depthRenderer.d.ts +12 -3
- package/Rendering/depthRenderer.js +22 -7
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.d.ts +1 -0
- package/Rendering/geometryBufferRenderer.js +4 -2
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/prePassRendererSceneComponent.d.ts +4 -0
- package/Rendering/prePassRendererSceneComponent.js +3 -3
- package/Rendering/prePassRendererSceneComponent.js.map +1 -1
- package/Rendering/screenSpaceReflections2Configuration.d.ts +19 -0
- package/Rendering/screenSpaceReflections2Configuration.js +22 -0
- package/Rendering/screenSpaceReflections2Configuration.js.map +1 -0
- package/Shaders/ShadersInclude/pbrBlockClearcoat.js +1 -3
- package/Shaders/ShadersInclude/pbrBlockClearcoat.js.map +1 -1
- package/Shaders/ShadersInclude/screenSpaceRayTrace.d.ts +5 -0
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js +32 -0
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js.map +1 -0
- package/Shaders/default.fragment.js +3 -3
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/depth.fragment.js +8 -0
- package/Shaders/depth.fragment.js.map +1 -1
- package/Shaders/depth.vertex.js +6 -1
- package/Shaders/depth.vertex.js.map +1 -1
- package/Shaders/geometry.fragment.js +5 -13
- package/Shaders/geometry.fragment.js.map +1 -1
- package/Shaders/pbr.fragment.js +2 -2
- package/Shaders/pbr.fragment.js.map +1 -1
- package/Shaders/screenSpaceReflection2.fragment.d.ts +7 -0
- package/Shaders/screenSpaceReflection2.fragment.js +61 -0
- package/Shaders/screenSpaceReflection2.fragment.js.map +1 -0
- package/Shaders/screenSpaceReflection2Blur.fragment.d.ts +5 -0
- package/Shaders/screenSpaceReflection2Blur.fragment.js +9 -0
- package/Shaders/screenSpaceReflection2Blur.fragment.js.map +1 -0
- package/Shaders/screenSpaceReflection2BlurCombiner.fragment.d.ts +6 -0
- package/Shaders/screenSpaceReflection2BlurCombiner.fragment.js +11 -0
- package/Shaders/screenSpaceReflection2BlurCombiner.fragment.js.map +1 -0
- package/XR/webXRCamera.d.ts +6 -0
- package/XR/webXRCamera.js +15 -0
- package/XR/webXRCamera.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +1 -0
- package/scene.js.map +1 -1
package/Engines/engine.d.ts
CHANGED
|
@@ -428,10 +428,8 @@ export declare class Engine extends ThinEngine {
|
|
|
428
428
|
/**
|
|
429
429
|
* Shared initialization across engines types.
|
|
430
430
|
* @param canvas The canvas associated with this instance of the engine.
|
|
431
|
-
* @param doNotHandleTouchAction Defines that engine should ignore modifying touch action attribute and style
|
|
432
|
-
* @param audioEngine Defines if an audio engine should be created by default
|
|
433
431
|
*/
|
|
434
|
-
protected _sharedInit(canvas: HTMLCanvasElement
|
|
432
|
+
protected _sharedInit(canvas: HTMLCanvasElement): void;
|
|
435
433
|
/**
|
|
436
434
|
* Gets current aspect ratio
|
|
437
435
|
* @param viewportOwner defines the camera to use to get the aspect ratio
|
package/Engines/engine.js
CHANGED
|
@@ -258,34 +258,8 @@ export class Engine extends ThinEngine {
|
|
|
258
258
|
options = this._creationOptions;
|
|
259
259
|
if (canvasOrContext.getContext) {
|
|
260
260
|
const canvas = canvasOrContext;
|
|
261
|
-
this._sharedInit(canvas
|
|
262
|
-
if (IsDocumentAvailable()) {
|
|
263
|
-
// Fullscreen
|
|
264
|
-
this._onFullscreenChange = () => {
|
|
265
|
-
this.isFullscreen = !!document.fullscreenElement;
|
|
266
|
-
// Pointer lock
|
|
267
|
-
if (this.isFullscreen && this._pointerLockRequested && canvas) {
|
|
268
|
-
Engine._RequestPointerlock(canvas);
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
document.addEventListener("fullscreenchange", this._onFullscreenChange, false);
|
|
272
|
-
document.addEventListener("webkitfullscreenchange", this._onFullscreenChange, false);
|
|
273
|
-
// Pointer lock
|
|
274
|
-
this._onPointerLockChange = () => {
|
|
275
|
-
this.isPointerLock = document.pointerLockElement === canvas;
|
|
276
|
-
};
|
|
277
|
-
document.addEventListener("pointerlockchange", this._onPointerLockChange, false);
|
|
278
|
-
document.addEventListener("webkitpointerlockchange", this._onPointerLockChange, false);
|
|
279
|
-
// Create Audio Engine if needed.
|
|
280
|
-
if (!Engine.audioEngine && options.audioEngine && Engine.AudioEngineFactory) {
|
|
281
|
-
Engine.audioEngine = Engine.AudioEngineFactory(this.getRenderingCanvas(), this.getAudioContext(), this.getAudioDestination());
|
|
282
|
-
}
|
|
283
|
-
}
|
|
261
|
+
this._sharedInit(canvas);
|
|
284
262
|
this._connectVREvents();
|
|
285
|
-
this.enableOfflineSupport = Engine.OfflineProviderFactory !== undefined;
|
|
286
|
-
this._deterministicLockstep = !!options.deterministicLockstep;
|
|
287
|
-
this._lockstepMaxSteps = options.lockstepMaxSteps || 0;
|
|
288
|
-
this._timeStep = options.timeStep || 1 / 60;
|
|
289
263
|
}
|
|
290
264
|
// Load WebVR Devices
|
|
291
265
|
this._prepareVRComponent();
|
|
@@ -300,11 +274,9 @@ export class Engine extends ThinEngine {
|
|
|
300
274
|
/**
|
|
301
275
|
* Shared initialization across engines types.
|
|
302
276
|
* @param canvas The canvas associated with this instance of the engine.
|
|
303
|
-
* @param doNotHandleTouchAction Defines that engine should ignore modifying touch action attribute and style
|
|
304
|
-
* @param audioEngine Defines if an audio engine should be created by default
|
|
305
277
|
*/
|
|
306
|
-
_sharedInit(canvas
|
|
307
|
-
super._sharedInit(canvas
|
|
278
|
+
_sharedInit(canvas) {
|
|
279
|
+
super._sharedInit(canvas);
|
|
308
280
|
this._onCanvasFocus = () => {
|
|
309
281
|
this.onCanvasFocusObservable.notifyObservers(this);
|
|
310
282
|
};
|
|
@@ -344,13 +316,35 @@ export class Engine extends ThinEngine {
|
|
|
344
316
|
hostWindow.addEventListener("focus", this._onFocus);
|
|
345
317
|
}
|
|
346
318
|
canvas.addEventListener("pointerout", this._onCanvasPointerOut);
|
|
347
|
-
if (!doNotHandleTouchAction) {
|
|
319
|
+
if (!this._creationOptions.doNotHandleTouchAction) {
|
|
348
320
|
this._disableTouchAction();
|
|
349
321
|
}
|
|
350
322
|
// Create Audio Engine if needed.
|
|
351
|
-
if (!Engine.audioEngine && audioEngine && Engine.AudioEngineFactory) {
|
|
323
|
+
if (!Engine.audioEngine && this._creationOptions.audioEngine && Engine.AudioEngineFactory) {
|
|
352
324
|
Engine.audioEngine = Engine.AudioEngineFactory(this.getRenderingCanvas(), this.getAudioContext(), this.getAudioDestination());
|
|
353
325
|
}
|
|
326
|
+
if (IsDocumentAvailable()) {
|
|
327
|
+
// Fullscreen
|
|
328
|
+
this._onFullscreenChange = () => {
|
|
329
|
+
this.isFullscreen = !!document.fullscreenElement;
|
|
330
|
+
// Pointer lock
|
|
331
|
+
if (this.isFullscreen && this._pointerLockRequested && canvas) {
|
|
332
|
+
Engine._RequestPointerlock(canvas);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
document.addEventListener("fullscreenchange", this._onFullscreenChange, false);
|
|
336
|
+
document.addEventListener("webkitfullscreenchange", this._onFullscreenChange, false);
|
|
337
|
+
// Pointer lock
|
|
338
|
+
this._onPointerLockChange = () => {
|
|
339
|
+
this.isPointerLock = document.pointerLockElement === canvas;
|
|
340
|
+
};
|
|
341
|
+
document.addEventListener("pointerlockchange", this._onPointerLockChange, false);
|
|
342
|
+
document.addEventListener("webkitpointerlockchange", this._onPointerLockChange, false);
|
|
343
|
+
}
|
|
344
|
+
this.enableOfflineSupport = Engine.OfflineProviderFactory !== undefined;
|
|
345
|
+
this._deterministicLockstep = !!this._creationOptions.deterministicLockstep;
|
|
346
|
+
this._lockstepMaxSteps = this._creationOptions.lockstepMaxSteps || 0;
|
|
347
|
+
this._timeStep = this._creationOptions.timeStep || 1 / 60;
|
|
354
348
|
}
|
|
355
349
|
/**
|
|
356
350
|
* Gets current aspect ratio
|