@woosh/meep-engine 3.14.3 → 3.14.4
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/package.json +1 -1
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +733 -726
- package/src/engine/network/NetworkSession.d.ts +24 -4
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +28 -4
- package/src/engine/network/orchestrator/NetworkPeer.d.ts +47 -6
- package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.js +184 -56
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +97 -11
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +304 -22
- package/src/engine/network/replication/Replicator.d.ts +14 -1
- package/src/engine/network/replication/Replicator.d.ts.map +1 -1
- package/src/engine/network/replication/Replicator.js +44 -3
- package/src/engine/network/sim/ActionLog.d.ts +21 -3
- package/src/engine/network/sim/ActionLog.d.ts.map +1 -1
- package/src/engine/network/sim/ActionLog.js +24 -3
- package/src/engine/network/sim/SimAction.d.ts +15 -0
- package/src/engine/network/sim/SimAction.d.ts.map +1 -1
- package/src/engine/network/sim/SimAction.js +15 -0
- package/src/engine/network/sim/SimActionExecutor.d.ts +51 -1
- package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
- package/src/engine/network/sim/SimActionExecutor.js +73 -5
- package/src/engine/network/transport/Channel.d.ts +1 -1
- package/src/engine/network/transport/Channel.js +1 -1
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +4 -1
- package/src/engine/ui/GUIEngine.d.ts.map +1 -1
- package/src/engine/ui/GUIEngine.js +6 -0
- package/src/shade/playground/particle_system/README.md +98 -0
- package/src/shade/playground/particle_system/index.html +124 -0
- package/src/shade/playground/particle_system/main.d.ts +2 -0
- package/src/shade/playground/particle_system/main.d.ts.map +1 -0
- package/src/shade/playground/particle_system/main.js +180 -0
- package/src/shade/playground/particle_system/particle_scene.d.ts +52 -0
- package/src/shade/playground/particle_system/particle_scene.d.ts.map +1 -0
- package/src/shade/playground/particle_system/particle_scene.js +552 -0
- package/src/shade/playground/skinned_mesh_soup/README.md +122 -0
- package/src/shade/playground/skinned_mesh_soup/index.html +199 -0
- package/src/shade/playground/skinned_mesh_soup/main.d.ts +7 -0
- package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -0
- package/src/shade/playground/skinned_mesh_soup/main.js +564 -0
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts +23 -0
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts.map +1 -0
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +409 -0
- package/src/shade/renderer/particles/cull/chunk_particle_cull.d.ts.map +1 -1
- package/src/shade/renderer/particles/cull/chunk_particle_cull.js +3 -1
- package/src/shade/renderer/particles/data/chunk_particle_emitter.js +1 -1
- package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts +1 -1
- package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts +89 -0
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -0
- package/src/shade/renderer/particles/isa/InstructionStream.js +162 -0
- package/src/shade/renderer/particles/isa/ParticleAssembler.d.ts +1 -48
- package/src/shade/renderer/particles/isa/ParticleAssembler.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/ParticleAssembler.js +25 -114
- package/src/shade/renderer/particles/shaders/chunk_particle_curve_animation.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_curve_animation.js +4 -2
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts +4 -4
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.js +7 -5
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +3 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.js +3 -1
- package/src/shade/renderer/particles/shaders/shader_particle_finalize.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_finalize.js +5 -2
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_render.js +9 -2
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +3 -1
- package/src/shade/renderer/particles/prototypeParticleSystem.d.ts +0 -2
- package/src/shade/renderer/particles/prototypeParticleSystem.d.ts.map +0 -1
- package/src/shade/renderer/particles/prototypeParticleSystem.js +0 -448
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>meep — skinned mesh soup</title>
|
|
6
|
+
<style>
|
|
7
|
+
:root {
|
|
8
|
+
color-scheme: dark;
|
|
9
|
+
--panel: rgba(20, 22, 26, 0.88);
|
|
10
|
+
--line: #2b3038;
|
|
11
|
+
--text: #d6dae0;
|
|
12
|
+
--muted: #8b939f;
|
|
13
|
+
--pass: #55c46a;
|
|
14
|
+
--fail: #ff6b6b;
|
|
15
|
+
--warn: #e5b54a;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
* { box-sizing: border-box; }
|
|
19
|
+
|
|
20
|
+
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0f12; }
|
|
21
|
+
|
|
22
|
+
/* body carries tabindex so the camera controller's keyboard device has something focusable
|
|
23
|
+
to listen on; the focus ring around the whole viewport is not wanted */
|
|
24
|
+
body:focus { outline: none; }
|
|
25
|
+
|
|
26
|
+
#view { display: block; width: 100vw; height: 100vh; }
|
|
27
|
+
|
|
28
|
+
#panel {
|
|
29
|
+
position: fixed;
|
|
30
|
+
top: 12px;
|
|
31
|
+
left: 12px;
|
|
32
|
+
width: 340px;
|
|
33
|
+
padding: 12px 14px;
|
|
34
|
+
background: var(--panel);
|
|
35
|
+
border: 1px solid var(--line);
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
backdrop-filter: blur(6px);
|
|
38
|
+
color: var(--text);
|
|
39
|
+
font: 13px/1.5 system-ui, -apple-system, Segoe UI, sans-serif;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#panel h1 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
|
|
43
|
+
|
|
44
|
+
label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
|
|
45
|
+
label input { margin: 0; }
|
|
46
|
+
label .hint { color: var(--muted); font-size: 11.5px; }
|
|
47
|
+
|
|
48
|
+
hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
|
|
49
|
+
|
|
50
|
+
button, select, input[type=number] {
|
|
51
|
+
font: inherit;
|
|
52
|
+
padding: 5px 9px;
|
|
53
|
+
border-radius: 6px;
|
|
54
|
+
border: 1px solid var(--line);
|
|
55
|
+
background: #1c1f25;
|
|
56
|
+
color: var(--text);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
button { cursor: pointer; }
|
|
60
|
+
button:hover:not(:disabled) { border-color: #3d4552; }
|
|
61
|
+
button:disabled { opacity: 0.45; cursor: default; }
|
|
62
|
+
|
|
63
|
+
select { width: 100%; cursor: pointer; }
|
|
64
|
+
|
|
65
|
+
.row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
|
|
66
|
+
.row button { flex: 0 0 auto; }
|
|
67
|
+
|
|
68
|
+
#character_count {
|
|
69
|
+
flex: 1 1 auto;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
font: 12px ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
72
|
+
background: #14161a;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#status { font-size: 12px; color: var(--muted); word-break: break-word; }
|
|
76
|
+
#status.pass { color: var(--pass); }
|
|
77
|
+
#status.fail { color: var(--fail); }
|
|
78
|
+
#status.warn { color: var(--warn); }
|
|
79
|
+
|
|
80
|
+
#stats {
|
|
81
|
+
margin-top: 6px;
|
|
82
|
+
font: 12px ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
83
|
+
color: var(--text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
p.note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
|
|
87
|
+
|
|
88
|
+
code { font: 11.5px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text); }
|
|
89
|
+
|
|
90
|
+
dl { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
|
|
91
|
+
dt { color: var(--text); font-weight: 600; margin-top: 6px; }
|
|
92
|
+
dd { margin: 0; }
|
|
93
|
+
</style>
|
|
94
|
+
</head>
|
|
95
|
+
<body tabindex="0">
|
|
96
|
+
|
|
97
|
+
<canvas id="view"></canvas>
|
|
98
|
+
|
|
99
|
+
<div id="panel">
|
|
100
|
+
<h1>Skinned mesh soup</h1>
|
|
101
|
+
|
|
102
|
+
<p class="note">
|
|
103
|
+
The same character <code>skinned_blas_refit</code> draws, loaded through
|
|
104
|
+
<code>GLTFSceneBundleAssetLoader</code> — one bundle, one instance per placement — with the
|
|
105
|
+
pieces that could be making soup on switches.
|
|
106
|
+
</p>
|
|
107
|
+
<p class="note">
|
|
108
|
+
<strong>The answer, for the record.</strong> <code>chunk_skin_blend_mesh_local</code> needs
|
|
109
|
+
<code>inverse(mesh.global) × joint.global × inverse_bind</code> to be rigid; for this file
|
|
110
|
+
it carries a uniform <strong>100×</strong>, and a dual quaternion cannot carry a scale. So
|
|
111
|
+
<code>bind</code> below is the right character at 1/100 size — one shared matrix, one shared
|
|
112
|
+
error — and <code>animated</code> is soup, sixty-five matrices each losing a different
|
|
113
|
+
amount. The README has the measurement.
|
|
114
|
+
</p>
|
|
115
|
+
|
|
116
|
+
<hr>
|
|
117
|
+
|
|
118
|
+
<label for="skin_mode"><span>How the skin is driven</span></label>
|
|
119
|
+
<select id="skin_mode">
|
|
120
|
+
<option value="off">off — no skin registered, nothing deforms the clone</option>
|
|
121
|
+
<option value="bind">bind — skin registered, no clip</option>
|
|
122
|
+
<option value="animated">animated — the file's dance, playing</option>
|
|
123
|
+
</select>
|
|
124
|
+
|
|
125
|
+
<dl>
|
|
126
|
+
<dt>off</dt>
|
|
127
|
+
<dd>
|
|
128
|
+
What is drawn is the clone's memcpy of the source: the rest pose under the mesh node's
|
|
129
|
+
own transform. Michelle's carries the file's centimetre scale and its up-axis rotation,
|
|
130
|
+
so <em>correct</em> here is a 1.7 cm figure on her side. Soup here is the geometry
|
|
131
|
+
upload, not skinning.
|
|
132
|
+
</dd>
|
|
133
|
+
<dt>bind</dt>
|
|
134
|
+
<dd>
|
|
135
|
+
The skinning pass runs every frame over a pose that never moves — and that pose has an
|
|
136
|
+
answer the CPU knows exactly. <code>await diagnose()</code> reads the clone's vertices
|
|
137
|
+
back and says which are wrong, and whether the wrong ones are a vertex-slot range (the
|
|
138
|
+
workgroup stride loop) or whole meshlets (addressing).
|
|
139
|
+
</dd>
|
|
140
|
+
<dt>animated</dt>
|
|
141
|
+
<dd>
|
|
142
|
+
Soup only in this mode is the pose: the joint matrices, their range, or the order the
|
|
143
|
+
skin's joints resolved in.
|
|
144
|
+
</dd>
|
|
145
|
+
</dl>
|
|
146
|
+
|
|
147
|
+
<hr>
|
|
148
|
+
|
|
149
|
+
<label>
|
|
150
|
+
<input type="checkbox" id="path_tracing">
|
|
151
|
+
<span>Path tracer <span class="hint">— traverses the BLAS</span></span>
|
|
152
|
+
</label>
|
|
153
|
+
<p class="note">
|
|
154
|
+
Off by default. The rasterizer reads the deformed vertices directly, with no tree in the
|
|
155
|
+
way, so it is the reading to establish the answer on first: soup in <em>both</em> is the
|
|
156
|
+
vertices, soup in the tracer alone is the tree.
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
<div class="row">
|
|
160
|
+
<button id="animation">Freeze pose</button>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<hr>
|
|
164
|
+
|
|
165
|
+
<div class="row">
|
|
166
|
+
<input type="number" id="character_count" value="1" min="1" max="64" step="1">
|
|
167
|
+
<button id="respawn">Characters</button>
|
|
168
|
+
</div>
|
|
169
|
+
<p class="note">
|
|
170
|
+
One parse whatever the count — the asset hands out the model itself, and each placement gets
|
|
171
|
+
its own node tree, skins and clips from <code>instantiate_scene_bundle</code>.
|
|
172
|
+
</p>
|
|
173
|
+
|
|
174
|
+
<hr>
|
|
175
|
+
|
|
176
|
+
<div id="status"></div>
|
|
177
|
+
<div id="stats"></div>
|
|
178
|
+
|
|
179
|
+
<p class="note">
|
|
180
|
+
Every switch is in the url — <code>?count=1&skin=bind&trace=1</code> — so a state
|
|
181
|
+
worth showing someone can be sent as a link.
|
|
182
|
+
</p>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<script type="module">
|
|
186
|
+
import { start } from './main.js';
|
|
187
|
+
|
|
188
|
+
start().catch(error => {
|
|
189
|
+
const status = document.getElementById('status');
|
|
190
|
+
|
|
191
|
+
status.className = 'fail';
|
|
192
|
+
status.textContent = String(error?.message ?? error);
|
|
193
|
+
|
|
194
|
+
console.error(error);
|
|
195
|
+
});
|
|
196
|
+
</script>
|
|
197
|
+
|
|
198
|
+
</body>
|
|
199
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/skinned_mesh_soup/main.js"],"names":[],"mappings":"AA8PA;;;;GAIG;AACH,yBAFa,QAAQ,IAAI,CAAC,CAkTzB"}
|