Instance Method

setValue(_:forAttribute:)

Sets an attribute value for an attached shader.

Declaration

func setValue(_ value: SKAttributeValue, forAttribute key: String)

Parameters

value

An attribute value object containing the scalar or vector value to set in the attached shader.

key

The attribute name.

See Also

Taking Full Control of Particle Drawing with a Shader

Getting Started with Particle Shaders

Provide custom shader code to alter a particle's look.

var shader: SKShader?

A custom shader used to determine how particles are rendered.

var attributeValues: [String : SKAttributeValue]

The values of each attribute associated with the node's attached shader.