Skip to content

Commit 2a0228c

Browse files
authored
Examples: Don’t use property() for creating variables (#32028)
* Don’t use property() for unassigned variable * Don’t use property() for unassigned variables * Revert "Don’t use property() for unassigned variables" This reverts commit a91f2d4.
1 parent 56013e0 commit 2a0228c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/webgpu_compute_birds.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<script type="module">
3636

3737
import * as THREE from 'three/webgpu';
38-
import { uniform, varying, vec4, add, sub, max, dot, sin, mat3, uint, negate, instancedArray, cameraProjectionMatrix, cameraViewMatrix, positionLocal, modelWorldMatrix, sqrt, property, float, Fn, If, cos, Loop, Continue, normalize, instanceIndex, length, vertexIndex } from 'three/tsl';
38+
import { uniform, varying, vec4, add, sub, max, dot, sin, mat3, uint, negate, instancedArray, cameraProjectionMatrix, cameraViewMatrix, positionLocal, modelWorldMatrix, sqrt, float, Fn, If, cos, Loop, Continue, normalize, instanceIndex, length, vertexIndex } from 'three/tsl';
3939

4040
import { Inspector } from 'three/addons/inspector/Inspector.js';
4141

@@ -110,7 +110,7 @@
110110
}
111111

112112
// TODO: Fix example with WebGL backend
113-
113+
114114
if ( WebGPU.isAvailable() === false ) {
115115

116116
document.body.appendChild( WebGPU.getErrorMessage() );
@@ -293,7 +293,7 @@
293293
// Define consts
294294
const PI = float( 3.141592653589793 );
295295
const PI_2 = PI.mul( 2.0 );
296-
const limit = property( 'float', 'limit' ).assign( SPEED_LIMIT );
296+
const limit = float( SPEED_LIMIT ).toVar( 'limit' );
297297

298298
// Destructure uniforms
299299
const { alignment, separation, cohesion, deltaTime, rayOrigin, rayDirection } = effectController;
@@ -337,7 +337,7 @@
337337
If( i.equal( birdIndex ), () => {
338338

339339
Continue();
340-
340+
341341
} );
342342

343343
// Cache bird's position and velocity

0 commit comments

Comments
 (0)