|
@@ -127,32 +127,28 @@ function fillScene() {
|
|
|
|
|
|
Hive.collection.forEach(hive => hive.addToScene(scene));
|
|
|
|
|
|
-
|
|
|
- for (let i = 0; i < 25; i++) {
|
|
|
+ for (let i = 0; i < 24; i++) {
|
|
|
let flower = new Flower();
|
|
|
await flower.load(result[1]);
|
|
|
- flower.position.x = Math.floor(800 * Math.random()) - 400;
|
|
|
- flower.position.z = Math.floor(800 * Math.random()) - 400;
|
|
|
+ flower.position.x = ((i % 6) / 6 * 400) - 200;
|
|
|
+ flower.position.z = (Math.floor(i / 6) / 6 * 300) + 150;
|
|
|
flower.rotation.y = (2 * Math.PI) * Math.random();
|
|
|
|
|
|
- if (i == 0) {
|
|
|
- flower.position.x = 0;
|
|
|
- flower.position.z = 100;
|
|
|
- }
|
|
|
- else {
|
|
|
- // let randomHive = Hive.collection[Math.floor(Hive.collection.length * Math.random())];
|
|
|
- // randomHive.addFlower(flower);
|
|
|
- }
|
|
|
-
|
|
|
Flower.collection.push(flower);
|
|
|
}
|
|
|
|
|
|
Flower.collection.forEach(flower => flower.addToScene(scene));
|
|
|
|
|
|
Bee.baseModel = result[2];
|
|
|
- Hive.collection[1].setSwarm(1);
|
|
|
- Hive.collection[1].toggleFlower(Flower.collection[0]);
|
|
|
- Hive.collection[1].spawnBee();
|
|
|
+ Hive.collection[0].setSwarm(1);
|
|
|
+ Hive.collection[0].honeyReserve = 20;
|
|
|
+ Hive.collection[0].toggleFlower(Flower.collection[0]);
|
|
|
+ Hive.collection[0].spawnBee();
|
|
|
+
|
|
|
+ Hive.collection[2].setSwarm(2);
|
|
|
+ Hive.collection[2].honeyReserve = 20;
|
|
|
+ Hive.collection[2].toggleFlower(Flower.collection[5]);
|
|
|
+ Hive.collection[2].spawnBee();
|
|
|
|
|
|
|
|
|
for (let i = 0; i < Waypoint.collection.length; i++) {
|