@rydr/game-sdk 8.14.0 → 8.15.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/dist/protocol/identity.d.ts +39 -0
- package/dist/protocol/identity.d.ts.map +1 -1
- package/dist/protocol/version.d.ts +1 -1
- package/dist/protocol/version.js +1 -1
- package/dist/three/README.md +132 -4
- package/dist/three/controller/index.d.ts +2 -0
- package/dist/three/controller/index.d.ts.map +1 -1
- package/dist/three/controller/index.js +2 -0
- package/dist/three/controller/index.js.map +1 -1
- package/dist/three/controller/joycon-designs.d.ts +15 -1
- package/dist/three/controller/joycon-designs.d.ts.map +1 -1
- package/dist/three/controller/joycon-designs.js +301 -17
- package/dist/three/controller/joycon-designs.js.map +1 -1
- package/dist/three/controller/joycon-object.d.ts +216 -0
- package/dist/three/controller/joycon-object.d.ts.map +1 -0
- package/dist/three/controller/joycon-object.js +578 -0
- package/dist/three/controller/joycon-object.js.map +1 -0
- package/dist/three/controller/joycon-spec.d.ts +116 -4
- package/dist/three/controller/joycon-spec.d.ts.map +1 -1
- package/dist/three/controller/joycon-spec.js +128 -22
- package/dist/three/controller/joycon-spec.js.map +1 -1
- package/dist/three/controller/press-pulse.d.ts +89 -0
- package/dist/three/controller/press-pulse.d.ts.map +1 -0
- package/dist/three/controller/press-pulse.js +309 -0
- package/dist/three/controller/press-pulse.js.map +1 -0
- package/dist/three/controller/three-pad-renderer.d.ts +11 -22
- package/dist/three/controller/three-pad-renderer.d.ts.map +1 -1
- package/dist/three/controller/three-pad-renderer.js +49 -247
- package/dist/three/controller/three-pad-renderer.js.map +1 -1
- package/dist/three/rider/three-rider-rig.d.ts +12 -0
- package/dist/three/rider/three-rider-rig.d.ts.map +1 -1
- package/dist/three/rider/three-rider-rig.js +101 -6
- package/dist/three/rider/three-rider-rig.js.map +1 -1
- package/dist/ui/README.md +133 -7
- package/dist/ui/controller/controller-pad.d.ts +105 -2
- package/dist/ui/controller/controller-pad.d.ts.map +1 -1
- package/dist/ui/controller/controller-pad.js +347 -16
- package/dist/ui/controller/controller-pad.js.map +1 -1
- package/dist/ui/controller/renderer.d.ts +13 -0
- package/dist/ui/controller/renderer.d.ts.map +1 -1
- package/dist/ui/controller/renderer.js.map +1 -1
- package/dist/ui/controller/styles.js +50 -1
- package/dist/ui/controller/styles.js.map +1 -1
- package/dist/ui/hud-placement.d.ts +81 -0
- package/dist/ui/hud-placement.d.ts.map +1 -0
- package/dist/ui/hud-placement.js +74 -0
- package/dist/ui/hud-placement.js.map +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/rider-rig.d.ts +108 -10
- package/dist/ui/rider-rig.d.ts.map +1 -1
- package/dist/ui/rider-rig.js +299 -48
- package/dist/ui/rider-rig.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PRESS PULSE — the white circle that marks the INSTANT a key goes down (PLAT-1580).
|
|
3
|
+
*
|
|
4
|
+
* The 3D pad already says a key is down twice over: it sinks along the viewing axis and it lights up.
|
|
5
|
+
* Neither reads. The sink is projected to almost nothing at the reading angle (the pad is tilted ~21°,
|
|
6
|
+
* so travel along z barely moves on screen), which leaves the colour — and a colour change is a STATE,
|
|
7
|
+
* not an EVENT. A tap of a few frames on a small key (the d-pad, `−`/`+`, Home) can come and go without
|
|
8
|
+
* the eye catching it at all.
|
|
9
|
+
*
|
|
10
|
+
* So: a circle, born on the key's own surface, that grows and fades out. The same thing a phone draws
|
|
11
|
+
* under a finger, and read the same way.
|
|
12
|
+
*
|
|
13
|
+
* ## Why it is drawn in the scene and not over the canvas
|
|
14
|
+
*
|
|
15
|
+
* The renderer can hand out a control's screen rectangle (`partRect`), so a DOM circle laid over the
|
|
16
|
+
* canvas would be a dozen lines. It would also be wrong: it would stay a perfect screen-space circle
|
|
17
|
+
* while the surface it claims to be on is tilted, yawed, and — for a trigger — rolling forward as it
|
|
18
|
+
* lights. It would read as a badge in front of the pad rather than as something ON the key. In the
|
|
19
|
+
* scene, the ring is a child of the pad's own group, so perspective, tilt and the trigger roll all
|
|
20
|
+
* apply to it for free, and the shell can occlude it.
|
|
21
|
+
*
|
|
22
|
+
* ## Not the same white as the "do this" pulse
|
|
23
|
+
*
|
|
24
|
+
* The flat pad already spends white on `hint` — *press this* — as a slow endless throb (see
|
|
25
|
+
* `ui/controller/styles.ts`). This one has to be unmistakably a different word: it fires ONCE, it is
|
|
26
|
+
* brief, and it GROWS. Nothing in the hint vocabulary grows.
|
|
27
|
+
*/
|
|
28
|
+
import * as THREE from "three";
|
|
29
|
+
/** A ring thick enough to read at a small on-screen size; the disc is the same circle, filled. */
|
|
30
|
+
const RING_INNER = 0.72;
|
|
31
|
+
/** The sonar's rings are thinner — two of them at the wave's weight would be a blob. */
|
|
32
|
+
const SONAR_INNER = 0.86;
|
|
33
|
+
/** Segments. A pulse is never more than a couple of hundred pixels across; 48 is already generous. */
|
|
34
|
+
const SEGMENTS = 48;
|
|
35
|
+
/**
|
|
36
|
+
* How far the pulse floats off the surface it sits on, ÷ shell width.
|
|
37
|
+
*
|
|
38
|
+
* A HAIR, and deliberately so. It is measured from the top of the key's own bounding box, which
|
|
39
|
+
* already clears the dome — this only has to beat z-fighting. Anything larger (a fraction of the
|
|
40
|
+
* button's radius, say) and the ring visibly hovers in front of the key instead of lying on it, which
|
|
41
|
+
* the perspective then gives away as a parallax slide when the pad tilts.
|
|
42
|
+
*/
|
|
43
|
+
const LIFT = 0.008;
|
|
44
|
+
/** The sonar's second ring, ms behind the first. */
|
|
45
|
+
const SONAR_STAGGER = 90;
|
|
46
|
+
/** Gap between echoes while a key is held, ms. Slower than a press — this is a murmur, not a beat. */
|
|
47
|
+
const HOLD_ECHO_MS = 700;
|
|
48
|
+
/** How much quieter an echo is than the press that started it. The first one has to stay the loud one. */
|
|
49
|
+
const ECHO_DIM = 0.45;
|
|
50
|
+
/** The collar sits just outside the key's edge, so the key itself stays unobscured. */
|
|
51
|
+
const COLLAR_SCALE = 1.18;
|
|
52
|
+
/** Its opacity breathes between these, over {@link COLLAR_BREATH_MS}. */
|
|
53
|
+
const COLLAR_MIN = 0.26;
|
|
54
|
+
const COLLAR_MAX = 0.58;
|
|
55
|
+
const COLLAR_BREATH_MS = 1200;
|
|
56
|
+
/** Peak opacity per style. The wave is the brightest because it is the thinnest thing on screen. */
|
|
57
|
+
const PEAK = {
|
|
58
|
+
wave: 0.85,
|
|
59
|
+
flash: 0.62,
|
|
60
|
+
sonar: 0.8,
|
|
61
|
+
};
|
|
62
|
+
/** Ease-out cubic: fast off the mark, settling at the end. A press is an impact, not a drift. */
|
|
63
|
+
function easeOut(t) {
|
|
64
|
+
return 1 - Math.pow(1 - t, 3);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Build the pulse pool for one pad.
|
|
68
|
+
*
|
|
69
|
+
* Everything is allocated lazily and then RECYCLED: a combo demo loops forever, and a pad that minted a
|
|
70
|
+
* mesh per press would leak one every second or so.
|
|
71
|
+
*/
|
|
72
|
+
export function createPressPulses(opts) {
|
|
73
|
+
const { parent, style, hold, ms, scale, unit } = opts;
|
|
74
|
+
if (style === "none") {
|
|
75
|
+
return {
|
|
76
|
+
fire: () => { },
|
|
77
|
+
release: () => { },
|
|
78
|
+
cancelAll: () => { },
|
|
79
|
+
step: () => false,
|
|
80
|
+
dispose: () => { },
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// One geometry for every pulse on this pad, unit-radius, resized per instance through `mesh.scale`.
|
|
84
|
+
const geometry = style === "flash"
|
|
85
|
+
? new THREE.CircleGeometry(1, SEGMENTS)
|
|
86
|
+
: new THREE.RingGeometry(style === "sonar" ? SONAR_INNER : RING_INNER, 1, SEGMENTS);
|
|
87
|
+
/**
|
|
88
|
+
* The collar is always a RING, even when the press itself is a filled disc: it has to sit AROUND the
|
|
89
|
+
* key without covering it, which a disc cannot do. Built only if it will be used.
|
|
90
|
+
*/
|
|
91
|
+
const collarGeometry = hold === "collar" ? new THREE.RingGeometry(SONAR_INNER, 1, SEGMENTS) : undefined;
|
|
92
|
+
const pool = [];
|
|
93
|
+
const held = new Map();
|
|
94
|
+
/** One steady ring per held key, kept and reused rather than re-minted on every press. */
|
|
95
|
+
const collars = new Map();
|
|
96
|
+
/** Scratch, so a press allocates nothing. */
|
|
97
|
+
const v = new THREE.Vector3();
|
|
98
|
+
const localBox = new THREE.Box3();
|
|
99
|
+
/** A fresh pulse object around `geo`. Callers park and reuse these rather than minting per press. */
|
|
100
|
+
function make(geo) {
|
|
101
|
+
// Opacity is per-pulse, and opacity lives on the material — so each one owns its own.
|
|
102
|
+
const material = new THREE.MeshBasicMaterial({
|
|
103
|
+
color: 0xffffff,
|
|
104
|
+
transparent: true,
|
|
105
|
+
opacity: 0,
|
|
106
|
+
depthWrite: false,
|
|
107
|
+
// Additive, because this is light spilling off a key rather than paint on it. Depth TESTING
|
|
108
|
+
// stays on, so the shell still hides a pulse on a face turned away from the camera.
|
|
109
|
+
blending: THREE.AdditiveBlending,
|
|
110
|
+
side: THREE.DoubleSide,
|
|
111
|
+
toneMapped: false,
|
|
112
|
+
});
|
|
113
|
+
const mesh = new THREE.Mesh(geo, material);
|
|
114
|
+
mesh.visible = false;
|
|
115
|
+
// Drawn after the pad, whatever the traversal order — otherwise an additive quad can be discarded
|
|
116
|
+
// against geometry that has not been laid down yet.
|
|
117
|
+
mesh.renderOrder = 10;
|
|
118
|
+
parent.add(mesh);
|
|
119
|
+
return { mesh, material, born: 0, delay: 0, r0: 1, dim: 1, live: false };
|
|
120
|
+
}
|
|
121
|
+
/** Take a parked pulse from the burst pool, or grow the pool by one. */
|
|
122
|
+
function take() {
|
|
123
|
+
const parked = pool.find((p) => !p.live);
|
|
124
|
+
if (parked)
|
|
125
|
+
return parked;
|
|
126
|
+
const pulse = make(geometry);
|
|
127
|
+
pool.push(pulse);
|
|
128
|
+
return pulse;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Where a pulse goes for a given control, in the PAD's own coordinates.
|
|
132
|
+
*
|
|
133
|
+
* Read off the node's geometry rather than a table of positions: a stick cap hangs off a tilting
|
|
134
|
+
* pivot and a shoulder key is a wide crown pad, so "where is this control and how big is it" is a
|
|
135
|
+
* question only the mesh itself can answer. Corners go through the node's world matrix and back into
|
|
136
|
+
* the pad group's space, which survives any nesting and any rotation in between.
|
|
137
|
+
*/
|
|
138
|
+
function placement(node, facing) {
|
|
139
|
+
const mesh = node;
|
|
140
|
+
const geo = mesh.geometry;
|
|
141
|
+
if (!geo)
|
|
142
|
+
return null;
|
|
143
|
+
if (!geo.boundingBox)
|
|
144
|
+
geo.computeBoundingBox();
|
|
145
|
+
const box = geo.boundingBox;
|
|
146
|
+
if (!box)
|
|
147
|
+
return null;
|
|
148
|
+
node.updateWorldMatrix(true, false);
|
|
149
|
+
localBox.makeEmpty();
|
|
150
|
+
for (let i = 0; i < 8; i++) {
|
|
151
|
+
v.set(i & 1 ? box.max.x : box.min.x, i & 2 ? box.max.y : box.min.y, i & 4 ? box.max.z : box.min.z);
|
|
152
|
+
v.applyMatrix4(node.matrixWorld);
|
|
153
|
+
parent.worldToLocal(v);
|
|
154
|
+
localBox.expandByPoint(v);
|
|
155
|
+
}
|
|
156
|
+
const size = localBox.getSize(new THREE.Vector3());
|
|
157
|
+
const centre = localBox.getCenter(new THREE.Vector3());
|
|
158
|
+
// The SMALLER of the two in-plane dimensions. Round keys make the choice moot, but a shoulder key
|
|
159
|
+
// is a wide band across the crown, and sizing a circle off its width would throw a hoop around the
|
|
160
|
+
// whole half of the pad.
|
|
161
|
+
const r = facing === "front"
|
|
162
|
+
? Math.min(size.x, size.y) / 2
|
|
163
|
+
: Math.min(size.x, size.z) / 2;
|
|
164
|
+
if (!(r > 0))
|
|
165
|
+
return null;
|
|
166
|
+
// Sit on the surface that is actually facing the viewer, lifted clear of the dome.
|
|
167
|
+
const lift = unit * LIFT;
|
|
168
|
+
const pos = facing === "front"
|
|
169
|
+
? new THREE.Vector3(centre.x, centre.y, localBox.max.z + lift)
|
|
170
|
+
: new THREE.Vector3(centre.x, localBox.max.y + lift, centre.z);
|
|
171
|
+
return { pos, r: r * scale };
|
|
172
|
+
}
|
|
173
|
+
function spawn(node, facing, now, delay, dim = 1) {
|
|
174
|
+
const at = placement(node, facing);
|
|
175
|
+
if (!at)
|
|
176
|
+
return;
|
|
177
|
+
const p = take();
|
|
178
|
+
p.born = now;
|
|
179
|
+
p.delay = delay;
|
|
180
|
+
p.r0 = at.r;
|
|
181
|
+
p.dim = dim;
|
|
182
|
+
p.live = true;
|
|
183
|
+
p.mesh.position.copy(at.pos);
|
|
184
|
+
// The ring is authored in the XY plane, which is already the face's plane. A crown key looks UP, so
|
|
185
|
+
// its pulse is laid flat.
|
|
186
|
+
p.mesh.rotation.set(facing === "up" ? -Math.PI / 2 : 0, 0, 0);
|
|
187
|
+
p.mesh.scale.setScalar(at.r);
|
|
188
|
+
p.mesh.visible = delay === 0;
|
|
189
|
+
p.material.opacity = 0;
|
|
190
|
+
}
|
|
191
|
+
/** Park the steady ring on a key, creating it the first time that key is held. */
|
|
192
|
+
function raiseCollar(key, node, facing, now) {
|
|
193
|
+
if (!collarGeometry)
|
|
194
|
+
return;
|
|
195
|
+
const at = placement(node, facing);
|
|
196
|
+
if (!at)
|
|
197
|
+
return;
|
|
198
|
+
let c = collars.get(key);
|
|
199
|
+
if (!c) {
|
|
200
|
+
c = make(collarGeometry);
|
|
201
|
+
collars.set(key, c);
|
|
202
|
+
}
|
|
203
|
+
c.born = now;
|
|
204
|
+
c.r0 = at.r;
|
|
205
|
+
c.live = true;
|
|
206
|
+
c.mesh.position.copy(at.pos);
|
|
207
|
+
c.mesh.rotation.set(facing === "up" ? -Math.PI / 2 : 0, 0, 0);
|
|
208
|
+
c.mesh.scale.setScalar(at.r * COLLAR_SCALE);
|
|
209
|
+
c.mesh.visible = true;
|
|
210
|
+
}
|
|
211
|
+
function lowerCollar(key) {
|
|
212
|
+
const c = collars.get(key);
|
|
213
|
+
if (!c)
|
|
214
|
+
return;
|
|
215
|
+
c.live = false;
|
|
216
|
+
c.mesh.visible = false;
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
fire(key, node, facing) {
|
|
220
|
+
const now = performance.now();
|
|
221
|
+
spawn(node, facing, now, 0);
|
|
222
|
+
// The sonar's signature is the pair, not the repeat — the repeat is the hold's job now.
|
|
223
|
+
if (style === "sonar")
|
|
224
|
+
spawn(node, facing, now, SONAR_STAGGER);
|
|
225
|
+
if (hold === "echo")
|
|
226
|
+
held.set(key, { node, facing, nextAt: now + HOLD_ECHO_MS });
|
|
227
|
+
else if (hold === "collar") {
|
|
228
|
+
held.set(key, { node, facing, nextAt: 0 });
|
|
229
|
+
raiseCollar(key, node, facing, now);
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
release(key) {
|
|
233
|
+
held.delete(key);
|
|
234
|
+
lowerCollar(key);
|
|
235
|
+
},
|
|
236
|
+
cancelAll() {
|
|
237
|
+
held.clear();
|
|
238
|
+
for (const p of pool) {
|
|
239
|
+
p.live = false;
|
|
240
|
+
p.mesh.visible = false;
|
|
241
|
+
}
|
|
242
|
+
for (const key of collars.keys())
|
|
243
|
+
lowerCollar(key);
|
|
244
|
+
},
|
|
245
|
+
step(now) {
|
|
246
|
+
// A held key murmurs: the same pulse again, quieter, on a slower clock than a press.
|
|
247
|
+
if (hold === "echo") {
|
|
248
|
+
for (const h of held.values()) {
|
|
249
|
+
if (now >= h.nextAt) {
|
|
250
|
+
spawn(h.node, h.facing, now, 0, ECHO_DIM);
|
|
251
|
+
if (style === "sonar")
|
|
252
|
+
spawn(h.node, h.facing, now, SONAR_STAGGER, ECHO_DIM);
|
|
253
|
+
h.nextAt = now + HOLD_ECHO_MS;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// The collar does not repeat — it is one ring that stays and breathes.
|
|
258
|
+
for (const c of collars.values()) {
|
|
259
|
+
if (!c.live)
|
|
260
|
+
continue;
|
|
261
|
+
const phase = ((now - c.born) % COLLAR_BREATH_MS) / COLLAR_BREATH_MS;
|
|
262
|
+
const breath = 0.5 - 0.5 * Math.cos(phase * Math.PI * 2);
|
|
263
|
+
c.material.opacity = COLLAR_MIN + (COLLAR_MAX - COLLAR_MIN) * breath;
|
|
264
|
+
}
|
|
265
|
+
let alive = held.size > 0;
|
|
266
|
+
for (const p of pool) {
|
|
267
|
+
if (!p.live)
|
|
268
|
+
continue;
|
|
269
|
+
const t = (now - p.born - p.delay) / ms;
|
|
270
|
+
if (t < 0) {
|
|
271
|
+
alive = true;
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
if (t >= 1) {
|
|
275
|
+
p.live = false;
|
|
276
|
+
p.mesh.visible = false;
|
|
277
|
+
p.material.opacity = 0;
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
alive = true;
|
|
281
|
+
const e = easeOut(t);
|
|
282
|
+
p.mesh.visible = true;
|
|
283
|
+
if (style === "flash") {
|
|
284
|
+
// Opens wide on the strike and CLOSES back onto the key, which is why it never spills.
|
|
285
|
+
p.mesh.scale.setScalar(p.r0 * (1.7 - 0.7 * e));
|
|
286
|
+
p.material.opacity = PEAK.flash * Math.pow(1 - e, 1.5) * p.dim;
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
// Leaves the key's edge and swells away from it.
|
|
290
|
+
p.mesh.scale.setScalar(p.r0 * (1 + (style === "sonar" ? 1.35 : 1.1) * e));
|
|
291
|
+
p.material.opacity = PEAK[style] * (1 - e) * p.dim;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return alive;
|
|
295
|
+
},
|
|
296
|
+
dispose() {
|
|
297
|
+
for (const p of [...pool, ...collars.values()]) {
|
|
298
|
+
parent.remove(p.mesh);
|
|
299
|
+
p.material.dispose();
|
|
300
|
+
}
|
|
301
|
+
pool.length = 0;
|
|
302
|
+
collars.clear();
|
|
303
|
+
held.clear();
|
|
304
|
+
geometry.dispose();
|
|
305
|
+
collarGeometry?.dispose();
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
//# sourceMappingURL=press-pulse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"press-pulse.js","sourceRoot":"","sources":["../../../src/three/controller/press-pulse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4D/B,kGAAkG;AAClG,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,wFAAwF;AACxF,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,sGAAsG;AACtG,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;GAOG;AACH,MAAM,IAAI,GAAG,KAAK,CAAC;AACnB,oDAAoD;AACpD,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,sGAAsG;AACtG,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,0GAA0G;AAC1G,MAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB,uFAAuF;AACvF,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,yEAAyE;AACzE,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,oGAAoG;AACpG,MAAM,IAAI,GAA+D;IACvE,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,GAAG;CACX,CAAC;AAyBF,iGAAiG;AACjG,SAAS,OAAO,CAAC,CAAS;IACxB,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,I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,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;gBACjE,CAAC;qBAAM,CAAC;oBACN,iDAAiD;oBACjD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC1E,CAAC,CAAC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;gBACrD,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO;YACL,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;gBAC/C,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBACtB,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YAChB,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,cAAc,EAAE,OAAO,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -13,6 +13,15 @@
|
|
|
13
13
|
* captions and the guided lesson's gating all work against it **unchanged** — none of them knows or
|
|
14
14
|
* cares that there is a WebGL canvas where an `<svg>` used to be.
|
|
15
15
|
*
|
|
16
|
+
* ## What this file is, and what it is not
|
|
17
|
+
*
|
|
18
|
+
* It is the FRAMING half: a canvas, a camera, a rule for fitting the pad into it, a dirty-guarded
|
|
19
|
+
* render loop, and the projection that answers "where is this key on screen". Everything the pad
|
|
20
|
+
* actually *does* — lighting a key, sinking it, pulsing, leaning a stick, rolling to show a trigger —
|
|
21
|
+
* lives in {@link createJoyconObject}, which a game can also use on its own to put the pad in its own
|
|
22
|
+
* scene. Both paths animate through that one implementation on purpose: a press must not look one way
|
|
23
|
+
* in a HUD and another way in a world.
|
|
24
|
+
*
|
|
16
25
|
* ## What the third dimension actually buys
|
|
17
26
|
*
|
|
18
27
|
* Two things the flat pad could not say:
|
|
@@ -38,28 +47,8 @@
|
|
|
38
47
|
*/
|
|
39
48
|
import { type PadRenderer, type PadRendererOptions } from "../../ui/controller/renderer.js";
|
|
40
49
|
import type { PadLayout } from "../../ui/controller/types.js";
|
|
41
|
-
import { type
|
|
42
|
-
export interface ThreePadRendererOptions extends PadRendererOptions {
|
|
43
|
-
/** Which art direction to draw. Default `"toy"` — the one built for reading at a distance. */
|
|
44
|
-
design?: JoyconDesignId;
|
|
45
|
-
/** Forward tilt in radians. Default {@link VIEW.pitch}. */
|
|
46
|
-
tilt?: number;
|
|
47
|
-
/** Turn about the vertical axis, radians. Default 0 — head-on. */
|
|
48
|
-
yaw?: number;
|
|
49
|
-
/**
|
|
50
|
-
* Extra forward tilt applied while a TRIGGER is being shown, radians. Default 0.38 (~22°).
|
|
51
|
-
*
|
|
52
|
-
* This is the reason the pad is modelled in 3D at all. `ZL`/`ZR` sit on the back of the crown: from
|
|
53
|
-
* the reading angle they are edge-on, and a view teaching one would be pointing at a sliver. When a
|
|
54
|
-
* trigger lights, the pad rolls forward so the top face — and the key — come into view, then rolls
|
|
55
|
-
* back when it is released. The flat pad had to draw the triggers floating above the shell instead,
|
|
56
|
-
* which is a picture of a controller that does not exist.
|
|
57
|
-
*
|
|
58
|
-
* Set to 0 to pin the pad still.
|
|
59
|
-
*/
|
|
60
|
-
triggerTilt?: number;
|
|
61
|
-
/** Seconds the roll takes, each way. Default 0.42. */
|
|
62
|
-
triggerTiltMs?: number;
|
|
50
|
+
import { type JoyconObjectOptions } from "./joycon-object.js";
|
|
51
|
+
export interface ThreePadRendererOptions extends PadRendererOptions, JoyconObjectOptions {
|
|
63
52
|
/**
|
|
64
53
|
* How much of the frame the pad fills, 0…1. Default 0.82.
|
|
65
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"three-pad-renderer.d.ts","sourceRoot":"","sources":["../../../src/three/controller/three-pad-renderer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"three-pad-renderer.d.ts","sourceRoot":"","sources":["../../../src/three/controller/three-pad-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EAExB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAQlF,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB,EAAE,mBAAmB;IACtF;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+FAA+F;IAC/F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE,uBAA4B,GACjC,WAAW,CA+Kb"}
|