Commit
·
6eac0ce
1
Parent(s):
a81ea66
Update game_viewer.html
Browse files- frontend/game_viewer.html +10 -1
frontend/game_viewer.html
CHANGED
|
@@ -1910,7 +1910,16 @@
|
|
| 1910 |
const lifetimes = new Float32Array(count);
|
| 1911 |
|
| 1912 |
const spread = config.spread || 1.0;
|
| 1913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1914 |
|
| 1915 |
for (let i = 0; i < count; i++) {
|
| 1916 |
const i3 = i * 3;
|
|
|
|
| 1910 |
const lifetimes = new Float32Array(count);
|
| 1911 |
|
| 1912 |
const spread = config.spread || 1.0;
|
| 1913 |
+
|
| 1914 |
+
// Use forward spawn position if no position specified or default (0,0,0)
|
| 1915 |
+
let pos = config.position || { x: 0, y: 0, z: 0 };
|
| 1916 |
+
const isDefaultPosition = pos.x === 0 && pos.y === 0 && pos.z === 0;
|
| 1917 |
+
|
| 1918 |
+
if (config.localized !== false && isDefaultPosition) {
|
| 1919 |
+
// For localized effects, spawn in front of player (don't snap to ground for particles)
|
| 1920 |
+
const spawnPos = getForwardSpawnPosition({x: spread, y: spread, z: spread}, false);
|
| 1921 |
+
pos = { x: spawnPos.x, y: spawnPos.y, z: spawnPos.z };
|
| 1922 |
+
}
|
| 1923 |
|
| 1924 |
for (let i = 0; i < count; i++) {
|
| 1925 |
const i3 = i * 3;
|