@wildshard/sdk 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GUIDE.md +10 -2
- package/docs/api/EXPORT-TIERS.md +7 -4
- package/lint/export-tiers.json +3 -0
- package/lint/host-callbacks.mjs +1 -1
- package/package.json +9 -5
- package/scripts/bake/template-skins.mjs +6 -3
- package/scripts/bake/template-warden.mjs +25 -0
- package/scripts/export-ci21-guests.mjs +89 -0
- package/scripts/scratch-sweep.mjs +3 -1
- package/src/cli/hero/hero.ts +45 -2
- package/src/sharddev/as/prelude.ts +67 -0
- package/src/sharddev/authorLint.ts +45 -0
- package/src/sharddev/bake/compileScript.ts +6 -0
- package/src/sharddev/bake/terrain.ts +11 -2
- package/src/sharddev/checkProject.ts +7 -18
- package/src/sharddev/engineMusic.ts +23 -0
- package/src/sharddev/materials.ts +7 -3
- package/src/sharddev/project.ts +5 -0
- package/src/sharddev/refusals.ts +1 -1
- package/src/sharddev/scene/author.ts +116 -11
- package/src/sharddev/scene/canvas.ts +2 -3
- package/src/sharddev/scene/description.ts +55 -2
- package/src/sharddev/scene/lower.ts +144 -29
- package/src/sharddev/scene/shard.ts +5 -2
- package/src/sharddev/scene/shardfile.ts +385 -72
- package/src/sharddev/watch/page.ts +116 -29
- package/src/sharddev/watch/pageEntry.ts +38 -2
- package/src/sharddev/watch/parity-baseline.json +22 -0
- package/src/sharddev/watch/parity.mjs +168 -0
- package/src/sharddev/watch/proof.mjs +129 -22
- package/src/sharddev/watch/protocol.ts +66 -8
- package/src/sharddev/watch/watch.ts +215 -51
- package/src/shards/_template/assets/3058c100bc477fd6fe8268f33b53756b8a2556e7e41c58b2216c703ca7b042c6 +1 -0
- package/src/shards/_template/assets/8a0440f392737a31cf0926a3c7dc011c320144972882945a5462c893e817d94a +0 -0
- package/src/shards/_template/behaviour/door.as +16 -26
- package/src/shards/_template/card/landscape.jpg +0 -0
- package/src/shards/_template/card/portrait.jpg +0 -0
- package/src/shards/_template/card/thumb.jpg +0 -0
- package/src/shards/_template/data/clientScripts.json +43 -43
- package/src/shards/_template/data/creatures.json +2 -2
- package/src/shards/_template/data/look.json +141 -13
- package/src/shards/_template/data/rows.json +20 -2
- package/src/shards/_template/data/skins.json +32 -0
- package/src/shards/_template/data/water.json +18 -0
- package/src/shards/_template/generators/product.ts +5 -1
- package/src/shards/_template/generators/warden.ts +273 -0
- package/src/shards/_template/generators/world.ts +52 -21
- package/src/shards/_template/hero.json +6 -6
- package/src/shards/authoring-slice/generators/shard.ts +9 -1
- package/src/shards/authoring-slice/generators/sky.ts +64 -0
- package/src/shards/authoring-slice/generators/template-sky.ts +27 -0
- package/src/shards/authoring-slice/generators/textures.ts +59 -0
- package/src/shards/authoring-slice/generators/world.ts +108 -5
- package/src/shards/mossgate/generators/shard.ts +6 -0
- package/src/shards/mossgate/generators/sky.ts +64 -0
- package/src/shards/mossgate/generators/textures.ts +249 -0
- package/src/shards/mossgate/generators/world.ts +998 -0
- package/src/shards/mossgate/shard.config.ts +7 -0
- package/scripts/shard-output-report.d.mts +0 -9
- package/scripts/shard-output-report.mjs +0 -85
- package/scripts/shard-platform-cli.mjs +0 -93
|
@@ -6,7 +6,10 @@ import { createReadStream, existsSync, mkdtempSync, readdirSync, readFileSync, r
|
|
|
6
6
|
import { tmpdir } from 'node:os';
|
|
7
7
|
// oxlint-disable-next-line import/no-nodejs-modules -- Resolve static requests inside the product directory.
|
|
8
8
|
import { extname, join, resolve, sep } from 'node:path';
|
|
9
|
-
import { build } from 'vite';
|
|
9
|
+
import { build, type Plugin } from 'vite';
|
|
10
|
+
import * as THREE from 'three';
|
|
11
|
+
import * as liveTsl from 'three/tsl';
|
|
12
|
+
import * as liveWebgpu from 'three/webgpu';
|
|
10
13
|
import { diagnosticNow } from '@wildshard/engine/core/clock';
|
|
11
14
|
import { Scope } from '@wildshard/engine/app/scope';
|
|
12
15
|
import { SDK_ROOT } from '../agentFiles';
|
|
@@ -14,9 +17,19 @@ import { buildProject } from '../project';
|
|
|
14
17
|
import { projectSourceStamp } from '../dev';
|
|
15
18
|
import { executeBundle } from '../executeBundle';
|
|
16
19
|
import type { ShardScene } from '../scene/description';
|
|
20
|
+
import * as liveAuthor from '../scene/author';
|
|
21
|
+
import { PaintMemo, withPaintMemo } from '../scene/author';
|
|
22
|
+
import * as liveCanvas from '../scene/canvas';
|
|
23
|
+
import * as liveLower from '../scene/lower';
|
|
24
|
+
import * as liveMaterials from '../materials';
|
|
25
|
+
import * as liveShard from '../scene/shard';
|
|
26
|
+
import * as liveShardfile from '../scene/shardfile';
|
|
17
27
|
import { hashOf } from '../scene/hash';
|
|
18
|
-
import { lampRows, sceneLook, waterRows } from '../scene/shardfile';
|
|
19
|
-
import { DEV_SCENE_PATH, WATCH_SOCKET, WATCH_WIRE, encodeGeometry, encodePart, hookMismatch, liveShell, type WatchState } from './protocol';
|
|
28
|
+
import { lampRows, sceneGroundBytes, sceneLook, waterRows, type sceneGameplay } from '../scene/shardfile';
|
|
29
|
+
import { DEV_SCENE_PATH, WATCH_RESHELL, WATCH_SOCKET, WATCH_WIRE, budgetLines, budgetOf, encodeGeometry, encodePart, hookMismatch, liveShell, type WatchBuild, type WatchState } from './protocol';
|
|
30
|
+
import { CONTENT_CAPS } from '@wildshard/format/contentBounds';
|
|
31
|
+
// oxlint-disable-next-line import/no-nodejs-modules -- The idle full build runs `wildshard build` in a child process.
|
|
32
|
+
import { spawn, type ChildProcess } from 'node:child_process';
|
|
20
33
|
import { acceptSocket, type WatchSocket } from './socket';
|
|
21
34
|
|
|
22
35
|
/**
|
|
@@ -30,7 +43,8 @@ import { acceptSocket, type WatchSocket } from './socket';
|
|
|
30
43
|
* push one `WatchState` on the WebSocket; the page script fetches the changed parts, and only the geometry and
|
|
31
44
|
* rasters it lacks, and drives engine's dev hook
|
|
32
45
|
*
|
|
33
|
-
* A sky, fog, sun colour or ambient edit goes live (the look's day keys)
|
|
46
|
+
* A sky, fog, sun colour or ambient edit goes live (the look's day keys); a ground edit too (AP18: `setGround`), and a quest,
|
|
47
|
+
* encounter, spawn or script edit restarts the page's simulation (AP19: `restartGameplay`). A spawn, grade or sun direction edit
|
|
34
48
|
* can't in M1 (AP17's fast path): it rebuilds the shell and the page reloads, as `dev` does. `wildshard dev` is unchanged.
|
|
35
49
|
*/
|
|
36
50
|
export interface WatchProject { url: string; close: () => Promise<void> }
|
|
@@ -38,29 +52,89 @@ export interface WatchProject { url: string; close: () => Promise<void> }
|
|
|
38
52
|
const MIME: Record<string, string> = { '.html': 'text/html', '.js': 'text/javascript', '.css': 'text/css', '.json': 'application/json', '.wasm': 'application/wasm', '.svg': 'image/svg+xml', '.png': 'image/png', '.woff2': 'font/woff2', '.ktx2': 'image/ktx2' };
|
|
39
53
|
const ignored = new Set(['node_modules', '.git', 'dist', 'public', '.worktrees', 'tmp']);
|
|
40
54
|
|
|
41
|
-
/**
|
|
42
|
-
|
|
55
|
+
/**
|
|
56
|
+
* AP17: the modules a watched revision shares with this process instead of bundling and evaluating its own copy: `three`
|
|
57
|
+
* (with `three/tsl` and `three/webgpu`, whose node graph is per instance: a bundled copy's `toVar()` has no graph op), the
|
|
58
|
+
* sdk's materials and the scene API. An author's bundle is then only the author's own code (~20 ms, not ~170 ms), and three and the
|
|
59
|
+
* lowering stay loaded and warm across revisions. Each is a virtual module that re-exports this process's instance, so
|
|
60
|
+
* an author's `THREE.Mesh` is the lowering's `Mesh`.
|
|
61
|
+
*/
|
|
62
|
+
const LIVE_GLOBAL = '__wildshardWatchLive';
|
|
63
|
+
const LIVE: Readonly<Record<string, object>> = { three: THREE, 'three/tsl': liveTsl, 'three/webgpu': liveWebgpu,
|
|
64
|
+
'@wildshard/sdk/materials': liveMaterials, '@wildshard/sdk/scene/author': liveAuthor, '@wildshard/sdk/scene/canvas': liveCanvas,
|
|
65
|
+
'@wildshard/sdk/scene/lower': liveLower, '@wildshard/sdk/scene/shard': liveShard, '@wildshard/sdk/scene/shardfile': liveShardfile };
|
|
66
|
+
/** The client's service worker, and what `watch` serves in its place: a worker that unregisters itself and serves nothing. */
|
|
67
|
+
const SERVICE_WORKER = '/sw.js';
|
|
68
|
+
export const NO_SERVICE_WORKER = "self.addEventListener('install', () => { self.skipWaiting(); });\nself.addEventListener('activate', (event) => { event.waitUntil(self.registration.unregister()); });\n";
|
|
69
|
+
/** AP17: how long after a guessed revision the true paint runs: once edits pause, so a paint (it holds this process) rarely delays one. */
|
|
70
|
+
const TRUTH_AFTER_MS = 1500;
|
|
71
|
+
const IDENTIFIER = /^[A-Za-z_$][\w$]*$/u, LIVE_PREFIX = '\0wildshard-live:';
|
|
72
|
+
const livePlugin = (): Plugin => {
|
|
73
|
+
(globalThis as Record<string, unknown>)[LIVE_GLOBAL] = LIVE;
|
|
74
|
+
return {
|
|
75
|
+
name: 'wildshard-watch-live', enforce: 'pre',
|
|
76
|
+
resolveId: (id) => (Object.hasOwn(LIVE, id) ? `${LIVE_PREFIX}${id}` : null),
|
|
77
|
+
load: (id) => {
|
|
78
|
+
if (!id.startsWith(LIVE_PREFIX)) return null;
|
|
79
|
+
const name = id.slice(LIVE_PREFIX.length), live = LIVE[name] ?? {}, keys = Object.keys(live).filter((key) => key !== 'default' && IDENTIFIER.test(key));
|
|
80
|
+
return `const live = globalThis.${LIVE_GLOBAL}[${JSON.stringify(name)}];\nexport const { ${keys.join(', ')} } = live;\n${'default' in live ? 'export default live.default;\n' : ''}`;
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The scene shard `shard.config.ts` exports (its default or `generate`), read fresh from source. Its build runs under `memo`
|
|
87
|
+
* in guess mode (AP17): `describe` runs it again, in guess or truth mode, without bundling again.
|
|
88
|
+
*/
|
|
89
|
+
type Gameplay = ReturnType<typeof sceneGameplay>;
|
|
90
|
+
async function describeSource(source: string, memo: PaintMemo): Promise<{ scene: ShardScene; gameplay: Gameplay; describe: (mode: 'guess' | 'truth') => ShardScene; bundleMs: number; describeMs: number }> {
|
|
43
91
|
const started = diagnosticNow();
|
|
44
|
-
const result = await build({ configFile: false, logLevel: 'silent', build: { write: false, minify: false, lib: { entry: resolve(source, 'shard.config.ts'), formats: ['es'], fileName: 'config' }, rolldownOptions: { external: [/^node:/u], output: { codeSplitting: false } } } });
|
|
92
|
+
const result = await build({ configFile: false, logLevel: 'silent', plugins: [livePlugin()], build: { write: false, minify: false, lib: { entry: resolve(source, 'shard.config.ts'), formats: ['es'], fileName: 'config' }, rolldownOptions: { external: [/^node:/u], output: { codeSplitting: false } } } });
|
|
45
93
|
const built = Array.isArray(result) ? result[0] : result;
|
|
46
94
|
const chunk = built !== undefined && 'output' in built ? built.output.find((out) => out.type === 'chunk') : undefined;
|
|
47
95
|
if (chunk === undefined || chunk.type !== 'chunk') throw new Error('watch: shard.config.ts did not bundle to one module');
|
|
48
96
|
const loaded = await executeBundle(chunk.code, source) as Record<string, unknown>;
|
|
49
97
|
const bundled = diagnosticNow();
|
|
50
|
-
const shard = [loaded['default'], loaded['generate']].find((value): value is { describe: () => ShardScene } => typeof value === 'function' && 'describe' in value && typeof value.describe === 'function');
|
|
98
|
+
const shard = [loaded['default'], loaded['generate']].find((value): value is { describe: () => ShardScene; gameplay?: () => Gameplay } => typeof value === 'function' && 'describe' in value && typeof value.describe === 'function');
|
|
51
99
|
if (shard === undefined) throw new Error('watch: shard.config.ts exports no scene shard (defineShard from @wildshard/sdk/scene/shard)');
|
|
52
|
-
const
|
|
53
|
-
|
|
100
|
+
const describe = (mode: 'guess' | 'truth'): ShardScene => { memo.begin(mode); return withPaintMemo(memo, () => shard.describe()); };
|
|
101
|
+
const scene = describe('guess'), gameplay = shard.gameplay?.() ?? { gameplay: {}, rest: {} };
|
|
102
|
+
return { scene, gameplay, describe, bundleMs: Math.round(bundled - started), describeMs: Math.round(diagnosticNow() - bundled) };
|
|
54
103
|
}
|
|
55
104
|
|
|
56
105
|
/** The shell's look, as the shardfile back end writes it for the live shell: its day keys go live, the rest is the shell's. */
|
|
57
106
|
const shellLook = (scene: ShardScene): ReturnType<typeof sceneLook> => sceneLook(scene, liveShell(scene).parts.flatMap((p) => p.lights), {});
|
|
58
107
|
|
|
59
|
-
/**
|
|
60
|
-
const
|
|
61
|
-
const {
|
|
108
|
+
/** The shell's look as the page takes it live (AP17): the whole section but its materials, which ride the parts. */
|
|
109
|
+
const liveLook = (scene: ShardScene): { keys: readonly unknown[]; look: unknown } => {
|
|
110
|
+
const { materials: _materials, ...look } = shellLook(scene);
|
|
111
|
+
return { keys: look.keys, look };
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* What a page boots from: a ground or spawn change, or a look change engine's dev hook can't set live, needs a new shell.
|
|
116
|
+
* The day keys, the sun's arc, exposure, tone, vignette and bloom go live (AP17); a page whose hook refuses one anyway asks
|
|
117
|
+
* for a new shell (`WATCH_RESHELL`).
|
|
118
|
+
*/
|
|
119
|
+
/** A built product's files (its `shard.json`) and tiles (format 2: the `world/tiles` section), for the budget table. */
|
|
120
|
+
function builtProduct(folder: string): Parameters<typeof budgetOf>[0] {
|
|
121
|
+
const shard = JSON.parse(readFileSync(join(folder, 'shard.json'), 'utf8')) as { files: { compressed: number }[]; sections?: { name: string; path: string }[] };
|
|
122
|
+
const section = shard.sections?.find((row) => row.name === 'world/tiles');
|
|
123
|
+
const tiles = section === undefined ? [] : (JSON.parse(readFileSync(join(folder, section.path), 'utf8')) as { tiles: Parameters<typeof budgetOf>[0]['tiles'] }).tiles;
|
|
124
|
+
return { files: shard.files, tiles };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** AP20: how long edits rest before watch runs the full build. */
|
|
128
|
+
const IDLE_BUILD_MS = 5000;
|
|
129
|
+
|
|
130
|
+
const shellKey = (scene: ShardScene, gameplay: Gameplay): string => {
|
|
131
|
+
const { keys: _keys, materials: _materials, day, grade, ...look } = shellLook(scene);
|
|
132
|
+
const { exposure: _exposure, tone: _tone, vignette: _vignette, bloom: _bloom, ...fixedGrade } = grade as typeof grade & { tone?: unknown; vignette?: unknown; bloom?: unknown };
|
|
62
133
|
// engine's live look keeps its fog kind: linear against exponential needs a new shell
|
|
63
|
-
return hashOf((hash) => hash.json({ look,
|
|
134
|
+
return hashOf((hash) => hash.json({ look, grade: fixedGrade, day: day === undefined ? null : { minutes: day.minutes, start: day.start },
|
|
135
|
+
linearFog: scene.look.fog?.kind === 'linear', ground: scene.ground?.surface ?? null, spawn: scene.spawn, identity: scene.identity, extended: gameplay.rest,
|
|
136
|
+
// AP16: a panel part is the shell's, not a streamed part: its change is a new shell
|
|
137
|
+
panels: scene.parts.filter((part) => part.panel !== undefined).map((part) => part.hash) }));
|
|
64
138
|
};
|
|
65
139
|
|
|
66
140
|
/** The page script, bundled once per process from `pageEntry.ts` into one classic script for the page's body. */
|
|
@@ -85,10 +159,12 @@ export async function watchProject(project: string, options: { port?: number; cl
|
|
|
85
159
|
if (typeof options.client === 'string') assertHook(options.client);
|
|
86
160
|
const source = resolve(project), scratch = realpathSync(mkdtempSync(join(tmpdir(), 'wildshard-watch-'))), log = options.log ?? ((line: string): void => { console.info(line); });
|
|
87
161
|
let product = '', shardRoot = '', shell = 0, shellHash = '', revision = 0, error: string | null = null, stopped = false, script = '';
|
|
88
|
-
let parts: { name: string; hash: string }[] = [], look: WatchState['look'] = { hash: '', keys: [] };
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
const
|
|
162
|
+
let parts: { name: string; hash: string }[] = [], look: WatchState['look'] = { hash: '', keys: [], look: null }, reshell = false;
|
|
163
|
+
let ground: WatchState['ground'] = { hash: '', shell: '' }, gameplayState: WatchState['gameplay'] = { hash: '', shell: '' }, lastBuild: WatchBuild | null = null, idle: Scope | null = null, building: ChildProcess | null = null;
|
|
164
|
+
const encodedParts = new Map<string, Uint8Array>(), geometries = new Map<string, Uint8Array>(), textures = new Map<string, Uint8Array>(), grounds = new Map<string, Uint8Array>(), gameplays = new Map<string, Uint8Array>();
|
|
165
|
+
const clients = new Set<WatchSocket>(), scope = new Scope('sdk.watch');
|
|
166
|
+
let seenAt = 0, observed = projectSourceStamp(source), work = Promise.resolve(), pending = false, stampMs = 0;
|
|
167
|
+
const state = (): string => JSON.stringify({ wire: WATCH_WIRE, shell, revision, parts, look, ground, gameplay: gameplayState, build: lastBuild, error, seenAt, sentAt: Date.now() } satisfies WatchState);
|
|
92
168
|
const announce = (): void => { const message = state(); for (const client of clients) client.send(message); };
|
|
93
169
|
|
|
94
170
|
const buildShell = async (): Promise<void> => {
|
|
@@ -107,19 +183,65 @@ export async function watchProject(project: string, options: { port?: number; cl
|
|
|
107
183
|
} finally { if (before === undefined) delete process.env['WILDSHARD_SCENE_LIVE']; else process.env['WILDSHARD_SCENE_LIVE'] = before; }
|
|
108
184
|
};
|
|
109
185
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
|
|
186
|
+
/**
|
|
187
|
+
* AP20: once edits rest `IDLE_BUILD_MS`, the full `wildshard build` of the source (the shardfile back end, as an upload
|
|
188
|
+
* would carry it) in a child process, so a long build never holds an edit back; an edit kills it. Its budget table goes to
|
|
189
|
+
* the page (`WatchState.build`) and the log.
|
|
190
|
+
*/
|
|
191
|
+
const fullBuild = async (): Promise<void> => {
|
|
192
|
+
if (stopped || building !== null) return;
|
|
193
|
+
const of = revision, started = diagnosticNow(), target = join(scratch, 'build');
|
|
194
|
+
rmSync(target, { recursive: true, force: true });
|
|
195
|
+
const child = spawn(process.execPath, [join(SDK_ROOT, 'bin/wildshard.mjs'), 'build', source, target, '--folder-only'], { stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, WILDSHARD_SCENE_LIVE: '' } });
|
|
196
|
+
building = child;
|
|
197
|
+
let output = '';
|
|
198
|
+
child.stdout?.on('data', (chunk: Buffer) => { output += String(chunk); }); child.stderr?.on('data', (chunk: Buffer) => { output += String(chunk); });
|
|
199
|
+
const code = await new Promise<number | null>((_resolve) => { child.on('close', _resolve); });
|
|
200
|
+
building = null;
|
|
201
|
+
if (stopped || of !== revision || child.signalCode !== null) return;
|
|
202
|
+
const ms = Math.round(diagnosticNow() - started), refused = (reason: string): WatchBuild => ({ revision: of, ms, error: reason, download: 0, files: 0, tiles: 0, triangles: 0, draws: 0, over: [] });
|
|
203
|
+
let table: WatchBuild;
|
|
204
|
+
try {
|
|
205
|
+
table = code === 0 ? { revision: of, ms, error: null, ...budgetOf(builtProduct(target), CONTENT_CAPS) }
|
|
206
|
+
: refused(output.trim().split('\n').reverse().find((row: string) => row !== '' && !row.includes('ExperimentalWarning') && !row.includes('--trace-warnings')) ?? `exit ${String(code)}`);
|
|
207
|
+
} catch (cause) { table = refused(cause instanceof Error ? cause.message : String(cause)); }
|
|
208
|
+
lastBuild = table;
|
|
209
|
+
for (const row of budgetLines(table)) log(`wildshard watch: ${row}`);
|
|
210
|
+
announce();
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
const idleBuild = (): void => {
|
|
214
|
+
idle?.dispose();
|
|
215
|
+
idle = scope.child('sdk.watch.idle');
|
|
216
|
+
idle.timeout(IDLE_BUILD_MS, () => { void fullBuild(); });
|
|
217
|
+
};
|
|
218
|
+
/** Push one described revision: a new shell if it needs one, the changed parts and the look. */
|
|
219
|
+
const push = async (described: ShardScene, gameplay: Gameplay, timing: string, started: number): Promise<void> => {
|
|
220
|
+
const key = shellKey(described, gameplay);
|
|
221
|
+
// AP16: the page streams every part but the panels, which the shell draws
|
|
222
|
+
const scene = { ...described, parts: described.parts.filter((part) => part.panel === undefined) };
|
|
223
|
+
const reshelled = key !== shellHash || reshell;
|
|
224
|
+
if (reshelled) {
|
|
225
|
+
if (shellHash !== '') log(`wildshard watch: ${reshell ? 'the page can\'t take this look live' : 'the ground, spawn or a fixed look field changed'}; rebuilding the shell (the page reloads)`);
|
|
118
226
|
// the first shell's failure is the command's; a later one is the page's error, and the old shell keeps serving
|
|
119
227
|
if (shellHash === '') await buildShell();
|
|
120
228
|
else try { await buildShell(); } catch (cause) { error = cause instanceof Error ? cause.message : String(cause); log(`wildshard watch: ${error}`); revision++; announce(); return; }
|
|
121
|
-
shellHash = key;
|
|
229
|
+
shellHash = key; reshell = false;
|
|
122
230
|
}
|
|
231
|
+
// AP18: the ground goes live (`setGround`); the shell keeps the one it was built with
|
|
232
|
+
const groundHash = scene.ground?.hash ?? 'flat';
|
|
233
|
+
if (!grounds.has(groundHash)) {
|
|
234
|
+
if (grounds.size > 8) grounds.clear();
|
|
235
|
+
grounds.set(groundHash, sceneGroundBytes(scene));
|
|
236
|
+
}
|
|
237
|
+
const groundChanged = ground.hash !== '' && groundHash !== ground.hash;
|
|
238
|
+
// AP19: the gameplay sections go live (`restartGameplay`); the shell keeps the ones it was built with
|
|
239
|
+
const gameplayHash = hashOf((hash) => hash.json(gameplay.gameplay));
|
|
240
|
+
if (!gameplays.has(gameplayHash)) {
|
|
241
|
+
if (gameplays.size > 8) gameplays.clear();
|
|
242
|
+
gameplays.set(gameplayHash, new TextEncoder().encode(JSON.stringify(gameplay.gameplay)));
|
|
243
|
+
}
|
|
244
|
+
const gameplayChanged = gameplayState.hash !== '' && gameplayHash !== gameplayState.hash;
|
|
123
245
|
const changed = scene.parts.filter((part) => parts.find((live) => live.name === part.name)?.hash !== part.hash).map((part) => part.name);
|
|
124
246
|
for (const part of scene.parts) {
|
|
125
247
|
if (encodedParts.has(part.hash)) continue;
|
|
@@ -128,17 +250,63 @@ export async function watchProject(project: string, options: { port?: number; cl
|
|
|
128
250
|
for (const t of part.textures) { const texture = scene.textures[t]; if (!textures.has(t) && texture !== undefined) textures.set(t, texture.rgba); }
|
|
129
251
|
}
|
|
130
252
|
const next = scene.parts.map((part) => ({ name: part.name, hash: part.hash }));
|
|
131
|
-
const
|
|
132
|
-
const same = error === null && lookHash === look.hash && next.length === parts.length && next.every((part, i) => part.name === parts[i]?.name && part.hash === parts[i]?.hash);
|
|
253
|
+
const live = liveLook(scene), lookHash = hashOf((hash) => hash.json(live));
|
|
254
|
+
const same = !reshelled && error === null && !groundChanged && !gameplayChanged && lookHash === look.hash && next.length === parts.length && next.every((part, i) => part.name === parts[i]?.name && part.hash === parts[i]?.hash);
|
|
133
255
|
error = null;
|
|
134
|
-
|
|
256
|
+
// a save that changes nothing still owes the idle full build reconcile put off
|
|
257
|
+
if (same) { if (lastBuild?.revision !== revision) idleBuild(); return; }
|
|
135
258
|
const lookChanged = look.hash !== '' && lookHash !== look.hash;
|
|
136
|
-
parts = next; look = { hash: lookHash,
|
|
259
|
+
parts = next; look = { hash: lookHash, ...live }; ground = { hash: groundHash, shell: reshelled ? groundHash : ground.shell };
|
|
260
|
+
gameplayState = { hash: gameplayHash, shell: reshelled ? gameplayHash : gameplayState.shell }; revision++;
|
|
137
261
|
announce();
|
|
138
|
-
const what = [...changed.length === 0 ? [] : [`changed ${changed.join(', ')}`], ...lookChanged ? ['the look'] : []];
|
|
139
|
-
|
|
262
|
+
const what = [...changed.length === 0 ? [] : [`changed ${changed.join(', ')}`], ...lookChanged ? ['the look'] : [], ...groundChanged && !reshelled ? ['the ground'] : [], ...gameplayChanged && !reshelled ? ['the gameplay'] : []];
|
|
263
|
+
idleBuild();
|
|
264
|
+
log(`wildshard watch: revision ${revision}, ${what.length === 0 ? (reshelled ? 'a new shell' : 'parts removed') : what.join(' and ')} in ${Math.round(diagnosticNow() - started)} ms ${timing}`);
|
|
140
265
|
};
|
|
141
266
|
|
|
267
|
+
const memo = new PaintMemo();
|
|
268
|
+
let edits = 0, truth: Scope | null = null;
|
|
269
|
+
const compile = async (): Promise<void> => {
|
|
270
|
+
const started = diagnosticNow();
|
|
271
|
+
// every compile is a new edit, before the source can fail: a pending texture recheck of an older one must not push
|
|
272
|
+
const edit = ++edits;
|
|
273
|
+
truth?.dispose(); truth = null;
|
|
274
|
+
let described: Awaited<ReturnType<typeof describeSource>>;
|
|
275
|
+
try { described = await describeSource(source, memo); }
|
|
276
|
+
catch (cause) { error = cause instanceof Error ? cause.message : String(cause); log(`wildshard watch: ${error}`); revision++; announce(); return; }
|
|
277
|
+
const guessed = memo.hits;
|
|
278
|
+
await push(described.scene, described.gameplay, `(bundle ${described.bundleMs} ms, describe ${described.describeMs} ms${guessed > 0 ? `, ${guessed} of ${guessed + memo.misses} textures kept` : ''})`, started);
|
|
279
|
+
// AP17: a kept texture was a guess. Once the page has fetched this revision (painting holds this process), and unless a
|
|
280
|
+
// newer edit came, paint every texture again and push what differs.
|
|
281
|
+
if (guessed === 0) return;
|
|
282
|
+
const verify = async (): Promise<void> => {
|
|
283
|
+
if (edit !== edits || stopped) return;
|
|
284
|
+
const checked = diagnosticNow();
|
|
285
|
+
let painted: ShardScene;
|
|
286
|
+
try { painted = described.describe('truth'); } catch (cause) { log(`wildshard watch: ${cause instanceof Error ? cause.message : String(cause)}`); return; }
|
|
287
|
+
await push(painted, described.gameplay, `(a kept texture changed; repainted in ${Math.round(diagnosticNow() - checked)} ms)`, checked);
|
|
288
|
+
};
|
|
289
|
+
truth = scope.child('sdk.watch.truth');
|
|
290
|
+
truth.timeout(TRUTH_AFTER_MS, () => { work = work.then(verify); });
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
// Edits: a native watch per top-level folder (and the root), plus a stamp poll for what native events miss. AP17: the poll
|
|
294
|
+
// runs every 40 to 250 ms, twenty times as long as a stamp takes, since native events don't always come (on a Mac whose
|
|
295
|
+
// FSEvents streams are used up, none do, and a fixed 250 ms poll alone cost an edit 125 ms on average).
|
|
296
|
+
const reconcile = (): void => {
|
|
297
|
+
if (stopped || pending) return;
|
|
298
|
+
const stamped = diagnosticNow(), next = projectSourceStamp(source);
|
|
299
|
+
stampMs = diagnosticNow() - stamped;
|
|
300
|
+
if (next === observed) return;
|
|
301
|
+
observed = next; pending = true; seenAt = Date.now();
|
|
302
|
+
// an edit: the idle full build waits for the next rest, and one running is of a stale source
|
|
303
|
+
idle?.dispose(); idle = null; building?.kill('SIGTERM');
|
|
304
|
+
const run = async (): Promise<void> => {
|
|
305
|
+
pending = false;
|
|
306
|
+
try { if (!stopped) await compile(); } catch (cause) { log(`wildshard watch: ${cause instanceof Error ? cause.message : String(cause)}`); }
|
|
307
|
+
};
|
|
308
|
+
work = work.then(run);
|
|
309
|
+
};
|
|
142
310
|
try { await compile(); } catch (cause) { rmSync(scratch, { recursive: true, force: true }); throw cause; }
|
|
143
311
|
if (product === '') { rmSync(scratch, { recursive: true, force: true }); throw new Error(`wildshard watch: ${error ?? 'no shell was built'}`); }
|
|
144
312
|
|
|
@@ -146,15 +314,24 @@ export async function watchProject(project: string, options: { port?: number; cl
|
|
|
146
314
|
response.setHeader('Cache-Control', 'no-store');
|
|
147
315
|
try {
|
|
148
316
|
const path = decodeURIComponent(new URL(request.url ?? '/', 'http://localhost').pathname);
|
|
317
|
+
if (path === WATCH_RESHELL && request.method === 'POST') {
|
|
318
|
+
// the page's look refused this revision live: the next compile builds a new shell, which the page reloads into
|
|
319
|
+
// a revision whose shell build already failed gets no new one until the source changes
|
|
320
|
+
if (error === null) { reshell = true; observed = ''; reconcile(); }
|
|
321
|
+
response.writeHead(204); response.end(); return;
|
|
322
|
+
}
|
|
149
323
|
if (path.startsWith(DEV_SCENE_PATH)) {
|
|
150
324
|
const rest = path.slice(DEV_SCENE_PATH.length), [kind = '', name = ''] = rest.split(/\/(.*)/su);
|
|
151
325
|
const hash = kind === 'part' ? parts.find((part) => part.name === name)?.hash : undefined;
|
|
152
|
-
const body = kind === 'part' ? (hash === undefined ? undefined : encodedParts.get(hash)) : kind === 'geometry' ? geometries.get(name) : kind === 'texture' ? textures.get(name) : undefined;
|
|
326
|
+
const body = kind === 'part' ? (hash === undefined ? undefined : encodedParts.get(hash)) : kind === 'geometry' ? geometries.get(name) : kind === 'texture' ? textures.get(name) : kind === 'ground' ? grounds.get(name) : kind === 'gameplay' ? gameplays.get(name) : undefined;
|
|
153
327
|
if (body === undefined) { response.writeHead(404); response.end(); return; }
|
|
154
|
-
response.setHeader('Content-Type', kind === 'part' ? 'application/json' : 'application/octet-stream');
|
|
328
|
+
response.setHeader('Content-Type', kind === 'part' || kind === 'gameplay' ? 'application/json' : 'application/octet-stream');
|
|
155
329
|
response.end(body); return;
|
|
156
330
|
}
|
|
157
331
|
if (request.method !== 'GET' && request.method !== 'HEAD') { response.writeHead(405); response.end(); return; }
|
|
332
|
+
// AP17: the client's service worker would serve a reloaded page its cached index.html, which has no page script (and
|
|
333
|
+
// an older shell); a watched page runs without one, so watch serves one that removes itself
|
|
334
|
+
if (path === SERVICE_WORKER) { response.setHeader('Content-Type', 'text/javascript'); response.end(NO_SERVICE_WORKER); return; }
|
|
158
335
|
const served = shardRoot !== '' && path.startsWith(shardRoot) ? path.slice(shardRoot.length - 1) : path;
|
|
159
336
|
const file = resolve(product, served === '/' ? 'index.html' : served.slice(1));
|
|
160
337
|
if (!file.startsWith(`${product}${sep}`) || !existsSync(file) || !statSync(file).isFile() || !realpathSync(file).startsWith(`${product}${sep}`)) { response.writeHead(404); response.end(); return; }
|
|
@@ -174,19 +351,6 @@ export async function watchProject(project: string, options: { port?: number; cl
|
|
|
174
351
|
});
|
|
175
352
|
await new Promise<void>((_resolve, reject) => { server.once('error', reject); server.listen(options.port ?? 0, '127.0.0.1', _resolve); });
|
|
176
353
|
|
|
177
|
-
// Edits: a native watch per top-level folder (and the root), plus a 250 ms stamp poll for what native events miss.
|
|
178
|
-
let observed = projectSourceStamp(source), work = Promise.resolve(), pending = false;
|
|
179
|
-
const reconcile = (): void => {
|
|
180
|
-
if (stopped || pending) return;
|
|
181
|
-
const next = projectSourceStamp(source);
|
|
182
|
-
if (next === observed) return;
|
|
183
|
-
observed = next; pending = true;
|
|
184
|
-
const run = async (): Promise<void> => {
|
|
185
|
-
pending = false;
|
|
186
|
-
try { if (!stopped) await compile(); } catch (cause) { log(`wildshard watch: ${cause instanceof Error ? cause.message : String(cause)}`); }
|
|
187
|
-
};
|
|
188
|
-
work = work.then(run);
|
|
189
|
-
};
|
|
190
354
|
const onChange = (prefix: string) => (_event: string, filename: string | null): void => {
|
|
191
355
|
if (`${prefix}${filename ?? ''}`.split(/[\\/]/u).some((part) => ignored.has(part))) return;
|
|
192
356
|
reconcile();
|
|
@@ -194,12 +358,12 @@ export async function watchProject(project: string, options: { port?: number; cl
|
|
|
194
358
|
const watchers = [watch(source, onChange('')), ...readdirSync(source, { withFileTypes: true })
|
|
195
359
|
.filter((entry) => entry.isDirectory() && !ignored.has(entry.name))
|
|
196
360
|
.map((entry) => watch(join(source, entry.name), { recursive: true }, onChange(`${entry.name}/`)))];
|
|
197
|
-
const
|
|
198
|
-
|
|
361
|
+
const poll = (): void => { reconcile(); scope.timeout(Math.min(250, Math.max(40, Math.round(stampMs * 20))), poll); };
|
|
362
|
+
poll();
|
|
199
363
|
const address = server.address(); if (address === null || typeof address === 'string') throw new Error('No watch server address');
|
|
200
364
|
return { url: `http://127.0.0.1:${address.port}/`, close: async () => {
|
|
201
365
|
if (stopped) return;
|
|
202
|
-
stopped = true; scope.dispose();
|
|
366
|
+
stopped = true; scope.dispose(); building?.kill('SIGTERM');
|
|
203
367
|
for (const client of clients) client.close();
|
|
204
368
|
await new Promise<void>((_resolve) => { server.close(() => { _resolve(); }); server.closeAllConnections(); });
|
|
205
369
|
await work;
|
package/src/shards/_template/assets/3058c100bc477fd6fe8268f33b53756b8a2556e7e41c58b2216c703ca7b042c6
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"row":{"id":"barrow-warden","file":"8a0440f392737a31cf0926a3c7dc011c320144972882945a5462c893e817d94a","family":"pbr","rig":{"skeleton":"template.barrowWarden","joints":[["body","head","armL","armR","legL","legR"]],"clips":["idle","walk","attack","hit","die"],"sockets":["body","head"]},"cost":{"decoded":279584,"gpu":219096,"triangles":1232,"draws":6}},"binding":{"skin":"barrow-warden","material":{"family":"pbr","roughness":0.9,"metalness":0,"occlusion":0,"envStrength":0.7,"vertexColours":true},"materials":{"Eyes":"mossgate.lamp","Core":"mossgate.tell"},"loops":["idle","walk"]}}
|
package/src/shards/_template/assets/8a0440f392737a31cf0926a3c7dc011c320144972882945a5462c893e817d94a
ADDED
|
Binary file
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
// ABI
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let count: i32 = 0;
|
|
10
|
-
let ticks: i32 = 0;
|
|
11
|
-
export function out_count(): i32 { return count; }
|
|
12
|
-
@inline function setShared(field: f64, value: f64): void {
|
|
13
|
-
const at = 24576 + count * 40;
|
|
14
|
-
store<f64>(at, 5); store<f64>(at + 8, field); store<f64>(at + 16, value); store<f64>(at + 24, 0); store<f64>(at + 32, 0);
|
|
15
|
-
count += 1;
|
|
16
|
-
}
|
|
1
|
+
// The Template's door and braziers (ABI v0, the sdk's `wildshard` prelude). Door and brazier ownership stays in declared
|
|
2
|
+
// shared state; the platform projects it to the panels and colliders. Shared fields in declared order: 0 template.door.open
|
|
3
|
+
// (id 101), then template.brazier-a, -b, -c (ids 102 to 104).
|
|
4
|
+
import { begin, eventCount, eventType, setShared, shared } from './wildshard';
|
|
5
|
+
export { abi_version, init, in_ptr, in_cap, out_ptr, out_cap, out_count } from './wildshard';
|
|
6
|
+
const DOOR = 0, BRAZIERS = 1;
|
|
7
|
+
const DOOR_FIELD: f64 = 101, BRAZIER_FIELD: f64 = 102;
|
|
8
|
+
const DOOR_TOGGLE: f64 = 201, BRAZIER_LIT: f64 = 202;
|
|
17
9
|
export function on_tick(): void {
|
|
18
|
-
|
|
19
|
-
let open =
|
|
10
|
+
begin();
|
|
11
|
+
let open = shared(DOOR), toggled = false;
|
|
20
12
|
// MH-2, MH-3: braziers A, B and C (fields 102 to 104, scene events 202 to 204) each light once, for good
|
|
21
13
|
let lit = 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (type === 201) { open = 1 - open; toggled = !toggled; }
|
|
14
|
+
for (let i = 0; i < eventCount(); i++) {
|
|
15
|
+
const type = eventType(i);
|
|
16
|
+
if (type === DOOR_TOGGLE) { open = 1 - open; toggled = !toggled; }
|
|
26
17
|
// E at a brazier: A's field opens the moss gate, B's raises the pond's stones, C's unlocks the arena
|
|
27
|
-
for (let k = 0; k < 3; k++) if (type ===
|
|
18
|
+
for (let k = 0; k < 3; k++) if (type === BRAZIER_LIT + k && shared(BRAZIERS + k) < 0.5) lit |= 1 << k;
|
|
28
19
|
}
|
|
29
|
-
if (toggled) setShared(
|
|
30
|
-
for (let k = 0; k < 3; k++) if (lit & (1 << k)) setShared(
|
|
31
|
-
store<i32>(30000, ticks); // continuation witness lives outside input/output regions
|
|
20
|
+
if (toggled) setShared(DOOR_FIELD, open);
|
|
21
|
+
for (let k = 0; k < 3; k++) if (lit & (1 << k)) setShared(BRAZIER_FIELD + k, 1);
|
|
32
22
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -123,18 +123,18 @@
|
|
|
123
123
|
{
|
|
124
124
|
"id": 1,
|
|
125
125
|
"recipe": "platform.particles",
|
|
126
|
-
"perTick":
|
|
127
|
-
"live":
|
|
128
|
-
"lifetimeTicks":
|
|
126
|
+
"perTick": 1,
|
|
127
|
+
"live": 24,
|
|
128
|
+
"lifetimeTicks": 44,
|
|
129
129
|
"colour": [
|
|
130
130
|
1,
|
|
131
|
-
0.
|
|
132
|
-
0.
|
|
131
|
+
0.62,
|
|
132
|
+
0.22
|
|
133
133
|
],
|
|
134
|
-
"size": 0.
|
|
134
|
+
"size": 0.12,
|
|
135
135
|
"velocity": [
|
|
136
136
|
0,
|
|
137
|
-
1.
|
|
137
|
+
1.5,
|
|
138
138
|
0
|
|
139
139
|
],
|
|
140
140
|
"gravity": 0
|
|
@@ -142,18 +142,18 @@
|
|
|
142
142
|
{
|
|
143
143
|
"id": 2,
|
|
144
144
|
"recipe": "platform.particles",
|
|
145
|
-
"perTick":
|
|
146
|
-
"live":
|
|
147
|
-
"lifetimeTicks":
|
|
145
|
+
"perTick": 1,
|
|
146
|
+
"live": 16,
|
|
147
|
+
"lifetimeTicks": 26,
|
|
148
148
|
"colour": [
|
|
149
149
|
1,
|
|
150
|
-
0.
|
|
151
|
-
0.
|
|
150
|
+
0.45,
|
|
151
|
+
0.12
|
|
152
152
|
],
|
|
153
|
-
"size": 0.
|
|
153
|
+
"size": 0.22,
|
|
154
154
|
"velocity": [
|
|
155
155
|
0,
|
|
156
|
-
1.
|
|
156
|
+
1.0,
|
|
157
157
|
0
|
|
158
158
|
],
|
|
159
159
|
"gravity": 0
|
|
@@ -193,18 +193,18 @@
|
|
|
193
193
|
{
|
|
194
194
|
"id": 1,
|
|
195
195
|
"recipe": "platform.particles",
|
|
196
|
-
"perTick":
|
|
197
|
-
"live":
|
|
198
|
-
"lifetimeTicks":
|
|
196
|
+
"perTick": 1,
|
|
197
|
+
"live": 24,
|
|
198
|
+
"lifetimeTicks": 44,
|
|
199
199
|
"colour": [
|
|
200
200
|
1,
|
|
201
|
-
0.
|
|
202
|
-
0.
|
|
201
|
+
0.62,
|
|
202
|
+
0.22
|
|
203
203
|
],
|
|
204
|
-
"size": 0.
|
|
204
|
+
"size": 0.12,
|
|
205
205
|
"velocity": [
|
|
206
206
|
0,
|
|
207
|
-
1.
|
|
207
|
+
1.5,
|
|
208
208
|
0
|
|
209
209
|
],
|
|
210
210
|
"gravity": 0
|
|
@@ -212,18 +212,18 @@
|
|
|
212
212
|
{
|
|
213
213
|
"id": 2,
|
|
214
214
|
"recipe": "platform.particles",
|
|
215
|
-
"perTick":
|
|
216
|
-
"live":
|
|
217
|
-
"lifetimeTicks":
|
|
215
|
+
"perTick": 1,
|
|
216
|
+
"live": 16,
|
|
217
|
+
"lifetimeTicks": 26,
|
|
218
218
|
"colour": [
|
|
219
219
|
1,
|
|
220
|
-
0.
|
|
221
|
-
0.
|
|
220
|
+
0.45,
|
|
221
|
+
0.12
|
|
222
222
|
],
|
|
223
|
-
"size": 0.
|
|
223
|
+
"size": 0.22,
|
|
224
224
|
"velocity": [
|
|
225
225
|
0,
|
|
226
|
-
1.
|
|
226
|
+
1.0,
|
|
227
227
|
0
|
|
228
228
|
],
|
|
229
229
|
"gravity": 0
|
|
@@ -263,18 +263,18 @@
|
|
|
263
263
|
{
|
|
264
264
|
"id": 1,
|
|
265
265
|
"recipe": "platform.particles",
|
|
266
|
-
"perTick":
|
|
267
|
-
"live":
|
|
268
|
-
"lifetimeTicks":
|
|
266
|
+
"perTick": 1,
|
|
267
|
+
"live": 24,
|
|
268
|
+
"lifetimeTicks": 44,
|
|
269
269
|
"colour": [
|
|
270
270
|
1,
|
|
271
|
-
0.
|
|
272
|
-
0.
|
|
271
|
+
0.62,
|
|
272
|
+
0.22
|
|
273
273
|
],
|
|
274
|
-
"size": 0.
|
|
274
|
+
"size": 0.12,
|
|
275
275
|
"velocity": [
|
|
276
276
|
0,
|
|
277
|
-
1.
|
|
277
|
+
1.5,
|
|
278
278
|
0
|
|
279
279
|
],
|
|
280
280
|
"gravity": 0
|
|
@@ -282,18 +282,18 @@
|
|
|
282
282
|
{
|
|
283
283
|
"id": 2,
|
|
284
284
|
"recipe": "platform.particles",
|
|
285
|
-
"perTick":
|
|
286
|
-
"live":
|
|
287
|
-
"lifetimeTicks":
|
|
285
|
+
"perTick": 1,
|
|
286
|
+
"live": 16,
|
|
287
|
+
"lifetimeTicks": 26,
|
|
288
288
|
"colour": [
|
|
289
289
|
1,
|
|
290
|
-
0.
|
|
291
|
-
0.
|
|
290
|
+
0.45,
|
|
291
|
+
0.12
|
|
292
292
|
],
|
|
293
|
-
"size": 0.
|
|
293
|
+
"size": 0.22,
|
|
294
294
|
"velocity": [
|
|
295
295
|
0,
|
|
296
|
-
1.
|
|
296
|
+
1.0,
|
|
297
297
|
0
|
|
298
298
|
],
|
|
299
299
|
"gravity": 0
|
|
@@ -921,7 +921,7 @@
|
|
|
921
921
|
"id": "template.warden-core",
|
|
922
922
|
"at": [
|
|
923
923
|
24.5,
|
|
924
|
-
|
|
924
|
+
6.2,
|
|
925
925
|
-2
|
|
926
926
|
]
|
|
927
927
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"id": "barrow-warden",
|
|
51
|
-
"species": "
|
|
51
|
+
"species": "barrow-warden",
|
|
52
52
|
"variant": "warden",
|
|
53
53
|
"brain": null,
|
|
54
54
|
"strike": "template.warden.slam",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
0,
|
|
60
60
|
-2
|
|
61
61
|
],
|
|
62
|
-
"yaw":
|
|
62
|
+
"yaw": -1.5708
|
|
63
63
|
}
|
|
64
64
|
]
|
|
65
65
|
}
|