Skip to content

Commit 05776f9

Browse files
sunagRuthySheffi
authored andcommitted
Mesh,Sprite: Add count property (mrdoob#31091)
* add `count` * add `count`
1 parent d98982d commit 05776f9

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/objects/Mesh.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ class Mesh extends Object3D {
9494
*/
9595
this.morphTargetInfluences = undefined;
9696

97+
/**
98+
* The number of instances of this mesh.
99+
* Can only be used with {@link WebGPURenderer}.
100+
*
101+
* @type {number}
102+
* @default 1
103+
*/
104+
this.count = 1;
105+
97106
this.updateMorphTargets();
98107

99108
}

src/objects/Sprite.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ class Sprite extends Object3D {
108108
*/
109109
this.center = new Vector2( 0.5, 0.5 );
110110

111+
/**
112+
* The number of instances of this sprite.
113+
* Can only be used with {@link WebGPURenderer}.
114+
*
115+
* @type {number}
116+
* @default 1
117+
*/
118+
this.count = 1;
119+
111120
}
112121

113122
/**

0 commit comments

Comments
 (0)