Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add docs for updateRanges #27148

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/api/en/core/BufferAttribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ <h3>[property:Function onUploadCallback]</h3>
the attribute array data to the GPU.
</p>

<h3>[property:Object updateRange]</h3>
<h3>[property:Object updateRanges]</h3>
<p>
Object containing:<br />
[page:Integer offset]: Default is `0`. Position at which to start
Array of objects containing:<br />
[page:Integer start]: Position at which to start
update.<br />
[page:Integer count]: Default is `-1`, which means don't use update
ranges. <br /><br />
[page:Integer count]: The number of components to update. <br /><br />

This can be used to only update some components of stored vectors (for
example, just the component related to color).
example, just the component related to color). Use the [page:BufferAttribute.addUpdateRange addUpdateRange]
function to add ranges to this array.
</p>

<h3>[property:Usage usage]</h3>
Expand Down Expand Up @@ -155,6 +155,18 @@ <h3>[method:this transformDirection]( [param:Matrix4 m] )</h3>
BufferAttribute, interpreting the elements as a direction vectors.
</p>

<h3>[method:this addUpdateRange]( [param:Number start], [param:Number count] )</h3>
<p>
Adds a range of data in the data array to be updated on the GPU. Adds an
object describing the range to the [page:BufferAttribute.updateRanges updateRanges]
array.
</p>

<h3>[method:this clearUpdateRanges]()</h3>
<p>
Clears the [page:BufferAttribute.updateRanges updateRanges] array.
</p>

<h3>[method:BufferAttribute clone]()</h3>
<p>Return a copy of this bufferAttribute.</p>

Expand Down
25 changes: 21 additions & 4 deletions docs/api/en/core/InterleavedBuffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ <h3>[property:Integer stride]</h3>
<h3>[property:Integer count]</h3>
<p>Gives the total number of elements in the array.</p>

<h3>[property:Object updateRange]</h3>
<h3>[property:Object updateRanges]</h3>
<p>
Object containing offset and count.<br />
- [page:Number offset]: Default is `0`.<br />
- [page:Number count]: Default is `-1`.<br />
Array of objects containing:<br />
[page:Integer start]: Position at which to start
update.<br />
[page:Integer count]: The number of components to update. <br /><br />

This can be used to only update some components of stored data. Use
the [page:InterleavedBuffer.addUpdateRange addUpdateRange] function
to add ranges to this array.
</p>

<h3>[property:String uuid]</h3>
Expand Down Expand Up @@ -75,6 +80,18 @@ <h3>[property:Usage usage]</h3>

<h2>Methods</h2>

<h3>[method:this addUpdateRange]( [param:Number start], [param:Number count] )</h3>
<p>
Adds a range of data in the data array to be updated on the GPU. Adds an
object describing the range to the [page:BufferAttribute.updateRanges updateRanges]
Mugen87 marked this conversation as resolved.
Show resolved Hide resolved
array.
</p>

<h3>[method:this clearUpdateRanges]()</h3>
<p>
Clears the [page:BufferAttribute.updateRanges updateRanges] array.
</p>

<h3>[method:this copy]( [param:InterleavedBuffer source] )</h3>
<p>Copies another [name] to this [name].</p>

Expand Down