UniformFloatSlot class base
A binding to a uniform of type float. Calling set on this object updates a float uniform's value.
Example:
void updateShader(ui.FragmentShader shader) {
shader.getUniformFloat('uColor', 0).set(1.0);
shader.getUniformFloat('uColor', 1).set(0.0);
shader.getUniformFloat('uColor', 2).set(0.0);
}
See also: FragmentShader.getUniformFloat - How UniformFloatSlot instances are acquired.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
The offset into the bound uniform. For example, 1 for
.yor 2 for.b.final - name → String
-
The name of the bound uniform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shaderIndex → int
-
VisibleForTesting: This is the index one would use with
FragmentShader.setFloat for this uniform.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
double val) → void - Set the float value of the bound uniform.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited