1 |
- {"ast":null,"code":"import { Vector3 } from \"../Maths/math.vector.js\";\nimport { PointParticleEmitter } from \"./EmitterTypes/pointParticleEmitter.js\";\nimport { HemisphericParticleEmitter } from \"./EmitterTypes/hemisphericParticleEmitter.js\";\nimport { SphereDirectedParticleEmitter, SphereParticleEmitter } from \"./EmitterTypes/sphereParticleEmitter.js\";\nimport { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from \"./EmitterTypes/cylinderParticleEmitter.js\";\nimport { ConeDirectedParticleEmitter, ConeParticleEmitter } from \"./EmitterTypes/coneParticleEmitter.js\";\n/**\n * Creates a Point Emitter for the particle system (emits directly from the emitter position)\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\n * @returns the emitter\n */\nexport function CreatePointEmitter(direction1, direction2) {\n const particleEmitter = new PointParticleEmitter();\n particleEmitter.direction1 = direction1;\n particleEmitter.direction2 = direction2;\n return particleEmitter;\n}\n/**\n * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)\n * @param radius The radius of the hemisphere to emit from\n * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\n * @returns the emitter\n */\nexport function CreateHemisphericEmitter(radius = 1, radiusRange = 1) {\n return new HemisphericParticleEmitter(radius, radiusRange);\n}\n/**\n * Creates a Sphere Emitter for the particle system (emits along the sphere radius)\n * @param radius The radius of the sphere to emit from\n * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\n * @returns the emitter\n */\nexport function CreateSphereEmitter(radius = 1, radiusRange = 1) {\n return new SphereParticleEmitter(radius, radiusRange);\n}\n/**\n * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)\n * @param radius The radius of the sphere to emit from\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere\n * @returns the emitter\n */\nexport function CreateDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {\n return new SphereDirectedParticleEmitter(radius, direction1, direction2);\n}\n/**\n * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)\n * @param radius The radius of the emission cylinder\n * @param height The height of the emission cylinder\n * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius\n * @param directionRandomizer How much to randomize the particle direction [0-1]\n * @returns the emitter\n */\nexport function CreateCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0) {\n return new CylinderParticleEmitter(radius, height, radiusRange, directionRandomizer);\n}\n/**\n * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)\n * @param radius The radius of the cylinder to emit from\n * @param height The height of the emission cylinder\n * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder\n * @returns the emitter\n */\nexport function CreateDirectedCylinderEmitter(radius = 1, height = 1, radiusRange = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {\n return new CylinderDirectedParticleEmitter(radius, height, radiusRange, direction1, direction2);\n}\n/**\n * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)\n * @param radius The radius of the cone to emit from\n * @param angle The base angle of the cone\n * @returns the emitter\n */\nexport function CreateConeEmitter(radius = 1, angle = Math.PI / 4) {\n return new ConeParticleEmitter(radius, angle);\n}\nexport function CreateDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {\n return new ConeDirectedParticleEmitter(radius, angle, direction1, direction2);\n}","map":{"version":3,"names":["Vector3","PointParticleEmitter","HemisphericParticleEmitter","SphereDirectedParticleEmitter","SphereParticleEmitter","CylinderDirectedParticleEmitter","CylinderParticleEmitter","ConeDirectedParticleEmitter","ConeParticleEmitter","CreatePointEmitter","direction1","direction2","particleEmitter","CreateHemisphericEmitter","radius","radiusRange","CreateSphereEmitter","CreateDirectedSphereEmitter","CreateCylinderEmitter","height","directionRandomizer","CreateDirectedCylinderEmitter","CreateConeEmitter","angle","Math","PI","CreateDirectedConeEmitter"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Particles/particleSystem.functions.js"],"sourcesContent":["import { Vector3 } from \"../Maths/math.vector.js\";\nimport { PointParticleEmitter } from \"./EmitterTypes/pointParticleEmitter.js\";\nimport { HemisphericParticleEmitter } from \"./EmitterTypes/hemisphericParticleEmitter.js\";\nimport { SphereDirectedParticleEmitter, SphereParticleEmitter } from \"./EmitterTypes/sphereParticleEmitter.js\";\nimport { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from \"./EmitterTypes/cylinderParticleEmitter.js\";\nimport { ConeDirectedParticleEmitter, ConeParticleEmitter } from \"./EmitterTypes/coneParticleEmitter.js\";\n/**\n * Creates a Point Emitter for the particle system (emits directly from the emitter position)\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\n * @returns the emitter\n */\nexport function CreatePointEmitter(direction1, direction2) {\n const particleEmitter = new PointParticleEmitter();\n particleEmitter.direction1 = direction1;\n particleEmitter.direction2 = direction2;\n return particleEmitter;\n}\n/**\n * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)\n * @param radius The radius of the hemisphere to emit from\n * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\n * @returns the emitter\n */\nexport function CreateHemisphericEmitter(radius = 1, radiusRange = 1) {\n return new HemisphericParticleEmitter(radius, radiusRange);\n}\n/**\n * Creates a Sphere Emitter for the particle system (emits along the sphere radius)\n * @param radius The radius of the sphere to emit from\n * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\n * @returns the emitter\n */\nexport function CreateSphereEmitter(radius = 1, radiusRange = 1) {\n return new SphereParticleEmitter(radius, radiusRange);\n}\n/**\n * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)\n * @param radius The radius of the sphere to emit from\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere\n * @returns the emitter\n */\nexport function CreateDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {\n return new SphereDirectedParticleEmitter(radius, direction1, direction2);\n}\n/**\n * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)\n * @param radius The radius of the emission cylinder\n * @param height The height of the emission cylinder\n * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius\n * @param directionRandomizer How much to randomize the particle direction [0-1]\n * @returns the emitter\n */\nexport function CreateCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0) {\n return new CylinderParticleEmitter(radius, height, radiusRange, directionRandomizer);\n}\n/**\n * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)\n * @param radius The radius of the cylinder to emit from\n * @param height The height of the emission cylinder\n * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder\n * @returns the emitter\n */\nexport function CreateDirectedCylinderEmitter(radius = 1, height = 1, radiusRange = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {\n return new CylinderDirectedParticleEmitter(radius, height, radiusRange, direction1, direction2);\n}\n/**\n * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)\n * @param radius The radius of the cone to emit from\n * @param angle The base angle of the cone\n * @returns the emitter\n */\nexport function CreateConeEmitter(radius = 1, angle = Math.PI / 4) {\n return new ConeParticleEmitter(radius, angle);\n}\nexport function CreateDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {\n return new ConeDirectedParticleEmitter(radius, angle, direction1, direction2);\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,oBAAoB,QAAQ,wCAAwC;AAC7E,SAASC,0BAA0B,QAAQ,8CAA8C;AACzF,SAASC,6BAA6B,EAAEC,qBAAqB,QAAQ,yCAAyC;AAC9G,SAASC,+BAA+B,EAAEC,uBAAuB,QAAQ,2CAA2C;AACpH,SAASC,2BAA2B,EAAEC,mBAAmB,QAAQ,uCAAuC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,UAAU,EAAEC,UAAU,EAAE;EACvD,MAAMC,eAAe,GAAG,IAAIX,oBAAoB,CAAC,CAAC;EAClDW,eAAe,CAACF,UAAU,GAAGA,UAAU;EACvCE,eAAe,CAACD,UAAU,GAAGA,UAAU;EACvC,OAAOC,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,MAAM,GAAG,CAAC,EAAEC,WAAW,GAAG,CAAC,EAAE;EAClE,OAAO,IAAIb,0BAA0B,CAACY,MAAM,EAAEC,WAAW,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAACF,MAAM,GAAG,CAAC,EAAEC,WAAW,GAAG,CAAC,EAAE;EAC7D,OAAO,IAAIX,qBAAqB,CAACU,MAAM,EAAEC,WAAW,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,2BAA2BA,CAACH,MAAM,GAAG,CAAC,EAAEJ,UAAU,GAAG,IAAIV,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAEW,UAAU,GAAG,IAAIX,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE;EAC9H,OAAO,IAAIG,6BAA6B,CAACW,MAA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