fun: offsets
This commit is contained in:
parent
1b35b03eb1
commit
6b60877711
|
@ -9,6 +9,8 @@ const SPREAD = 1;
|
|||
const creating = [];
|
||||
const promises = []
|
||||
|
||||
const offset = Math.random() * Math.TAU;
|
||||
|
||||
for (let i = 0; i < N; ++i) {
|
||||
promises.push(ecs.create({
|
||||
Collider: {
|
||||
|
@ -27,7 +29,7 @@ for (let i = 0; i < N; ++i) {
|
|||
collisionStartScript: '/resources/magic-swords/collision-start.js',
|
||||
},
|
||||
Controlled: {},
|
||||
Direction: {direction: Math.TAU * (i / N)},
|
||||
Direction: {direction: offset + Math.TAU * (i / N)},
|
||||
Forces: {},
|
||||
Light: {brightness: 0},
|
||||
Owned: {owner: Player ? Player.id : 0},
|
||||
|
|
Loading…
Reference in New Issue
Block a user