File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ function instancingCallback() {
210
210
return fract(sin(dot(seed, [12.9898, 78.233])) * 43758.5453123);
211
211
}
212
212
213
- function sphere () {
213
+ function randomPositionOnSphere () {
214
214
let id = instanceID();
215
215
let theta = rand([id, 0.1234]) * TWO_PI;
216
216
let phi = rand([id, 3.321]) * PI;
@@ -223,7 +223,7 @@ function sphere() {
223
223
}
224
224
225
225
getWorldInputs((inputs) => {
226
- inputs.position += sphere ();
226
+ inputs.position += randomPositionOnSphere ();
227
227
return inputs;
228
228
});
229
229
}
@@ -282,7 +282,7 @@ function instancingCallback() {
282
282
return fract(sin(dot(seed, [12.9898, 78.233])) * 43758.5453123);
283
283
}
284
284
285
- function sphere () {
285
+ function getAnimatedSpherePosition () {
286
286
let id = instanceID();
287
287
let theta = rand([id, 0.1234]) * TWO_PI;
288
288
// change the particle's position over time:
@@ -298,7 +298,7 @@ function sphere() {
298
298
}
299
299
300
300
getWorldInputs((inputs) => {
301
- inputs.position += sphere ();
301
+ inputs.position += getAnimatedSpherePosition ();
302
302
return inputs;
303
303
});
304
304
}
You can’t perform that action at this time.
0 commit comments