2
0
Эх сурвалжийг харах

Docs: Add docs for updateRanges (#27148)

* Add docs for updateRanges

* Fix InterleavedBuffer name in docs
Garrett Johnson 1 жил өмнө
parent
commit
228af660c5

+ 18 - 6
docs/api/en/core/BufferAttribute.html

@@ -99,16 +99,16 @@
 			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>
@@ -155,6 +155,18 @@
 			BufferAttribute, interpreting the elements as a direction vectors.
 		</p>
 
+		<h3>[method:this addUpdateRange]( [param:Integer start], [param:Integer 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>
 

+ 21 - 4
docs/api/en/core/InterleavedBuffer.html

@@ -40,11 +40,16 @@
 		<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>
@@ -75,6 +80,18 @@
 
 		<h2>Methods</h2>
 
+		<h3>[method:this addUpdateRange]( [param:Integer start], [param:Integer 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:InterleavedBuffer.updateRanges updateRanges]
+			array.
+		</p>
+
+		<h3>[method:this clearUpdateRanges]()</h3>
+		<p>
+			Clears the [page:InterleavedBuffer.updateRanges updateRanges] array.
+		</p>
+
 		<h3>[method:this copy]( [param:InterleavedBuffer source] )</h3>
 		<p>Copies another [name] to this [name].</p>