@rydr/game-sdk 8.11.0 → 8.13.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.
- package/README.md +26 -2
- package/dist/client/PlatformClient.d.ts.map +1 -1
- package/dist/client/PlatformClient.js +14 -2
- package/dist/client/PlatformClient.js.map +1 -1
- package/dist/client/Room.d.ts +9 -4
- package/dist/client/Room.d.ts.map +1 -1
- package/dist/client/Room.js +8 -5
- package/dist/client/Room.js.map +1 -1
- package/dist/host/PlatformHost.d.ts +4 -2
- package/dist/host/PlatformHost.d.ts.map +1 -1
- package/dist/host/PlatformHost.js +5 -3
- package/dist/host/PlatformHost.js.map +1 -1
- package/dist/protocol/messages.d.ts +11 -4
- package/dist/protocol/messages.d.ts.map +1 -1
- package/dist/protocol/room.d.ts +26 -0
- package/dist/protocol/room.d.ts.map +1 -1
- package/dist/protocol/version.d.ts +2 -2
- package/dist/protocol/version.d.ts.map +1 -1
- package/dist/protocol/version.js +23 -2
- package/dist/protocol/version.js.map +1 -1
- package/dist/three/README.md +111 -0
- package/dist/three/character/index.d.ts +14 -0
- package/dist/three/character/index.d.ts.map +1 -0
- package/dist/three/character/index.js +14 -0
- package/dist/three/character/index.js.map +1 -0
- package/dist/three/character/kit.d.ts +74 -0
- package/dist/three/character/kit.d.ts.map +1 -0
- package/dist/three/character/kit.js +254 -0
- package/dist/three/character/kit.js.map +1 -0
- package/dist/three/character/riders.d.ts +20 -0
- package/dist/three/character/riders.d.ts.map +1 -0
- package/dist/three/character/riders.js +383 -0
- package/dist/three/character/riders.js.map +1 -0
- package/dist/three/character/skeleton.d.ts +105 -0
- package/dist/three/character/skeleton.d.ts.map +1 -0
- package/dist/three/character/skeleton.js +57 -0
- package/dist/three/character/skeleton.js.map +1 -0
- package/dist/three/controller/glyph-texture.d.ts +29 -0
- package/dist/three/controller/glyph-texture.d.ts.map +1 -0
- package/dist/three/controller/glyph-texture.js +68 -0
- package/dist/three/controller/glyph-texture.js.map +1 -0
- package/dist/three/controller/index.d.ts +12 -0
- package/dist/three/controller/index.d.ts.map +1 -0
- package/dist/three/controller/index.js +12 -0
- package/dist/three/controller/index.js.map +1 -0
- package/dist/three/controller/joycon-designs.d.ts +49 -0
- package/dist/three/controller/joycon-designs.d.ts.map +1 -0
- package/dist/three/controller/joycon-designs.js +742 -0
- package/dist/three/controller/joycon-designs.js.map +1 -0
- package/dist/three/controller/joycon-shoulder-mesh.d.ts +41 -0
- package/dist/three/controller/joycon-shoulder-mesh.d.ts.map +1 -0
- package/dist/three/controller/joycon-shoulder-mesh.js +527 -0
- package/dist/three/controller/joycon-shoulder-mesh.js.map +1 -0
- package/dist/three/controller/joycon-spec.d.ts +233 -0
- package/dist/three/controller/joycon-spec.d.ts.map +1 -0
- package/dist/three/controller/joycon-spec.js +285 -0
- package/dist/three/controller/joycon-spec.js.map +1 -0
- package/dist/three/controller/three-pad-renderer.d.ts +81 -0
- package/dist/three/controller/three-pad-renderer.d.ts.map +1 -0
- package/dist/three/controller/three-pad-renderer.js +433 -0
- package/dist/three/controller/three-pad-renderer.js.map +1 -0
- package/dist/three/index.d.ts +2 -0
- package/dist/three/index.d.ts.map +1 -1
- package/dist/three/index.js +2 -0
- package/dist/three/index.js.map +1 -1
- package/dist/three/rider/cyclist-pose.d.ts +62 -0
- package/dist/three/rider/cyclist-pose.d.ts.map +1 -0
- package/dist/three/rider/cyclist-pose.js +173 -0
- package/dist/three/rider/cyclist-pose.js.map +1 -0
- package/dist/three/rider/index.d.ts +8 -0
- package/dist/three/rider/index.d.ts.map +1 -0
- package/dist/three/rider/index.js +8 -0
- package/dist/three/rider/index.js.map +1 -0
- package/dist/three/rider/three-rider-rig.d.ts +80 -0
- package/dist/three/rider/three-rider-rig.d.ts.map +1 -0
- package/dist/three/rider/three-rider-rig.js +418 -0
- package/dist/three/rider/three-rider-rig.js.map +1 -0
- package/dist/ui/README.md +153 -1
- package/dist/ui/controller/combo-demo.d.ts +9 -0
- package/dist/ui/controller/combo-demo.d.ts.map +1 -1
- package/dist/ui/controller/combo-demo.js +1 -0
- package/dist/ui/controller/combo-demo.js.map +1 -1
- package/dist/ui/controller/control-spotlight.d.ts +10 -1
- package/dist/ui/controller/control-spotlight.d.ts.map +1 -1
- package/dist/ui/controller/control-spotlight.js +42 -42
- package/dist/ui/controller/control-spotlight.js.map +1 -1
- package/dist/ui/controller/control-trainer.d.ts +14 -0
- package/dist/ui/controller/control-trainer.d.ts.map +1 -1
- package/dist/ui/controller/control-trainer.js +6 -0
- package/dist/ui/controller/control-trainer.js.map +1 -1
- package/dist/ui/controller/controller-map.d.ts +9 -0
- package/dist/ui/controller/controller-map.d.ts.map +1 -1
- package/dist/ui/controller/controller-map.js +8 -6
- package/dist/ui/controller/controller-map.js.map +1 -1
- package/dist/ui/controller/controller-pad.d.ts +35 -2
- package/dist/ui/controller/controller-pad.d.ts.map +1 -1
- package/dist/ui/controller/controller-pad.js +47 -7
- package/dist/ui/controller/controller-pad.js.map +1 -1
- package/dist/ui/controller/index.d.ts +1 -0
- package/dist/ui/controller/index.d.ts.map +1 -1
- package/dist/ui/controller/index.js +1 -0
- package/dist/ui/controller/index.js.map +1 -1
- package/dist/ui/controller/renderer.d.ts +118 -0
- package/dist/ui/controller/renderer.d.ts.map +1 -0
- package/dist/ui/controller/renderer.js +93 -0
- package/dist/ui/controller/renderer.js.map +1 -0
- package/dist/ui/controller/styles.js +30 -0
- package/dist/ui/controller/styles.js.map +1 -1
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/keycap.d.ts +11 -0
- package/dist/ui/keycap.d.ts.map +1 -1
- package/dist/ui/keycap.js +3 -0
- package/dist/ui/keycap.js.map +1 -1
- package/dist/ui/pad-hints.d.ts +78 -0
- package/dist/ui/pad-hints.d.ts.map +1 -0
- package/dist/ui/pad-hints.js +103 -0
- package/dist/ui/pad-hints.js.map +1 -0
- package/dist/ui/rider-rig.d.ts +315 -0
- package/dist/ui/rider-rig.d.ts.map +1 -0
- package/dist/ui/rider-rig.js +1000 -0
- package/dist/ui/rider-rig.js.map +1 -0
- package/dist/ui/showcase/index.d.ts +11 -0
- package/dist/ui/showcase/index.d.ts.map +1 -1
- package/dist/ui/showcase/index.js +109 -1
- package/dist/ui/showcase/index.js.map +1 -1
- package/dist/ui/solo-labeled-diamond.d.ts +7 -0
- package/dist/ui/solo-labeled-diamond.d.ts.map +1 -1
- package/dist/ui/solo-labeled-diamond.js +1 -1
- package/dist/ui/solo-labeled-diamond.js.map +1 -1
- package/dist/ui/styles.js +9 -0
- package/dist/ui/styles.js.map +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,383 @@
|
|
|
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 * as THREE from "three";
|
|
17
|
+
import { ball, box, cyl, glow, inked, limb, pbr, radial, toon } from "./kit.js";
|
|
18
|
+
import { skeleton } from "./skeleton.js";
|
|
19
|
+
/** Roughly a 1.8m adult, the default every variant deviates from on purpose. */
|
|
20
|
+
const STANDARD = {
|
|
21
|
+
hipHeight: 0.92,
|
|
22
|
+
spine: 0.5,
|
|
23
|
+
upperArm: 0.29,
|
|
24
|
+
forearm: 0.27,
|
|
25
|
+
thigh: 0.46,
|
|
26
|
+
shin: 0.44,
|
|
27
|
+
shoulderWidth: 0.2,
|
|
28
|
+
hipWidth: 0.11,
|
|
29
|
+
neck: 0.16,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Hang the four limbs, the hands and the feet on a skeleton. Everything a variant does beyond this
|
|
33
|
+
* is torso, head and personality — which is exactly the part worth looking at.
|
|
34
|
+
*/
|
|
35
|
+
function dressLimbs(j, p, suit) {
|
|
36
|
+
const wrap = suit.wrap ?? ((mesh) => mesh);
|
|
37
|
+
const armR = suit.armRadius ?? 0.058;
|
|
38
|
+
const legR = suit.legRadius ?? 0.075;
|
|
39
|
+
for (const shoulder of [j.shoulderL, j.shoulderR]) {
|
|
40
|
+
shoulder.add(wrap(limb(armR, p.upperArm, suit.arm, 0.85)));
|
|
41
|
+
}
|
|
42
|
+
for (const elbow of [j.elbowL, j.elbowR]) {
|
|
43
|
+
elbow.add(wrap(limb(armR * 0.85, p.forearm, suit.arm, 0.8)));
|
|
44
|
+
}
|
|
45
|
+
for (const hip of [j.hipL, j.hipR]) {
|
|
46
|
+
hip.add(wrap(limb(legR, p.thigh, suit.leg, 0.82)));
|
|
47
|
+
}
|
|
48
|
+
for (const knee of [j.kneeL, j.kneeR]) {
|
|
49
|
+
knee.add(wrap(limb(legR * 0.82, p.shin, suit.leg, 0.72)));
|
|
50
|
+
// The foot lives at the ankle, i.e. at the far end of the shin.
|
|
51
|
+
const foot = box(legR * 2.1, 0.07, 0.26, suit.foot, [0, -p.shin + 0.03, 0.055]);
|
|
52
|
+
knee.add(wrap(foot));
|
|
53
|
+
}
|
|
54
|
+
for (const hand of [j.handL, j.handR]) {
|
|
55
|
+
hand.add(wrap(ball(armR * 0.92, suit.hand, 12)));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// ── 1 · Inked cel ─────────────────────────────────────────────────────────────────────────────
|
|
59
|
+
function celRider(over) {
|
|
60
|
+
const p = { ...STANDARD, hipHeight: 0.86, shoulderWidth: 0.22, neck: 0.13, ...over };
|
|
61
|
+
const { joints: j, object } = skeleton(p);
|
|
62
|
+
const jersey = toon("#4a7fd6");
|
|
63
|
+
const jerseyDark = toon("#2c4b8c");
|
|
64
|
+
const skin = toon("#f0c8a2", 3);
|
|
65
|
+
const shorts = toon("#1b2540");
|
|
66
|
+
const shoe = toon("#f5c451");
|
|
67
|
+
dressLimbs(j, p, {
|
|
68
|
+
arm: skin,
|
|
69
|
+
leg: shorts,
|
|
70
|
+
hand: skin,
|
|
71
|
+
foot: shoe,
|
|
72
|
+
wrap: (mesh) => inked(mesh, 0.02),
|
|
73
|
+
armRadius: 0.055,
|
|
74
|
+
legRadius: 0.078,
|
|
75
|
+
});
|
|
76
|
+
// Torso: a soft barrel, wider at the chest than the waist — the classic cartoon wedge.
|
|
77
|
+
const torso = new THREE.Mesh(new THREE.CapsuleGeometry(0.19, 0.3, 4, 20), jersey);
|
|
78
|
+
torso.scale.set(1, 1, 0.78);
|
|
79
|
+
torso.position.y = p.spine / 2 - 0.02;
|
|
80
|
+
j.hips.add(inked(torso, 0.022));
|
|
81
|
+
const stripe = cyl(0.192, 0.192, 0.06, jerseyDark, 22);
|
|
82
|
+
stripe.scale.z = 0.78;
|
|
83
|
+
stripe.position.y = p.spine / 2 + 0.06;
|
|
84
|
+
j.hips.add(stripe);
|
|
85
|
+
const head = ball(0.155, skin, 22);
|
|
86
|
+
head.scale.set(1, 1.05, 0.95);
|
|
87
|
+
head.position.y = 0.14;
|
|
88
|
+
j.neck.add(inked(head, 0.02));
|
|
89
|
+
// Hair as a skull cap that sits proud of the head, so the outline picks it out separately.
|
|
90
|
+
const hair = new THREE.Mesh(new THREE.SphereGeometry(0.162, 22, 14, 0, Math.PI * 2, 0, Math.PI * 0.58), toon("#2a2118", 3));
|
|
91
|
+
hair.position.y = 0.148;
|
|
92
|
+
hair.rotation.x = -0.16;
|
|
93
|
+
j.neck.add(inked(hair, 0.018));
|
|
94
|
+
const eyes = new THREE.Group();
|
|
95
|
+
for (const x of [-0.055, 0.055]) {
|
|
96
|
+
const eye = ball(0.021, new THREE.MeshBasicMaterial({ color: "#101828" }), 10);
|
|
97
|
+
eye.position.set(x, 0.14, 0.135);
|
|
98
|
+
eye.scale.z = 0.5;
|
|
99
|
+
eyes.add(eye);
|
|
100
|
+
}
|
|
101
|
+
j.neck.add(eyes);
|
|
102
|
+
return { joints: j, proportions: p, object };
|
|
103
|
+
}
|
|
104
|
+
// ── 2 · Faceted low-poly ──────────────────────────────────────────────────────────────────────
|
|
105
|
+
function facetRider(over) {
|
|
106
|
+
const p = { ...STANDARD, hipHeight: 0.95, spine: 0.52, shoulderWidth: 0.21, ...over };
|
|
107
|
+
const { joints: j, object } = skeleton(p);
|
|
108
|
+
const flat = (color, rough = 0.62) => pbr({ color, roughness: rough, flat: true });
|
|
109
|
+
const suit = flat("#28405f");
|
|
110
|
+
const accent = flat("#66d9c8", 0.45);
|
|
111
|
+
const skin = flat("#e8b98f", 0.8);
|
|
112
|
+
dressLimbs(j, p, { arm: suit, leg: flat("#1b2a3f"), hand: skin, foot: accent, armRadius: 0.05 });
|
|
113
|
+
// A four-sided torso: the facets ARE the style, so the hull is deliberately crude.
|
|
114
|
+
const torso = new THREE.Mesh(new THREE.CylinderGeometry(0.15, 0.21, p.spine, 6, 1), suit);
|
|
115
|
+
torso.rotation.y = Math.PI / 6;
|
|
116
|
+
torso.position.y = p.spine / 2;
|
|
117
|
+
j.hips.add(torso);
|
|
118
|
+
const shoulderPlate = new THREE.Mesh(new THREE.OctahedronGeometry(0.13, 0), accent);
|
|
119
|
+
shoulderPlate.scale.set(1, 0.6, 0.9);
|
|
120
|
+
j.shoulderL.add(shoulderPlate);
|
|
121
|
+
const other = shoulderPlate.clone();
|
|
122
|
+
j.shoulderR.add(other);
|
|
123
|
+
const chevron = new THREE.Mesh(new THREE.TetrahedronGeometry(0.1, 0), accent);
|
|
124
|
+
chevron.position.set(0, p.spine * 0.62, 0.13);
|
|
125
|
+
chevron.rotation.set(0.5, 0.6, 0);
|
|
126
|
+
j.hips.add(chevron);
|
|
127
|
+
// Head as a cut gem — an icosahedron reads as a face once the visor band is on it.
|
|
128
|
+
const head = new THREE.Mesh(new THREE.IcosahedronGeometry(0.15, 0), skin);
|
|
129
|
+
head.position.y = 0.14;
|
|
130
|
+
head.rotation.y = 0.4;
|
|
131
|
+
j.neck.add(head);
|
|
132
|
+
const visor = new THREE.Mesh(new THREE.TorusGeometry(0.13, 0.022, 4, 12, Math.PI), accent);
|
|
133
|
+
visor.position.set(0, 0.15, 0.02);
|
|
134
|
+
visor.rotation.set(Math.PI / 2 - 0.2, 0, 0);
|
|
135
|
+
j.neck.add(visor);
|
|
136
|
+
return { joints: j, proportions: p, object };
|
|
137
|
+
}
|
|
138
|
+
// ── 3 · Chrome + neon ─────────────────────────────────────────────────────────────────────────
|
|
139
|
+
function neonRider(over) {
|
|
140
|
+
const p = {
|
|
141
|
+
...STANDARD,
|
|
142
|
+
hipHeight: 1.0,
|
|
143
|
+
spine: 0.54,
|
|
144
|
+
thigh: 0.5,
|
|
145
|
+
shin: 0.48,
|
|
146
|
+
upperArm: 0.31,
|
|
147
|
+
forearm: 0.29,
|
|
148
|
+
shoulderWidth: 0.19,
|
|
149
|
+
...over,
|
|
150
|
+
};
|
|
151
|
+
const { joints: j, object } = skeleton(p);
|
|
152
|
+
const chrome = pbr({ color: "#c9d6ee", metalness: 1, roughness: 0.18 });
|
|
153
|
+
const carbon = pbr({ color: "#161c2b", metalness: 0.6, roughness: 0.42 });
|
|
154
|
+
const neon = pbr({ color: "#7ea2e6", emissive: "#6fd8ff", emissiveIntensity: 3.2, roughness: 0.3 });
|
|
155
|
+
dressLimbs(j, p, { arm: carbon, leg: carbon, hand: chrome, foot: chrome, armRadius: 0.048, legRadius: 0.066 });
|
|
156
|
+
const torso = new THREE.Mesh(new THREE.CapsuleGeometry(0.165, 0.3, 6, 24), chrome);
|
|
157
|
+
torso.scale.set(1.05, 1, 0.72);
|
|
158
|
+
torso.position.y = p.spine / 2;
|
|
159
|
+
j.hips.add(torso);
|
|
160
|
+
// Light lines: thin emissive rings around the chest and each thigh — the whole read of the variant.
|
|
161
|
+
for (const y of [p.spine * 0.72, p.spine * 0.44]) {
|
|
162
|
+
const ring = new THREE.Mesh(new THREE.TorusGeometry(0.168, 0.008, 8, 40), neon);
|
|
163
|
+
ring.rotation.x = Math.PI / 2;
|
|
164
|
+
ring.scale.z = 0.74;
|
|
165
|
+
ring.position.y = y;
|
|
166
|
+
j.hips.add(ring);
|
|
167
|
+
}
|
|
168
|
+
for (const hip of [j.hipL, j.hipR]) {
|
|
169
|
+
const band = new THREE.Mesh(new THREE.TorusGeometry(0.068, 0.007, 8, 28), neon);
|
|
170
|
+
band.rotation.x = Math.PI / 2;
|
|
171
|
+
band.position.y = -p.thigh * 0.55;
|
|
172
|
+
hip.add(band);
|
|
173
|
+
}
|
|
174
|
+
const helmet = new THREE.Mesh(new THREE.CapsuleGeometry(0.115, 0.08, 6, 22), chrome);
|
|
175
|
+
helmet.scale.set(1, 1, 0.92);
|
|
176
|
+
helmet.position.y = 0.15;
|
|
177
|
+
j.neck.add(helmet);
|
|
178
|
+
const visor = new THREE.Mesh(new THREE.SphereGeometry(0.118, 24, 16, 0, Math.PI, 1.0, 0.85), glow("#6fd8ff", 0.9, 2.6));
|
|
179
|
+
visor.position.y = 0.16;
|
|
180
|
+
visor.rotation.y = -Math.PI / 2;
|
|
181
|
+
j.neck.add(visor);
|
|
182
|
+
// A drifting halo of shards behind the shoulders — the flourish `tick` animates.
|
|
183
|
+
const shards = radial(5, 0.26, (i) => {
|
|
184
|
+
const shard = new THREE.Mesh(new THREE.TetrahedronGeometry(0.035, 0), neon);
|
|
185
|
+
shard.rotation.set(i, i * 1.3, 0);
|
|
186
|
+
return shard;
|
|
187
|
+
});
|
|
188
|
+
shards.position.set(0, p.spine * 0.8, -0.06);
|
|
189
|
+
shards.rotation.x = 0.4;
|
|
190
|
+
j.hips.add(shards);
|
|
191
|
+
return {
|
|
192
|
+
joints: j,
|
|
193
|
+
proportions: p,
|
|
194
|
+
object,
|
|
195
|
+
tick(pose) {
|
|
196
|
+
shards.rotation.y = pose.time * 0.9;
|
|
197
|
+
shards.position.y = p.spine * 0.8 + Math.sin(pose.time * 2) * 0.02;
|
|
198
|
+
neon.emissiveIntensity = 2.6 + Math.sin(pose.time * 3.4) * 0.35 + pose.effort * 1.4;
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// ── 4 · Soft clay ─────────────────────────────────────────────────────────────────────────────
|
|
203
|
+
function clayRider(over) {
|
|
204
|
+
const p = {
|
|
205
|
+
...STANDARD,
|
|
206
|
+
hipHeight: 0.72,
|
|
207
|
+
spine: 0.44,
|
|
208
|
+
thigh: 0.34,
|
|
209
|
+
shin: 0.34,
|
|
210
|
+
upperArm: 0.24,
|
|
211
|
+
forearm: 0.22,
|
|
212
|
+
shoulderWidth: 0.2,
|
|
213
|
+
hipWidth: 0.1,
|
|
214
|
+
neck: 0.12,
|
|
215
|
+
...over,
|
|
216
|
+
};
|
|
217
|
+
const { joints: j, object } = skeleton(p);
|
|
218
|
+
const dough = (color) => pbr({ color, roughness: 0.92, metalness: 0 });
|
|
219
|
+
const shirt = dough("#f2856a");
|
|
220
|
+
const trousers = dough("#5f7fc7");
|
|
221
|
+
const skin = dough("#f7d3b0");
|
|
222
|
+
const shoe = dough("#f5c451");
|
|
223
|
+
dressLimbs(j, p, { arm: skin, leg: trousers, hand: skin, foot: shoe, armRadius: 0.062, legRadius: 0.078 });
|
|
224
|
+
// Everything is over-rounded: a big head, a pillowy torso, stubby limbs. Reads as handled clay.
|
|
225
|
+
const torso = new THREE.Mesh(new THREE.SphereGeometry(0.21, 26, 18), shirt);
|
|
226
|
+
torso.scale.set(1, 1.15, 0.86);
|
|
227
|
+
torso.position.y = p.spine * 0.52;
|
|
228
|
+
j.hips.add(torso);
|
|
229
|
+
const collar = new THREE.Mesh(new THREE.TorusGeometry(0.085, 0.028, 12, 26), dough("#e0684d"));
|
|
230
|
+
collar.rotation.x = Math.PI / 2;
|
|
231
|
+
collar.position.y = p.spine * 0.96;
|
|
232
|
+
j.hips.add(collar);
|
|
233
|
+
const head = ball(0.21, skin, 28);
|
|
234
|
+
head.scale.set(1, 0.97, 0.95);
|
|
235
|
+
head.position.y = 0.2;
|
|
236
|
+
j.neck.add(head);
|
|
237
|
+
const hair = new THREE.Mesh(new THREE.SphereGeometry(0.216, 26, 16, 0, Math.PI * 2, 0, Math.PI * 0.52), dough("#5b3d2e"));
|
|
238
|
+
hair.position.y = 0.2;
|
|
239
|
+
hair.rotation.x = -0.2;
|
|
240
|
+
j.neck.add(hair);
|
|
241
|
+
const cheeks = new THREE.Group();
|
|
242
|
+
for (const x of [-0.11, 0.11]) {
|
|
243
|
+
const cheek = ball(0.045, dough("#f0a08c"), 12);
|
|
244
|
+
cheek.position.set(x, 0.16, 0.16);
|
|
245
|
+
cheek.scale.z = 0.4;
|
|
246
|
+
cheeks.add(cheek);
|
|
247
|
+
}
|
|
248
|
+
for (const x of [-0.07, 0.07]) {
|
|
249
|
+
const eye = ball(0.025, new THREE.MeshBasicMaterial({ color: "#2a2118" }), 12);
|
|
250
|
+
eye.position.set(x, 0.215, 0.185);
|
|
251
|
+
eye.scale.z = 0.45;
|
|
252
|
+
cheeks.add(eye);
|
|
253
|
+
}
|
|
254
|
+
j.neck.add(cheeks);
|
|
255
|
+
return {
|
|
256
|
+
joints: j,
|
|
257
|
+
proportions: p,
|
|
258
|
+
object,
|
|
259
|
+
// A squash-and-stretch bounce on the torso, at twice the gait — the clay "gives" on each step.
|
|
260
|
+
tick(pose) {
|
|
261
|
+
const squash = Math.abs(Math.sin(pose.phase)) * 0.05 * pose.effort;
|
|
262
|
+
torso.scale.set(1 + squash, 1.15 - squash, 0.86 + squash);
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
// ── 5 · Plated knight ─────────────────────────────────────────────────────────────────────────
|
|
267
|
+
function knightRider(over) {
|
|
268
|
+
const p = {
|
|
269
|
+
...STANDARD,
|
|
270
|
+
hipHeight: 0.94,
|
|
271
|
+
spine: 0.52,
|
|
272
|
+
shoulderWidth: 0.235,
|
|
273
|
+
hipWidth: 0.125,
|
|
274
|
+
...over,
|
|
275
|
+
};
|
|
276
|
+
const { joints: j, object } = skeleton(p);
|
|
277
|
+
const steel = pbr({ color: "#aeb9cd", metalness: 0.95, roughness: 0.3 });
|
|
278
|
+
const dark = pbr({ color: "#2a3145", metalness: 0.8, roughness: 0.45 });
|
|
279
|
+
const gold = pbr({ color: "#f5c451", metalness: 1, roughness: 0.22 });
|
|
280
|
+
const cloth = pbr({ color: "#8c2f4a", roughness: 0.85, metalness: 0 });
|
|
281
|
+
dressLimbs(j, p, { arm: dark, leg: dark, hand: steel, foot: steel, armRadius: 0.055, legRadius: 0.08 });
|
|
282
|
+
// Plate over the joints: pauldrons, vambraces, cuisses. Layered shells, not one hull.
|
|
283
|
+
for (const shoulder of [j.shoulderL, j.shoulderR]) {
|
|
284
|
+
const pauldron = new THREE.Mesh(new THREE.SphereGeometry(0.115, 20, 12, 0, Math.PI * 2, 0, Math.PI * 0.55), steel);
|
|
285
|
+
pauldron.position.y = 0.02;
|
|
286
|
+
shoulder.add(pauldron);
|
|
287
|
+
const trim = new THREE.Mesh(new THREE.TorusGeometry(0.112, 0.011, 8, 28), gold);
|
|
288
|
+
trim.rotation.x = Math.PI / 2;
|
|
289
|
+
trim.position.y = -0.045;
|
|
290
|
+
shoulder.add(trim);
|
|
291
|
+
}
|
|
292
|
+
for (const elbow of [j.elbowL, j.elbowR]) {
|
|
293
|
+
const vambrace = cyl(0.055, 0.05, 0.16, steel, 14);
|
|
294
|
+
vambrace.position.y = -0.09;
|
|
295
|
+
elbow.add(vambrace);
|
|
296
|
+
}
|
|
297
|
+
const cuirass = new THREE.Mesh(new THREE.CapsuleGeometry(0.185, 0.26, 6, 24), steel);
|
|
298
|
+
cuirass.scale.set(1.06, 1, 0.8);
|
|
299
|
+
cuirass.position.y = p.spine * 0.55;
|
|
300
|
+
j.hips.add(cuirass);
|
|
301
|
+
// A raised keel down the breastplate, which is what makes it read as armour and not a barrel.
|
|
302
|
+
const keel = new THREE.Mesh(new THREE.CylinderGeometry(0.02, 0.045, 0.34, 3), gold);
|
|
303
|
+
keel.position.set(0, p.spine * 0.55, 0.145);
|
|
304
|
+
keel.rotation.set(0.1, 0, 0);
|
|
305
|
+
j.hips.add(keel);
|
|
306
|
+
const skirt = new THREE.Mesh(new THREE.CylinderGeometry(0.17, 0.235, 0.2, 16, 1, true), dark);
|
|
307
|
+
skirt.position.y = 0.02;
|
|
308
|
+
j.hips.add(skirt);
|
|
309
|
+
const helm = new THREE.Mesh(new THREE.CapsuleGeometry(0.115, 0.09, 6, 22), steel);
|
|
310
|
+
helm.scale.set(1, 1, 0.95);
|
|
311
|
+
helm.position.y = 0.15;
|
|
312
|
+
j.neck.add(helm);
|
|
313
|
+
const slit = box(0.17, 0.022, 0.04, new THREE.MeshBasicMaterial({ color: "#0a0d14" }), [0, 0.17, 0.1]);
|
|
314
|
+
j.neck.add(slit);
|
|
315
|
+
const crest = new THREE.Mesh(new THREE.ConeGeometry(0.03, 0.16, 4), gold);
|
|
316
|
+
crest.position.y = 0.29;
|
|
317
|
+
j.neck.add(crest);
|
|
318
|
+
// The cape hangs off the shoulder line and is swayed by `tick` — a plate rider needs cloth.
|
|
319
|
+
const cape = new THREE.Mesh(new THREE.PlaneGeometry(0.44, 0.78, 6, 10), cloth);
|
|
320
|
+
cape.material.side = THREE.DoubleSide;
|
|
321
|
+
cape.position.set(0, p.spine * 0.9, -0.15);
|
|
322
|
+
j.hips.add(cape);
|
|
323
|
+
const rest = cape.geometry.attributes["position"].clone();
|
|
324
|
+
return {
|
|
325
|
+
joints: j,
|
|
326
|
+
proportions: p,
|
|
327
|
+
object,
|
|
328
|
+
tick(pose) {
|
|
329
|
+
const position = cape.geometry.attributes["position"];
|
|
330
|
+
for (let i = 0; i < position.count; i++) {
|
|
331
|
+
const y = rest.getY(i);
|
|
332
|
+
const drop = (0.39 - y) / 0.78; // 0 at the collar, 1 at the hem — the hem moves most
|
|
333
|
+
const wave = Math.sin(pose.time * 4 + drop * 5 + rest.getX(i) * 3);
|
|
334
|
+
position.setZ(i, -drop * drop * (0.12 + pose.effort * 0.4) + wave * 0.02 * drop);
|
|
335
|
+
position.setY(i, y - drop * 0.04 * pose.effort);
|
|
336
|
+
}
|
|
337
|
+
position.needsUpdate = true;
|
|
338
|
+
cape.geometry.computeVertexNormals();
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
export const CHARACTERS = [
|
|
343
|
+
{
|
|
344
|
+
id: "cel",
|
|
345
|
+
label: "Inked cel",
|
|
346
|
+
blurb: "Banded toon shading with a drawn outline. Reads at thumbnail size and never goes muddy.",
|
|
347
|
+
accent: "#4a7fd6",
|
|
348
|
+
build: celRider,
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: "facet",
|
|
352
|
+
label: "Faceted",
|
|
353
|
+
blurb: "Flat-shaded low-poly, cold palette, hard planes. The cheapest to render and the coolest.",
|
|
354
|
+
accent: "#66d9c8",
|
|
355
|
+
build: facetRider,
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: "neon",
|
|
359
|
+
label: "Neon chrome",
|
|
360
|
+
blurb: "Polished chrome under emissive light lines — the one that looks like RYDR.",
|
|
361
|
+
accent: "#6fd8ff",
|
|
362
|
+
build: neonRider,
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
id: "clay",
|
|
366
|
+
label: "Soft clay",
|
|
367
|
+
blurb: "Matte pastel dough, big head, squash on every step. Warm and completely unthreatening.",
|
|
368
|
+
accent: "#f2856a",
|
|
369
|
+
build: clayRider,
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
id: "knight",
|
|
373
|
+
label: "Plated knight",
|
|
374
|
+
blurb: "Layered steel, gold trim and a simulated cape. Makes the sword feel earned.",
|
|
375
|
+
accent: "#f5c451",
|
|
376
|
+
build: knightRider,
|
|
377
|
+
},
|
|
378
|
+
];
|
|
379
|
+
/** Convenience for the hero stage, which stores a variant by id. */
|
|
380
|
+
export function characterById(id) {
|
|
381
|
+
return CHARACTERS.find((variant) => variant.id === id) ?? CHARACTERS[0];
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=riders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"riders.js","sourceRoot":"","sources":["../../../src/three/character/riders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAsF,MAAM,eAAe,CAAC;AAE7H,gFAAgF;AAChF,MAAM,QAAQ,GAAgB;IAC5B,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,aAAa,EAAE,GAAG;IAClB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,IAAI;CACX,CAAC;AAeF;;;GAGG;AACH,SAAS,UAAU,CAAC,CAAS,EAAE,CAAc,EAAE,IAAU;IACvD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,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AEF,oEAAoE;AACpE,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,IAAK,UAAU,CAAC,CAAC,CAAsB,CAAC;AAChG,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ **LIFTED FROM THE PLATFORM — `src/showcase/player3d/rig.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
|
+
/** The joints a variant hangs geometry off. Rotating these IS the animation. */
|
|
18
|
+
export interface Joints {
|
|
19
|
+
/** Ground-anchored root; the stage owns its yaw. */
|
|
20
|
+
root: THREE.Group;
|
|
21
|
+
/** Everything above the floor — bob and lean live here. */
|
|
22
|
+
body: THREE.Group;
|
|
23
|
+
hips: THREE.Group;
|
|
24
|
+
chest: THREE.Group;
|
|
25
|
+
neck: THREE.Group;
|
|
26
|
+
shoulderL: THREE.Group;
|
|
27
|
+
shoulderR: THREE.Group;
|
|
28
|
+
elbowL: THREE.Group;
|
|
29
|
+
elbowR: THREE.Group;
|
|
30
|
+
hipL: THREE.Group;
|
|
31
|
+
hipR: THREE.Group;
|
|
32
|
+
kneeL: THREE.Group;
|
|
33
|
+
kneeR: THREE.Group;
|
|
34
|
+
handL: THREE.Group;
|
|
35
|
+
handR: THREE.Group;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The character's dimensions, in metres.
|
|
39
|
+
*
|
|
40
|
+
* Every segment length the skeleton chains is here, which is what lets a caller build the rig to
|
|
41
|
+
* dimensions it has already solved for — the rider rig passes its own drawing's thigh and shin so the
|
|
42
|
+
* knee it computed is a knee the skeleton can actually reach.
|
|
43
|
+
*/
|
|
44
|
+
export interface Proportions {
|
|
45
|
+
/** Floor → hip pivot. */
|
|
46
|
+
hipHeight: number;
|
|
47
|
+
/** Hip → shoulder line. */
|
|
48
|
+
spine: number;
|
|
49
|
+
/** Shoulder → elbow, and elbow → wrist. */
|
|
50
|
+
upperArm: number;
|
|
51
|
+
forearm: number;
|
|
52
|
+
/** Hip → knee, and knee → ankle. */
|
|
53
|
+
thigh: number;
|
|
54
|
+
shin: number;
|
|
55
|
+
/** Half the distance between the shoulders / the hips. */
|
|
56
|
+
shoulderWidth: number;
|
|
57
|
+
hipWidth: number;
|
|
58
|
+
/** Shoulder line → the base of the skull. */
|
|
59
|
+
neck: number;
|
|
60
|
+
}
|
|
61
|
+
export interface CharacterVariant {
|
|
62
|
+
id: string;
|
|
63
|
+
label: string;
|
|
64
|
+
/** The art direction in one line — what the card is actually asking you to choose between. */
|
|
65
|
+
blurb: string;
|
|
66
|
+
/** Accent used for that card's rim light and its badge, so the page reads as one set. */
|
|
67
|
+
accent: string;
|
|
68
|
+
/**
|
|
69
|
+
* Build it. `over` forces specific dimensions — the rider rig passes the lengths its flat drawing
|
|
70
|
+
* already solved with, because a rotation can aim a limb but cannot stretch one: build the
|
|
71
|
+
* character to different lengths and the feet leave the pedals.
|
|
72
|
+
*/
|
|
73
|
+
build(over?: Partial<Proportions>): Rig;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The three scalars a variant's own flourishes read — a cape's sway, a jet's flicker, a glow's pulse.
|
|
77
|
+
*
|
|
78
|
+
* Named rather than inherited from the arena's full `Pose`, which also carries a weapon, an attack
|
|
79
|
+
* progress and a facing: none of that means anything to a rider on a fixed trainer. These three do.
|
|
80
|
+
*/
|
|
81
|
+
export interface RiderTickPose {
|
|
82
|
+
/** 0 still → 1 flat out. */
|
|
83
|
+
effort: number;
|
|
84
|
+
/** Seconds since mount, for idle motion. */
|
|
85
|
+
time: number;
|
|
86
|
+
/** Gait phase in radians — the crank angle, for a cyclist. */
|
|
87
|
+
phase: number;
|
|
88
|
+
}
|
|
89
|
+
export interface Rig {
|
|
90
|
+
joints: Joints;
|
|
91
|
+
proportions: Proportions;
|
|
92
|
+
/** Everything to add to the scene. */
|
|
93
|
+
object: THREE.Group;
|
|
94
|
+
/** Per-variant flourishes the shared animation can't know about (cape sway, jet flicker…). */
|
|
95
|
+
tick?(pose: RiderTickPose, dt: number): void;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Chain the joint tree. Limbs hang along **−Y** in the rest pose, and each joint is parented to the
|
|
99
|
+
* one above it — so posing a limb is one rotation per joint, expressed relative to its parent.
|
|
100
|
+
*/
|
|
101
|
+
export declare function skeleton(p: Proportions): {
|
|
102
|
+
joints: Joints;
|
|
103
|
+
object: THREE.Group;
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/three/character/skeleton.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,gFAAgF;AAChF,MAAM,WAAW,MAAM;IACrB,oDAAoD;IACpD,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC;IAClB,2DAA2D;IAC3D,IAAI,EAA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,GAAG,GAAG,CAAC;CACzC;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,sCAAsC;IACtC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC;IACpB,8FAA8F;IAC9F,IAAI,CAAC,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAA;CAAE,CAqChF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ **LIFTED FROM THE PLATFORM — `src/showcase/player3d/rig.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 { pivot } from "./kit.js";
|
|
18
|
+
/**
|
|
19
|
+
* Chain the joint tree. Limbs hang along **−Y** in the rest pose, and each joint is parented to the
|
|
20
|
+
* one above it — so posing a limb is one rotation per joint, expressed relative to its parent.
|
|
21
|
+
*/
|
|
22
|
+
export function skeleton(p) {
|
|
23
|
+
const root = new THREE.Group();
|
|
24
|
+
const body = pivot(root, 0, 0, 0);
|
|
25
|
+
const hips = pivot(body, 0, p.hipHeight, 0);
|
|
26
|
+
const chest = pivot(hips, 0, p.spine, 0);
|
|
27
|
+
const neck = pivot(chest, 0, p.neck, 0);
|
|
28
|
+
const shoulderL = pivot(chest, -p.shoulderWidth, 0, 0);
|
|
29
|
+
const shoulderR = pivot(chest, p.shoulderWidth, 0, 0);
|
|
30
|
+
const elbowL = pivot(shoulderL, 0, -p.upperArm, 0);
|
|
31
|
+
const elbowR = pivot(shoulderR, 0, -p.upperArm, 0);
|
|
32
|
+
const handL = pivot(elbowL, 0, -p.forearm, 0);
|
|
33
|
+
const handR = pivot(elbowR, 0, -p.forearm, 0);
|
|
34
|
+
const hipL = pivot(hips, -p.hipWidth, 0, 0);
|
|
35
|
+
const hipR = pivot(hips, p.hipWidth, 0, 0);
|
|
36
|
+
const kneeL = pivot(hipL, 0, -p.thigh, 0);
|
|
37
|
+
const kneeR = pivot(hipR, 0, -p.thigh, 0);
|
|
38
|
+
const joints = {
|
|
39
|
+
root,
|
|
40
|
+
body,
|
|
41
|
+
hips,
|
|
42
|
+
chest,
|
|
43
|
+
neck,
|
|
44
|
+
shoulderL,
|
|
45
|
+
shoulderR,
|
|
46
|
+
elbowL,
|
|
47
|
+
elbowR,
|
|
48
|
+
hipL,
|
|
49
|
+
hipR,
|
|
50
|
+
kneeL,
|
|
51
|
+
kneeR,
|
|
52
|
+
handL,
|
|
53
|
+
handR,
|
|
54
|
+
};
|
|
55
|
+
return { joints, object: root };
|
|
56
|
+
}
|
|
57
|
+
//# sour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AE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAE9C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAW;QACrB,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,SAAS;QACT,SAAS;QACT,MAAM;QACN,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GLYPH TEXTURES — the letters printed on a 3D pad's buttons (`A`, `B`, `X`, `Y`, `−`, `+`, `ZL`…),
|
|
3
|
+
* drawn into a canvas at runtime and used as a texture.
|
|
4
|
+
*
|
|
5
|
+
* **Why not 3D text?** Because this SDK ships no non-TS assets (`files: ["dist"]`, every drawing in the
|
|
6
|
+
* kit is generated from code), and real 3D text means a font file — `TextGeometry` needs a typeface
|
|
7
|
+
* JSON, and an `SDF`/MSDF atlas is an image. Both would be the first binary in the package. A canvas
|
|
8
|
+
* texture keeps the rule intact, costs one small draw per distinct glyph, and looks the same as the
|
|
9
|
+
* flat pad's lettering because it *is* the same: `2d` canvas text in the host's own font stack.
|
|
10
|
+
*
|
|
11
|
+
* Textures are cached by their full appearance key, so the eight buttons of a Joy-Con pair cost eight
|
|
12
|
+
* canvases once and zero per frame — and a pad rebuilt on a controller swap reuses them.
|
|
13
|
+
*/
|
|
14
|
+
import * as THREE from "three";
|
|
15
|
+
/**
|
|
16
|
+
* A transparent texture with `text` centred on it, in `color`.
|
|
17
|
+
*
|
|
18
|
+
* Short strings only — one or two characters. A trigger's `ZL` is the longest thing that lands here,
|
|
19
|
+
* and the font shrinks for a second character so both stay inside the circle.
|
|
20
|
+
*/
|
|
21
|
+
export declare function glyphTexture(text: string, color?: string): THREE.CanvasTexture;
|
|
22
|
+
/**
|
|
23
|
+
* Drop every cached glyph texture and free its GPU memory.
|
|
24
|
+
*
|
|
25
|
+
* The cache is process-wide and tiny, so a pad renderer must NOT call this on dispose — a second pad on
|
|
26
|
+
* the page would lose the textures out from under it. It exists for a host tearing the whole kit down.
|
|
27
|
+
*/
|
|
28
|
+
export declare function clearGlyphTextureCache(): void;
|
|
29
|
+
//# sourceMappingURL=glyph-texture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glyph-texture.d.ts","sourceRoot":"","sources":["../../../src/three/controller/glyph-texture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAY,GAAG,KAAK,CAAC,aAAa,CAkCjF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C"}
|