Contents

init(name:float:)

Initializes a new uniform object that holds a floating-point number.

Declaration

init(name: String, float value: Float)

Parameters

  • name:

    The name used to identify the uniform variable; you use this name inside your shader to read the uniform variable’s value.

  • value:

    The initial floating-point value for the uniform variable.

Return Value

An initialized uniform object whose type is set to SKUniformType.float.

See Also

Creating and Initializing Uniform Objects