@rydr/game-sdk 8.11.0 → 8.12.0

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 (121) hide show
  1. package/README.md +26 -2
  2. package/dist/client/PlatformClient.d.ts.map +1 -1
  3. package/dist/client/PlatformClient.js +14 -2
  4. package/dist/client/PlatformClient.js.map +1 -1
  5. package/dist/client/Room.d.ts +9 -4
  6. package/dist/client/Room.d.ts.map +1 -1
  7. package/dist/client/Room.js +8 -5
  8. package/dist/client/Room.js.map +1 -1
  9. package/dist/host/PlatformHost.d.ts +4 -2
  10. package/dist/host/PlatformHost.d.ts.map +1 -1
  11. package/dist/host/PlatformHost.js +5 -3
  12. package/dist/host/PlatformHost.js.map +1 -1
  13. package/dist/protocol/messages.d.ts +11 -4
  14. package/dist/protocol/messages.d.ts.map +1 -1
  15. package/dist/protocol/room.d.ts +26 -0
  16. package/dist/protocol/room.d.ts.map +1 -1
  17. package/dist/protocol/version.d.ts +2 -2
  18. package/dist/protocol/version.d.ts.map +1 -1
  19. package/dist/protocol/version.js +23 -2
  20. package/dist/protocol/version.js.map +1 -1
  21. package/dist/three/README.md +111 -0
  22. package/dist/three/character/index.d.ts +14 -0
  23. package/dist/three/character/index.d.ts.map +1 -0
  24. package/dist/three/character/index.js +14 -0
  25. package/dist/three/character/index.js.map +1 -0
  26. package/dist/three/character/kit.d.ts +74 -0
  27. package/dist/three/character/kit.d.ts.map +1 -0
  28. package/dist/three/character/kit.js +254 -0
  29. package/dist/three/character/kit.js.map +1 -0
  30. package/dist/three/character/riders.d.ts +20 -0
  31. package/dist/three/character/riders.d.ts.map +1 -0
  32. package/dist/three/character/riders.js +383 -0
  33. package/dist/three/character/riders.js.map +1 -0
  34. package/dist/three/character/skeleton.d.ts +105 -0
  35. package/dist/three/character/skeleton.d.ts.map +1 -0
  36. package/dist/three/character/skeleton.js +57 -0
  37. package/dist/three/character/skeleton.js.map +1 -0
  38. package/dist/three/controller/glyph-texture.d.ts +29 -0
  39. package/dist/three/controller/glyph-texture.d.ts.map +1 -0
  40. package/dist/three/controller/glyph-texture.js +68 -0
  41. package/dist/three/controller/glyph-texture.js.map +1 -0
  42. package/dist/three/controller/index.d.ts +12 -0
  43. package/dist/three/controller/index.d.ts.map +1 -0
  44. package/dist/three/controller/index.js +12 -0
  45. package/dist/three/controller/index.js.map +1 -0
  46. package/dist/three/controller/joycon-designs.d.ts +49 -0
  47. package/dist/three/controller/joycon-designs.d.ts.map +1 -0
  48. package/dist/three/controller/joycon-designs.js +742 -0
  49. package/dist/three/controller/joycon-designs.js.map +1 -0
  50. package/dist/three/controller/joycon-shoulder-mesh.d.ts +41 -0
  51. package/dist/three/controller/joycon-shoulder-mesh.d.ts.map +1 -0
  52. package/dist/three/controller/joycon-shoulder-mesh.js +527 -0
  53. package/dist/three/controller/joycon-shoulder-mesh.js.map +1 -0
  54. package/dist/three/controller/joycon-spec.d.ts +233 -0
  55. package/dist/three/controller/joycon-spec.d.ts.map +1 -0
  56. package/dist/three/controller/joycon-spec.js +285 -0
  57. package/dist/three/controller/joycon-spec.js.map +1 -0
  58. package/dist/three/controller/three-pad-renderer.d.ts +81 -0
  59. package/dist/three/controller/three-pad-renderer.d.ts.map +1 -0
  60. package/dist/three/controller/three-pad-renderer.js +433 -0
  61. package/dist/three/controller/three-pad-renderer.js.map +1 -0
  62. package/dist/three/index.d.ts +2 -0
  63. package/dist/three/index.d.ts.map +1 -1
  64. package/dist/three/index.js +2 -0
  65. package/dist/three/index.js.map +1 -1
  66. package/dist/three/rider/cyclist-pose.d.ts +62 -0
  67. package/dist/three/rider/cyclist-pose.d.ts.map +1 -0
  68. package/dist/three/rider/cyclist-pose.js +173 -0
  69. package/dist/three/rider/cyclist-pose.js.map +1 -0
  70. package/dist/three/rider/index.d.ts +8 -0
  71. package/dist/three/rider/index.d.ts.map +1 -0
  72. package/dist/three/rider/index.js +8 -0
  73. package/dist/three/rider/index.js.map +1 -0
  74. package/dist/three/rider/three-rider-rig.d.ts +80 -0
  75. package/dist/three/rider/three-rider-rig.d.ts.map +1 -0
  76. package/dist/three/rider/three-rider-rig.js +418 -0
  77. package/dist/three/rider/three-rider-rig.js.map +1 -0
  78. package/dist/ui/README.md +153 -1
  79. package/dist/ui/controller/combo-demo.d.ts +9 -0
  80. package/dist/ui/controller/combo-demo.d.ts.map +1 -1
  81. package/dist/ui/controller/combo-demo.js +1 -0
  82. package/dist/ui/controller/combo-demo.js.map +1 -1
  83. package/dist/ui/controller/control-spotlight.d.ts +10 -1
  84. package/dist/ui/controller/control-spotlight.d.ts.map +1 -1
  85. package/dist/ui/controller/control-spotlight.js +42 -42
  86. package/dist/ui/controller/control-spotlight.js.map +1 -1
  87. package/dist/ui/controller/control-trainer.d.ts +14 -0
  88. package/dist/ui/controller/control-trainer.d.ts.map +1 -1
  89. package/dist/ui/controller/control-trainer.js +6 -0
  90. package/dist/ui/controller/control-trainer.js.map +1 -1
  91. package/dist/ui/controller/controller-map.d.ts +9 -0
  92. package/dist/ui/controller/controller-map.d.ts.map +1 -1
  93. package/dist/ui/controller/controller-map.js +8 -6
  94. package/dist/ui/controller/controller-map.js.map +1 -1
  95. package/dist/ui/controller/controller-pad.d.ts +35 -2
  96. package/dist/ui/controller/controller-pad.d.ts.map +1 -1
  97. package/dist/ui/controller/controller-pad.js +47 -7
  98. package/dist/ui/controller/controller-pad.js.map +1 -1
  99. package/dist/ui/controller/index.d.ts +1 -0
  100. package/dist/ui/controller/index.d.ts.map +1 -1
  101. package/dist/ui/controller/index.js +1 -0
  102. package/dist/ui/controller/index.js.map +1 -1
  103. package/dist/ui/controller/renderer.d.ts +118 -0
  104. package/dist/ui/controller/renderer.d.ts.map +1 -0
  105. package/dist/ui/controller/renderer.js +93 -0
  106. package/dist/ui/controller/renderer.js.map +1 -0
  107. package/dist/ui/controller/styles.js +30 -0
  108. package/dist/ui/controller/styles.js.map +1 -1
  109. package/dist/ui/index.d.ts +6 -0
  110. package/dist/ui/index.d.ts.map +1 -1
  111. package/dist/ui/index.js +6 -0
  112. package/dist/ui/index.js.map +1 -1
  113. package/dist/ui/rider-rig.d.ts +315 -0
  114. package/dist/ui/rider-rig.d.ts.map +1 -0
  115. package/dist/ui/rider-rig.js +1000 -0
  116. package/dist/ui/rider-rig.js.map +1 -0
  117. package/dist/ui/showcase/index.d.ts +11 -0
  118. package/dist/ui/showcase/index.d.ts.map +1 -1
  119. package/dist/ui/showcase/index.js +109 -1
  120. package/dist/ui/showcase/index.js.map +1 -1
  121. package/package.json +8 -4
@@ -0,0 +1,254 @@
1
+ /**
2
+ * ⚠️ **LIFTED FROM THE PLATFORM — `src/showcase/player3d/kit.ts` (PLAT-503 ↔ PLAT-504).**
3
+ *
4
+ * The platform built a procedural humanoid rider — skeleton, proportions, and five art directions —
5
+ * with no assets and no build step. The rider rig needs exactly that, so it is published here rather
6
+ * than re-invented: the same argument as `@rydr/game-sdk/difficulty`, where a hand-ported copy of the
7
+ * shell's ladder drifted until one rider's badge disagreed with the chrome.
8
+ *
9
+ * What came across: the SKELETON and the LOOK. What stayed behind: the walk cycle, the weapon mounts,
10
+ * and `swingSweep` — those are the tutorial arena's gameplay, not a character.
11
+ *
12
+ * **Known debt:** the platform still has its own copy. It should import from here instead, and until
13
+ * it does the two can drift — which is the exact failure this file's provenance is meant to prevent.
14
+ * Tracked on PLAT-1564.
15
+ */
16
+ import * as THREE from "three";
17
+ import { RoomEnvironment } from "three/addons/environments/RoomEnvironment.js";
18
+ // ── Materials ─────────────────────────────────────────────────────────────────────────────────
19
+ /** Physically-lit surface — the default for anything that should catch the environment. */
20
+ export function pbr(options) {
21
+ const material = new THREE.MeshStandardMaterial({
22
+ color: options.color,
23
+ metalness: options.metalness ?? 0.05,
24
+ roughness: options.roughness ?? 0.55,
25
+ flatShading: options.flat ?? false,
26
+ transparent: options.opacity !== undefined && options.opacity < 1,
27
+ opacity: options.opacity ?? 1,
28
+ });
29
+ if (options.emissive !== undefined) {
30
+ material.emissive = new THREE.Color(options.emissive);
31
+ material.emissiveIntensity = options.emissiveIntensity ?? 1;
32
+ }
33
+ return material;
34
+ }
35
+ /**
36
+ * Banded shading, for the cel-drawn variants. The ramp is a 4px texture sampled by N·L, so the
37
+ * light falls off in steps rather than a gradient — the whole trick behind a toon look.
38
+ */
39
+ export function toon(color, steps = 4) {
40
+ return new THREE.MeshToonMaterial({ color, gradientMap: gradientRamp(steps) });
41
+ }
42
+ const ramps = new Map();
43
+ function gradientRamp(steps) {
44
+ const cached = ramps.get(steps);
45
+ if (cached)
46
+ return cached;
47
+ const data = new Uint8Array(steps * 4);
48
+ for (let i = 0; i < steps; i++) {
49
+ // Squared spacing keeps the dark band wide and the lit bands tight, which reads as ink + fill.
50
+ const value = Math.round(255 * ((i + 1) / steps) ** 1.6);
51
+ data.set([value, value, value, 255], i * 4);
52
+ }
53
+ const texture = new THREE.DataTexture(data, steps, 1, THREE.RGBAFormat);
54
+ texture.needsUpdate = true;
55
+ ramps.set(steps, texture);
56
+ return texture;
57
+ }
58
+ /** Glass/energy: lit from within, barely there, never shadowing anything. */
59
+ export function glow(color, opacity = 0.55, intensity = 2.4) {
60
+ const material = pbr({ color, emissive: color, emissiveIntensity: intensity, opacity });
61
+ material.roughness = 0.15;
62
+ material.depthWrite = false;
63
+ material.side = THREE.DoubleSide;
64
+ return material;
65
+ }
66
+ /**
67
+ * An inked silhouette: the same shell, inflated and drawn back-faces-only, so the far side of the
68
+ * hull shows as a line around the near side. Cheap outlines with no post-processing pass.
69
+ */
70
+ export function inkOutline(source, thickness = 0.035, color = "#0a0d14") {
71
+ const shell = new THREE.Mesh(source.geometry, new THREE.MeshBasicMaterial({ color, side: THREE.BackSide }));
72
+ shell.position.copy(source.position);
73
+ shell.rotation.copy(source.rotation);
74
+ // Scale-based inflation, so it costs nothing and follows the part when the rig animates it.
75
+ const bounds = source.geometry.boundingSphere ?? boundsOf(source.geometry);
76
+ const grow = 1 + thickness / Math.max(0.08, bounds.radius);
77
+ shell.scale.copy(source.scale).multiplyScalar(grow);
78
+ shell.renderOrder = -1;
79
+ return shell;
80
+ }
81
+ function boundsOf(geometry) {
82
+ geometry.computeBoundingSphere();
83
+ return geometry.boundingSphere ?? new THREE.Sphere(new THREE.Vector3(), 0.5);
84
+ }
85
+ /** Wrap a mesh with its own outline so callers can add ONE object to the rig. */
86
+ export function inked(mesh, thickness) {
87
+ const group = new THREE.Group();
88
+ group.add(mesh, inkOutline(mesh, thickness));
89
+ return group;
90
+ }
91
+ // ── Primitives ────────────────────────────────────────────────────────────────────────────────
92
+ /** A limb segment: a capsule whose TOP sits at the origin, so it hangs off its joint. */
93
+ export function limb(radius, length, material, taper = 1) {
94
+ const geometry = new THREE.CapsuleGeometry(radius, Math.max(0.01, length - radius * 2), 4, 14);
95
+ if (taper !== 1)
96
+ tape(geometry, taper);
97
+ const mesh = new THREE.Mesh(geometry, material);
98
+ mesh.position.y = -length / 2;
99
+ return mesh;
100
+ }
101
+ /** Squeeze a geometry towards its bottom (`taper < 1`) — wrists, ankles, blade tips. */
102
+ function tape(geometry, taper) {
103
+ geometry.computeBoundingBox();
104
+ const box = geometry.boundingBox;
105
+ if (!box)
106
+ return;
107
+ const position = geometry.attributes["position"];
108
+ const span = box.max.y - box.min.y || 1;
109
+ for (let i = 0; i < position.count; i++) {
110
+ const t = (position.getY(i) - box.min.y) / span; // 0 at the bottom, 1 at the top
111
+ const factor = taper + (1 - taper) * t;
112
+ position.setX(i, position.getX(i) * factor);
113
+ position.setZ(i, position.getZ(i) * factor);
114
+ }
115
+ position.needsUpdate = true;
116
+ geometry.computeVertexNormals();
117
+ }
118
+ export function box(w, h, d, material, position) {
119
+ const mesh = new THREE.Mesh(new THREE.BoxGeometry(w, h, d), material);
120
+ if (position)
121
+ mesh.position.set(...position);
122
+ return mesh;
123
+ }
124
+ export function cyl(top, bottom, height, material, segments = 18) {
125
+ return new THREE.Mesh(new THREE.CylinderGeometry(top, bottom, height, segments), material);
126
+ }
127
+ export function ball(radius, material, segments = 20) {
128
+ return new THREE.Mesh(new THREE.SphereGeometry(radius, segments, segments * 0.6), material);
129
+ }
130
+ /**
131
+ * A blade slab: a box squashed into a lens in cross-section and pointed at the tip. Every sword in
132
+ * the set starts here and then earns its own silhouette.
133
+ */
134
+ export function blade(length, width, thickness, material, options = {}) {
135
+ const geometry = new THREE.BoxGeometry(width, length, thickness, 2, 12, 2);
136
+ const point = options.point ?? 0.22; // fraction of the length spent narrowing to the tip
137
+ const edge = options.edge ?? 0.25; // how thin the outer edges are vs. the spine
138
+ const position = geometry.attributes["position"];
139
+ for (let i = 0; i < position.count; i++) {
140
+ const y = position.getY(i);
141
+ const t = (y + length / 2) / length; // 0 at the ricasso, 1 at the tip
142
+ const narrow = t > 1 - point ? 1 - (t - (1 - point)) / point : 1;
143
+ position.setX(i, position.getX(i) * Math.max(0.02, narrow));
144
+ // Diamond section: thickest on the spine, thin at the edges.
145
+ const across = Math.abs(position.getX(i)) / (width / 2);
146
+ position.setZ(i, position.getZ(i) * (edge + (1 - edge) * (1 - across)) * Math.max(0.15, narrow));
147
+ }
148
+ position.needsUpdate = true;
149
+ geometry.computeVertexNormals();
150
+ const mesh = new THREE.Mesh(geometry, material);
151
+ mesh.position.y = length / 2; // grows up from the grip
152
+ return mesh;
153
+ }
154
+ /** A ring of copies — barrel clusters, rivets, floating rune shards. */
155
+ export function radial(count, radius, make) {
156
+ const group = new THREE.Group();
157
+ for (let i = 0; i < count; i++) {
158
+ const child = make(i);
159
+ const angle = (i / count) * Math.PI * 2;
160
+ child.position.x += Math.cos(angle) * radius;
161
+ child.position.z += Math.sin(angle) * radius;
162
+ group.add(child);
163
+ }
164
+ return group;
165
+ }
166
+ /** A joint: an empty at a fixed offset from its parent, which is what the animation rotates. */
167
+ export function pivot(parent, x, y, z) {
168
+ const group = new THREE.Group();
169
+ group.position.set(x, y, z);
170
+ parent.add(group);
171
+ return group;
172
+ }
173
+ // ── Staging ───────────────────────────────────────────────────────────────────────────────────
174
+ /**
175
+ * A painted contact shadow. Real shadow maps × 16 live scenes is a lot of passes for what is, at
176
+ * this camera, a soft dark oval — so it's a texture, and the light budget goes on the character.
177
+ */
178
+ export function contactShadow(radius = 0.7, opacity = 0.55) {
179
+ const size = 128;
180
+ const canvas = document.createElement("canvas");
181
+ canvas.width = canvas.height = size;
182
+ const ctx = canvas.getContext("2d");
183
+ if (ctx) {
184
+ const gradient = ctx.createRadialGradient(size / 2, size / 2, 0, size / 2, size / 2, size / 2);
185
+ gradient.addColorStop(0, "rgba(0,0,0,0.9)");
186
+ gradient.addColorStop(0.45, "rgba(0,0,0,0.45)");
187
+ gradient.addColorStop(1, "rgba(0,0,0,0)");
188
+ ctx.fillStyle = gradient;
189
+ ctx.fillRect(0, 0, size, size);
190
+ }
191
+ const texture = new THREE.CanvasTexture(canvas);
192
+ texture.colorSpace = THREE.SRGBColorSpace;
193
+ const mesh = new THREE.Mesh(new THREE.PlaneGeometry(radius * 2, radius * 2), new THREE.MeshBasicMaterial({
194
+ map: texture,
195
+ transparent: true,
196
+ opacity,
197
+ depthWrite: false,
198
+ blending: THREE.NormalBlending,
199
+ }));
200
+ mesh.rotation.x = -Math.PI / 2;
201
+ mesh.position.y = 0.002; // just off the floor, so it never z-fights the ground plane
202
+ mesh.renderOrder = -2;
203
+ return mesh;
204
+ }
205
+ /**
206
+ * Three-point lighting plus a shared IBL. Key from the front-left, a cold rim from behind so the
207
+ * silhouette separates from the dark card, and a warm bounce off the floor.
208
+ */
209
+ export function stageLights(scene, tint = "#8fb0ee") {
210
+ const key = new THREE.DirectionalLight("#ffffff", 2.6);
211
+ key.position.set(2.4, 3.4, 2.8);
212
+ const rim = new THREE.DirectionalLight(tint, 3.2);
213
+ rim.position.set(-2.6, 2.2, -3.2);
214
+ const fill = new THREE.HemisphereLight("#dfe8ff", "#141a26", 1.1);
215
+ scene.add(key, rim, fill);
216
+ }
217
+ /** The disc every subject stands on: dark, slightly reflective, fading out at its rim. */
218
+ export function plinth(radius = 1.35, color = "#0d1420") {
219
+ const mesh = new THREE.Mesh(new THREE.CircleGeometry(radius, 64), new THREE.MeshStandardMaterial({
220
+ color,
221
+ roughness: 0.35,
222
+ metalness: 0.6,
223
+ transparent: true,
224
+ opacity: 0.9,
225
+ }));
226
+ mesh.rotation.x = -Math.PI / 2;
227
+ return mesh;
228
+ }
229
+ /**
230
+ * One environment map, generated once and shared by every scene — it is what makes the chrome and
231
+ * the gunmetal read as metal instead of as grey plastic.
232
+ */
233
+ let environment = null;
234
+ export function sharedEnvironment(renderer) {
235
+ if (environment)
236
+ return environment;
237
+ const pmrem = new THREE.PMREMGenerator(renderer);
238
+ environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;
239
+ pmrem.dispose();
240
+ return environment;
241
+ }
242
+ /** Deep-clean a subtree — the hero stage rebuilds its rig whenever the picker changes. */
243
+ export function disposeTree(root) {
244
+ root.traverse((object) => {
245
+ const mesh = object;
246
+ if (!mesh.isMesh)
247
+ return;
248
+ mesh.geometry.dispose();
249
+ for (const material of Array.isArray(mesh.material) ? mesh.material : [mesh.material]) {
250
+ material.dispose();
251
+ }
252
+ });
253
+ }
254
+ //# sourceMappingURL=kit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kit.js","sourceRoot":"","sources":["../../../src/three/character/kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAE/E,iGAAiG;AAEjG,2FAA2F;AAC3F,MAAM,UAAU,GAAG,CAAC,OASnB;IACC,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,oBAAoB,CAAC;QAC9C,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI;QACpC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI;QACpC,WAAW,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;QAClC,WAAW,EAAE,OAA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CAAC;AAC7C,MAAM,UAAU,iBAAiB,CAAC,QAA6B;IAC7D,IAAI,WAAW;QAAE,OAAO,WAAW,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjD,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,eAAe,EAAE,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC;IACnE,KAAK,CAAC,OAAO,EAAE,CAAC;IAChB,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,WAAW,CAAC,IAAoB;IAC9C,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,EAAE;QACvB,MAAM,IAAI,GAAG,MAAoB,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QACzB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtF,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * ⚠️ **LIFTED FROM THE PLATFORM — `src/showcase/player3d/characters.ts` (PLAT-503 ↔ PLAT-504).**
3
+ *
4
+ * The platform built a procedural humanoid rider — skeleton, proportions, and five art directions —
5
+ * with no assets and no build step. The rider rig needs exactly that, so it is published here rather
6
+ * than re-invented: the same argument as `@rydr/game-sdk/difficulty`, where a hand-ported copy of the
7
+ * shell's ladder drifted until one rider's badge disagreed with the chrome.
8
+ *
9
+ * What came across: the SKELETON and the LOOK. What stayed behind: the walk cycle, the weapon mounts,
10
+ * and `swingSweep` — those are the tutorial arena's gameplay, not a character.
11
+ *
12
+ * **Known debt:** the platform still has its own copy. It should import from here instead, and until
13
+ * it does the two can drift — which is the exact failure this file's provenance is meant to prevent.
14
+ * Tracked on PLAT-1564.
15
+ */
16
+ import { type CharacterVariant } from "./skeleton.js";
17
+ export declare const CHARACTERS: CharacterVariant[];
18
+ /** Convenience for the hero stage, which stores a variant by id. */
19
+ export declare function characterById(id: string): CharacterVariant;
20
+ //# sourceMappingURL=riders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"riders.d.ts","sourceRoot":"","sources":["../../../src/three/character/riders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAY,KAAK,gBAAgB,EAA+D,MAAM,eAAe,CAAC;AA8Y7H,eAAO,MAAM,UAAU,EAAE,gBAAgB,EAoCxC,CAAC;AAEF,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAE1D"}