Skip to main content

SamplerBuilder

Class

Class for building Sampler.

  • 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

Methods

build()

build(): Sampler

Builds Sampler.

Returns

Sampler

Since

Lens Scripting Version 145


getTypeName()

static getTypeName(): TypeName<SamplerBuilder>

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

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


setBorderColor()

setBorderColor(borderColor): SamplerBuilder

Sets border color that will be used for WrapMode.ClampToBorder case.

Parameters

ParameterType
borderColorvec4

Returns

SamplerBuilder

Since

Lens Scripting Version 210


setFilteringMode()

setFilteringMode(filteringMode): SamplerBuilder

Sets the filtering mode used for textures sampling.

Parameters

ParameterType
filteringModeFilteringMode

Returns

SamplerBuilder

Since

Lens Scripting Version 210


setUseMipmaps()

setUseMipmaps(value): SamplerBuilder

Sets the flag to use/generate texture mipmaps if they exist/requested.

Parameters

ParameterType
valueboolean

Returns

SamplerBuilder


setWrapMode()

setWrapMode(wrapMode): SamplerBuilder

Sets the same wrap mode for all U, V and W axes.

Parameters

ParameterType
wrapModeWrapMode

Returns

SamplerBuilder

Since

Lens Scripting Version 210


setWrapUMode()

setWrapUMode(wrapMode): SamplerBuilder

Sets the wrap mode U axis.

Parameters

ParameterType
wrapModeWrapMode

Returns

SamplerBuilder

Since

Lens Scripting Version 210


setWrapVMode()

setWrapVMode(wrapMode): SamplerBuilder

Sets the wrap mode V axis.

Parameters

ParameterType
wrapModeWrapMode

Returns

SamplerBuilder

Since

Lens Scripting Version 210


setWrapWMode()

setWrapWMode(wrapMode): SamplerBuilder

Sets the wrap mode W axis.

Parameters

ParameterType
wrapModeWrapMode

Returns

SamplerBuilder

Since

Lens Scripting Version 210