update Tue 07/14/2026 12:21:23.58
This commit is contained in:
+4
-4
@@ -7,7 +7,7 @@
|
||||
* crossfadeSeconds: 3, // fade out/in overlap hint for clients
|
||||
* order: 'shuffle' | 'roster', // rotation order through the roster
|
||||
* include: { colors:[], rarities:[], ids:[] }, // empty = all
|
||||
* behaviors: { staticChance: 0.5, wanderRadius: 0.6, wanderSpeed: 0.15 },
|
||||
* behaviors: { staticChance: 0.5, wanderRadius: 60, wanderSpeed: 0.15 },
|
||||
* timeWindows: [] // e.g. [{ start:"09:00", end:"17:00" }] — empty = always on
|
||||
* }
|
||||
*
|
||||
@@ -23,7 +23,7 @@ class Playlist {
|
||||
this.cfg = state.getPlaylistConfig({
|
||||
slots: 5, dwellSeconds: 120, crossfadeSeconds: 3, order: 'shuffle',
|
||||
include: { colors: [], rarities: [], ids: [] },
|
||||
behaviors: { staticChance: 0.5, wanderRadius: 0.6, wanderSpeed: 0.15 },
|
||||
behaviors: { staticChance: 0.5, wanderRadius: 60, wanderSpeed: 0.15 },
|
||||
timeWindows: [],
|
||||
});
|
||||
this.active = new Map(); // uid -> ghost record
|
||||
@@ -104,8 +104,8 @@ class Playlist {
|
||||
uid, id: g.id, name: g.name, color: g.color, rarity: g.rarity,
|
||||
spawnId: spawn.id, pos: spawn.position,
|
||||
behavior: isStatic
|
||||
? { type: 'static', bobAmp: 0.05 + Math.random() * 0.05, bobHz: 0.3 + Math.random() * 0.3 }
|
||||
: { type: 'wander', radius: b.wanderRadius ?? 0.6, speed: b.wanderSpeed ?? 0.15, seed: Math.floor(Math.random() * 1e6) },
|
||||
? { type: 'static', bobAmp: 5 + Math.random() * 5, bobHz: 0.3 + Math.random() * 0.3 }
|
||||
: { type: 'wander', radius: b.wanderRadius ?? 60, speed: b.wanderSpeed ?? 0.15, seed: Math.floor(Math.random() * 1e6) },
|
||||
spawnedAt: Date.now(),
|
||||
until: Date.now() + (this.cfg.dwellSeconds || 120) * 1000,
|
||||
crossfade: this.cfg.crossfadeSeconds || 3,
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ function writeJSON(p, obj) {
|
||||
fs.writeFileSync(p, JSON.stringify(obj, null, 2));
|
||||
}
|
||||
|
||||
let scene = readJSON(LIVE, null) || readJSON(SEED, { anchors: [], buildings: [], spawns: [], world: { units: 'm' } });
|
||||
let scene = readJSON(LIVE, null) || readJSON(SEED, { anchors: [], buildings: [], spawns: [], world: { units: 'cm' } });
|
||||
let ghosts = readJSON(path.join(DATA, 'ghosts.json'), []);
|
||||
let gradients = readJSON(path.join(DATA, 'gradients.json'), {});
|
||||
let models = readJSON(MODELS_LIVE, null) || readJSON(MODELS_SEED, { models: [] });
|
||||
|
||||
Reference in New Issue
Block a user