@onerjs/core 8.25.1 → 8.25.3
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/bone.js +14 -54
- package/Bones/bone.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.cubeTexture.js +1 -1
- package/Engines/AbstractEngine/abstractEngine.cubeTexture.js.map +1 -1
- package/Engines/Native/nativeShaderProcessors.js +3 -0
- package/Engines/Native/nativeShaderProcessors.js.map +1 -1
- package/Engines/WebGL/webGL2ShaderProcessors.js +3 -0
- package/Engines/WebGL/webGL2ShaderProcessors.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsGLSL.d.ts +3 -1
- package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js +4 -1
- package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +4 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/abstractEngine.d.ts +1 -1
- package/Engines/abstractEngine.functions.d.ts +2 -2
- package/Engines/abstractEngine.functions.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/nullEngine.js +1 -0
- package/Engines/nullEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +3 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +10 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +3 -0
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +10 -0
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +8 -0
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js +16 -0
- package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.js +2 -0
- package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +6 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +16 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +8 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +40 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.d.ts +3 -1
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +10 -7
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +2 -2
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphTextureManager.js +4 -0
- package/FrameGraph/frameGraphTextureManager.js.map +1 -1
- package/Gizmos/cameraGizmo.js +11 -13
- package/Gizmos/cameraGizmo.js.map +1 -1
- package/Gizmos/planeDragGizmo.js +21 -13
- package/Gizmos/planeDragGizmo.js.map +1 -1
- package/Loading/sceneLoader.d.ts +3 -1
- package/Loading/sceneLoader.js +3 -2
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +1 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +1 -1
- package/Materials/Node/nodeMaterial.js +3 -14
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +1 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.d.ts +5 -0
- package/Materials/Textures/renderTargetTexture.js +9 -0
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/material.d.ts +17 -1
- package/Materials/material.js +38 -7
- package/Materials/material.js.map +1 -1
- package/Materials/materialDefines.d.ts +1 -0
- package/Materials/materialDefines.js +1 -0
- package/Materials/materialDefines.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +2 -1
- package/Materials/materialHelper.functions.js +3 -1
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.js +1 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +3 -10
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/geometry.js +4 -4
- package/Meshes/geometry.js.map +1 -1
- package/Misc/assetsManager.d.ts +81 -25
- package/Misc/assetsManager.js +70 -32
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/fileTools.d.ts +2 -2
- package/Misc/fileTools.js +3 -1
- package/Misc/fileTools.js.map +1 -1
- package/Misc/sceneSerializer.js +3 -1
- package/Misc/sceneSerializer.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +6 -0
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +4 -0
- package/Particles/gpuParticleSystem.js +4 -0
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +14 -0
- package/Particles/thinParticleSystem.js +19 -0
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Physics/joinedPhysicsEngineComponent.js +1 -1
- package/Physics/joinedPhysicsEngineComponent.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +5 -3
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +22 -9
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.js +3 -0
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +18 -2
- package/Rendering/objectRenderer.js +69 -29
- package/Rendering/objectRenderer.js.map +1 -1
- package/Rendering/outlineRenderer.d.ts +4 -0
- package/Rendering/outlineRenderer.js +10 -0
- package/Rendering/outlineRenderer.js.map +1 -1
- package/Shaders/pbr.vertex.js +1 -5
- package/Shaders/pbr.vertex.js.map +1 -1
- package/Shaders/ssao2.fragment.js +14 -2
- package/Shaders/ssao2.fragment.js.map +1 -1
- package/ShadersWGSL/ssao2.fragment.js +14 -2
- package/ShadersWGSL/ssao2.fragment.js.map +1 -1
- package/XR/features/WebXRDepthSensing.js +6 -2
- package/XR/features/WebXRDepthSensing.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +2 -0
- package/scene.js.map +1 -1
package/Misc/assetsManager.d.ts
CHANGED
|
@@ -3,9 +3,12 @@ import type { AbstractMesh } from "../Meshes/abstractMesh.js";
|
|
|
3
3
|
import type { TransformNode } from "../Meshes/transformNode.js";
|
|
4
4
|
import type { IParticleSystem } from "../Particles/IParticleSystem.js";
|
|
5
5
|
import type { Skeleton } from "../Bones/skeleton.js";
|
|
6
|
+
import type { PluginOptions } from "../Loading/sceneLoader.js";
|
|
6
7
|
import { Observable } from "./observable.js";
|
|
7
8
|
import type { BaseTexture } from "../Materials/Textures/baseTexture.js";
|
|
9
|
+
import type { ITextureCreationOptions } from "../Materials/Textures/texture.js";
|
|
8
10
|
import { Texture } from "../Materials/Textures/texture.js";
|
|
11
|
+
import type { ICubeTextureCreationOptions } from "../Materials/Textures/cubeTexture.js";
|
|
9
12
|
import { CubeTexture } from "../Materials/Textures/cubeTexture.js";
|
|
10
13
|
import { HDRCubeTexture } from "../Materials/Textures/hdrCubeTexture.js";
|
|
11
14
|
import { EquiRectangularCubeTexture } from "../Materials/Textures/equiRectangularCubeTexture.js";
|
|
@@ -260,6 +263,14 @@ export declare class MeshAssetTask extends AbstractAssetTask {
|
|
|
260
263
|
* Defines the extension to use to load the scene (if not defined, ".babylon" will be used)
|
|
261
264
|
*/
|
|
262
265
|
extension?: string | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* defines the name of the file, if the data is binary
|
|
268
|
+
*/
|
|
269
|
+
fileName?: string | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* defines the options to use with the plugin
|
|
272
|
+
*/
|
|
273
|
+
pluginOptions?: PluginOptions;
|
|
263
274
|
/**
|
|
264
275
|
* Gets the list of loaded transforms
|
|
265
276
|
*/
|
|
@@ -295,6 +306,8 @@ export declare class MeshAssetTask extends AbstractAssetTask {
|
|
|
295
306
|
* @param rootUrl defines the root url to use as a base to load your meshes and associated resources
|
|
296
307
|
* @param sceneFilename defines the filename or File of the scene to load from
|
|
297
308
|
* @param extension defines the extension to use to load the scene (if not defined, ".babylon" will be used)
|
|
309
|
+
* @param fileName defines the name of the file, if the data is binary
|
|
310
|
+
* @param pluginOptions defines the options to use with the plugin
|
|
298
311
|
*/
|
|
299
312
|
constructor(
|
|
300
313
|
/**
|
|
@@ -316,7 +329,15 @@ export declare class MeshAssetTask extends AbstractAssetTask {
|
|
|
316
329
|
/**
|
|
317
330
|
* Defines the extension to use to load the scene (if not defined, ".babylon" will be used)
|
|
318
331
|
*/
|
|
319
|
-
extension?: string | undefined
|
|
332
|
+
extension?: string | undefined,
|
|
333
|
+
/**
|
|
334
|
+
* defines the name of the file, if the data is binary
|
|
335
|
+
*/
|
|
336
|
+
fileName?: string | undefined,
|
|
337
|
+
/**
|
|
338
|
+
* defines the options to use with the plugin
|
|
339
|
+
*/
|
|
340
|
+
pluginOptions?: PluginOptions);
|
|
320
341
|
/**
|
|
321
342
|
* Execute the current task
|
|
322
343
|
* @param scene defines the scene where you want your assets to be loaded
|
|
@@ -562,9 +583,9 @@ export declare class TextureAssetTask extends AbstractAssetTask implements IText
|
|
|
562
583
|
*/
|
|
563
584
|
url: string;
|
|
564
585
|
/**
|
|
565
|
-
* Defines if mipmap should not be generated (default is false)
|
|
586
|
+
* Defines if mipmap should not be generated (default is false) or the creation options to use
|
|
566
587
|
*/
|
|
567
|
-
|
|
588
|
+
noMipmapOrOptions?: (boolean | ITextureCreationOptions) | undefined;
|
|
568
589
|
/**
|
|
569
590
|
* [true] Defines if texture must be inverted on Y axis (default is true)
|
|
570
591
|
*/
|
|
@@ -589,7 +610,7 @@ export declare class TextureAssetTask extends AbstractAssetTask implements IText
|
|
|
589
610
|
* Creates a new TextureAssetTask object
|
|
590
611
|
* @param name defines the name of the task
|
|
591
612
|
* @param url defines the location of the file to load
|
|
592
|
-
* @param
|
|
613
|
+
* @param noMipmapOrOptions defines if mipmap should not be generated (default is false) or the creation options to use
|
|
593
614
|
* @param invertY defines if texture must be inverted on Y axis (default is true)
|
|
594
615
|
* @param samplingMode defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)
|
|
595
616
|
*/
|
|
@@ -603,9 +624,9 @@ export declare class TextureAssetTask extends AbstractAssetTask implements IText
|
|
|
603
624
|
*/
|
|
604
625
|
url: string,
|
|
605
626
|
/**
|
|
606
|
-
* Defines if mipmap should not be generated (default is false)
|
|
627
|
+
* Defines if mipmap should not be generated (default is false) or the creation options to use
|
|
607
628
|
*/
|
|
608
|
-
|
|
629
|
+
noMipmapOrOptions?: (boolean | ITextureCreationOptions) | undefined,
|
|
609
630
|
/**
|
|
610
631
|
* [true] Defines if texture must be inverted on Y axis (default is true)
|
|
611
632
|
*/
|
|
@@ -635,9 +656,9 @@ export declare class CubeTextureAssetTask extends AbstractAssetTask implements I
|
|
|
635
656
|
*/
|
|
636
657
|
url: string;
|
|
637
658
|
/**
|
|
638
|
-
* Defines the
|
|
659
|
+
* Defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture
|
|
639
660
|
*/
|
|
640
|
-
|
|
661
|
+
extensionsOrOptions: Nullable<string[] | ICubeTextureCreationOptions>;
|
|
641
662
|
/**
|
|
642
663
|
* Defines if mipmaps should not be generated (default is false)
|
|
643
664
|
*/
|
|
@@ -666,7 +687,7 @@ export declare class CubeTextureAssetTask extends AbstractAssetTask implements I
|
|
|
666
687
|
* Creates a new CubeTextureAssetTask
|
|
667
688
|
* @param name defines the name of the task
|
|
668
689
|
* @param url defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)
|
|
669
|
-
* @param
|
|
690
|
+
* @param extensionsOrOptions defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture
|
|
670
691
|
* @param noMipmap defines if mipmaps should not be generated (default is false)
|
|
671
692
|
* @param files defines the explicit list of files (undefined by default)
|
|
672
693
|
* @param prefiltered
|
|
@@ -681,9 +702,9 @@ export declare class CubeTextureAssetTask extends AbstractAssetTask implements I
|
|
|
681
702
|
*/
|
|
682
703
|
url: string,
|
|
683
704
|
/**
|
|
684
|
-
* Defines the
|
|
705
|
+
* Defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture
|
|
685
706
|
*/
|
|
686
|
-
|
|
707
|
+
extensionsOrOptions?: Nullable<string[] | ICubeTextureCreationOptions>,
|
|
687
708
|
/**
|
|
688
709
|
* Defines if mipmaps should not be generated (default is false)
|
|
689
710
|
*/
|
|
@@ -733,9 +754,21 @@ export declare class HDRCubeTextureAssetTask extends AbstractAssetTask implement
|
|
|
733
754
|
*/
|
|
734
755
|
gammaSpace: boolean;
|
|
735
756
|
/**
|
|
736
|
-
* [false]
|
|
757
|
+
* [false] Specifies if the texture should be prefiltered on load (default is false)
|
|
758
|
+
*/
|
|
759
|
+
prefilterOnLoad: boolean;
|
|
760
|
+
/**
|
|
761
|
+
* [false] Specifies if the texture will be generated with super sampling (default is false)
|
|
762
|
+
*/
|
|
763
|
+
supersample: boolean;
|
|
764
|
+
/**
|
|
765
|
+
* [false] Specifies if the irradiance should be prefiltered on load (default is false)
|
|
737
766
|
*/
|
|
738
|
-
|
|
767
|
+
prefilterIrradianceOnLoad: boolean;
|
|
768
|
+
/**
|
|
769
|
+
* [false] Specifies if the texture should be prefiltered using CDF (default is false)
|
|
770
|
+
*/
|
|
771
|
+
prefilterUsingCdf: boolean;
|
|
739
772
|
/**
|
|
740
773
|
* Gets the loaded texture
|
|
741
774
|
*/
|
|
@@ -756,7 +789,10 @@ export declare class HDRCubeTextureAssetTask extends AbstractAssetTask implement
|
|
|
756
789
|
* @param noMipmap defines if mipmaps should not be generated (default is false)
|
|
757
790
|
* @param generateHarmonics specifies whether you want to extract the polynomial harmonics during the generation process (default is true)
|
|
758
791
|
* @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)
|
|
759
|
-
* @param
|
|
792
|
+
* @param prefilterOnLoad specifies if the texture should be prefiltered on load (default is false)
|
|
793
|
+
* @param supersample specifies if the texture will be generated with super sampling (default is false)
|
|
794
|
+
* @param prefilterIrradianceOnLoad specifies if the irradiance should be prefiltered on load (default is false)
|
|
795
|
+
* @param prefilterUsingCdf specifies if the texture should be prefiltered using CDF (default is false)
|
|
760
796
|
*/
|
|
761
797
|
constructor(
|
|
762
798
|
/**
|
|
@@ -784,9 +820,21 @@ export declare class HDRCubeTextureAssetTask extends AbstractAssetTask implement
|
|
|
784
820
|
*/
|
|
785
821
|
gammaSpace?: boolean,
|
|
786
822
|
/**
|
|
787
|
-
* [false]
|
|
823
|
+
* [false] Specifies if the texture should be prefiltered on load (default is false)
|
|
824
|
+
*/
|
|
825
|
+
prefilterOnLoad?: boolean,
|
|
826
|
+
/**
|
|
827
|
+
* [false] Specifies if the texture will be generated with super sampling (default is false)
|
|
828
|
+
*/
|
|
829
|
+
supersample?: boolean,
|
|
830
|
+
/**
|
|
831
|
+
* [false] Specifies if the irradiance should be prefiltered on load (default is false)
|
|
788
832
|
*/
|
|
789
|
-
|
|
833
|
+
prefilterIrradianceOnLoad?: boolean,
|
|
834
|
+
/**
|
|
835
|
+
* [false] Specifies if the texture should be prefiltered using CDF (default is false)
|
|
836
|
+
*/
|
|
837
|
+
prefilterUsingCdf?: boolean);
|
|
790
838
|
/**
|
|
791
839
|
* Execute the current task
|
|
792
840
|
* @param scene defines the scene where you want your assets to be loaded
|
|
@@ -820,6 +868,7 @@ export declare class EquiRectangularCubeTextureAssetTask extends AbstractAssetTa
|
|
|
820
868
|
* but the standard material would require them in Gamma space) (default is true)
|
|
821
869
|
*/
|
|
822
870
|
gammaSpace: boolean;
|
|
871
|
+
superSample: boolean;
|
|
823
872
|
/**
|
|
824
873
|
* Gets the loaded texture
|
|
825
874
|
*/
|
|
@@ -840,6 +889,7 @@ export declare class EquiRectangularCubeTextureAssetTask extends AbstractAssetTa
|
|
|
840
889
|
* If the size is omitted this implies you are using a preprocessed cubemap.
|
|
841
890
|
* @param noMipmap defines if mipmaps should not be generated (default is false)
|
|
842
891
|
* @param gammaSpace specifies if the texture will be used in gamma or linear space
|
|
892
|
+
* @param superSample specifies if the texture will be generated with super sampling (default is false)
|
|
843
893
|
* (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)
|
|
844
894
|
* (default is true)
|
|
845
895
|
*/
|
|
@@ -864,7 +914,7 @@ export declare class EquiRectangularCubeTextureAssetTask extends AbstractAssetTa
|
|
|
864
914
|
* [true] Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space,
|
|
865
915
|
* but the standard material would require them in Gamma space) (default is true)
|
|
866
916
|
*/
|
|
867
|
-
gammaSpace?: boolean);
|
|
917
|
+
gammaSpace?: boolean, superSample?: boolean);
|
|
868
918
|
/**
|
|
869
919
|
* Execute the current task
|
|
870
920
|
* @param scene defines the scene where you want your assets to be loaded
|
|
@@ -948,9 +998,11 @@ export declare class AssetsManager {
|
|
|
948
998
|
* @param rootUrl defines the root url to use to locate files
|
|
949
999
|
* @param sceneFilename defines the filename of the scene file or the File itself
|
|
950
1000
|
* @param extension defines the extension to use to load the file
|
|
1001
|
+
* @param filename defines the name of the file, if the data is binary
|
|
1002
|
+
* @param pluginOptions defines the options to use with the plugin
|
|
951
1003
|
* @returns a new MeshAssetTask object
|
|
952
1004
|
*/
|
|
953
|
-
addMeshTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string | File, extension?: string): MeshAssetTask;
|
|
1005
|
+
addMeshTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string | File, extension?: string, filename?: string, pluginOptions?: PluginOptions): MeshAssetTask;
|
|
954
1006
|
/**
|
|
955
1007
|
* Add a TextFileAssetTask to the list of active tasks
|
|
956
1008
|
* @param taskName defines the name of the new task
|
|
@@ -976,23 +1028,23 @@ export declare class AssetsManager {
|
|
|
976
1028
|
* Add a TextureAssetTask to the list of active tasks
|
|
977
1029
|
* @param taskName defines the name of the new task
|
|
978
1030
|
* @param url defines the url of the file to load
|
|
979
|
-
* @param
|
|
1031
|
+
* @param noMipmapOrOptions defines if mipmap should not be generated (default is false) or the creation options to use
|
|
980
1032
|
* @param invertY defines if you want to invert Y axis of the loaded texture (true by default)
|
|
981
1033
|
* @param samplingMode defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)
|
|
982
1034
|
* @returns a new TextureAssetTask object
|
|
983
1035
|
*/
|
|
984
|
-
addTextureTask(taskName: string, url: string,
|
|
1036
|
+
addTextureTask(taskName: string, url: string, noMipmapOrOptions?: boolean | ITextureCreationOptions, invertY?: boolean, samplingMode?: number): TextureAssetTask;
|
|
985
1037
|
/**
|
|
986
1038
|
* Add a CubeTextureAssetTask to the list of active tasks
|
|
987
1039
|
* @param taskName defines the name of the new task
|
|
988
1040
|
* @param url defines the url of the file to load
|
|
989
|
-
* @param
|
|
1041
|
+
* @param extensionsOrOptions defines the extension to use to load the cube map (can be null) or the options to use for the cube texture
|
|
990
1042
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
991
1043
|
* @param files defines the list of files to load (can be null)
|
|
992
1044
|
* @param prefiltered defines the prefiltered texture option (default is false)
|
|
993
1045
|
* @returns a new CubeTextureAssetTask object
|
|
994
1046
|
*/
|
|
995
|
-
addCubeTextureTask(taskName: string, url: string,
|
|
1047
|
+
addCubeTextureTask(taskName: string, url: string, extensionsOrOptions?: string[] | ICubeTextureCreationOptions, noMipmap?: boolean, files?: string[], prefiltered?: boolean): CubeTextureAssetTask;
|
|
996
1048
|
/**
|
|
997
1049
|
*
|
|
998
1050
|
* Add a HDRCubeTextureAssetTask to the list of active tasks
|
|
@@ -1002,10 +1054,13 @@ export declare class AssetsManager {
|
|
|
1002
1054
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
1003
1055
|
* @param generateHarmonics defines if you want to automatically generate (true by default)
|
|
1004
1056
|
* @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)
|
|
1005
|
-
* @param
|
|
1057
|
+
* @param prefilterOnLoad specifies if the texture should be prefiltered on load (default is false)
|
|
1058
|
+
* @param supersample specifies if the texture will be generated with super sampling (default is false)
|
|
1059
|
+
* @param prefilterIrradianceOnLoad specifies if the irradiance should be prefiltered on load (default is false)
|
|
1060
|
+
* @param prefilterUsingCdf specifies if the texture should be prefiltered using CDF (default is false)
|
|
1006
1061
|
* @returns a new HDRCubeTextureAssetTask object
|
|
1007
1062
|
*/
|
|
1008
|
-
addHDRCubeTextureTask(taskName: string, url: string, size: number, noMipmap?: boolean, generateHarmonics?: boolean, gammaSpace?: boolean,
|
|
1063
|
+
addHDRCubeTextureTask(taskName: string, url: string, size: number, noMipmap?: boolean, generateHarmonics?: boolean, gammaSpace?: boolean, prefilterOnLoad?: boolean, supersample?: boolean, prefilterIrradianceOnLoad?: boolean, prefilterUsingCdf?: boolean): HDRCubeTextureAssetTask;
|
|
1009
1064
|
/**
|
|
1010
1065
|
*
|
|
1011
1066
|
* Add a EquiRectangularCubeTextureAssetTask to the list of active tasks
|
|
@@ -1014,10 +1069,11 @@ export declare class AssetsManager {
|
|
|
1014
1069
|
* @param size defines the size you want for the cubemap (can be null)
|
|
1015
1070
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
1016
1071
|
* @param gammaSpace Specifies if the texture will be used in gamma or linear space
|
|
1072
|
+
* @param superSample specifies if the texture will be generated with super sampling (default is false)
|
|
1017
1073
|
* (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
|
|
1018
1074
|
* @returns a new EquiRectangularCubeTextureAssetTask object
|
|
1019
1075
|
*/
|
|
1020
|
-
addEquiRectangularCubeTextureAssetTask(taskName: string, url: string, size: number, noMipmap?: boolean, gammaSpace?: boolean): EquiRectangularCubeTextureAssetTask;
|
|
1076
|
+
addEquiRectangularCubeTextureAssetTask(taskName: string, url: string, size: number, noMipmap?: boolean, gammaSpace?: boolean, superSample?: boolean): EquiRectangularCubeTextureAssetTask;
|
|
1021
1077
|
/**
|
|
1022
1078
|
* Remove a task from the assets manager.
|
|
1023
1079
|
* @param task the task to remove
|
package/Misc/assetsManager.js
CHANGED
|
@@ -219,6 +219,8 @@ export class MeshAssetTask extends AbstractAssetTask {
|
|
|
219
219
|
* @param rootUrl defines the root url to use as a base to load your meshes and associated resources
|
|
220
220
|
* @param sceneFilename defines the filename or File of the scene to load from
|
|
221
221
|
* @param extension defines the extension to use to load the scene (if not defined, ".babylon" will be used)
|
|
222
|
+
* @param fileName defines the name of the file, if the data is binary
|
|
223
|
+
* @param pluginOptions defines the options to use with the plugin
|
|
222
224
|
*/
|
|
223
225
|
constructor(
|
|
224
226
|
/**
|
|
@@ -240,13 +242,23 @@ export class MeshAssetTask extends AbstractAssetTask {
|
|
|
240
242
|
/**
|
|
241
243
|
* Defines the extension to use to load the scene (if not defined, ".babylon" will be used)
|
|
242
244
|
*/
|
|
243
|
-
extension
|
|
245
|
+
extension,
|
|
246
|
+
/**
|
|
247
|
+
* defines the name of the file, if the data is binary
|
|
248
|
+
*/
|
|
249
|
+
fileName,
|
|
250
|
+
/**
|
|
251
|
+
* defines the options to use with the plugin
|
|
252
|
+
*/
|
|
253
|
+
pluginOptions) {
|
|
244
254
|
super(name);
|
|
245
255
|
this.name = name;
|
|
246
256
|
this.meshesNames = meshesNames;
|
|
247
257
|
this.rootUrl = rootUrl;
|
|
248
258
|
this.sceneFilename = sceneFilename;
|
|
249
259
|
this.extension = extension;
|
|
260
|
+
this.fileName = fileName;
|
|
261
|
+
this.pluginOptions = pluginOptions;
|
|
250
262
|
}
|
|
251
263
|
/**
|
|
252
264
|
* Execute the current task
|
|
@@ -264,7 +276,7 @@ export class MeshAssetTask extends AbstractAssetTask {
|
|
|
264
276
|
onSuccess();
|
|
265
277
|
}, null, (scene, message, exception) => {
|
|
266
278
|
onError(message, exception);
|
|
267
|
-
}, this.extension);
|
|
279
|
+
}, this.extension, this.fileName, this.pluginOptions);
|
|
268
280
|
}
|
|
269
281
|
}
|
|
270
282
|
/**
|
|
@@ -454,7 +466,7 @@ export class TextureAssetTask extends AbstractAssetTask {
|
|
|
454
466
|
* Creates a new TextureAssetTask object
|
|
455
467
|
* @param name defines the name of the task
|
|
456
468
|
* @param url defines the location of the file to load
|
|
457
|
-
* @param
|
|
469
|
+
* @param noMipmapOrOptions defines if mipmap should not be generated (default is false) or the creation options to use
|
|
458
470
|
* @param invertY defines if texture must be inverted on Y axis (default is true)
|
|
459
471
|
* @param samplingMode defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)
|
|
460
472
|
*/
|
|
@@ -468,9 +480,9 @@ export class TextureAssetTask extends AbstractAssetTask {
|
|
|
468
480
|
*/
|
|
469
481
|
url,
|
|
470
482
|
/**
|
|
471
|
-
* Defines if mipmap should not be generated (default is false)
|
|
483
|
+
* Defines if mipmap should not be generated (default is false) or the creation options to use
|
|
472
484
|
*/
|
|
473
|
-
|
|
485
|
+
noMipmapOrOptions,
|
|
474
486
|
/**
|
|
475
487
|
* [true] Defines if texture must be inverted on Y axis (default is true)
|
|
476
488
|
*/
|
|
@@ -482,7 +494,7 @@ export class TextureAssetTask extends AbstractAssetTask {
|
|
|
482
494
|
super(name);
|
|
483
495
|
this.name = name;
|
|
484
496
|
this.url = url;
|
|
485
|
-
this.
|
|
497
|
+
this.noMipmapOrOptions = noMipmapOrOptions;
|
|
486
498
|
this.invertY = invertY;
|
|
487
499
|
this.samplingMode = samplingMode;
|
|
488
500
|
}
|
|
@@ -499,7 +511,7 @@ export class TextureAssetTask extends AbstractAssetTask {
|
|
|
499
511
|
const onerror = (message, exception) => {
|
|
500
512
|
onError(message, exception);
|
|
501
513
|
};
|
|
502
|
-
this.texture = new Texture(this.url, scene, this.
|
|
514
|
+
this.texture = new Texture(this.url, scene, this.noMipmapOrOptions, this.invertY, this.samplingMode, onload, onerror);
|
|
503
515
|
}
|
|
504
516
|
}
|
|
505
517
|
/**
|
|
@@ -510,7 +522,7 @@ export class CubeTextureAssetTask extends AbstractAssetTask {
|
|
|
510
522
|
* Creates a new CubeTextureAssetTask
|
|
511
523
|
* @param name defines the name of the task
|
|
512
524
|
* @param url defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)
|
|
513
|
-
* @param
|
|
525
|
+
* @param extensionsOrOptions defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture
|
|
514
526
|
* @param noMipmap defines if mipmaps should not be generated (default is false)
|
|
515
527
|
* @param files defines the explicit list of files (undefined by default)
|
|
516
528
|
* @param prefiltered
|
|
@@ -525,9 +537,9 @@ export class CubeTextureAssetTask extends AbstractAssetTask {
|
|
|
525
537
|
*/
|
|
526
538
|
url,
|
|
527
539
|
/**
|
|
528
|
-
* Defines the
|
|
540
|
+
* Defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture
|
|
529
541
|
*/
|
|
530
|
-
|
|
542
|
+
extensionsOrOptions = null,
|
|
531
543
|
/**
|
|
532
544
|
* Defines if mipmaps should not be generated (default is false)
|
|
533
545
|
*/
|
|
@@ -543,7 +555,7 @@ export class CubeTextureAssetTask extends AbstractAssetTask {
|
|
|
543
555
|
super(name);
|
|
544
556
|
this.name = name;
|
|
545
557
|
this.url = url;
|
|
546
|
-
this.
|
|
558
|
+
this.extensionsOrOptions = extensionsOrOptions;
|
|
547
559
|
this.noMipmap = noMipmap;
|
|
548
560
|
this.files = files;
|
|
549
561
|
this.prefiltered = prefiltered;
|
|
@@ -561,7 +573,7 @@ export class CubeTextureAssetTask extends AbstractAssetTask {
|
|
|
561
573
|
const onerror = (message, exception) => {
|
|
562
574
|
onError(message, exception);
|
|
563
575
|
};
|
|
564
|
-
this.texture = new CubeTexture(this.url, scene, this.
|
|
576
|
+
this.texture = new CubeTexture(this.url, scene, this.extensionsOrOptions, this.noMipmap, this.files, onload, onerror, undefined, this.prefiltered);
|
|
565
577
|
}
|
|
566
578
|
}
|
|
567
579
|
/**
|
|
@@ -576,7 +588,10 @@ export class HDRCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
576
588
|
* @param noMipmap defines if mipmaps should not be generated (default is false)
|
|
577
589
|
* @param generateHarmonics specifies whether you want to extract the polynomial harmonics during the generation process (default is true)
|
|
578
590
|
* @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)
|
|
579
|
-
* @param
|
|
591
|
+
* @param prefilterOnLoad specifies if the texture should be prefiltered on load (default is false)
|
|
592
|
+
* @param supersample specifies if the texture will be generated with super sampling (default is false)
|
|
593
|
+
* @param prefilterIrradianceOnLoad specifies if the irradiance should be prefiltered on load (default is false)
|
|
594
|
+
* @param prefilterUsingCdf specifies if the texture should be prefiltered using CDF (default is false)
|
|
580
595
|
*/
|
|
581
596
|
constructor(
|
|
582
597
|
/**
|
|
@@ -604,9 +619,21 @@ export class HDRCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
604
619
|
*/
|
|
605
620
|
gammaSpace = false,
|
|
606
621
|
/**
|
|
607
|
-
* [false]
|
|
622
|
+
* [false] Specifies if the texture should be prefiltered on load (default is false)
|
|
608
623
|
*/
|
|
609
|
-
|
|
624
|
+
prefilterOnLoad = false,
|
|
625
|
+
/**
|
|
626
|
+
* [false] Specifies if the texture will be generated with super sampling (default is false)
|
|
627
|
+
*/
|
|
628
|
+
supersample = false,
|
|
629
|
+
/**
|
|
630
|
+
* [false] Specifies if the irradiance should be prefiltered on load (default is false)
|
|
631
|
+
*/
|
|
632
|
+
prefilterIrradianceOnLoad = false,
|
|
633
|
+
/**
|
|
634
|
+
* [false] Specifies if the texture should be prefiltered using CDF (default is false)
|
|
635
|
+
*/
|
|
636
|
+
prefilterUsingCdf = false) {
|
|
610
637
|
super(name);
|
|
611
638
|
this.name = name;
|
|
612
639
|
this.url = url;
|
|
@@ -614,7 +641,10 @@ export class HDRCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
614
641
|
this.noMipmap = noMipmap;
|
|
615
642
|
this.generateHarmonics = generateHarmonics;
|
|
616
643
|
this.gammaSpace = gammaSpace;
|
|
617
|
-
this.
|
|
644
|
+
this.prefilterOnLoad = prefilterOnLoad;
|
|
645
|
+
this.supersample = supersample;
|
|
646
|
+
this.prefilterIrradianceOnLoad = prefilterIrradianceOnLoad;
|
|
647
|
+
this.prefilterUsingCdf = prefilterUsingCdf;
|
|
618
648
|
}
|
|
619
649
|
/**
|
|
620
650
|
* Execute the current task
|
|
@@ -629,7 +659,7 @@ export class HDRCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
629
659
|
const onerror = (message, exception) => {
|
|
630
660
|
onError(message, exception);
|
|
631
661
|
};
|
|
632
|
-
this.texture = new HDRCubeTexture(this.url, scene, this.size, this.noMipmap, this.generateHarmonics, this.gammaSpace, this.
|
|
662
|
+
this.texture = new HDRCubeTexture(this.url, scene, this.size, this.noMipmap, this.generateHarmonics, this.gammaSpace, this.prefilterOnLoad, onload, onerror, this.supersample, this.prefilterIrradianceOnLoad, this.prefilterUsingCdf);
|
|
633
663
|
}
|
|
634
664
|
}
|
|
635
665
|
/**
|
|
@@ -644,6 +674,7 @@ export class EquiRectangularCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
644
674
|
* If the size is omitted this implies you are using a preprocessed cubemap.
|
|
645
675
|
* @param noMipmap defines if mipmaps should not be generated (default is false)
|
|
646
676
|
* @param gammaSpace specifies if the texture will be used in gamma or linear space
|
|
677
|
+
* @param superSample specifies if the texture will be generated with super sampling (default is false)
|
|
647
678
|
* (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)
|
|
648
679
|
* (default is true)
|
|
649
680
|
*/
|
|
@@ -668,13 +699,14 @@ export class EquiRectangularCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
668
699
|
* [true] Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space,
|
|
669
700
|
* but the standard material would require them in Gamma space) (default is true)
|
|
670
701
|
*/
|
|
671
|
-
gammaSpace = true) {
|
|
702
|
+
gammaSpace = true, superSample = false) {
|
|
672
703
|
super(name);
|
|
673
704
|
this.name = name;
|
|
674
705
|
this.url = url;
|
|
675
706
|
this.size = size;
|
|
676
707
|
this.noMipmap = noMipmap;
|
|
677
708
|
this.gammaSpace = gammaSpace;
|
|
709
|
+
this.superSample = superSample;
|
|
678
710
|
}
|
|
679
711
|
/**
|
|
680
712
|
* Execute the current task
|
|
@@ -689,7 +721,7 @@ export class EquiRectangularCubeTextureAssetTask extends AbstractAssetTask {
|
|
|
689
721
|
const onerror = (message, exception) => {
|
|
690
722
|
onError(message, exception);
|
|
691
723
|
};
|
|
692
|
-
this.texture = new EquiRectangularCubeTexture(this.url, scene, this.size, this.noMipmap, this.gammaSpace, onload, onerror);
|
|
724
|
+
this.texture = new EquiRectangularCubeTexture(this.url, scene, this.size, this.noMipmap, this.gammaSpace, onload, onerror, this.superSample);
|
|
693
725
|
}
|
|
694
726
|
}
|
|
695
727
|
/**
|
|
@@ -756,10 +788,12 @@ export class AssetsManager {
|
|
|
756
788
|
* @param rootUrl defines the root url to use to locate files
|
|
757
789
|
* @param sceneFilename defines the filename of the scene file or the File itself
|
|
758
790
|
* @param extension defines the extension to use to load the file
|
|
791
|
+
* @param filename defines the name of the file, if the data is binary
|
|
792
|
+
* @param pluginOptions defines the options to use with the plugin
|
|
759
793
|
* @returns a new MeshAssetTask object
|
|
760
794
|
*/
|
|
761
|
-
addMeshTask(taskName, meshesNames, rootUrl, sceneFilename, extension) {
|
|
762
|
-
const task = new MeshAssetTask(taskName, meshesNames, rootUrl, sceneFilename, extension);
|
|
795
|
+
addMeshTask(taskName, meshesNames, rootUrl, sceneFilename, extension, filename, pluginOptions) {
|
|
796
|
+
const task = new MeshAssetTask(taskName, meshesNames, rootUrl, sceneFilename, extension, filename, pluginOptions);
|
|
763
797
|
this._tasks.push(task);
|
|
764
798
|
return task;
|
|
765
799
|
}
|
|
@@ -800,13 +834,13 @@ export class AssetsManager {
|
|
|
800
834
|
* Add a TextureAssetTask to the list of active tasks
|
|
801
835
|
* @param taskName defines the name of the new task
|
|
802
836
|
* @param url defines the url of the file to load
|
|
803
|
-
* @param
|
|
837
|
+
* @param noMipmapOrOptions defines if mipmap should not be generated (default is false) or the creation options to use
|
|
804
838
|
* @param invertY defines if you want to invert Y axis of the loaded texture (true by default)
|
|
805
839
|
* @param samplingMode defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)
|
|
806
840
|
* @returns a new TextureAssetTask object
|
|
807
841
|
*/
|
|
808
|
-
addTextureTask(taskName, url,
|
|
809
|
-
const task = new TextureAssetTask(taskName, url,
|
|
842
|
+
addTextureTask(taskName, url, noMipmapOrOptions, invertY, samplingMode = Texture.TRILINEAR_SAMPLINGMODE) {
|
|
843
|
+
const task = new TextureAssetTask(taskName, url, noMipmapOrOptions, invertY, samplingMode);
|
|
810
844
|
this._tasks.push(task);
|
|
811
845
|
return task;
|
|
812
846
|
}
|
|
@@ -814,14 +848,14 @@ export class AssetsManager {
|
|
|
814
848
|
* Add a CubeTextureAssetTask to the list of active tasks
|
|
815
849
|
* @param taskName defines the name of the new task
|
|
816
850
|
* @param url defines the url of the file to load
|
|
817
|
-
* @param
|
|
851
|
+
* @param extensionsOrOptions defines the extension to use to load the cube map (can be null) or the options to use for the cube texture
|
|
818
852
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
819
853
|
* @param files defines the list of files to load (can be null)
|
|
820
854
|
* @param prefiltered defines the prefiltered texture option (default is false)
|
|
821
855
|
* @returns a new CubeTextureAssetTask object
|
|
822
856
|
*/
|
|
823
|
-
addCubeTextureTask(taskName, url,
|
|
824
|
-
const task = new CubeTextureAssetTask(taskName, url,
|
|
857
|
+
addCubeTextureTask(taskName, url, extensionsOrOptions, noMipmap, files, prefiltered) {
|
|
858
|
+
const task = new CubeTextureAssetTask(taskName, url, extensionsOrOptions, noMipmap, files, prefiltered);
|
|
825
859
|
this._tasks.push(task);
|
|
826
860
|
return task;
|
|
827
861
|
}
|
|
@@ -834,11 +868,14 @@ export class AssetsManager {
|
|
|
834
868
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
835
869
|
* @param generateHarmonics defines if you want to automatically generate (true by default)
|
|
836
870
|
* @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)
|
|
837
|
-
* @param
|
|
871
|
+
* @param prefilterOnLoad specifies if the texture should be prefiltered on load (default is false)
|
|
872
|
+
* @param supersample specifies if the texture will be generated with super sampling (default is false)
|
|
873
|
+
* @param prefilterIrradianceOnLoad specifies if the irradiance should be prefiltered on load (default is false)
|
|
874
|
+
* @param prefilterUsingCdf specifies if the texture should be prefiltered using CDF (default is false)
|
|
838
875
|
* @returns a new HDRCubeTextureAssetTask object
|
|
839
876
|
*/
|
|
840
|
-
addHDRCubeTextureTask(taskName, url, size, noMipmap = false, generateHarmonics = true, gammaSpace = false,
|
|
841
|
-
const task = new HDRCubeTextureAssetTask(taskName, url, size, noMipmap, generateHarmonics, gammaSpace,
|
|
877
|
+
addHDRCubeTextureTask(taskName, url, size, noMipmap = false, generateHarmonics = true, gammaSpace = false, prefilterOnLoad = false, supersample = false, prefilterIrradianceOnLoad = false, prefilterUsingCdf = false) {
|
|
878
|
+
const task = new HDRCubeTextureAssetTask(taskName, url, size, noMipmap, generateHarmonics, gammaSpace, prefilterOnLoad, supersample, prefilterIrradianceOnLoad, prefilterUsingCdf);
|
|
842
879
|
this._tasks.push(task);
|
|
843
880
|
return task;
|
|
844
881
|
}
|
|
@@ -850,11 +887,12 @@ export class AssetsManager {
|
|
|
850
887
|
* @param size defines the size you want for the cubemap (can be null)
|
|
851
888
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
852
889
|
* @param gammaSpace Specifies if the texture will be used in gamma or linear space
|
|
890
|
+
* @param superSample specifies if the texture will be generated with super sampling (default is false)
|
|
853
891
|
* (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
|
|
854
892
|
* @returns a new EquiRectangularCubeTextureAssetTask object
|
|
855
893
|
*/
|
|
856
|
-
addEquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap = false, gammaSpace = true) {
|
|
857
|
-
const task = new EquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap, gammaSpace);
|
|
894
|
+
addEquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap = false, gammaSpace = true, superSample = false) {
|
|
895
|
+
const task = new EquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap, gammaSpace, superSample);
|
|
858
896
|
this._tasks.push(task);
|
|
859
897
|
return task;
|
|
860
898
|
}
|