Skip to content

Commit de3d5ff

Browse files
committed
Examples: Improved webgpu_compute_particles_snow.
1 parent caf8c1f commit de3d5ff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
-1003 Bytes
Loading

examples/webgpu_compute_particles_snow.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99

1010
<div id="info">
11-
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> WebGPU - GPU Compute Snow - 100.000 Particles
11+
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> WebGPU - Compute Snow - 100K Particles
1212
</div>
1313

1414
<script type="importmap">
@@ -229,7 +229,7 @@
229229

230230
// tree
231231

232-
function tree( count = 10 ) {
232+
function tree( count = 8 ) {
233233

234234
const coneMaterial = new MeshStandardNodeMaterial( {
235235
color: 0x0d492c,
@@ -243,11 +243,11 @@
243243

244244
const radius = 1 + i;
245245

246-
const coneGeometry = new THREE.ConeGeometry( radius, radius, 64 );
246+
const coneGeometry = new THREE.ConeGeometry( radius * 0.95, radius * 1.25, 32 );
247247

248248
const cone = new THREE.Mesh( coneGeometry, coneMaterial );
249249
cone.castShadow = true;
250-
cone.position.y = ( ( count - i ) * 1.3 ) + ( count * .5 );
250+
cone.position.y = ( ( count - i ) * 1.5 ) + ( count * .6 );
251251
object.add( cone );
252252

253253
}
@@ -261,11 +261,11 @@
261261

262262
}
263263

264-
const teapotTree = new THREE.Mesh( new TeapotGeometry( .8, 18 ), new MeshBasicNodeMaterial( {
264+
const teapotTree = new THREE.Mesh( new TeapotGeometry( .5, 18 ), new MeshBasicNodeMaterial( {
265265
color: 0xfcfb9e
266266
} ) );
267267

268-
teapotTree.position.y = 19.5;
268+
teapotTree.position.y = 18;
269269

270270
scene.add( tree() );
271271
scene.add( teapotTree );
@@ -322,7 +322,7 @@
322322
controls.maxDistance = 35;
323323
controls.maxPolarAngle = Math.PI / 1.7;
324324
controls.autoRotate = true;
325-
controls.autoRotateSpeed = - 1;
325+
controls.autoRotateSpeed = - 0.7;
326326
controls.update();
327327

328328
//

0 commit comments

Comments
 (0)