You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object specifying the uniforms to be passed to the shader code; keys are uniform names, values are definitions of the form
220
+
<code>
221
+
{ type: 'f', value: 1.0 }
222
+
</code>
223
+
where *type* is a <ahref="#uniform-types">uniform type string</a>, and *value* is the value of the uniform. Names must match the name of the uniform, as defined in the GLSL code. Note that uniforms are refreshed on every frame, so updating the value of the uniform will immediately update the value available to the GLSL code.
220
224
</div>
221
225
222
226
<h3>.[page:Object attributes]</h3>
223
227
<div>
224
-
Attributes defined inside GLSL shader code.
228
+
<p>
229
+
Object specifying the custom attributes to be passed to the shader code; keys are attribute names, values are definitions of the form
230
+
<code>
231
+
{ type: 'f', value: [1.0, 0.5, 2.0, ...] }
232
+
</code>
233
+
where *type* is an <ahref="#attribute-types">attribute type string</a>, and *value* is an array containing an attribute value for each vertex in the geometry (or *undefined* if using [page:BufferGeometry]). Names must match the name of the attribute, as defined in the GLSL code.
234
+
</p>
235
+
<p>
236
+
Note that attribute buffers are <emph>not</emph> refreshed automatically when their values change; if using [page:Geometry], set <code>needsUpdate = true</code> on the attribute definition. If using [page:BufferGeometry], set <code>needsUpdate = true</code> on the [page:BufferAttribute].
0 commit comments