Class ParticleCollisionsOptions

Structure used for initializing a ParticleCollisions object.

Hierarchy

  • FrameworkObject
    • ParticleCollisionsOptions

Constructors

Accessors

  • get dampening(): number
  • Determines how much velocity should a particle lose after a collision, in percent of its current velocity. In range [0, 1].

    Returns number

  • set dampening(value): void
  • Parameters

    • value: number

    Returns void

  • get layer(): rsx.LayerMask
  • Physics layers that determine which objects will particle collide with. Only relevant when using the World collision mode.

    Returns rsx.LayerMask

  • set layer(value): void
  • Parameters

    Returns void

  • get lifetimeLoss(): number
  • Determines how much should the particle lifetime be reduced after a collision, in percent of its original lifetime. In range [0, 1].

    Returns number

  • set lifetimeLoss(value): void
  • Parameters

    • value: number

    Returns void

  • get radius(): number
  • Radius scale for particles used for collision.

    Returns number

  • set radius(value): void
  • Parameters

    • value: number

    Returns void

  • get restitution(): number
  • Determines the elasticity (bounciness) of the particle collision. Lower values make the collision less bouncy and higher values more.

    Returns number

  • set restitution(value): void
  • Parameters

    • value: number

    Returns void

Methods

  • Marks the object as dirty.

    Parameters

    Returns void

  • Allows modifying this object multiple times in a row in a scope, without marking the object dirty immediately. Dirty flags are accumulated and the object is marked dirty at the end.

    Parameters

    • action: (() => void)

      The scope where the object is modified.

        • (): void
        • Returns void

    Returns void

Events

onDirty: Event<[dirtyFlags: EnumValue<ManagedSettingsDirtyFlag, number>], void>

Event that is triggered when a member changes.