فهرست منبع

Particles documentation

Jason Sturges 4 سال پیش
والد
کامیت
95374cdadc

+ 1 - 1
src/Particles/EmitterTypes/boxParticleEmitter.ts

@@ -104,7 +104,7 @@ export class BoxParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define BOXEMITTER";

+ 1 - 1
src/Particles/EmitterTypes/coneParticleEmitter.ts

@@ -159,7 +159,7 @@ export class ConeParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         let defines = "#define CONEEMITTER";

+ 2 - 2
src/Particles/EmitterTypes/customParticleEmitter.ts

@@ -10,7 +10,7 @@ import { Nullable } from '../../types';
 export class CustomParticleEmitter implements IParticleEmitterType {
 
     /**
-     * Gets or sets the position generator that will create the inital position of each particle.
+     * Gets or sets the position generator that will create the initial position of each particle.
      * Index will be provided when used with GPU particle. Particle will be provided when used with CPU particles
      */
     public particlePositionGenerator: (index: number, particle: Nullable<Particle>, outPosition: Vector3) => void = () => {};
@@ -103,7 +103,7 @@ export class CustomParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define CUSTOMEMITTER";

+ 2 - 2
src/Particles/EmitterTypes/cylinderParticleEmitter.ts

@@ -112,7 +112,7 @@ export class CylinderParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define CYLINDEREMITTER";
@@ -221,7 +221,7 @@ export class CylinderDirectedParticleEmitter extends CylinderParticleEmitter {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define CYLINDEREMITTER\n#define DIRECTEDCYLINDEREMITTER";

+ 1 - 1
src/Particles/EmitterTypes/hemisphericParticleEmitter.ts

@@ -103,7 +103,7 @@ export class HemisphericParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define HEMISPHERICEMITTER";

+ 1 - 1
src/Particles/EmitterTypes/meshParticleEmitter.ts

@@ -162,7 +162,7 @@ export class MeshParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "";

+ 1 - 1
src/Particles/EmitterTypes/pointParticleEmitter.ts

@@ -84,7 +84,7 @@ export class PointParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define POINTEMITTER";

+ 2 - 2
src/Particles/EmitterTypes/sphereParticleEmitter.ts

@@ -103,7 +103,7 @@ export class SphereParticleEmitter implements IParticleEmitterType {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define SPHEREEMITTER";
@@ -204,7 +204,7 @@ export class SphereDirectedParticleEmitter extends SphereParticleEmitter {
 
     /**
      * Returns a string to use to update the GPU particles update shader
-     * @returns a string containng the defines string
+     * @returns a string containing the defines string
      */
     public getEffectDefines(): string {
         return "#define SPHEREEMITTER\n#define DIRECTEDSPHEREEMITTER";

+ 14 - 14
src/Particles/IParticleSystem.ts

@@ -288,7 +288,7 @@ export interface IParticleSystem {
     render(): number;
     /**
      * Dispose the particle system and frees its associated resources.
-     * @param disposeTexture defines if the particule texture must be disposed as well (true by default)
+     * @param disposeTexture defines if the particle texture must be disposed as well (true by default)
      */
     dispose(disposeTexture?: boolean): void;
     /**
@@ -417,19 +417,19 @@ export interface IParticleSystem {
     removeSizeGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of color gradients.
-     * You must use addColorGradient and removeColorGradient to udpate this list
+     * You must use addColorGradient and removeColorGradient to update this list
      * @returns the list of color gradients
      */
     getColorGradients(): Nullable<Array<ColorGradient>>;
     /**
      * Gets the current list of size gradients.
-     * You must use addSizeGradient and removeSizeGradient to udpate this list
+     * You must use addSizeGradient and removeSizeGradient to update this list
      * @returns the list of size gradients
      */
     getSizeGradients(): Nullable<Array<FactorGradient>>;
     /**
      * Gets the current list of angular speed gradients.
-     * You must use addAngularSpeedGradient and removeAngularSpeedGradient to udpate this list
+     * You must use addAngularSpeedGradient and removeAngularSpeedGradient to update this list
      * @returns the list of angular speed gradients
      */
     getAngularSpeedGradients(): Nullable<Array<FactorGradient>>;
@@ -449,7 +449,7 @@ export interface IParticleSystem {
     removeAngularSpeedGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of velocity gradients.
-     * You must use addVelocityGradient and removeVelocityGradient to udpate this list
+     * You must use addVelocityGradient and removeVelocityGradient to update this list
      * @returns the list of velocity gradients
      */
     getVelocityGradients(): Nullable<Array<FactorGradient>>;
@@ -469,7 +469,7 @@ export interface IParticleSystem {
     removeVelocityGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of limit velocity gradients.
-     * You must use addLimitVelocityGradient and removeLimitVelocityGradient to udpate this list
+     * You must use addLimitVelocityGradient and removeLimitVelocityGradient to update this list
      * @returns the list of limit velocity gradients
      */
     getLimitVelocityGradients(): Nullable<Array<FactorGradient>>;
@@ -503,7 +503,7 @@ export interface IParticleSystem {
     removeDragGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of drag gradients.
-     * You must use addDragGradient and removeDragGradient to udpate this list
+     * You must use addDragGradient and removeDragGradient to update this list
      * @returns the list of drag gradients
      */
     getDragGradients(): Nullable<Array<FactorGradient>>;
@@ -523,7 +523,7 @@ export interface IParticleSystem {
     removeEmitRateGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of emit rate gradients.
-     * You must use addEmitRateGradient and removeEmitRateGradient to udpate this list
+     * You must use addEmitRateGradient and removeEmitRateGradient to update this list
      * @returns the list of emit rate gradients
      */
     getEmitRateGradients(): Nullable<Array<FactorGradient>>;
@@ -544,7 +544,7 @@ export interface IParticleSystem {
     removeStartSizeGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of start size gradients.
-     * You must use addStartSizeGradient and removeStartSizeGradient to udpate this list
+     * You must use addStartSizeGradient and removeStartSizeGradient to update this list
      * @returns the list of start size gradients
      */
     getStartSizeGradients(): Nullable<Array<FactorGradient>>;
@@ -565,14 +565,14 @@ export interface IParticleSystem {
     removeLifeTimeGradient(gradient: number): IParticleSystem;
     /**
      * Gets the current list of life time gradients.
-     * You must use addLifeTimeGradient and removeLifeTimeGradient to udpate this list
+     * You must use addLifeTimeGradient and removeLifeTimeGradient to update this list
      * @returns the list of life time gradients
      */
     getLifeTimeGradients(): Nullable<Array<FactorGradient>>;
 
     /**
      * Gets the current list of color gradients.
-     * You must use addColorGradient and removeColorGradient to udpate this list
+     * You must use addColorGradient and removeColorGradient to update this list
      * @returns the list of color gradients
      */
     getColorGradients(): Nullable<Array<ColorGradient>>;
@@ -586,7 +586,7 @@ export interface IParticleSystem {
     addRampGradient(gradient: number, color: Color3): IParticleSystem;
     /**
      * Gets the current list of ramp gradients.
-     * You must use addRampGradient and removeRampGradient to udpate this list
+     * You must use addRampGradient and removeRampGradient to update this list
      * @returns the list of ramp gradients
      */
     getRampGradients(): Nullable<Array<Color3Gradient>>;
@@ -606,7 +606,7 @@ export interface IParticleSystem {
     addColorRemapGradient(gradient: number, min: number, max: number): IParticleSystem;
     /**
      * Gets the current list of color remap gradients.
-     * You must use addColorRemapGradient and removeColorRemapGradient to udpate this list
+     * You must use addColorRemapGradient and removeColorRemapGradient to update this list
      * @returns the list of color remap gradients
      */
     getColorRemapGradients(): Nullable<Array<FactorGradient>>;
@@ -621,7 +621,7 @@ export interface IParticleSystem {
     addAlphaRemapGradient(gradient: number, min: number, max: number): IParticleSystem;
     /**
      * Gets the current list of alpha remap gradients.
-     * You must use addAlphaRemapGradient and removeAlphaRemapGradient to udpate this list
+     * You must use addAlphaRemapGradient and removeAlphaRemapGradient to update this list
      * @returns the list of alpha remap gradients
      */
     getAlphaRemapGradients(): Nullable<Array<FactorGradient>>;

+ 11 - 11
src/Particles/baseParticleSystem.ts

@@ -346,7 +346,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of drag gradients.
-     * You must use addDragGradient and removeDragGradient to udpate this list
+     * You must use addDragGradient and removeDragGradient to update this list
      * @returns the list of drag gradients
      */
     public getDragGradients(): Nullable<Array<FactorGradient>> {
@@ -358,7 +358,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of limit velocity gradients.
-     * You must use addLimitVelocityGradient and removeLimitVelocityGradient to udpate this list
+     * You must use addLimitVelocityGradient and removeLimitVelocityGradient to update this list
      * @returns the list of limit velocity gradients
      */
     public getLimitVelocityGradients(): Nullable<Array<FactorGradient>> {
@@ -367,7 +367,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of color gradients.
-     * You must use addColorGradient and removeColorGradient to udpate this list
+     * You must use addColorGradient and removeColorGradient to update this list
      * @returns the list of color gradients
      */
     public getColorGradients(): Nullable<Array<ColorGradient>> {
@@ -376,7 +376,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of size gradients.
-     * You must use addSizeGradient and removeSizeGradient to udpate this list
+     * You must use addSizeGradient and removeSizeGradient to update this list
      * @returns the list of size gradients
      */
     public getSizeGradients(): Nullable<Array<FactorGradient>> {
@@ -385,7 +385,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of color remap gradients.
-     * You must use addColorRemapGradient and removeColorRemapGradient to udpate this list
+     * You must use addColorRemapGradient and removeColorRemapGradient to update this list
      * @returns the list of color remap gradients
      */
     public getColorRemapGradients(): Nullable<Array<FactorGradient>> {
@@ -394,7 +394,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of alpha remap gradients.
-     * You must use addAlphaRemapGradient and removeAlphaRemapGradient to udpate this list
+     * You must use addAlphaRemapGradient and removeAlphaRemapGradient to update this list
      * @returns the list of alpha remap gradients
      */
     public getAlphaRemapGradients(): Nullable<Array<FactorGradient>> {
@@ -403,7 +403,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of life time gradients.
-     * You must use addLifeTimeGradient and removeLifeTimeGradient to udpate this list
+     * You must use addLifeTimeGradient and removeLifeTimeGradient to update this list
      * @returns the list of life time gradients
      */
     public getLifeTimeGradients(): Nullable<Array<FactorGradient>> {
@@ -412,7 +412,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of angular speed gradients.
-     * You must use addAngularSpeedGradient and removeAngularSpeedGradient to udpate this list
+     * You must use addAngularSpeedGradient and removeAngularSpeedGradient to update this list
      * @returns the list of angular speed gradients
      */
     public getAngularSpeedGradients(): Nullable<Array<FactorGradient>> {
@@ -421,7 +421,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of velocity gradients.
-     * You must use addVelocityGradient and removeVelocityGradient to udpate this list
+     * You must use addVelocityGradient and removeVelocityGradient to update this list
      * @returns the list of velocity gradients
      */
     public getVelocityGradients(): Nullable<Array<FactorGradient>> {
@@ -430,7 +430,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of start size gradients.
-     * You must use addStartSizeGradient and removeStartSizeGradient to udpate this list
+     * You must use addStartSizeGradient and removeStartSizeGradient to update this list
      * @returns the list of start size gradients
      */
     public getStartSizeGradients(): Nullable<Array<FactorGradient>> {
@@ -439,7 +439,7 @@ export class BaseParticleSystem {
 
     /**
      * Gets the current list of emit rate gradients.
-     * You must use addEmitRateGradient and removeEmitRateGradient to udpate this list
+     * You must use addEmitRateGradient and removeEmitRateGradient to update this list
      * @returns the list of emit rate gradients
      */
     public getEmitRateGradients(): Nullable<Array<FactorGradient>> {

+ 1 - 1
src/Particles/cloudPoint.ts

@@ -141,7 +141,7 @@ export class CloudPoint {
      * Returns a boolean. True if the particle intersects a mesh, else false
      * The intersection is computed on the particle position and Axis Aligned Bounding Box (AABB) or Sphere
      * @param target is the object (point or mesh) what the intersection is computed against
-     * @param isSphere is boolean flag when false (default) bounding box of mesh is used, when true the bouding sphere is used
+     * @param isSphere is boolean flag when false (default) bounding box of mesh is used, when true the bounding sphere is used
      * @returns true if it intersects
      */
     public intersectsMesh(target: Mesh, isSphere: boolean): boolean {

+ 2 - 2
src/Particles/particleSystem.ts

@@ -844,7 +844,7 @@ export class ParticleSystem extends BaseParticleSystem implements IDisposable, I
 
     /**
      * Gets the current list of ramp gradients.
-     * You must use addRampGradient and removeRampGradient to udpate this list
+     * You must use addRampGradient and removeRampGradient to update this list
      * @returns the list of ramp gradients
      */
     public getRampGradients(): Nullable<Array<Color3Gradient>> {
@@ -2033,7 +2033,7 @@ export class ParticleSystem extends BaseParticleSystem implements IDisposable, I
 
     /**
      * Disposes the particle system and free the associated resources
-     * @param disposeTexture defines if the particule texture must be disposed as well (true by default)
+     * @param disposeTexture defines if the particle texture must be disposed as well (true by default)
      */
     public dispose(disposeTexture = true): void {
         if (this._vertexBuffer) {

+ 1 - 1
src/Particles/particleSystemComponent.ts

@@ -50,7 +50,7 @@ declare module "../Engines/engine" {
          * @param uniformsNames defines a list of attribute names
          * @param samplers defines an array of string used to represent textures
          * @param defines defines the string containing the defines to use to compile the shaders
-         * @param fallbacks defines the list of potential fallbacks to use if shader conmpilation fails
+         * @param fallbacks defines the list of potential fallbacks to use if shader compilation fails
          * @param onCompiled defines a function to call when the effect creation is successful
          * @param onError defines a function to call when the effect creation has failed
          * @param particleSystem the particle system you want to create the effect for

+ 3 - 3
src/Particles/pointsCloudSystem.ts

@@ -31,7 +31,7 @@ export enum PointColor {
  * The PointCloudSystem (PCS) is a single updatable mesh. The points corresponding to the vertices of this big mesh.
  * As it is just a mesh, the PointCloudSystem has all the same properties as any other BJS mesh : not more, not less. It can be scaled, rotated, translated, enlighted, textured, moved, etc.
 
- * The PointCloudSytem is also a particle system, with each point being a particle. It provides some methods to manage the particles.
+ * The PointCloudSystem is also a particle system, with each point being a particle. It provides some methods to manage the particles.
  * However it is behavior agnostic. This means it has no emitter, no particle physics, no particle recycler. You have to implement your own behavior.
  *
  * Full documentation here : TO BE ENTERED
@@ -55,7 +55,7 @@ export class PointsCloudSystem implements IDisposable {
      */
     public name: string;
     /**
-     * The PCS mesh. It's a standard BJS Mesh, so all the methods from the Mesh class are avalaible.
+     * The PCS mesh. It's a standard BJS Mesh, so all the methods from the Mesh class are available.
      */
     public mesh: Mesh;
     /**
@@ -916,7 +916,7 @@ export class PointsCloudSystem implements IDisposable {
     }
 
     /**
-     * Visibilty helper : Recomputes the visible size according to the mesh bounding box
+     * Visibility helper : Recomputes the visible size according to the mesh bounding box
      * doc :
      * @returns the PCS.
      */

+ 7 - 7
src/Particles/solidParticleSystem.ts

@@ -54,7 +54,7 @@ export class SolidParticleSystem implements IDisposable {
      */
     public name: string;
     /**
-     * The SPS mesh. It's a standard BJS Mesh, so all the methods from the Mesh class are avalaible.
+     * The SPS mesh. It's a standard BJS Mesh, so all the methods from the Mesh class are available.
      */
     public mesh: Mesh;
     /**
@@ -98,7 +98,7 @@ export class SolidParticleSystem implements IDisposable {
      */
     public _bSphereOnly: boolean = false;
     /**
-     * A number to multiply the boundind sphere radius by in order to reduce it for instance. (Internal use only)
+     * A number to multiply the bounding sphere radius by in order to reduce it for instance. (Internal use only)
      * @hidden
      */
     public _bSphereRadiusFactor: number = 1.0;
@@ -159,12 +159,12 @@ export class SolidParticleSystem implements IDisposable {
      * * updatable (optional boolean, default true) : if the SPS must be updatable or immutable.
      * * isPickable (optional boolean, default false) : if the solid particles must be pickable.
      * * enableDepthSort (optional boolean, default false) : if the solid particles must be sorted in the geometry according to their distance to the camera.
-     * * useModelMaterial (optional boolean, defaut false) : if the model materials must be used to create the SPS multimaterial. This enables the multimaterial supports of the SPS.
+     * * useModelMaterial (optional boolean, default false) : if the model materials must be used to create the SPS multimaterial. This enables the multimaterial supports of the SPS.
      * * enableMultiMaterial (optional boolean, default false) : if the solid particles can be given different materials.
      * * expandable (optional boolean, default false) : if particles can still be added after the initial SPS mesh creation.
      * * particleIntersection (optional boolean, default false) : if the solid particle intersections must be computed.
      * * boundingSphereOnly (optional boolean, default false) : if the particle intersection must be computed only with the bounding sphere (no bounding box computation, so faster).
-     * * bSphereRadiusFactor (optional float, default 1.0) : a number to multiply the boundind sphere radius by in order to reduce it for instance.
+     * * bSphereRadiusFactor (optional float, default 1.0) : a number to multiply the bounding sphere radius by in order to reduce it for instance.
      * @example bSphereRadiusFactor = 1.0 / Math.sqrt(3.0) => the bounding sphere exactly matches a spherical mesh.
      */
     constructor(name: string, scene: Scene, options?: { updatable?: boolean; isPickable?: boolean; enableDepthSort?: boolean; particleIntersection?: boolean; boundingSphereOnly?: boolean; bSphereRadiusFactor?: number; expandable?: boolean; useModelMaterial?: boolean; enableMultiMaterial?: boolean; }) {
@@ -295,7 +295,7 @@ export class SolidParticleSystem implements IDisposable {
      * These particles will have the same geometry than the mesh parts and will be positioned at the same localisation than the mesh original places.
      * Thus the particles generated from `digest()` have their property `position` set yet.
      * @param mesh ( Mesh ) is the mesh to be digested
-     * @param options {facetNb} (optional integer, default 1) is the number of mesh facets per particle, this parameter is overriden by the parameter `number` if any
+     * @param options {facetNb} (optional integer, default 1) is the number of mesh facets per particle, this parameter is overridden by the parameter `number` if any
      * {delta} (optional integer, default 0) is the random extra number of facets per particle , each particle will have between `facetNb` and `facetNb + delta` facets
      * {number} (optional positive integer) is the wanted number of particles : each particle is built with `mesh_total_facets / number` facets
      * {storage} (optional existing array) is an array where the particles will be stored for a further use instead of being inserted in the SPS.
@@ -1360,7 +1360,7 @@ export class SolidParticleSystem implements IDisposable {
         (<any>this._indicesByMaterial) = null;
         (<any>this._idxOfId) = null;
     }
-    /** Returns an object {idx: numbern faceId: number} for the picked particle from the passed pickingInfo object.
+    /** Returns an object {idx: number faceId: number} for the picked particle from the passed pickingInfo object.
      * idx is the particle index in the SPS
      * faceId is the picked face index counted within this particle.
      * Returns null if the pickInfo can't identify a picked particle.
@@ -1573,7 +1573,7 @@ export class SolidParticleSystem implements IDisposable {
         return this._defaultMaterial;
     }
     /**
-     * Visibilty helper : Recomputes the visible size according to the mesh bounding box
+     * Visibility helper : Recomputes the visible size according to the mesh bounding box
      * doc : https://doc.babylonjs.com/how_to/Solid_Particle_System#sps-visibility
      * @returns the SPS.
      */