Skip to main content

VFXAsset

Class

Defines a VFX to use with VFXComponent.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Index

Extends

Properties

feedbacks

readonly feedbacks: PassWrappers

Returns a PassWrapper containing all feedback passes in a VFX asset


fixedDeltaTime

fixedDeltaTime: number

When useFixedDeltaTime is true, this value is used for Delta Time for the asset.

Since

Lens Scripting Version 307

Default Value

0

mesh

mesh: RenderMesh

When Mesh is selected as a Geometry Type in the VFX Output Container, the system will render particles using this mesh, otherwise particles will be rendered as quads. Refer to the Custom Mesh Emitter built-in asset as a starting point when working with custom meshes.

Default Value

null

name

name: string

The name of the Asset in Lens Studio.

Default Value

""

Inherited from

Asset.name


outputs

readonly outputs: PassWrappers

Returns a PassWrapper containing all output passes in a VFX asset


playRate

playRate: number

A multiplier on the delta time for this VFX Asset. If useFixedDeltaTime is true, Component Time += fixedDeltaTime * playRate, otherwise Component Time += getDeltaTime() * playRate.

Since

Lens Scripting Version 307

Default Value

1

properties

readonly properties: Properties

Controls properties for the VFXAsset. Any scriptable properties on a VFX Graph will automatically become properties of this Properties class. For example, if the VFX Graph defines a variable named baseColor, a script would be able to access that property as vfxAsset.properties.baseColor.


simulations

readonly simulations: PassWrappers

Returns a PassWrapper containing all simulation passes in a VFX asset


uniqueIdentifier

readonly uniqueIdentifier: string

Since

Lens Scripting Version 176

Inherited from

Asset.uniqueIdentifier


useFixedDeltaTime

useFixedDeltaTime: boolean

Toggles the use of fixedDeltaTime for Component Time accumulation and particle simulation. When false, the real delta time of the Lens is used.

Since

Lens Scripting Version 307

Default Value

false

Methods

clone()

clone(): VFXAsset

Clones the VFX asset and returns a copy.

Returns

VFXAsset

Since

Lens Scripting Version 147


getTypeName()

static getTypeName(): TypeName<VFXAsset>

Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

Returns

TypeName<VFXAsset>

Overrides

Asset.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

Asset.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object matches or derives from the passed in type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

Asset.isOfType


isSame()

isSame(other): boolean

Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

Asset.isSame

See also

VFX guide.