@babylonjs/core 6.0.0 → 6.1.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/Animations/animatable.js +4 -0
- package/Animations/animatable.js.map +1 -1
- package/Animations/runtimeAnimation.d.ts +0 -1
- package/Animations/runtimeAnimation.js +0 -1
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Engines/Extensions/engine.cubeTexture.js +1 -1
- package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.js +1 -1
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/engine.d.ts +7 -20
- package/Engines/thinEngine.d.ts +7 -1
- package/Engines/thinEngine.js +36 -19
- package/Engines/thinEngine.js.map +1 -1
- package/Layers/effectLayer.d.ts +15 -0
- package/Layers/effectLayer.js +21 -0
- package/Layers/effectLayer.js.map +1 -1
- package/Materials/Node/Blocks/index.d.ts +1 -0
- package/Materials/Node/Blocks/index.js +1 -0
- package/Materials/Node/Blocks/index.js.map +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.d.ts +52 -0
- package/Materials/Node/Blocks/meshAttributeExistsBlock.js +199 -0
- package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -0
- package/Materials/Node/nodeMaterial.d.ts +1 -0
- package/Materials/Node/nodeMaterial.js +5 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Textures/equiRectangularCubeTexture.d.ts +3 -1
- package/Materials/Textures/equiRectangularCubeTexture.js +3 -2
- package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
- package/Materials/Textures/hdrCubeTexture.d.ts +2 -1
- package/Materials/Textures/hdrCubeTexture.js +3 -2
- package/Materials/Textures/hdrCubeTexture.js.map +1 -1
- package/Misc/HighDynamicRange/hdr.d.ts +1 -1
- package/Misc/HighDynamicRange/hdr.js +2 -2
- package/Misc/HighDynamicRange/hdr.js.map +1 -1
- package/Misc/HighDynamicRange/panoramaToCubemap.d.ts +1 -1
- package/Misc/HighDynamicRange/panoramaToCubemap.js +31 -23
- package/Misc/HighDynamicRange/panoramaToCubemap.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +2 -1
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +2 -0
- package/Rendering/prePassRenderer.js +12 -1
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js +1 -1
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js.map +1 -1
- package/Shaders/glowMapGeneration.fragment.js +2 -2
- package/Shaders/glowMapGeneration.fragment.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +2 -6
package/Engines/engine.d.ts
CHANGED
|
@@ -1065,9 +1065,9 @@ const PressureObserver: {
|
|
|
1065
1065
|
|
|
1066
1066
|
interface WebGL2RenderingContext extends WebGL2RenderingContextBase {
|
|
1067
1067
|
HALF_FLOAT_OES: number;
|
|
1068
|
-
RGBA16F:
|
|
1069
|
-
RGBA32F:
|
|
1070
|
-
DEPTH24_STENCIL8:
|
|
1068
|
+
RGBA16F: typeof WebGL2RenderingContext.RGBA16F;
|
|
1069
|
+
RGBA32F: typeof WebGL2RenderingContext.RGBA32F;
|
|
1070
|
+
DEPTH24_STENCIL8: typeof WebGL2RenderingContext.DEPTH24_STENCIL8;
|
|
1071
1071
|
COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: number;
|
|
1072
1072
|
COMPRESSED_SRGB_S3TC_DXT1_EXT: number;
|
|
1073
1073
|
COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: number;
|
|
@@ -1075,13 +1075,10 @@ interface WebGL2RenderingContext extends WebGL2RenderingContextBase {
|
|
|
1075
1075
|
COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT: number;
|
|
1076
1076
|
COMPRESSED_SRGB8_ETC2: number;
|
|
1077
1077
|
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: number;
|
|
1078
|
-
DRAW_FRAMEBUFFER:
|
|
1079
|
-
UNSIGNED_INT_24_8:
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
SRGB: number;
|
|
1083
|
-
SRGB8: number;
|
|
1084
|
-
SRGB8_ALPHA8: number;
|
|
1078
|
+
DRAW_FRAMEBUFFER: typeof WebGL2RenderingContext.DRAW_FRAMEBUFFER;
|
|
1079
|
+
UNSIGNED_INT_24_8: typeof WebGL2RenderingContext.UNSIGNED_INT_24_8;
|
|
1080
|
+
MIN: typeof WebGL2RenderingContext.MIN;
|
|
1081
|
+
MAX: typeof WebGL2RenderingContext.MAX;
|
|
1085
1082
|
}
|
|
1086
1083
|
|
|
1087
1084
|
interface EXT_disjoint_timer_query {
|
|
@@ -3366,16 +3363,6 @@ enum XOVR_multiview2 {
|
|
|
3366
3363
|
FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633,
|
|
3367
3364
|
}
|
|
3368
3365
|
|
|
3369
|
-
interface OVR_multiview2 {
|
|
3370
|
-
framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
|
|
3371
|
-
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: 0x9630;
|
|
3372
|
-
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: 0x9632;
|
|
3373
|
-
readonly MAX_VIEWS_OVR: 0x9631;
|
|
3374
|
-
readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: 0x9633;
|
|
3375
|
-
}
|
|
3376
|
-
|
|
3377
|
-
abstract class OVR_multiview2 implements OVR_multiview2 {}
|
|
3378
|
-
|
|
3379
3366
|
// Oculus extensions
|
|
3380
3367
|
interface XRSessionGrant {
|
|
3381
3368
|
mode: XRSessionMode;
|
package/Engines/thinEngine.d.ts
CHANGED
|
@@ -278,6 +278,12 @@ export declare class ThinEngine {
|
|
|
278
278
|
protected _creationOptions: EngineOptions;
|
|
279
279
|
protected _audioContext: Nullable<AudioContext>;
|
|
280
280
|
protected _audioDestination: Nullable<AudioDestinationNode | MediaStreamAudioDestinationNode>;
|
|
281
|
+
/** @internal */
|
|
282
|
+
_glSRGBExtensionValues: {
|
|
283
|
+
SRGB: typeof WebGL2RenderingContext.SRGB;
|
|
284
|
+
SRGB8: typeof WebGL2RenderingContext.SRGB8 | EXT_sRGB["SRGB_ALPHA_EXT"];
|
|
285
|
+
SRGB8_ALPHA8: typeof WebGL2RenderingContext.SRGB8_ALPHA8 | EXT_sRGB["SRGB_ALPHA_EXT"];
|
|
286
|
+
};
|
|
281
287
|
/**
|
|
282
288
|
* Gets the options used for engine creation
|
|
283
289
|
* @returns EngineOptions object
|
|
@@ -1562,7 +1568,7 @@ export declare class ThinEngine {
|
|
|
1562
1568
|
/**
|
|
1563
1569
|
* @internal
|
|
1564
1570
|
*/
|
|
1565
|
-
_getRGBAMultiSampleBufferFormat(type: number): number;
|
|
1571
|
+
_getRGBAMultiSampleBufferFormat(type: number, format?: number): number;
|
|
1566
1572
|
/**
|
|
1567
1573
|
* @internal
|
|
1568
1574
|
*/
|
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.
|
|
37
|
+
return "babylonjs@6.1.0";
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Returns the current version of the framework
|
|
41
41
|
*/
|
|
42
42
|
static get Version() {
|
|
43
|
-
return "6.
|
|
43
|
+
return "6.1.0";
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Returns a string describing the current engine
|
|
@@ -926,14 +926,21 @@ export class ThinEngine {
|
|
|
926
926
|
if (!this._caps.supportSRGBBuffers) {
|
|
927
927
|
if (this._webGLVersion > 1) {
|
|
928
928
|
this._caps.supportSRGBBuffers = true;
|
|
929
|
+
this._glSRGBExtensionValues = {
|
|
930
|
+
SRGB: WebGL2RenderingContext.SRGB,
|
|
931
|
+
SRGB8: WebGL2RenderingContext.SRGB8,
|
|
932
|
+
SRGB8_ALPHA8: WebGL2RenderingContext.SRGB8_ALPHA8,
|
|
933
|
+
};
|
|
929
934
|
}
|
|
930
935
|
else {
|
|
931
936
|
const sRGBExtension = this._gl.getExtension("EXT_sRGB");
|
|
932
937
|
if (sRGBExtension != null) {
|
|
933
938
|
this._caps.supportSRGBBuffers = true;
|
|
934
|
-
this.
|
|
935
|
-
|
|
936
|
-
|
|
939
|
+
this._glSRGBExtensionValues = {
|
|
940
|
+
SRGB: sRGBExtension.SRGB_EXT,
|
|
941
|
+
SRGB8: sRGBExtension.SRGB_ALPHA_EXT,
|
|
942
|
+
SRGB8_ALPHA8: sRGBExtension.SRGB_ALPHA_EXT,
|
|
943
|
+
};
|
|
937
944
|
}
|
|
938
945
|
}
|
|
939
946
|
// take into account the forced state that was provided in options
|
|
@@ -3291,7 +3298,7 @@ export class ThinEngine {
|
|
|
3291
3298
|
: extension === ".jpg" && !texture._useSRGBBuffer
|
|
3292
3299
|
? gl.RGB
|
|
3293
3300
|
: texture._useSRGBBuffer
|
|
3294
|
-
?
|
|
3301
|
+
? this._glSRGBExtensionValues.SRGB8_ALPHA8
|
|
3295
3302
|
: gl.RGBA;
|
|
3296
3303
|
let texelFormat = format ? this._getInternalFormat(format) : extension === ".jpg" && !texture._useSRGBBuffer ? gl.RGB : gl.RGBA;
|
|
3297
3304
|
if (texture._useSRGBBuffer && this.webGLVersion === 1) {
|
|
@@ -4279,7 +4286,7 @@ export class ThinEngine {
|
|
|
4279
4286
|
* @internal
|
|
4280
4287
|
*/
|
|
4281
4288
|
_getInternalFormat(format, useSRGBBuffer = false) {
|
|
4282
|
-
let internalFormat = useSRGBBuffer ? this.
|
|
4289
|
+
let internalFormat = useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA;
|
|
4283
4290
|
switch (format) {
|
|
4284
4291
|
case 0:
|
|
4285
4292
|
internalFormat = this._gl.ALPHA;
|
|
@@ -4297,10 +4304,10 @@ export class ThinEngine {
|
|
|
4297
4304
|
internalFormat = this._gl.RG;
|
|
4298
4305
|
break;
|
|
4299
4306
|
case 4:
|
|
4300
|
-
internalFormat = useSRGBBuffer ? this.
|
|
4307
|
+
internalFormat = useSRGBBuffer ? this._glSRGBExtensionValues.SRGB : this._gl.RGB;
|
|
4301
4308
|
break;
|
|
4302
4309
|
case 5:
|
|
4303
|
-
internalFormat = useSRGBBuffer ? this.
|
|
4310
|
+
internalFormat = useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA;
|
|
4304
4311
|
break;
|
|
4305
4312
|
}
|
|
4306
4313
|
if (this._webGLVersion > 1) {
|
|
@@ -4335,7 +4342,7 @@ export class ThinEngine {
|
|
|
4335
4342
|
case 2:
|
|
4336
4343
|
return this._gl.LUMINANCE_ALPHA;
|
|
4337
4344
|
case 4:
|
|
4338
|
-
return useSRGBBuffer ? this.
|
|
4345
|
+
return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB : this._gl.RGB;
|
|
4339
4346
|
}
|
|
4340
4347
|
}
|
|
4341
4348
|
return this._gl.RGBA;
|
|
@@ -4367,9 +4374,9 @@ export class ThinEngine {
|
|
|
4367
4374
|
case 7:
|
|
4368
4375
|
return this._gl.RG8;
|
|
4369
4376
|
case 4:
|
|
4370
|
-
return useSRGBBuffer ? this.
|
|
4377
|
+
return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8 : this._gl.RGB8; // By default. Other possibilities are RGB565, SRGB8.
|
|
4371
4378
|
case 5:
|
|
4372
|
-
return useSRGBBuffer ? this.
|
|
4379
|
+
return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA8; // By default. Other possibilities are RGB5_A1, RGBA4, SRGB8_ALPHA8.
|
|
4373
4380
|
case 8:
|
|
4374
4381
|
return this._gl.R8UI;
|
|
4375
4382
|
case 9:
|
|
@@ -4485,17 +4492,27 @@ export class ThinEngine {
|
|
|
4485
4492
|
return this._gl.RGB10_A2;
|
|
4486
4493
|
}
|
|
4487
4494
|
}
|
|
4488
|
-
return useSRGBBuffer ? this.
|
|
4495
|
+
return useSRGBBuffer ? this._glSRGBExtensionValues.SRGB8_ALPHA8 : this._gl.RGBA8;
|
|
4489
4496
|
}
|
|
4490
4497
|
/**
|
|
4491
4498
|
* @internal
|
|
4492
4499
|
*/
|
|
4493
|
-
_getRGBAMultiSampleBufferFormat(type) {
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4500
|
+
_getRGBAMultiSampleBufferFormat(type, format = 5) {
|
|
4501
|
+
switch (type) {
|
|
4502
|
+
case 1:
|
|
4503
|
+
switch (format) {
|
|
4504
|
+
case 6:
|
|
4505
|
+
return this._gl.R32F;
|
|
4506
|
+
default:
|
|
4507
|
+
return this._gl.RGBA32F;
|
|
4508
|
+
}
|
|
4509
|
+
case 2:
|
|
4510
|
+
switch (format) {
|
|
4511
|
+
case 6:
|
|
4512
|
+
return this._gl.R16F;
|
|
4513
|
+
default:
|
|
4514
|
+
return this._gl.RGBA16F;
|
|
4515
|
+
}
|
|
4499
4516
|
}
|
|
4500
4517
|
return this._gl.RGBA8;
|
|
4501
4518
|
}
|