Parcourir la source

docs: update BufferAttribute docs to warn about changing usage (#23960)

* Update BufferAttribute docs to warn about changing `usage`

* adds note to setUsage too

* .
Gianmarco il y a 3 ans
Parent
commit
e3f3758d20
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 8 2
      docs/api/en/core/BufferAttribute.html

+ 8 - 2
docs/api/en/core/BufferAttribute.html

@@ -103,7 +103,9 @@
 		<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>
@@ -185,7 +187,11 @@
 		</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>