David Catuhe пре 5 година
родитељ
комит
851eb9df6f

+ 12 - 3
dist/preview release/babylon.d.ts

@@ -11046,6 +11046,15 @@ declare module BABYLON {
          */
          */
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         /**
         /**
+         * Creates a sprite manager from a snippet saved in a remote file
+         * @param name defines the name of the sprite manager to create (can be null or empty to use the one from the json data)
+         * @param url defines the url to load from
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a promise that will resolve to the new sprite manager
+         */
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, rootUrl?: string): Promise<SpriteManager>;
+        /**
          * Creates a sprite manager from a snippet saved by the sprite editor
          * Creates a sprite manager from a snippet saved by the sprite editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
@@ -66056,14 +66065,14 @@ declare module BABYLON {
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         /**
         /**
          * Creates a particle system from a snippet saved in a remote file
          * Creates a particle system from a snippet saved in a remote file
-         * @param name defines the name of the  particle system to create
+         * @param name defines the name of the particle system to create (can be null or empty to use the one from the json data)
          * @param url defines the url to load from
          * @param url defines the url to load from
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param gpu If the system will use gpu
          * @param gpu If the system will use gpu
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a promise that will resolve to the new  particle system
+         * @returns a promise that will resolve to the new particle system
          */
          */
-        static ParseFromFileAsync(name: string, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
         /**
         /**
          * Creates a particle system from a snippet saved by the particle system editor
          * Creates a particle system from a snippet saved by the particle system editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/preview release/babylon.js


Разлика између датотеке није приказан због своје велике величине
+ 38 - 3
dist/preview release/babylon.max.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 24 - 6
dist/preview release/babylon.module.d.ts

@@ -11271,6 +11271,15 @@ declare module "babylonjs/Sprites/spriteManager" {
          */
          */
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         /**
         /**
+         * Creates a sprite manager from a snippet saved in a remote file
+         * @param name defines the name of the sprite manager to create (can be null or empty to use the one from the json data)
+         * @param url defines the url to load from
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a promise that will resolve to the new sprite manager
+         */
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, rootUrl?: string): Promise<SpriteManager>;
+        /**
          * Creates a sprite manager from a snippet saved by the sprite editor
          * Creates a sprite manager from a snippet saved by the sprite editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
@@ -69519,14 +69528,14 @@ declare module "babylonjs/Particles/particleHelper" {
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         /**
         /**
          * Creates a particle system from a snippet saved in a remote file
          * Creates a particle system from a snippet saved in a remote file
-         * @param name defines the name of the  particle system to create
+         * @param name defines the name of the particle system to create (can be null or empty to use the one from the json data)
          * @param url defines the url to load from
          * @param url defines the url to load from
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param gpu If the system will use gpu
          * @param gpu If the system will use gpu
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a promise that will resolve to the new  particle system
+         * @returns a promise that will resolve to the new particle system
          */
          */
-        static ParseFromFileAsync(name: string, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
         /**
         /**
          * Creates a particle system from a snippet saved by the particle system editor
          * Creates a particle system from a snippet saved by the particle system editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
@@ -88060,6 +88069,15 @@ declare module BABYLON {
          */
          */
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         /**
         /**
+         * Creates a sprite manager from a snippet saved in a remote file
+         * @param name defines the name of the sprite manager to create (can be null or empty to use the one from the json data)
+         * @param url defines the url to load from
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a promise that will resolve to the new sprite manager
+         */
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, rootUrl?: string): Promise<SpriteManager>;
+        /**
          * Creates a sprite manager from a snippet saved by the sprite editor
          * Creates a sprite manager from a snippet saved by the sprite editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
@@ -143070,14 +143088,14 @@ declare module BABYLON {
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         /**
         /**
          * Creates a particle system from a snippet saved in a remote file
          * Creates a particle system from a snippet saved in a remote file
-         * @param name defines the name of the  particle system to create
+         * @param name defines the name of the particle system to create (can be null or empty to use the one from the json data)
          * @param url defines the url to load from
          * @param url defines the url to load from
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param gpu If the system will use gpu
          * @param gpu If the system will use gpu
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a promise that will resolve to the new  particle system
+         * @returns a promise that will resolve to the new particle system
          */
          */
-        static ParseFromFileAsync(name: string, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
         /**
         /**
          * Creates a particle system from a snippet saved by the particle system editor
          * Creates a particle system from a snippet saved by the particle system editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load

+ 12 - 3
dist/preview release/documentation.d.ts

@@ -11046,6 +11046,15 @@ declare module BABYLON {
          */
          */
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         /**
         /**
+         * Creates a sprite manager from a snippet saved in a remote file
+         * @param name defines the name of the sprite manager to create (can be null or empty to use the one from the json data)
+         * @param url defines the url to load from
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a promise that will resolve to the new sprite manager
+         */
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, rootUrl?: string): Promise<SpriteManager>;
+        /**
          * Creates a sprite manager from a snippet saved by the sprite editor
          * Creates a sprite manager from a snippet saved by the sprite editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
@@ -66056,14 +66065,14 @@ declare module BABYLON {
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         /**
         /**
          * Creates a particle system from a snippet saved in a remote file
          * Creates a particle system from a snippet saved in a remote file
-         * @param name defines the name of the  particle system to create
+         * @param name defines the name of the particle system to create (can be null or empty to use the one from the json data)
          * @param url defines the url to load from
          * @param url defines the url to load from
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param gpu If the system will use gpu
          * @param gpu If the system will use gpu
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a promise that will resolve to the new  particle system
+         * @returns a promise that will resolve to the new particle system
          */
          */
-        static ParseFromFileAsync(name: string, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
         /**
         /**
          * Creates a particle system from a snippet saved by the particle system editor
          * Creates a particle system from a snippet saved by the particle system editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load

+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"thinEngineOnly":115966,"engineOnly":152369,"sceneOnly":511549,"minGridMaterial":644826,"minStandardMaterial":788649}
+{"thinEngineOnly":115966,"engineOnly":152369,"sceneOnly":511549,"minGridMaterial":644826,"minStandardMaterial":788650}

+ 24 - 6
dist/preview release/viewer/babylon.module.d.ts

@@ -11271,6 +11271,15 @@ declare module "babylonjs/Sprites/spriteManager" {
          */
          */
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         /**
         /**
+         * Creates a sprite manager from a snippet saved in a remote file
+         * @param name defines the name of the sprite manager to create (can be null or empty to use the one from the json data)
+         * @param url defines the url to load from
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a promise that will resolve to the new sprite manager
+         */
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, rootUrl?: string): Promise<SpriteManager>;
+        /**
          * Creates a sprite manager from a snippet saved by the sprite editor
          * Creates a sprite manager from a snippet saved by the sprite editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
@@ -69519,14 +69528,14 @@ declare module "babylonjs/Particles/particleHelper" {
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         /**
         /**
          * Creates a particle system from a snippet saved in a remote file
          * Creates a particle system from a snippet saved in a remote file
-         * @param name defines the name of the  particle system to create
+         * @param name defines the name of the particle system to create (can be null or empty to use the one from the json data)
          * @param url defines the url to load from
          * @param url defines the url to load from
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param gpu If the system will use gpu
          * @param gpu If the system will use gpu
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a promise that will resolve to the new  particle system
+         * @returns a promise that will resolve to the new particle system
          */
          */
-        static ParseFromFileAsync(name: string, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
         /**
         /**
          * Creates a particle system from a snippet saved by the particle system editor
          * Creates a particle system from a snippet saved by the particle system editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
@@ -88060,6 +88069,15 @@ declare module BABYLON {
          */
          */
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         static Parse(parsedManager: any, scene: Scene, rootUrl: string): SpriteManager;
         /**
         /**
+         * Creates a sprite manager from a snippet saved in a remote file
+         * @param name defines the name of the sprite manager to create (can be null or empty to use the one from the json data)
+         * @param url defines the url to load from
+         * @param scene defines the hosting scene
+         * @param rootUrl defines the root URL to use to load textures and relative dependencies
+         * @returns a promise that will resolve to the new sprite manager
+         */
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, rootUrl?: string): Promise<SpriteManager>;
+        /**
          * Creates a sprite manager from a snippet saved by the sprite editor
          * Creates a sprite manager from a snippet saved by the sprite editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
@@ -143070,14 +143088,14 @@ declare module BABYLON {
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         static ExportSet(systems: IParticleSystem[]): ParticleSystemSet;
         /**
         /**
          * Creates a particle system from a snippet saved in a remote file
          * Creates a particle system from a snippet saved in a remote file
-         * @param name defines the name of the  particle system to create
+         * @param name defines the name of the particle system to create (can be null or empty to use the one from the json data)
          * @param url defines the url to load from
          * @param url defines the url to load from
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param gpu If the system will use gpu
          * @param gpu If the system will use gpu
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
          * @param rootUrl defines the root URL to use to load textures and relative dependencies
-         * @returns a promise that will resolve to the new  particle system
+         * @returns a promise that will resolve to the new particle system
          */
          */
-        static ParseFromFileAsync(name: string, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
+        static ParseFromFileAsync(name: Nullable<string>, url: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>;
         /**
         /**
          * Creates a particle system from a snippet saved by the particle system editor
          * Creates a particle system from a snippet saved by the particle system editor
          * @param snippetId defines the snippet to load
          * @param snippetId defines the snippet to load

Разлика између датотеке није приказан због своје велике величине
+ 4 - 4
dist/preview release/viewer/babylon.viewer.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
src/Particles/particleHelper.ts

@@ -140,7 +140,7 @@ export class ParticleHelper {
                         } else {
                         } else {
                             output = ParticleSystem.Parse(serializationObject, scene, rootUrl);
                             output = ParticleSystem.Parse(serializationObject, scene, rootUrl);
                         }
                         }
-                        
+
                         if (name) {
                         if (name) {
                             output.name = name;
                             output.name = name;
                         }
                         }

+ 3 - 3
src/Sprites/spriteManager.ts

@@ -840,11 +840,11 @@ export class SpriteManager implements ISpriteManager {
                     if (request.status == 200) {
                     if (request.status == 200) {
                         let serializationObject = JSON.parse(request.responseText);
                         let serializationObject = JSON.parse(request.responseText);
                         let output = SpriteManager.Parse(serializationObject, scene || Engine.LastCreatedScene, rootUrl);
                         let output = SpriteManager.Parse(serializationObject, scene || Engine.LastCreatedScene, rootUrl);
-                        
+
                         if (name) {
                         if (name) {
                             output.name = name;
                             output.name = name;
                         }
                         }
-                        
+
                         resolve(output);
                         resolve(output);
                     } else {
                     } else {
                         reject("Unable to load the sprite manager");
                         reject("Unable to load the sprite manager");
@@ -855,7 +855,7 @@ export class SpriteManager implements ISpriteManager {
             request.open("GET", url);
             request.open("GET", url);
             request.send();
             request.send();
         });
         });
-    }    
+    }
 
 
     /**
     /**
      * Creates a sprite manager from a snippet saved by the sprite editor
      * Creates a sprite manager from a snippet saved by the sprite editor