|
@@ -33,9 +33,9 @@ class InstanceNode extends Node {
|
|
|
*
|
|
*
|
|
|
* @param {number} count - The number of instances.
|
|
* @param {number} count - The number of instances.
|
|
|
* @param {InstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations.
|
|
* @param {InstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations.
|
|
|
- * @param {InstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors.
|
|
|
|
|
|
|
+ * @param {?InstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors.
|
|
|
*/
|
|
*/
|
|
|
- constructor( count, instanceMatrix, instanceColor ) {
|
|
|
|
|
|
|
+ constructor( count, instanceMatrix, instanceColor = null ) {
|
|
|
|
|
|
|
|
super( 'void' );
|
|
super( 'void' );
|
|
|
|
|
|
|
@@ -71,6 +71,7 @@ class InstanceNode extends Node {
|
|
|
* The node that represents the instance color data.
|
|
* The node that represents the instance color data.
|
|
|
*
|
|
*
|
|
|
* @type {?Node}
|
|
* @type {?Node}
|
|
|
|
|
+ * @default null
|
|
|
*/
|
|
*/
|
|
|
this.instanceColorNode = null;
|
|
this.instanceColorNode = null;
|
|
|
|
|
|
|
@@ -220,7 +221,7 @@ export default InstanceNode;
|
|
|
* @function
|
|
* @function
|
|
|
* @param {number} count - The number of instances.
|
|
* @param {number} count - The number of instances.
|
|
|
* @param {InstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations.
|
|
* @param {InstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations.
|
|
|
- * @param {InstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors.
|
|
|
|
|
|
|
+ * @param {?InstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors.
|
|
|
* @returns {InstanceNode}
|
|
* @returns {InstanceNode}
|
|
|
*/
|
|
*/
|
|
|
-export const instance = /*@__PURE__*/ nodeProxy( InstanceNode ).setParameterLength( 3 );
|
|
|
|
|
|
|
+export const instance = /*@__PURE__*/ nodeProxy( InstanceNode ).setParameterLength( 2, 3 );
|