Skip to content

Commit

Permalink
docs: update BufferAttribute docs to warn about changing usage (#23960)
Browse files Browse the repository at this point in the history
* Update BufferAttribute docs to warn about changing `usage`

* adds note to setUsage too

* .
  • Loading branch information
gsimone authored Apr 29, 2022
1 parent ab7caa1 commit e3f3758
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/api/en/core/BufferAttribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ <h3>[property:Usage usage]</h3>
<p>
Defines the intended usage pattern of the data store for optimization purposes. Corresponds to the *usage* parameter of
[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData WebGLRenderingContext.bufferData]().
Default is [page:BufferAttributeUsage StaticDrawUsage]. See usage [page:BufferAttributeUsage constants] for all possible values.
Default is [page:BufferAttributeUsage StaticDrawUsage]. See usage [page:BufferAttributeUsage constants] for all possible values. <br /><br />

Note: After the initial use of a buffer, its usage cannot be changed. Instead, instantiate a new one and set the desired usage before the next render.
</p>

<h3>[property:Integer version]</h3>
Expand Down Expand Up @@ -185,7 +187,11 @@ <h3>[method:this set] ( [param:Array value], [param:Integer offset] ) </h3>
</p>

<h3>[method:this setUsage] ( [param:Usage value] ) </h3>
<p>Set [page:BufferAttribute.usage usage] to value. See usage [page:BufferAttributeUsage constants] for all possible input values.</p>
<p>
Set [page:BufferAttribute.usage usage] to value. See usage [page:BufferAttributeUsage constants] for all possible input values. <br /><br />

Note: After the initial use of a buffer, its usage cannot be changed. Instead, instantiate a new one and set the desired usage before the next render.
</p>

<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
<p>Sets the x component of the vector at the given index.</p>
Expand Down

0 comments on commit e3f3758

Please sign in to comment.