Skip to main content

PassWrapper

Class

Similar to Pass, except used by VFXAsset.

  • 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.

Since Lens Scripting v148

Index

Extends

Properties

blendMode

blendMode: BlendMode

The blend mode used for rendering.

Since

Lens Scripting Version 148

Default Value

BlendMode.Disabled

colorMask

colorMask: vec4b

Controls the masking of color channels with a vec4b representing each channel with a boolean.

Since

Lens Scripting Version 148

Default Value

(true, true, true, false)

cullMode

cullMode: CullMode

The cull mode used for rendering.

Since

Lens Scripting Version 148

Default Value

CullMode.Back

depthTest

depthTest: boolean

Enables depth-sorting.

Since

Lens Scripting Version 148

Default Value

true

depthWrite

depthWrite: boolean

Enables writing pixels to the depth buffer.

Since

Lens Scripting Version 148

Default Value

true

instanceCount

instanceCount: number

Number of times the pass will be rendered. Useful with the Instance ID node in Material Editor.

Since

Lens Scripting Version 148

Default Value

1

lineWidth

lineWidth: number

Line width used for rendering.

Since

Lens Scripting Version 148

Default Value

1

name

name: string

The name of the pass wrapper.

Since

Lens Scripting Version 148

Default Value

""

polygonOffset

polygonOffset: vec2

Changes the position that each polygon gets drawn.

Since

Lens Scripting Version 148

Default Value

(0, 0)

samplers

readonly samplers: SamplerWrappers

A proxy class that provides the access to the properties of the passes under the hood of VFXAsset. PassWrapper.samplers property which is tied to the Pass.samplers one. For example:

pass.samplers.texture_name.Fitering = FilteringMode.Nearest

Since

Lens Scripting Version 148


twoSided

twoSided: boolean

Whether the material renders on both sides of a mesh face.

Since

Lens Scripting Version 148

Default Value

false

Methods

getTypeName()

static getTypeName(): TypeName<PassWrapper>

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<PassWrapper>

Since

Lens Scripting Version 148

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.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

ScriptObject.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

ScriptObject.isSame