@woosh/meep-engine 3.78.1 → 3.78.3

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +1 -1
  3. package/src/engine/asset/loaders/GroomAssetLoader.d.ts.map +1 -1
  4. package/src/engine/asset/loaders/GroomAssetLoader.js +2 -1
  5. package/src/engine/graphics/hair/Groom.d.ts +30 -0
  6. package/src/engine/graphics/hair/Groom.d.ts.map +1 -1
  7. package/src/engine/graphics/hair/Groom.js +35 -0
  8. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts +18 -2
  9. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts.map +1 -1
  10. package/src/engine/graphics/hair/GroomSerializationAdapter.js +36 -6
  11. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.d.ts +8 -0
  12. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.d.ts.map +1 -0
  13. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.js +44 -0
  14. package/src/engine/graphics/hair/groom_bake_shelter.d.ts +33 -0
  15. package/src/engine/graphics/hair/groom_bake_shelter.d.ts.map +1 -0
  16. package/src/engine/graphics/hair/groom_bake_shelter.js +288 -0
  17. package/src/engine/graphics/hair/groom_build_group.d.ts +10 -2
  18. package/src/engine/graphics/hair/groom_build_group.d.ts.map +1 -1
  19. package/src/engine/graphics/hair/groom_build_group.js +8 -2
  20. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts +119 -0
  21. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts.map +1 -0
  22. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.js +563 -0
  23. package/src/generation/wfc/GRID_WFC_PIECE_SOCKET_PREFIX.d.ts +11 -0
  24. package/src/generation/wfc/GRID_WFC_PIECE_SOCKET_PREFIX.d.ts.map +1 -0
  25. package/src/generation/wfc/GRID_WFC_PIECE_SOCKET_PREFIX.js +10 -0
  26. package/src/generation/wfc/GridWFCCompiledTileSet.d.ts +123 -0
  27. package/src/generation/wfc/GridWFCCompiledTileSet.d.ts.map +1 -0
  28. package/src/generation/wfc/GridWFCCompiledTileSet.js +355 -0
  29. package/src/generation/wfc/GridWFCEdge.d.ts +13 -0
  30. package/src/generation/wfc/GridWFCEdge.d.ts.map +1 -0
  31. package/src/generation/wfc/GridWFCEdge.js +14 -0
  32. package/src/generation/wfc/GridWFCTileSet.d.ts +120 -0
  33. package/src/generation/wfc/GridWFCTileSet.d.ts.map +1 -0
  34. package/src/generation/wfc/GridWFCTileSet.js +275 -0
  35. package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -1
  36. package/src/shade/renderer/hair/GPUHairSystem.js +55 -11
  37. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts.map +1 -1
  38. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.js +4 -0
  39. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts +77 -15
  40. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts.map +1 -1
  41. package/src/shade/renderer/hair/HAIR_SIMULATION.js +104 -17
  42. package/src/shade/renderer/hair/chunk_hair_guide.d.ts +9 -2
  43. package/src/shade/renderer/hair/chunk_hair_guide.d.ts.map +1 -1
  44. package/src/shade/renderer/hair/chunk_hair_guide.js +30 -2
  45. package/src/shade/renderer/hair/shader_hair_simulate.d.ts +27 -18
  46. package/src/shade/renderer/hair/shader_hair_simulate.d.ts.map +1 -1
  47. package/src/shade/renderer/hair/shader_hair_simulate.js +174 -83
@@ -0,0 +1,275 @@
1
+ import { assert } from "../../core/assert.js";
2
+ import { GRID_WFC_PIECE_SOCKET_PREFIX } from "./GRID_WFC_PIECE_SOCKET_PREFIX.js";
3
+ import { GridWFCCompiledTileSet } from "./GridWFCCompiledTileSet.js";
4
+ import { GridWFCEdge } from "./GridWFCEdge.js";
5
+
6
+ /**
7
+ * @param {string} socket
8
+ * @param {string} what
9
+ */
10
+ function assert_socket(socket, what) {
11
+ assert.isString(socket, what);
12
+
13
+ if (socket.startsWith(GRID_WFC_PIECE_SOCKET_PREFIX)) {
14
+ throw new Error(`${what}: a socket name may not start with U+0000`);
15
+ }
16
+ }
17
+
18
+ /**
19
+ * @param {string[]} edges
20
+ * @param {string} what
21
+ */
22
+ function assert_edges(edges, what) {
23
+ assert.isArray(edges, what);
24
+ assert.equal(edges.length, 4, `${what}.length`);
25
+
26
+ for (let e = 0; e < 4; e++) {
27
+ assert_socket(edges[e], `${what}[${e}]`);
28
+ }
29
+ }
30
+
31
+ /**
32
+ * @param {number} weight
33
+ * @param {number} rotations
34
+ * @param {string[]} tags
35
+ */
36
+ function assert_tile_options(weight, rotations, tags) {
37
+ assert.isNumber(weight, 'weight');
38
+ assert.greaterThan(weight, 0, 'weight');
39
+ assert.isOneOf(rotations, [1, 2, 4], 'rotations');
40
+ assert.isArray(tags, 'tags');
41
+ }
42
+
43
+ /**
44
+ * @param {GridCellAction|null} action
45
+ * @param {string} what
46
+ */
47
+ function assert_action(action, what) {
48
+ if (action !== null) {
49
+ assert.equal(action.isGridCellAction, true, `${what}.isGridCellAction !== true`);
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Cell offset of a step across each edge, in {@link GridWFCEdge} order.
55
+ *
56
+ * @type {number[][]}
57
+ */
58
+ const EDGE_STEP = [];
59
+ EDGE_STEP[GridWFCEdge.NegativeX] = [-1, 0];
60
+ EDGE_STEP[GridWFCEdge.PositiveX] = [1, 0];
61
+ EDGE_STEP[GridWFCEdge.NegativeY] = [0, -1];
62
+ EDGE_STEP[GridWFCEdge.PositiveY] = [0, 1];
63
+
64
+ /**
65
+ * A set of tiles for a 2D grid, described the way they are drawn: each tile names the **socket**
66
+ * on each of its four edges, and two tiles may sit side by side when the sockets on their shared
67
+ * edge are the same.
68
+ *
69
+ * This is the authoring half of wave function collapse. The solver in `core/wfc/` knows a tile
70
+ * only as an integer and a rule only as a bit; {@link compile} is what turns turned copies and
71
+ * multi-cell pieces into distinct integers and their sockets into that table.
72
+ *
73
+ * ```js
74
+ * const tiles = new GridWFCTileSet();
75
+ *
76
+ * // -x +x -y +y
77
+ * tiles.add({ name: 'open', edges: ['open', 'open', 'open', 'open'], weight: 20, tags: ['walkable'] });
78
+ * tiles.add({ name: 'wall', edges: ['wall', 'wall', 'open', 'open'], rotations: 2, action: place_wall });
79
+ * tiles.add({ name: 'bend', edges: ['open', 'wall', 'open', 'wall'], rotations: 4, action: place_bend });
80
+ * ```
81
+ *
82
+ * A socket has no handedness: it matches itself, read from either side. That is enough for
83
+ * anything centred on its edge (a wall, a path, a region's border) and is not enough for a feature
84
+ * that crosses an edge off-centre.
85
+ */
86
+ export class GridWFCTileSet {
87
+
88
+ /**
89
+ * Tiles as they were added — one per {@link add} call, one per cell of an {@link add_piece}.
90
+ *
91
+ * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]}
92
+ */
93
+ prototypes = [];
94
+
95
+ /**
96
+ * @type {number}
97
+ * @private
98
+ */
99
+ __piece_count = 0;
100
+
101
+ /**
102
+ * @type {GridWFCCompiledTileSet|null}
103
+ * @private
104
+ */
105
+ __compiled = null;
106
+
107
+ /**
108
+ * Add a tile that occupies one cell.
109
+ *
110
+ * @param {Object} options
111
+ * @param {string} options.name for diagnostics, and how {@link GridWFCCompiledTileSet#prototype_named} finds it
112
+ * @param {string[]} options.edges socket per edge, in {@link GridWFCEdge} order: -x, +x, -y, +y
113
+ * @param {number} [options.weight=1] relative likelihood of the tile, shared between its turned copies
114
+ * @param {number} [options.rotations=1] how many distinct quarter turns it has: 1 for a tile
115
+ * that looks the same turned any way, 2 for one with a half-turn symmetry (a straight
116
+ * wall), 4 for one with none (a bend)
117
+ * @param {string[]} [options.tags] what the tile is, for restricting cells to a kind of tile
118
+ * @param {GridCellAction|null} [options.action] run on the cell the tile lands in, with the
119
+ * tile's rotation in radians
120
+ * @returns {number} index of the prototype
121
+ */
122
+ add({ name, edges, weight = 1, rotations = 1, tags = [], action = null }) {
123
+ assert.isString(name, 'name');
124
+ assert_edges(edges, 'edges');
125
+ assert_tile_options(weight, rotations, tags);
126
+ assert_action(action, 'action');
127
+
128
+ return this.__push({ name, edges: edges.slice(), weight, rotations, tags: tags.slice(), action });
129
+ }
130
+
131
+ /**
132
+ * Add a piece that occupies several cells and only ever appears whole: a building two cells by
133
+ * three, a gatehouse with its two towers.
134
+ *
135
+ * Each cell becomes a tile of its own, and the edges between the piece's cells get sockets
136
+ * nothing else carries — so wherever one cell of it lands, propagation forces the rest.
137
+ *
138
+ * @param {Object} options
139
+ * @param {string} options.name
140
+ * @param {{x:number, y:number, edges?:string[], tags?:string[], action?:(GridCellAction|null)}[]} options.cells
141
+ * offsets of the piece's cells at rotation 0, every cell sharing an edge with another —
142
+ * cells that only touch at a corner, or not at all, would be placed apart, so they are an
143
+ * error. `edges` gives a cell's OUTWARD-facing
144
+ * sockets (entries for edges that face another cell of the piece are ignored) and
145
+ * defaults to `edge` all round. `action` usually sits on one cell only — the one the
146
+ * piece's model stands on.
147
+ * @param {string} [options.edge] socket of every outward-facing edge a cell does not name
148
+ * @param {number} [options.weight=1]
149
+ * @param {number} [options.rotations=1]
150
+ * @param {string[]} [options.tags] carried by every cell of the piece, with the cell's own
151
+ * @returns {number[]} index of each cell's prototype, in the order of `cells`
152
+ */
153
+ add_piece({ name, cells, edge, weight = 1, rotations = 1, tags = [] }) {
154
+ assert.isString(name, 'name');
155
+ assert.isArray(cells, 'cells');
156
+ assert.greaterThan(cells.length, 0, 'cells.length');
157
+ assert_tile_options(weight, rotations, tags);
158
+
159
+ if (edge !== undefined) {
160
+ assert_socket(edge, 'edge');
161
+ }
162
+
163
+ const at = new Map();
164
+
165
+ for (let i = 0; i < cells.length; i++) {
166
+ const { x, y } = cells[i];
167
+
168
+ assert.isInteger(x, `cells[${i}].x`);
169
+ assert.isInteger(y, `cells[${i}].y`);
170
+
171
+ if (at.has(`${x},${y}`)) {
172
+ throw new Error(`piece '${name}': two cells at (${x}, ${y})`);
173
+ }
174
+
175
+ at.set(`${x},${y}`, i);
176
+ }
177
+
178
+ // Only the sockets between cells hold a piece together, so a cell joined to the rest by no
179
+ // edge is a separate tile that happens to share a name: it would be placed anywhere, alone.
180
+ // A real throw — the result would look fine and be wrong.
181
+ const reached = [0];
182
+ const seen = new Set([0]);
183
+
184
+ for (let k = 0; k < reached.length; k++) {
185
+ const { x, y } = cells[reached[k]];
186
+
187
+ for (let e = 0; e < 4; e++) {
188
+ const neighbour = at.get(`${x + EDGE_STEP[e][0]},${y + EDGE_STEP[e][1]}`);
189
+
190
+ if (neighbour !== undefined && !seen.has(neighbour)) {
191
+ seen.add(neighbour);
192
+ reached.push(neighbour);
193
+ }
194
+ }
195
+ }
196
+
197
+ if (reached.length !== cells.length) {
198
+ const apart = cells.findIndex((cell, i) => !seen.has(i));
199
+
200
+ throw new Error(`piece '${name}': cell ${apart} shares no edge with cell 0 or any cell joined to it`);
201
+ }
202
+
203
+ const piece = this.__piece_count++;
204
+ const result = [];
205
+
206
+ for (let i = 0; i < cells.length; i++) {
207
+ const cell = cells[i];
208
+ const outward = cell.edges;
209
+ const cell_action = cell.action ?? null;
210
+
211
+ if (outward !== undefined) {
212
+ assert_edges(outward, `cells[${i}].edges`);
213
+ } else if (edge === undefined) {
214
+ throw new Error(`piece '${name}': cell ${i} names no edges and the piece has no default 'edge'`);
215
+ }
216
+
217
+ if (cell.tags !== undefined) {
218
+ assert.isArray(cell.tags, `cells[${i}].tags`);
219
+ }
220
+
221
+ assert_action(cell_action, `cells[${i}].action`);
222
+
223
+ const edges = [];
224
+
225
+ for (let e = 0; e < 4; e++) {
226
+ const neighbour = at.get(`${cell.x + EDGE_STEP[e][0]},${cell.y + EDGE_STEP[e][1]}`);
227
+
228
+ if (neighbour === undefined) {
229
+ edges[e] = outward !== undefined ? outward[e] : edge;
230
+ } else {
231
+ // one name per pair of cells, the same from both sides
232
+ const low = Math.min(i, neighbour), high = Math.max(i, neighbour);
233
+
234
+ edges[e] = `${GRID_WFC_PIECE_SOCKET_PREFIX}${piece}:${low}:${high}`;
235
+ }
236
+ }
237
+
238
+ result.push(this.__push({
239
+ name: `${name}#${i}`,
240
+ edges,
241
+ weight,
242
+ rotations,
243
+ tags: tags.concat(cell.tags ?? []),
244
+ action: cell_action
245
+ }));
246
+ }
247
+
248
+ return result;
249
+ }
250
+
251
+ /**
252
+ * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}} prototype
253
+ * @returns {number}
254
+ * @private
255
+ */
256
+ __push(prototype) {
257
+ this.prototypes.push(prototype);
258
+ this.__compiled = null;
259
+
260
+ return this.prototypes.length - 1;
261
+ }
262
+
263
+ /**
264
+ * The set as the solver takes it. Built once and kept until a tile is added.
265
+ *
266
+ * @returns {GridWFCCompiledTileSet}
267
+ */
268
+ compile() {
269
+ if (this.__compiled === null) {
270
+ this.__compiled = new GridWFCCompiledTileSet(this.prototypes);
271
+ }
272
+
273
+ return this.__compiled;
274
+ }
275
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"GPUHairSystem.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/GPUHairSystem.js"],"names":[],"mappings":"AAkIA;;;;GAIG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,wCAFU,MAAM,CAE6B;AAc7C;;GAEG;AACH;IACI,6CAA6C;IAC7C,SADW,MAAM,CACH;IAEd,kEAAkE;IAClE,SADW,MAAM,CACL;IAEZ,mDAAmD;IACnD,KADW,YAAY,CACW;IAElC,oDAAoD;IACpD,WADW,MAAM,CACD;IAEhB;;OAEG;IACH,YAFW,YAAY,QAOtB;IAED;;;OAGG;IACH,cAHW,YAAY,GACV,OAAO,CASnB;CACJ;AAED;;;GAGG;AACH;IACI,gCAAgC;IAChC,SADW,MAAM,CACL;IAEZ,gCAAgC;IAChC,mBADW,MAAM,CACM;IAEvB,+CAA+C;IAC/C,oBADW,MAAM,CACQ;I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+ {"version":3,"file":"GPUHairSystem.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/GPUHairSystem.js"],"names":[],"mappings":"AAwIA;;;;GAIG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,wCAFU,MAAM,CAE6B;AAc7C;;GAEG;AACH;IACI,6CAA6C;IAC7C,SADW,MAAM,CACH;IAEd,kEAAkE;IAClE,SADW,MAAM,CACL;IAEZ,mDAAmD;IACnD,KADW,YAAY,CACW;IAElC,oDAAoD;IACpD,WADW,MAAM,CACD;IAEhB;;OAEG;IACH,YAFW,YAAY,QAOtB;IAED;;;OAGG;IACH,cAHW,YAAY,GACV,OAAO,CASnB;CACJ;AAED;;;GAGG;AACH;IACI,gCAAgC;IAChC,SADW,MAAM,CACL;IAEZ,gCAAgC;IAChC,mBADW,MAAM,CACM;IAEvB,+CAA+C;IAC/C,oBADW,MAAM,CACQ;IAEzB,gCAAgC;IAChC,kBADW,MAAM,CACK;IAEtB,qBAAqB;IACrB,UADW,MAAM,CACF;IAEf,4BAA4B;IAC5B,WADW,MAAM,CACH;IAEd;;OAEG;IACH,YAFW,oBAAoB,QAS9B;IAED;;;OAGG;IACH,cAHW,oBAAoB,GAClB,OAAO,CASnB;CACJ;AAiBD;;GAEG;AACH;IACI,yBAAyB;IACzB,OADW,KAAK,GAAC,IAAI,CACR;IAEb,iFAAiF;IACjF,MADW,MAAM,EAAE,CACT;IAEV,wDAAwD;IACxD,MADW,MAAM,CACR;IAET,gDAAgD;IAChD,UADW,YAAY,CACO;IAE9B,kGAAkG;IAClG,UADW,oBAAoB,GAAC,IAAI,CACpB;IAEhB,6GAA6G;IAC7G,QADW,OAAO,mDAAmD,EAAE,UAAU,EAAE,CACvE;IAEZ,kDAAkD;IAClD,QADW,MAAM,EAAE,CACP;IAEZ,kHAAkH;IAClH,WADW,WAAW,CACiD;IAEvE,qBAAqB;IACrB,gBADW,MAAM,CACE;IAEnB,2GAA2G;IAC3G,WADW,MAAM,CACa;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;;;;;;;OAOG;IACH,uBAJW,cAAc,SACd,WAAW,SACX,MAAM,QAYhB;IAED;;;;;;;OAOG;IACH,WALW,KAAK,QACL,MAAM,YACN,YAAY,GACV,cAAc,GAAC,IAAI,CA+B/B;IAED;;;;;OAKG;IACH,kBAHW,cAAc,QACd,MAAM,QAYhB;IAED;;;OAGG;IACH,sBAHW,cAAc,YACd,YAAY,QAUtB;IAED;;OAEG;IACH,gBAFW,cAAc,QA6CxB;IAED;;OAEG;IACH,eAUC;IAED;;;;;;OAMG;IACH,kBAFW,YAAY,QAsXtB;IAsHD;;;;;OAKG;IACH,mBAFW,YAAY,QAmGtB;IAED,gBAiBC;;CA+rBJ;oBAjqEY,OAAO,wCAAwC,EAAE,KAAK;2BACtD,OAAO,8BAA8B,EAAE,YAAY;8BACnD,OAAO,uBAAuB,EAAE,eAAe;4BAvFhC,gCAAgC;2BADjC,yBAAyB"}
@@ -1,7 +1,7 @@
1
1
  import { assert } from "../../../core/assert.js";
2
2
  import { ALLOCATOR_NO_SPACE } from "../../../core/binary/allocator/OffsetAllocator.js";
3
3
  import { groom_bind_to_mesh, groom_mesh_binder } from "../../../engine/graphics/hair/groom_bind_to_mesh.js";
4
- import { GROOM_POINT_WORDS } from "../../../engine/graphics/hair/Groom.js";
4
+ import { GROOM_POINT_WORDS, GROOM_SHELTER_WORDS } from "../../../engine/graphics/hair/Groom.js";
5
5
  import { TextureViewDescriptor } from "../../descriptor/texture/TextureViewDescriptor.js";
6
6
  import { BufferResourceDescriptor } from "../../device/graph/BufferResourceDescriptor.js";
7
7
  import { TextureResourceDescriptor } from "../../device/graph/TextureResourceDescriptor.js";
@@ -56,14 +56,20 @@ import {
56
56
  HAIR_BINDING_NONE,
57
57
  HAIR_COLLIDER_LIMIT,
58
58
  HAIR_COLLIDER_WORDS,
59
- HAIR_FRAME_STEP_MAX,
59
+ HAIR_FIBRE_DENSITY,
60
+ hair_frame_steps,
61
+ HAIR_FRAME_STEPS_BLEND,
62
+ HAIR_FRAME_STEPS_COUNT,
63
+ HAIR_FRAME_STEPS_FIRST,
64
+ HAIR_FRAME_STEPS_OWED,
65
+ HAIR_FRAME_STEPS_STRIDE,
60
66
  HAIR_ROOT_FRAME_VECTORS,
61
67
  HAIR_GUIDE_BOUNDS_WORDS,
62
68
  HAIR_GUIDE_RECORD_WORDS,
63
69
  HAIR_STATE_HEADER,
64
70
  HAIR_STATE_NONE,
65
71
  HAIR_STATE_PLANES,
66
- HAIR_SUBSTEP_MAX
72
+ HAIR_STEP
67
73
  } from "./HAIR_SIMULATION.js";
68
74
  import { HAIR_EPOCH_MASK } from "./chunk_hair_guide.js";
69
75
  import {
@@ -464,9 +470,15 @@ export class GPUHairSystem {
464
470
  /** @type {number} entities whose hair is simulated */
465
471
  #simulated = 0;
466
472
 
467
- /** @type {number} seconds the scene's clock moved that the guides were not stepped through */
473
+ /** @type {number} seconds the scene's clock moved since the guides' frame was last recorded */
468
474
  #pending_time = 0;
469
475
 
476
+ /** @type {number} seconds the frames recorded have run past the guides' last step, less than a step */
477
+ #owed_time = 0;
478
+
479
+ /** @type {Float64Array} how the frame's time is cut into steps (`hair_frame_steps`) */
480
+ #frame_steps = new Float64Array(5);
481
+
470
482
  /** @type {number} the scene context's frame the guides were last stepped in, -1 for none */
471
483
  #simulated_frame = -1;
472
484
 
@@ -512,6 +524,8 @@ export class GPUHairSystem {
512
524
  meshlet_base: 0,
513
525
  bindings: 0,
514
526
  roots: 0,
527
+ body_diameter: 0,
528
+ body_mass: 0,
515
529
  };
516
530
 
517
531
  #view_words = new ArrayBuffer(HAIR_VIEW_STRUCT.size);
@@ -1767,6 +1781,14 @@ export class GPUHairSystem {
1767
1781
 
1768
1782
  record.guide_length_max = length_max;
1769
1783
 
1784
+ // the group as one body in the wind's way: a cylinder across the disc of its silhouette, with its fibres' mass
1785
+ const silhouette = group.silhouette;
1786
+ const body_diameter = Math.sqrt(4 * silhouette / Math.PI);
1787
+ const fibre_mass = HAIR_FIBRE_DENSITY * Math.PI / 4 * group.width_mean * group.width_mean * group.fibre_length;
1788
+
1789
+ record.body_diameter = body_diameter;
1790
+ record.body_mass = silhouette > 0 ? fibre_mass * body_diameter / silhouette : 0;
1791
+
1770
1792
  const dynamics = context.dynamics;
1771
1793
  const state = dynamics === null ? null : context.states[g];
1772
1794
 
@@ -1811,8 +1833,13 @@ export class GPUHairSystem {
1811
1833
  for (let g = 0; g < groups.length; g++) {
1812
1834
  const group = groups[g];
1813
1835
 
1836
+ assert.equal(
1837
+ group.guide_shelter.length, group.guide_count * group.guide_point_count * GROOM_SHELTER_WORDS,
1838
+ 'the group carries its shelter (groom_bake_shelter)'
1839
+ );
1840
+
1814
1841
  words += group.strand_count * group.point_count * GROOM_POINT_WORDS + group.strand_count
1815
- + group.guide_count * HAIR_GUIDE_RECORD_WORDS;
1842
+ + group.guide_count * HAIR_GUIDE_RECORD_WORDS + group.guide_shelter.length;
1816
1843
  }
1817
1844
 
1818
1845
  const run = this.#pool.allocate(words);
@@ -1863,6 +1890,15 @@ export class GPUHairSystem {
1863
1890
  }
1864
1891
 
1865
1892
  at += guides.length;
1893
+
1894
+ // the guides' shelter follows their records
1895
+ const shelter = group.guide_shelter;
1896
+
1897
+ if (shelter.length > 0) {
1898
+ this.#pool.write(at, new Uint32Array(shelter.buffer, shelter.byteOffset, shelter.length), shelter.length);
1899
+ }
1900
+
1901
+ at += shelter.length;
1866
1902
  }
1867
1903
 
1868
1904
  this.#grooms.set(groom, entry);
@@ -1923,8 +1959,9 @@ export class GPUHairSystem {
1923
1959
  /**
1924
1960
  * Step the guides of every simulated instance through the time the scene's clock moved, once a frame: the first
1925
1961
  * view to draw hair records it, the begin pass, the colliders' poses and the solver (`shader_hair_simulate.js`).
1926
- * A frame step is the time owed, at most `HAIR_FRAME_STEP_MAX`, in as few substeps as keep each within
1927
- * `HAIR_SUBSTEP_MAX`; a frame owing none still lays new states at rest and follows the anchors.
1962
+ * The time is stepped through in whole steps of `HAIR_STEP`, what is left of it owed to the next frame
1963
+ * (`hair_frame_steps`); a frame that takes no step still lays new states at rest, follows the anchors and draws
1964
+ * the guides between their last two steps.
1928
1965
  *
1929
1966
  * @param {import("../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} graph
1930
1967
  * @param {Object} scene the view's scene context
@@ -1958,9 +1995,12 @@ export class GPUHairSystem {
1958
1995
  return { state, bounds };
1959
1996
  }
1960
1997
 
1961
- const seconds = Math.min(this.#pending_time, HAIR_FRAME_STEP_MAX);
1962
- const substeps = seconds > 0 ? Math.ceil(seconds / HAIR_SUBSTEP_MAX) : 0;
1998
+ const seconds = this.#pending_time;
1999
+ const steps = this.#frame_steps;
2000
+
2001
+ hair_frame_steps(steps, this.#owed_time, seconds);
1963
2002
 
2003
+ this.#owed_time = steps[HAIR_FRAME_STEPS_OWED];
1964
2004
  this.#pending_time = 0;
1965
2005
  this.#simulated_frame = scene.frame;
1966
2006
 
@@ -2043,8 +2083,12 @@ export class GPUHairSystem {
2043
2083
  hair_guide_bounds: current.bounds,
2044
2084
  settings: {
2045
2085
  gravity: this.gravity,
2046
- step: substeps > 0 ? seconds / substeps : 0,
2047
- substeps,
2086
+ step: HAIR_STEP,
2087
+ steps: steps[HAIR_FRAME_STEPS_COUNT],
2088
+ first: steps[HAIR_FRAME_STEPS_FIRST],
2089
+ stride: steps[HAIR_FRAME_STEPS_STRIDE],
2090
+ blend: steps[HAIR_FRAME_STEPS_BLEND],
2091
+ seconds,
2048
2092
  },
2049
2093
  };
2050
2094
 
@@ -1 +1 @@
1
- {"version":3,"file":"HAIR_DATABASE_SPEC.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/HAIR_DATABASE_SPEC.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,gDAmE0B;AAE1B,oCAA4C;AAE5C,gDAAwD;AAExD,mDAAoD;AAEpD;;;GAGG;AACH,uDAEmB;AAYnB,oHAAoF;6BAnGvD,gCAAgC;sCAHvB,0CAA0C"}
1
+ {"version":3,"file":"HAIR_DATABASE_SPEC.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/HAIR_DATABASE_SPEC.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,gDAuE0B;AAE1B,oCAA4C;AAE5C,gDAAwD;AAExD,mDAAoD;AAEpD;;;GAGG;AACH,uDAEmB;AAYnB,oHAAoF;6BAvGvD,gCAAgC;sCAHvB,0CAA0C"}
@@ -75,6 +75,10 @@ export const HAIR_INSTANCE_STRUCT = WebGPUStruct.from({
75
75
  bindings: u32,
76
76
  /** the instance's first root frame in the guide state pool, `HAIR_ROOT_FRAME_VECTORS` a strand */
77
77
  roots: u32,
78
+ /** the group as one body in the wind's way: the diameter of the disc of its silhouette, groom metres */
79
+ body_diameter: f32,
80
+ /** that body's mass a unit length as a cylinder across the wind: its fibres' mass over its diameter, kg a metre */
81
+ body_mass: f32,
78
82
  }, "HairInstance").pack();
79
83
 
80
84
  export const HAIR_PAGE_SIZE = 16 * KILOBYTE;
@@ -1,9 +1,35 @@
1
1
  /**
2
- * The rate a node's velocity relaxes toward the air's by drag, per second: the drag of the wisp its guide stands for,
3
- * a cylinder of diameter `diameter` across the flow at relative speed `speed`, over the wisp's mass a unit length,
4
- * `k = ½ ρ C_d(Re) D |w| / μ`. The cylinder's drag coefficient is White's correlation, `C_d = 1 + 10 Re^(-2/3)`
5
- * (good to ±10% for `1 < Re < 2·10⁵`), so `k = (½ ρ D / μ)(|w| + 10 |w|^(1/3) (ρ D / μ_air)^(-2/3))`, which goes to
6
- * zero with the speed. The WGSL `hair_drag_rate` is its twin.
2
+ * How a frame's time is cut into the solver's steps. The time not yet stepped through, `owed` from the frames
3
+ * before and this frame's `seconds` (at most {@link HAIR_FRAME_STEP_MAX} of them), is stepped through in whole
4
+ * steps of {@link HAIR_STEP}; what is left is owed to the next frame. A step falls at a time within the frame, and
5
+ * reads the world there: the share of the frame's motion, from a frame ago at 0 to now at 1, is `first` for the
6
+ * frame's first step and `stride` more for each after it. The drawn state is `blend` of the way from the step
7
+ * before the last to the last: a step behind the scene's clock, always.
8
+ *
9
+ * @param {Float64Array|number[]} result written: the `HAIR_FRAME_STEPS_*` words
10
+ * @param {number} owed seconds the frames before ran past their last step, in `[0, HAIR_STEP)`
11
+ * @param {number} seconds the scene's clock moved this frame
12
+ */
13
+ export function hair_frame_steps(result: Float64Array | number[], owed: number, seconds: number): void;
14
+ /**
15
+ * The drag coefficient of a cylinder of diameter `diameter` across a flow of speed `speed`: White's correlation,
16
+ * `C_d = 1 + 10 Re^(-2/3)`, good to ±10% for `1 < Re < 2·10⁵`, and held under `Re = 1` at its value there, so that
17
+ * still air's is a number. The WGSL `hair_drag_coefficient` is its twin.
18
+ *
19
+ * @param {number} speed metres a second
20
+ * @param {number} diameter metres
21
+ * @returns {number}
22
+ */
23
+ export function hair_drag_coefficient(speed: number, diameter: number): number;
24
+ /**
25
+ * The rate a body's velocity relaxes toward the air's by drag, per second: the drag of a cylinder of diameter
26
+ * `diameter` across the flow at relative speed `speed`, over its mass a unit length, `k = ½ ρ C_d(Re) D |w| / m`.
27
+ * The cylinder's drag coefficient is White's correlation, `C_d = 1 + 10 Re^(-2/3)` (good to ±10% for
28
+ * `1 < Re < 2·10⁵`), so `k = (½ ρ D / m)(|w| + 10 |w|^(1/3) (ρ D / μ_air)^(-2/3))`, which goes to zero with the
29
+ * speed. The WGSL `hair_drag_rate` is its twin.
30
+ *
31
+ * A guide's node takes it twice (`shader_hair_simulate.js`): for a fibre of its group alone in open air, and for the
32
+ * group as one body in the wind's way, a cylinder across the disc of its silhouette with the mass of all its fibres.
7
33
  *
8
34
  * @param {number} speed metres a second
9
35
  * @param {number} diameter metres
@@ -24,19 +50,31 @@ export function hair_drag_rate(speed: number, diameter: number, mass_per_length:
24
50
  * for `P` nodes a guide and `G` guides, so the threads of neighbouring guides read neighbouring vectors.
25
51
  *
26
52
  * Positions are metres from the instance's **anchor**, its entity's translation this frame, along the world's axes:
27
- * near zero wherever the entity is, so a substep's small moves keep their precision far from the world's origin.
53
+ * near zero wherever the entity is, so a step's small moves keep their precision far from the world's origin.
54
+ *
55
+ * The guides are solved in steps of {@link HAIR_STEP}, whatever the frames' lengths ({@link hair_frame_steps}), and
56
+ * drawn between the last two steps: what the strands read is the **drawn** state, the solver's own is the **solved**
57
+ * one. The drawn state is blended in the frame of the guide's root (the entity's, or its strand's root frame on a bound
58
+ * mesh), from the step before the last to the last by the share of a step the frames have run past the last, and
59
+ * carried by the root's frame now: a guide's drawn root is its root this frame, and a root that turns or moves between
60
+ * steps carries its guide rigidly.
28
61
  *
29
62
  * ```
30
63
  * header 0 the anchor, world metres; w: the epoch the state was made for, u32 bits
31
- * 1 the anchor's move since the state was last stepped; w: 1 when the state is to be laid at rest
64
+ * 1 the anchor's move since the frame before; w: 1 when the state is to be laid at rest
32
65
  * 2..4 the entity's world matrix now, its columns' x, y and z, translation dropped
33
66
  * 5..7 the same a frame ago
34
67
  * 8 where the entity's origin was a frame ago, from the anchor
35
- * plane 0 a node's position
36
- * 1 its velocity, metres a second
37
- * 2 its frame: the rotation, a unit quaternion, from its rest frame carried by the entity to where it is
38
- * 3 its position a frame ago, from this frame's anchor
39
- * 4 its frame a frame ago
68
+ * plane 0 a node's drawn position
69
+ * 1 its solved velocity, metres a second, at the last step
70
+ * 2 its drawn frame: the rotation, a unit quaternion, from its rest frame carried by the entity to where it is
71
+ * 3 its drawn position a frame ago, from this frame's anchor
72
+ * 4 its drawn frame a frame ago
73
+ * 5 its solved position at the last step
74
+ * 6 its solved rotation at the last step, a unit quaternion: from the groom's rest space to the world, scale
75
+ * left out. The root node's is its root frame's.
76
+ * 7 its solved position a step before the last: from its guide's root, along the root frame's axes
77
+ * 8 its solved rotation a step before the last, in the root frame's axes
40
78
  * ```
41
79
  */
42
80
  /**
@@ -70,17 +108,34 @@ export const HAIR_STATE_VELOCITY: 1;
70
108
  export const HAIR_STATE_FRAME: 2;
71
109
  export const HAIR_STATE_LAST_POSITION: 3;
72
110
  export const HAIR_STATE_LAST_FRAME: 4;
111
+ export const HAIR_STATE_SOLVED_POSITION: 5;
112
+ export const HAIR_STATE_SOLVED_ROTATION: 6;
113
+ export const HAIR_STATE_PREVIOUS_POSITION: 7;
114
+ export const HAIR_STATE_PREVIOUS_ROTATION: 8;
73
115
  /**
74
116
  * Words of a guide's record in the groom pool: its strand's rank, its wisp's strand count, its wisp's diameter and
75
- * its length (f32 bits each, groom metres).
117
+ * its length (f32 bits each, groom metres). A group's guide records are followed by its guides' shelter
118
+ * (`GroomGroup#guide_shelter`): `GROOM_SHELTER_WORDS` depths a node (f32 bits), a guide's nodes in turn, guide after
119
+ * guide.
76
120
  * @type {number}
77
121
  */
78
122
  export const HAIR_GUIDE_RECORD_WORDS: number;
79
123
  /**
80
- * The longest substep, seconds: a frame is cut into as many as keep each within it.
124
+ * The solver's step, seconds: every step is this long, whatever the frames' lengths, so the hair's pose and its
125
+ * stability do not follow the frame rate.
81
126
  * @type {number}
82
127
  */
83
- export const HAIR_SUBSTEP_MAX: number;
128
+ export const HAIR_STEP: number;
129
+ /** Steps the solver takes this frame, in {@link hair_frame_steps}' result. */
130
+ export const HAIR_FRAME_STEPS_COUNT: 0;
131
+ /** Seconds the frames have run past the last step, less than {@link HAIR_STEP}, in {@link hair_frame_steps}' result. */
132
+ export const HAIR_FRAME_STEPS_OWED: 1;
133
+ /** The share of the frame's motion the first step falls at, in {@link hair_frame_steps}' result. */
134
+ export const HAIR_FRAME_STEPS_FIRST: 2;
135
+ /** The share of the frame's motion from a step to the next, in {@link hair_frame_steps}' result. */
136
+ export const HAIR_FRAME_STEPS_STRIDE: 3;
137
+ /** How far the drawn state is from the step before the last, 0, to the last, 1, in {@link hair_frame_steps}' result. */
138
+ export const HAIR_FRAME_STEPS_BLEND: 4;
84
139
  /**
85
140
  * The longest frame the simulation steps, seconds, as the animation clamps its own: a stall slows the hair rather
86
141
  * than throwing it.
@@ -102,6 +157,12 @@ export const HAIR_AIR_VISCOSITY: number;
102
157
  * @type {number}
103
158
  */
104
159
  export const HAIR_FIBRE_DENSITY: number;
160
+ /**
161
+ * The most of its own drag in open air a fibre of a groom takes, where nothing stands between it and the wind: the
162
+ * hair about it still shares its load. A chosen value, not a derived one.
163
+ * @type {number}
164
+ */
165
+ export const HAIR_EXPOSED_DRAG_SHARE: number;
105
166
  /**
106
167
  * The share of a node's follow-the-leader correction taken back out of its parent's velocity (Müller et al. 2012's
107
168
  * `s`), which keeps the correction from feeding the velocity it was made to undo.
@@ -124,6 +185,7 @@ export const HAIR_COLLIDER_LIMIT: number;
124
185
  * 8 .. 11 from the world to its own frame, as the pose pass writes it: the rotation, a unit quaternion
125
186
  * 12 .. 14 the translation after it
126
187
  * 15 the scale after that: distances in its frame are the world's times it
188
+ * 16 .. 23 the same a frame ago
127
189
  * ```
128
190
  *
129
191
  * @type {number}
@@ -1 +1 @@
1
- {"version":3,"file":"HAIR_SIMULATION.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/HAIR_SIMULATION.js"],"names":[],"mappings":"AA8IA;;;;;;;;;;;GAWG;AACH,sCALW,MAAM,YACN,MAAM,mBACN,MAAM,GACJ,MAAM,CAOlB;AA/JD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;GAGG;AACH,8BAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,gCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC,oCAAqC;AACrC,oCAAqC;AACrC,iCAAkC;AAClC,yCAA0C;AAC1C,sCAAuC;AAEvC;;;;GAIG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;GAGG;AACH,+BAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,kCAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,+BAFU,MAAM,CAEsB;AAEtC;;;GAGG;AACH,iCAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,iCAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,6CAFU,MAAM,CAEkC;AAElD;;;GAGG;AACH,kCAFU,MAAM,CAEsB;AAEtC;;;;;;;;;;;;;;GAcG;AACH,kCAFU,MAAM,CAEsB;AAEtC;;;;;GAKG;AACH,sCAFU,MAAM,CAEyB"}
1
+ {"version":3,"file":"HAIR_SIMULATION.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/HAIR_SIMULATION.js"],"names":[],"mappings":"AAiHA;;;;;;;;;;;GAWG;AACH,yCAJW,YAAY,GAAC,MAAM,EAAE,QACrB,MAAM,WACN,MAAM,QAehB;AAyED;;;;;;;;GAQG;AACH,6CAJW,MAAM,YACN,MAAM,GACJ,MAAM,CAMlB;AAED;;;;;;;;;;;;;;GAcG;AACH,sCALW,MAAM,YACN,MAAM,mBACN,MAAM,GACJ,MAAM,CAOlB;AAtPD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH;;;GAGG;AACH,8BAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,gCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC,oCAAqC;AACrC,oCAAqC;AACrC,iCAAkC;AAClC,yCAA0C;AAC1C,sCAAuC;AACvC,2CAA4C;AAC5C,2CAA4C;AAC5C,6CAA8C;AAC9C,6CAA8C;AAE9C;;;;;;GAMG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;;GAIG;AACH,wBAFU,MAAM,CAEgB;AAEhC,8EAA8E;AAC9E,uCAAwC;AAExC,wHAAwH;AACxH,sCAAuC;AAEvC,oGAAoG;AACpG,uCAAwC;AAExC,oGAAoG;AACpG,wCAAyC;AAEzC,wHAAwH;AACxH,uCAAwC;AA6BxC;;;;GAIG;AACH,kCAFU,MAAM,CAE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