@babylonjs-toolkit/next 9.11.1 → 9.12.101
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/lib/scenemanager.d.ts +144 -42
- package/lib/scenemanager.d.ts.map +1 -1
- package/lib/scenemanager.js +1337 -370
- package/package.json +14 -13
package/lib/scenemanager.d.ts
CHANGED
|
@@ -36,10 +36,10 @@ import { Skeleton } from '@babylonjs/core/Bones/skeleton';
|
|
|
36
36
|
import { Control } from '@babylonjs/gui/2D/controls/control';
|
|
37
37
|
import { Effect } from '@babylonjs/core/Materials/effect';
|
|
38
38
|
import { PhysicsBody, IPhysicsEnabledObject, PhysicsShape, PhysicsShapeCapsule, PhysicsRaycastResult, PhysicsMotionType, IRaycastQuery, ShapeCastResult, PhysicsShapeMesh, PhysicsShapeConvexHull, PhysicsShapeBox, PhysicsShapeSphere, PhysicsShapeCylinder } from '@babylonjs/core/Physics';
|
|
39
|
+
import { BaseTexture } from '@babylonjs/core/Materials/Textures/baseTexture';
|
|
39
40
|
import { GLTFLoader } from '@babylonjs/loaders/glTF/2.0/glTFLoader';
|
|
40
41
|
import { IScene, INode, IMaterial, IAnimation, IMesh } from '@babylonjs/loaders/glTF/2.0/glTFLoaderInterfaces';
|
|
41
42
|
import { Texture } from '@babylonjs/core/Materials/Textures/texture';
|
|
42
|
-
import { BaseTexture } from '@babylonjs/core/Materials/Textures/baseTexture';
|
|
43
43
|
import { IGLTFLoaderExtension } from '@babylonjs/loaders/glTF/2.0/glTFLoaderExtension';
|
|
44
44
|
import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture';
|
|
45
45
|
import { SubMesh } from '@babylonjs/core/Meshes/subMesh';
|
|
@@ -47,7 +47,7 @@ import { MaterialDefines } from '@babylonjs/core/Materials/materialDefines';
|
|
|
47
47
|
import { UniformBuffer } from '@babylonjs/core/Materials/uniformBuffer';
|
|
48
48
|
import { MaterialPluginBase } from '@babylonjs/core/Materials/materialPluginBase';
|
|
49
49
|
import { IAnimatable } from '@babylonjs/core/Animations';
|
|
50
|
-
import { ShaderLanguage } from '@babylonjs/core/Materials';
|
|
50
|
+
import { ShaderLanguage, RawTexture2DArray } from '@babylonjs/core/Materials';
|
|
51
51
|
import { StaticSound, IStaticSoundOptions, AudioEngineV2, StaticSoundBuffer, StreamingSound, IWebAudioEngineOptions, AbstractSpatialAudio, IStaticSoundBufferOptions, IStreamingSoundOptions } from '@babylonjs/core/AudioV2';
|
|
52
52
|
import { VertexData } from '@babylonjs/core/Meshes/mesh.vertexData';
|
|
53
53
|
import { IFileRequest } from '@babylonjs/core/Misc/fileRequest';
|
|
@@ -813,6 +813,8 @@ export declare class CVTOOLS_unity_metadata implements IGLTFLoaderExtension {
|
|
|
813
813
|
static readonly IBL_TINY_VALUE: number;
|
|
814
814
|
static readonly IBL_SPEC_FACTOR: number;
|
|
815
815
|
static readonly IBL_PROBE_FACTOR: number;
|
|
816
|
+
static SuppressReflectionProbeDiffuse(texture: BaseTexture): void;
|
|
817
|
+
static ApplyGlobalReflectionProbeDiffuse(texture: BaseTexture, scene: Scene, createPolynomialsFromFaces?: boolean): void;
|
|
816
818
|
enabled: boolean;
|
|
817
819
|
private _webgpu;
|
|
818
820
|
private _loader;
|
|
@@ -884,8 +886,8 @@ export declare class CVTOOLS_unity_metadata implements IGLTFLoaderExtension {
|
|
|
884
886
|
private _preloadRawMaterialsAsync;
|
|
885
887
|
private _parseMultiMaterialAsync;
|
|
886
888
|
private _parseCommonConstantProperties;
|
|
887
|
-
private _applyRepoWatermark;
|
|
888
889
|
private _parseUniformAndSamplerProperties;
|
|
890
|
+
private applyRepoWatermark;
|
|
889
891
|
}
|
|
890
892
|
export declare class CVTOOLS_babylon_mesh implements IGLTFLoaderExtension {
|
|
891
893
|
readonly name: string;
|
|
@@ -919,6 +921,12 @@ export declare class CustomShaderMaterial extends PBRMaterial {
|
|
|
919
921
|
protected shader: string;
|
|
920
922
|
protected plugin: MaterialPluginBase;
|
|
921
923
|
private _unityLightingPlugin;
|
|
924
|
+
private _skinArray;
|
|
925
|
+
private _skinArrayNormal;
|
|
926
|
+
private _skinArrayMetalRough;
|
|
927
|
+
private _skinArrayEmissive;
|
|
928
|
+
private _skinLayerUniform;
|
|
929
|
+
private _skinArraySwitchingPlugin;
|
|
922
930
|
getPlugin(): MaterialPluginBase;
|
|
923
931
|
getClassName(): string;
|
|
924
932
|
constructor(name: string, scene: Scene);
|
|
@@ -927,6 +935,21 @@ export declare class CustomShaderMaterial extends PBRMaterial {
|
|
|
927
935
|
checkUniform(uniformName: string, type: string, value?: any): void;
|
|
928
936
|
checkSampler(samplerName: string, texture?: any): void;
|
|
929
937
|
splitLighting(diffuseIbl: number, specularIbl: number): void;
|
|
938
|
+
enableSkinArray(layerUniform?: boolean): CustomShaderMaterial;
|
|
939
|
+
setSkinLayer(layer: number): CustomShaderMaterial;
|
|
940
|
+
enableSkinArrayNormal(enabled?: boolean): CustomShaderMaterial;
|
|
941
|
+
enableSkinArrayMetalRough(enabled?: boolean): CustomShaderMaterial;
|
|
942
|
+
enableSkinArrayEmissive(enabled?: boolean): CustomShaderMaterial;
|
|
943
|
+
setSkinArrayLayerMode(uniform: boolean): CustomShaderMaterial;
|
|
944
|
+
addTextureArrayUniform(name: string, texture: BaseTexture): CustomShaderMaterial;
|
|
945
|
+
get skinArray(): boolean;
|
|
946
|
+
get skinArrayNormal(): boolean;
|
|
947
|
+
get skinArrayMetalRough(): boolean;
|
|
948
|
+
get skinArrayEmissive(): boolean;
|
|
949
|
+
get skinArrayActive(): boolean;
|
|
950
|
+
get skinLayerUniform(): boolean;
|
|
951
|
+
clone(name: string, cloneTexturesOnlyOnce?: boolean, rootUrl?: string): CustomShaderMaterial;
|
|
952
|
+
protected copyCustomStateTo(result: CustomShaderMaterial): void;
|
|
930
953
|
addTextureUniform(name: string, texture: Texture): CustomShaderMaterial;
|
|
931
954
|
setTextureValue(name: string, texture: Texture): CustomShaderMaterial;
|
|
932
955
|
markTextureAsRaw(name: string): void;
|
|
@@ -978,6 +1001,31 @@ export declare class UnityStyleLightingPlugin extends CustomShaderMaterialPlugin
|
|
|
978
1001
|
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
979
1002
|
bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: AbstractEngine, subMesh: SubMesh): void;
|
|
980
1003
|
}
|
|
1004
|
+
export declare class SkinArraySwitchingPlugin extends CustomShaderMaterialPlugin {
|
|
1005
|
+
constructor(material: CustomShaderMaterial);
|
|
1006
|
+
isCompatible(shaderLanguage: ShaderLanguage): boolean;
|
|
1007
|
+
getClassName(): string;
|
|
1008
|
+
getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void;
|
|
1009
|
+
getSamplers(samplers: string[]): void;
|
|
1010
|
+
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
1011
|
+
getCustomCode(shaderType: string, shaderLanguage: ShaderLanguage): any;
|
|
1012
|
+
private getGLSLVertexDefinitions;
|
|
1013
|
+
private getGLSLVertexMainEnd;
|
|
1014
|
+
private getGLSLFragmentDefinitions;
|
|
1015
|
+
private getGLSLAlbedoCode;
|
|
1016
|
+
private getGLSLNormalCode;
|
|
1017
|
+
private getGLSLMetalRoughSampleCode;
|
|
1018
|
+
private getGLSLMetalRoughApplyCode;
|
|
1019
|
+
private getGLSLEmissiveCode;
|
|
1020
|
+
private getWGSLVertexDefinitions;
|
|
1021
|
+
private getWGSLVertexMainEnd;
|
|
1022
|
+
private getWGSLFragmentDefinitions;
|
|
1023
|
+
private getWGSLAlbedoCode;
|
|
1024
|
+
private getWGSLNormalCode;
|
|
1025
|
+
private getWGSLMetalRoughSampleCode;
|
|
1026
|
+
private getWGSLMetalRoughApplyCode;
|
|
1027
|
+
private getWGSLEmissiveCode;
|
|
1028
|
+
}
|
|
981
1029
|
export type CustomUniformProperty = {
|
|
982
1030
|
name: string;
|
|
983
1031
|
size: number;
|
|
@@ -1460,26 +1508,29 @@ export declare class TreeBranchMaterialPlugin extends CustomShaderMaterialPlugin
|
|
|
1460
1508
|
}
|
|
1461
1509
|
export declare class VertexAnimationMaterial extends CustomShaderMaterial {
|
|
1462
1510
|
controller: VertexAnimationController;
|
|
1463
|
-
|
|
1464
|
-
|
|
1511
|
+
private _vatSkinArray;
|
|
1512
|
+
private _vatSkinArrayNormal;
|
|
1513
|
+
private _vatSkinArrayMetalRough;
|
|
1514
|
+
private _vatSkinArrayEmissive;
|
|
1465
1515
|
constructor(name: string, scene: Scene);
|
|
1466
1516
|
awake(): void;
|
|
1467
1517
|
update(): void;
|
|
1468
1518
|
getShaderName(): string;
|
|
1469
1519
|
getController(): VertexAnimationController;
|
|
1470
1520
|
cloneForInstance(instanceName: string): VertexAnimationMaterial;
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1521
|
+
enableVatSkinArray(): VertexAnimationMaterial;
|
|
1522
|
+
disableVatSkinArray(): void;
|
|
1523
|
+
enableVatSkinArrayNormal(): VertexAnimationMaterial;
|
|
1524
|
+
disableVatSkinArrayNormal(): void;
|
|
1525
|
+
enableVatSkinArrayMetalRough(): VertexAnimationMaterial;
|
|
1526
|
+
disableVatSkinArrayMetalRough(): void;
|
|
1527
|
+
enableVatSkinArrayEmissive(): VertexAnimationMaterial;
|
|
1528
|
+
disableVatSkinArrayEmissive(): void;
|
|
1529
|
+
get vatSkinArray(): boolean;
|
|
1530
|
+
get vatSkinArrayNormal(): boolean;
|
|
1531
|
+
get vatSkinArrayMetalRough(): boolean;
|
|
1532
|
+
get vatSkinArrayEmissive(): boolean;
|
|
1533
|
+
get vatSkinArrayActive(): boolean;
|
|
1483
1534
|
}
|
|
1484
1535
|
export interface IVertexAnimationRendererReference {
|
|
1485
1536
|
name?: string;
|
|
@@ -1538,8 +1589,8 @@ export declare class VertexAnimationController {
|
|
|
1538
1589
|
static Find(guid: string): VertexAnimationController;
|
|
1539
1590
|
static GetOrCreate(guid: string, scene: Scene, rootUrl?: string, lazyLoadTextures?: boolean): VertexAnimationController;
|
|
1540
1591
|
static CollectRendererTargets(settings: IVertexAnimationSettings[]): IVertexAnimationRendererReference[];
|
|
1541
|
-
static
|
|
1542
|
-
static
|
|
1592
|
+
static SetAtlasCellIndex(mesh: AbstractMesh, cellIndex: number): void;
|
|
1593
|
+
static GetAtlasCellIndex(mesh: AbstractMesh): number;
|
|
1543
1594
|
static DisposeAll(scene?: Scene): void;
|
|
1544
1595
|
readonly guid: string;
|
|
1545
1596
|
readonly scene: Scene;
|
|
@@ -1584,17 +1635,6 @@ export declare class VertexAnimationController {
|
|
|
1584
1635
|
getClip(name: string): IVertexAnimationClip | null;
|
|
1585
1636
|
setSpeed(speed: number): void;
|
|
1586
1637
|
setLoop(loop: boolean): void;
|
|
1587
|
-
setRuntimeSkinArrays(albedoArray: BaseTexture, normalArray: BaseTexture, nullOutDefaults?: boolean): void;
|
|
1588
|
-
clearRuntimeSkinArrays(): void;
|
|
1589
|
-
installSkinsFromUrlsAsync(layers: {
|
|
1590
|
-
albedo: string;
|
|
1591
|
-
normal: string;
|
|
1592
|
-
}[], width: number, height: number, options?: {
|
|
1593
|
-
nullOutDefaults?: boolean;
|
|
1594
|
-
rootUrl?: string;
|
|
1595
|
-
generateMipMaps?: boolean;
|
|
1596
|
-
samplingMode?: number;
|
|
1597
|
-
}): Promise<void>;
|
|
1598
1638
|
setCurrentTime(time: number): void;
|
|
1599
1639
|
getCurrentTime(): number;
|
|
1600
1640
|
addPlugin(plugin: VertexAnimationMaterialPlugin): void;
|
|
@@ -1627,8 +1667,6 @@ export declare class VertexAnimationMaterialPlugin extends CustomShaderMaterialP
|
|
|
1627
1667
|
private _rendererTargets;
|
|
1628
1668
|
private _targetRendererGuid;
|
|
1629
1669
|
private _placeholderTexture;
|
|
1630
|
-
private _placeholderAlbedoArray;
|
|
1631
|
-
private _placeholderNormalArray;
|
|
1632
1670
|
private _cc_posTex;
|
|
1633
1671
|
private _cc_normTex;
|
|
1634
1672
|
private _cc_prevPosTex;
|
|
@@ -1654,9 +1692,7 @@ export declare class VertexAnimationMaterialPlugin extends CustomShaderMaterialP
|
|
|
1654
1692
|
getSamplers(samplers: string[]): void;
|
|
1655
1693
|
getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void;
|
|
1656
1694
|
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
1657
|
-
onRuntimeSkinArraysChanged(): void;
|
|
1658
1695
|
bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: AbstractEngine, subMesh: SubMesh): void;
|
|
1659
|
-
private _pushRuntimeSkinSamplers;
|
|
1660
1696
|
setupAnimations(settings: IVertexAnimationSettings[], controllerId: string, rootUrl?: string, lazyLoadTextures?: boolean): VertexAnimationController;
|
|
1661
1697
|
private _captureRendererTarget;
|
|
1662
1698
|
private _resolveRendererTarget;
|
|
@@ -1675,14 +1711,20 @@ export declare class VertexAnimationMaterialPlugin extends CustomShaderMaterialP
|
|
|
1675
1711
|
private getWGSLVertexDefinitions;
|
|
1676
1712
|
private getWGSLVertexPositionCode;
|
|
1677
1713
|
private getWGSLVertexNormalCode;
|
|
1678
|
-
private
|
|
1679
|
-
private
|
|
1680
|
-
private
|
|
1681
|
-
private
|
|
1682
|
-
private
|
|
1683
|
-
private
|
|
1684
|
-
private
|
|
1685
|
-
private
|
|
1714
|
+
private getGLSLSkinLayerVaryingCode;
|
|
1715
|
+
private getGLSLSkinFragmentDefs;
|
|
1716
|
+
private getGLSLSkinAlbedoCode;
|
|
1717
|
+
private getGLSLSkinNormalCode;
|
|
1718
|
+
private getGLSLSkinMetalRoughSampleCode;
|
|
1719
|
+
private getGLSLSkinMetalRoughApplyCode;
|
|
1720
|
+
private getGLSLSkinEmissiveCode;
|
|
1721
|
+
private getWGSLSkinLayerVaryingCode;
|
|
1722
|
+
private getWGSLSkinFragmentDefs;
|
|
1723
|
+
private getWGSLSkinAlbedoCode;
|
|
1724
|
+
private getWGSLSkinNormalCode;
|
|
1725
|
+
private getWGSLSkinMetalRoughSampleCode;
|
|
1726
|
+
private getWGSLSkinMetalRoughApplyCode;
|
|
1727
|
+
private getWGSLSkinEmissiveCode;
|
|
1686
1728
|
}
|
|
1687
1729
|
export interface KeymapState {
|
|
1688
1730
|
result: boolean | number;
|
|
@@ -3912,6 +3954,20 @@ export interface IParticleSystemProperties {
|
|
|
3912
3954
|
trails?: any;
|
|
3913
3955
|
customData?: any;
|
|
3914
3956
|
}
|
|
3957
|
+
export declare class SkinTextureArray {
|
|
3958
|
+
private static _cache;
|
|
3959
|
+
static Build(scene: Scene, urls: string[], options?: {
|
|
3960
|
+
samplingMode?: number;
|
|
3961
|
+
aniso?: number;
|
|
3962
|
+
invertY?: boolean;
|
|
3963
|
+
mipmaps?: boolean;
|
|
3964
|
+
}): Promise<RawTexture2DArray>;
|
|
3965
|
+
private static _uploadMipChain;
|
|
3966
|
+
private static _downsampleLayers;
|
|
3967
|
+
private static _maxArrayLayers;
|
|
3968
|
+
private static _loadImages;
|
|
3969
|
+
static Clear(): void;
|
|
3970
|
+
}
|
|
3915
3971
|
export declare class MeshNormalProxy {
|
|
3916
3972
|
blendWithPhysicsNormal: number;
|
|
3917
3973
|
maxLookupDistance: number;
|
|
@@ -4095,6 +4151,52 @@ export declare class TerrainBuilder extends ScriptComponent {
|
|
|
4095
4151
|
private static GammaToLinear;
|
|
4096
4152
|
private static LinearToGamma;
|
|
4097
4153
|
}
|
|
4154
|
+
export declare class TextureAtlasSkin extends ScriptComponent {
|
|
4155
|
+
private abtractMesh;
|
|
4156
|
+
private textureData;
|
|
4157
|
+
private defaultIndex;
|
|
4158
|
+
private skinnedParts;
|
|
4159
|
+
private albedoSlices;
|
|
4160
|
+
private normalSlices;
|
|
4161
|
+
private metallicSlices;
|
|
4162
|
+
private occlusionSlices;
|
|
4163
|
+
private emissiveSlices;
|
|
4164
|
+
private _applied;
|
|
4165
|
+
private _manifest;
|
|
4166
|
+
private _currentIndex;
|
|
4167
|
+
private _targets;
|
|
4168
|
+
private _clonedMultiMaterial;
|
|
4169
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
4170
|
+
protected awake(): void;
|
|
4171
|
+
protected start(): void;
|
|
4172
|
+
applySkins(): void;
|
|
4173
|
+
setSkinIndex(index: number): number;
|
|
4174
|
+
private clampIndex;
|
|
4175
|
+
skinCount(): number;
|
|
4176
|
+
private maxChannelSliceCount;
|
|
4177
|
+
getSkinIndex(): number;
|
|
4178
|
+
private configureMaterial;
|
|
4179
|
+
private albedoChannelUrls;
|
|
4180
|
+
private normalChannelUrls;
|
|
4181
|
+
private metalRoughChannelUrls;
|
|
4182
|
+
private emissiveChannelUrls;
|
|
4183
|
+
private sliceUrls;
|
|
4184
|
+
private resolveLayerUrl;
|
|
4185
|
+
private applyIndexToTargets;
|
|
4186
|
+
private applyLayerToMaterial;
|
|
4187
|
+
private isInstancedSetup;
|
|
4188
|
+
private ensureSkinLayerBuffer;
|
|
4189
|
+
private getMeshSlots;
|
|
4190
|
+
private matchSlot;
|
|
4191
|
+
private resolvePartMaterial;
|
|
4192
|
+
private partName;
|
|
4193
|
+
private cloneForRegular;
|
|
4194
|
+
private parseManifest;
|
|
4195
|
+
private toInt;
|
|
4196
|
+
private isConfigured;
|
|
4197
|
+
private markConfigured;
|
|
4198
|
+
private describeKind;
|
|
4199
|
+
}
|
|
4098
4200
|
export declare class UserInterface extends ScriptComponent {
|
|
4099
4201
|
private static readonly PHYSICAL_SIZE_SLICE_FACTOR;
|
|
4100
4202
|
private static readonly PHYSICAL_SIZE_POINT_FACTOR;
|