Skip to main content

Editor.Assets.PassInfo

Class

The Editor.Assets.Pass on a Editor.Assets.Material.

Index

Example

// Import built in helpers
import * as Utils from 'LensStudio:Utils@1.0.js';

// In the plugin create function
const model = pluginSystem.findInterface(Editor.Model.IModel);
const assetManager = model.project.assetManager;
const destination = destination;

const material = const assetManager.createNativeAsset('Material', 'Material Name', destination);

const absGraphPath = new Editor.Path(params.graph_path);
const pass = await Utils.findOrCreateAsync(assetManager, absGraphPath, destination);
const passInfo = material.addPass(pass);

Extends

Properties

blendMode

blendMode: BlendMode

Blending mode for color output.


colorMask

colorMask: vec4b

RGBA channel mask for color writes.


cullMode

cullMode: CullMode

Face culling mode.


defines

defines: string[]

Preprocessor defines applied to shaders.


depthFunction

depthFunction: DepthFunction

Depth comparison function.


depthTest

depthTest: boolean

Whether depth testing is enabled.


depthWrite

depthWrite: boolean

Whether depth buffer writes are enabled.


frustumCulling

frustumCulling: FrustumCullMode

Frustum culling mode.


id

readonly id: Uuid

The unique id of the entity.

Inherited from

Entity.id


instanceCount

instanceCount: number

Number of instances to render.


meta

readonly meta: Meta

Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

Inherited from

Entity.meta


polygonOffset

polygonOffset: vec2

Whether polygon offset is enabled.


twoSided

twoSided: boolean

Whether both front and back faces are rendered.


type

readonly type: string

The entity's type.

Inherited from

Entity.type


uiData

readonly uiData: PassUiData

UI metadata for this pass.

Methods

getDirectlyReferencedEntities()

getDirectlyReferencedEntities(): Entity[]

A list of entities which this entity has a reference to.

Returns

Entity[]

Inherited from

Entity.getDirectlyReferencedEntities


getMeta()

static getMeta(): Meta

Returns metadata about this type.

Returns

Meta

Overrides

Entity.getMeta


getOwnedEntities()

getOwnedEntities(): Entity[]

A list of entities which has a reference to this entity.

Returns

Entity[]

Inherited from

Entity.getOwnedEntities


getPropertyNames()

getPropertyNames(): string[]

Get the list of property names for this pass.

Returns

string[]


getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

Entity.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

Entity.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

Entity.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

Entity.isSame


setPassConfiguration()

setPassConfiguration(config): void

Applies the given PassConfiguration to this pass, updating its Pass asset, blend mode, and shader defines in a single call.

Parameters

ParameterType
configPassConfiguration

Returns

void