Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ParticleHelper

This class is made for on one-liner static method to help creating particle system set.

Hierarchy

  • ParticleHelper

Index

Properties

Static BaseAssetsUrlSearch playground for BaseAssetsUrl

BaseAssetsUrl: string

Gets or sets base Assets URL

Static SnippetUrlSearch playground for SnippetUrl

SnippetUrl: string

Define the Url to load snippets

Methods

Static CreateAsyncSearch playground for CreateAsync

  • This is the main static method (one-liner) of this helper to create different particle systems

    Parameters

    • type: string

      This string represents the type to the particle system to create

    • scene: Nullable<Scene>

      The scene where the particle system should live

    • Optional gpu: boolean

      If the system will use gpu

    Returns Promise<ParticleSystemSet>

    the ParticleSystemSet created

Static CreateDefaultSearch playground for CreateDefault

  • Create a default particle system that you can tweak

    Parameters

    • emitter: Nullable<AbstractMesh | Vector3>

      defines the emitter to use

    • Optional capacity: number

      defines the system capacity (default is 500 particles)

    • Optional scene: Scene

      defines the hosting scene

    • Optional useGPU: boolean

      defines if a GPUParticleSystem must be created (default is false)

    Returns IParticleSystem

    the new Particle system

Static CreateFromSnippetAsyncSearch playground for CreateFromSnippetAsync

  • CreateFromSnippetAsync(snippetId: string, scene: Scene, gpu?: boolean, rootUrl?: string): Promise<IParticleSystem>
  • Creates a particle system from a snippet saved by the particle system editor

    Parameters

    • snippetId: string

      defines the snippet to load (can be set to _BLANK to create a default one)

    • scene: Scene

      defines the hosting scene

    • Optional gpu: boolean

      If the system will use gpu

    • Optional rootUrl: string

      defines the root URL to use to load textures and relative dependencies

    Returns Promise<IParticleSystem>

    a promise that will resolve to the new particle system

Static ExportSetSearch playground for ExportSet

  • Static function used to export a particle system to a ParticleSystemSet variable. Please note that the emitter shape is not exported

    Parameters

    Returns ParticleSystemSet

    the created particle system set

Static ParseFromFileAsyncSearch playground for ParseFromFileAsync

  • Creates a particle system from a snippet saved in a remote file

    Parameters

    • name: Nullable<string>

      defines the name of the particle system to create (can be null or empty to use the one from the json data)

    • url: string

      defines the url to load from

    • scene: Scene

      defines the hosting scene

    • Optional gpu: boolean

      If the system will use gpu

    • Optional rootUrl: string

      defines the root URL to use to load textures and relative dependencies

    Returns Promise<IParticleSystem>

    a promise that will resolve to the new particle system

Legend

  • Property
  • Method
  • Constructor
  • Property
  • Static property
  • Static method