tosijs-3d 0.10.13 → 0.10.14
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/CHANGELOG.md +20 -0
- package/dist/b3d-aircraft.js +2 -2
- package/dist/b3d-biped.d.ts +28 -27
- package/dist/b3d-biped.d.ts.map +1 -1
- package/dist/b3d-biped.js +36 -35
- package/dist/b3d-biped.js.map +1 -1
- package/dist/b3d-exploder.js +2 -2
- package/dist/b3d-galaxy.js +2 -2
- package/dist/b3d-hud.js +1 -1
- package/dist/b3d-launcher.js +1 -1
- package/dist/b3d-library.js +1 -1
- package/dist/b3d-light-shafts.js +2 -2
- package/dist/b3d-lightning.js +1 -1
- package/dist/b3d-moon.d.ts.map +1 -1
- package/dist/b3d-moon.js +3 -2
- package/dist/b3d-moon.js.map +1 -1
- package/dist/b3d-panel.d.ts.map +1 -1
- package/dist/b3d-panel.js +11 -10
- package/dist/b3d-panel.js.map +1 -1
- package/dist/b3d-physics.js +2 -2
- package/dist/b3d-planet.js +2 -2
- package/dist/b3d-sound.js +2 -2
- package/dist/b3d-ssao.d.ts +6 -3
- package/dist/b3d-ssao.d.ts.map +1 -1
- package/dist/b3d-ssao.js +6 -3
- package/dist/b3d-ssao.js.map +1 -1
- package/dist/b3d-terrain.js +4 -4
- package/dist/b3d-warhead.js +1 -1
- package/dist/biome-chart.js +1 -1
- package/dist/control-input.d.ts +5 -3
- package/dist/control-input.d.ts.map +1 -1
- package/dist/control-input.js +1 -1
- package/dist/control-input.js.map +1 -1
- package/dist/frame-panel.d.ts.map +1 -1
- package/dist/frame-panel.js +6 -3
- package/dist/frame-panel.js.map +1 -1
- package/dist/galaxy-data.d.ts +2 -2
- package/dist/game-controller.d.ts +2 -1
- package/dist/game-controller.d.ts.map +1 -1
- package/dist/game-controller.js +9 -5
- package/dist/game-controller.js.map +1 -1
- package/dist/land-and-sky.js +2 -2
- package/dist/landform.d.ts +2 -3
- package/dist/landform.d.ts.map +1 -1
- package/dist/landform.js.map +1 -1
- package/dist/playground.js +3 -3
- package/dist/scene-schemas.d.ts +2 -2
- package/dist/scene-schemas.js +2 -2
- package/dist/svg-icons.d.ts +12 -0
- package/dist/svg-icons.d.ts.map +1 -1
- package/dist/svg-icons.js +12 -11
- package/dist/svg-icons.js.map +1 -1
- package/dist/tosi-b3d.d.ts +12 -2
- package/dist/tosi-b3d.d.ts.map +1 -1
- package/dist/tosi-b3d.js +53 -24
- package/dist/tosi-b3d.js.map +1 -1
- package/dist/virtual-gamepad.js +1 -1
- package/dist/widgets3d.d.ts +18 -8
- package/dist/widgets3d.d.ts.map +1 -1
- package/dist/widgets3d.js +65 -29
- package/dist/widgets3d.js.map +1 -1
- package/package.json +1 -1
- package/static/attributes.json +10 -10
- package/static/attributes.txt +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,26 @@ All notable changes to **tosijs-3d**. This project is pre-1.0 (`0.x`), so minor
|
|
|
6
6
|
versions may carry breaking peer-dependency changes — each is called out in a
|
|
7
7
|
**⚠️ Breaking** block in its version section below, with what a consumer must do.
|
|
8
8
|
|
|
9
|
+
## 0.10.14
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **A press during a system panel's content swap is no longer lost** (#111 follow-up, ensemble). Setting `el.svg = next` on an open panel closed and reopened it, which left a moment with no plane: a click landing then went nowhere (ensemble's host-actions test failed one run in four after a store refresh swapped every panel's content), and `contentToClient` returned null. A framed panel (the default title bar) now swaps the content under the same frame, so the plane, texture, spot and focus stay. `panelopen` still goes to the old content (close) and the new (open). A press already down in the old content ends there rather than releasing onto the new. `chrome="none"` panels still close and reopen.
|
|
14
|
+
- **The docs a consumer reads describe what the code does** (#116, ensemble). `select3d`'s JSDoc called it "a compact cycler, no dropdown" five releases after it became a select that opens a list (it steps only with no host). A sweep of every behaviour change in this CHANGELOG against the shipped docs found 33 more, fixed against the code:
|
|
15
|
+
- The settings panel is the owl's in-scene panel, not a gear and an HTML overlay (about 20 pages, and the `scenePanel` property).
|
|
16
|
+
- `gameController`'s key map: the wheel zooms (the d-pad axis), the arrows look, the mouse buttons are listed, `mouseLook` defaults to `'off'`.
|
|
17
|
+
- `b3dBiped`: the camera defaults in its table, `invertLookY` is off by default, `jumpSpeed` has no wind-up, `wadeDepth`'s swim thresholds (in at 1.3 ×, out at 1 ×).
|
|
18
|
+
- SSAO runs in a headset with `on` and the default `projected` method (three type docs and a console warning said never).
|
|
19
|
+
- `slider3d`'s peek readout sits beside the label; `panel3d`'s gap is 4.
|
|
20
|
+
- Frame-panel presets are angular, and frame panels can show flat; `b3d-moon` lights the night; planets have no separate sea sphere; the loadout is on the system bar; `lookX`/`lookY` persist on foot; `gamepadFade` ignores the pointer; the aircraft's `maxSpeed` is full lever; `GulleyOptions.heading` is degrees; `iconGlyph` takes composed and mirrored names; `biomeLapseRate`'s auto value is a fixed 0.004.
|
|
21
|
+
- Two doc comments had come loose from their declarations (`iconGlyph`'s sat on a private constant, `wadeDepth`'s on the wrong attribute), so the `.d.ts` documented the wrong thing.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **`titled3d(…).setContent(next)`**: other content under the same title bar, in place (the old content goes back where it came from).
|
|
26
|
+
|
|
27
|
+
Size: barrel (min, packages external) 1158.6 KB raw / 396.5 KB gz, +0.05% on 0.10.13.
|
|
28
|
+
|
|
9
29
|
## 0.10.13
|
|
10
30
|
|
|
11
31
|
### Fixed
|
package/dist/b3d-aircraft.js
CHANGED
|
@@ -60,7 +60,7 @@ const targets = [...air, ...ground]
|
|
|
60
60
|
const kills = div({ class: 'kills' }, `Targets down: 0 / ${targets.length}`)
|
|
61
61
|
// WEATHER, to fly in: a storm cell over the whole arena (storminess shakes
|
|
62
62
|
// the airframe) and the scene's wind (it carries you; blowing east, across
|
|
63
|
-
// your starting heading, so you crab). Both on the
|
|
63
|
+
// your starting heading, so you crab). Both on the settings panel.
|
|
64
64
|
const storm = b3dWeatherCell({ x: 0, z: 0, radius: 3000, storminess: 0 })
|
|
65
65
|
const turb = div({ class: 'turb' }, 'turbulence 0.00')
|
|
66
66
|
let down = 0
|
|
@@ -210,7 +210,7 @@ turns the pilot's head in the cockpit, springs back on release).
|
|
|
210
210
|
| `library` | `''` | Library type to source mesh from |
|
|
211
211
|
| `meshName` | `''` | Node name to instantiate from library |
|
|
212
212
|
| `enterable` | `false` | Whether a biped can enter |
|
|
213
|
-
| `maxSpeed` | `50` |
|
|
213
|
+
| `maxSpeed` | `50` | Top speed at full lever, **military** thrust (m/s). A released trigger leaves the lever where it was, so speed settles wherever that lever meets drag |
|
|
214
214
|
| `afterburnerSpeed` | `75` | Speed ceiling while the throttle is held past `maxSpeed`; releasing bleeds back to `maxSpeed`. ≤ `maxSpeed` disables afterburner. |
|
|
215
215
|
| `acceleration` | `12` | Throttle / lean authority (speed change rate) |
|
|
216
216
|
| `vtolSpeed` | `6` | Forward ground speed splitting hover (below) from plane (above). 0 = pure aeroplane, no hover regime. |
|
package/dist/b3d-biped.d.ts
CHANGED
|
@@ -94,16 +94,6 @@ export declare class B3dBiped extends B3dControllable {
|
|
|
94
94
|
aimMaxYaw: number;
|
|
95
95
|
/** How far up/down the look can go, degrees. */
|
|
96
96
|
maxLookPitch: number;
|
|
97
|
-
/**
|
|
98
|
-
* Invert the right stick's vertical. **On by default** — Tonio's call, and
|
|
99
|
-
* the conventional one for a third-person camera: pushing the stick away
|
|
100
|
-
* from you tips the view DOWN, the way a physical camera head works. Set
|
|
101
|
-
* `'off'` for the direct mapping.
|
|
102
|
-
*
|
|
103
|
-
* A string enum rather than a boolean because an absent boolean attribute
|
|
104
|
-
* is false, so a default-true boolean can never turn on (and tosijs now
|
|
105
|
-
* throws on one) — see CLAUDE.md.
|
|
106
|
-
*/
|
|
107
97
|
/**
|
|
108
98
|
* How far in FRONT of the head bone the first-person eye sits, in metres.
|
|
109
99
|
*
|
|
@@ -112,6 +102,15 @@ export declare class B3dBiped extends B3dControllable {
|
|
|
112
102
|
* which is what makes a too-large value feel like floating.
|
|
113
103
|
*/
|
|
114
104
|
eyeForward: number;
|
|
105
|
+
/**
|
|
106
|
+
* Invert the right stick's vertical. **Off by default**: pushing the stick
|
|
107
|
+
* up looks (and aims) up. `'on'` gives the inverted, aircraft-style mapping,
|
|
108
|
+
* where pushing the stick away tips the view down.
|
|
109
|
+
*
|
|
110
|
+
* A string enum rather than a boolean because an absent boolean attribute
|
|
111
|
+
* is false, so a default-true boolean can never turn on (and tosijs now
|
|
112
|
+
* throws on one) — see CLAUDE.md.
|
|
113
|
+
*/
|
|
115
114
|
invertLookY: "on" | "off";
|
|
116
115
|
/**
|
|
117
116
|
* Never let the follow camera drop below this above the character's feet.
|
|
@@ -121,10 +120,10 @@ export declare class B3dBiped extends B3dControllable {
|
|
|
121
120
|
*/
|
|
122
121
|
cameraMinHeight: number;
|
|
123
122
|
/**
|
|
124
|
-
* Upward speed
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
123
|
+
* Upward speed at take-off, m/s. The jump is instant (no wind-up), and the
|
|
124
|
+
* physics decides it: the start, loop and land clips each play for as long
|
|
125
|
+
* as they are true, so the jump is never a consequence of whatever the
|
|
126
|
+
* animator exported.
|
|
128
127
|
*/
|
|
129
128
|
jumpSpeed: number;
|
|
130
129
|
/** Fraction of walking speed while sneaking. */
|
|
@@ -143,6 +142,17 @@ export declare class B3dBiped extends B3dControllable {
|
|
|
143
142
|
* A string enum rather than a boolean because a boolean attribute cannot
|
|
144
143
|
* default to true, and the useful default here is "strafing off".
|
|
145
144
|
*/
|
|
145
|
+
/**
|
|
146
|
+
* **How high a ledge the character can pull itself onto, metres.** Below
|
|
147
|
+
* `STEP_UP` (0.5) the walking code just steps up; above this it is a wall.
|
|
148
|
+
*
|
|
149
|
+
* `2.2` is a touch over shoulder height on a 1.83 m rig — a decent mantle
|
|
150
|
+
* for someone athletic. Lower it for a heavier or clumsier character; that
|
|
151
|
+
* is the mobility half of the skill dial AI-DESIGN argues for, and it costs
|
|
152
|
+
* nothing to expose because the band it defines is read from geometry
|
|
153
|
+
* rather than painted onto it.
|
|
154
|
+
*/
|
|
155
|
+
climbReach: number;
|
|
146
156
|
/**
|
|
147
157
|
* **How deep the water gets before you swim, as a fraction of standing
|
|
148
158
|
* height.** Below this you wade — feet on the bottom, walking; above it
|
|
@@ -158,20 +168,11 @@ export declare class B3dBiped extends B3dControllable {
|
|
|
158
168
|
* fraction tracks that for free. Metres would be right for a fact about the
|
|
159
169
|
* WORLD; the two are easy to confuse and worth keeping apart.
|
|
160
170
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
171
|
+
* Hysteresis, so the boundary does not flicker: you START swimming a bit
|
|
172
|
+
* deeper than this (1.3 × `wadeDepth`, about 0.59 of your height at the
|
|
173
|
+
* default) and stop once the water drops back to `wadeDepth` itself; see
|
|
174
|
+
* `buoyancy.isSwimming`.
|
|
163
175
|
*/
|
|
164
|
-
/**
|
|
165
|
-
* **How high a ledge the character can pull itself onto, metres.** Below
|
|
166
|
-
* `STEP_UP` (0.5) the walking code just steps up; above this it is a wall.
|
|
167
|
-
*
|
|
168
|
-
* `2.2` is a touch over shoulder height on a 1.83 m rig — a decent mantle
|
|
169
|
-
* for someone athletic. Lower it for a heavier or clumsier character; that
|
|
170
|
-
* is the mobility half of the skill dial AI-DESIGN argues for, and it costs
|
|
171
|
-
* nothing to expose because the band it defines is read from geometry
|
|
172
|
-
* rather than painted onto it.
|
|
173
|
-
*/
|
|
174
|
-
climbReach: number;
|
|
175
176
|
wadeDepth: number;
|
|
176
177
|
strafing: string;
|
|
177
178
|
/**
|
package/dist/b3d-biped.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"b3d-biped.d.ts","sourceRoot":"","sources":["../src/b3d-biped.ts"],"names":[],"mappings":"AAkOA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,OAAO,EAKR,MAAM,gBAAgB,CAAA;AAyBvB,OA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B,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK;IA+F3C,YAAY;IAiCZ,MAAM;CA6BP;AAED,eAAO,MAAM,QAAQ,2CAA4B,CAAA"}
|
package/dist/b3d-biped.js
CHANGED
|
@@ -190,10 +190,10 @@ preview.append(
|
|
|
190
190
|
| `forwardSpeed` | `2` | Walk speed |
|
|
191
191
|
| `runSpeed` | `5` | Sprint speed |
|
|
192
192
|
| `backwardSpeed` | `1` | Backward speed |
|
|
193
|
-
| `cameraHeightOffset` | `
|
|
194
|
-
| `cameraTargetHeight` | `
|
|
195
|
-
| `cameraMinFollowDistance` | `
|
|
196
|
-
| `cameraMaxFollowDistance` | `
|
|
193
|
+
| `cameraHeightOffset` | `2` | Camera height above target |
|
|
194
|
+
| `cameraTargetHeight` | `1.4` | Height of the point the camera looks at |
|
|
195
|
+
| `cameraMinFollowDistance` | `4` | Closest follow distance |
|
|
196
|
+
| `cameraMaxFollowDistance` | `10` | Furthest follow distance |
|
|
197
197
|
|
|
198
198
|
## Animations
|
|
199
199
|
|
|
@@ -473,16 +473,6 @@ export class B3dBiped extends B3dControllable {
|
|
|
473
473
|
aimMaxYaw: 90,
|
|
474
474
|
/** How far up/down the look can go, degrees. */
|
|
475
475
|
maxLookPitch: 70,
|
|
476
|
-
/**
|
|
477
|
-
* Invert the right stick's vertical. **On by default** — Tonio's call, and
|
|
478
|
-
* the conventional one for a third-person camera: pushing the stick away
|
|
479
|
-
* from you tips the view DOWN, the way a physical camera head works. Set
|
|
480
|
-
* `'off'` for the direct mapping.
|
|
481
|
-
*
|
|
482
|
-
* A string enum rather than a boolean because an absent boolean attribute
|
|
483
|
-
* is false, so a default-true boolean can never turn on (and tosijs now
|
|
484
|
-
* throws on one) — see CLAUDE.md.
|
|
485
|
-
*/
|
|
486
476
|
/*
|
|
487
477
|
NOT INVERTED, which is a changed default and the direct cause of a bug
|
|
488
478
|
report: "when I fire it just fires into my feet".
|
|
@@ -506,6 +496,15 @@ export class B3dBiped extends B3dControllable {
|
|
|
506
496
|
* which is what makes a too-large value feel like floating.
|
|
507
497
|
*/
|
|
508
498
|
eyeForward: 0.13,
|
|
499
|
+
/**
|
|
500
|
+
* Invert the right stick's vertical. **Off by default**: pushing the stick
|
|
501
|
+
* up looks (and aims) up. `'on'` gives the inverted, aircraft-style mapping,
|
|
502
|
+
* where pushing the stick away tips the view down.
|
|
503
|
+
*
|
|
504
|
+
* A string enum rather than a boolean because an absent boolean attribute
|
|
505
|
+
* is false, so a default-true boolean can never turn on (and tosijs now
|
|
506
|
+
* throws on one) — see CLAUDE.md.
|
|
507
|
+
*/
|
|
509
508
|
invertLookY: 'off',
|
|
510
509
|
/**
|
|
511
510
|
* Never let the follow camera drop below this above the character's feet.
|
|
@@ -515,10 +514,10 @@ export class B3dBiped extends B3dControllable {
|
|
|
515
514
|
*/
|
|
516
515
|
cameraMinHeight: 0.5,
|
|
517
516
|
/**
|
|
518
|
-
* Upward speed
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
517
|
+
* Upward speed at take-off, m/s. The jump is instant (no wind-up), and the
|
|
518
|
+
* physics decides it: the start, loop and land clips each play for as long
|
|
519
|
+
* as they are true, so the jump is never a consequence of whatever the
|
|
520
|
+
* animator exported.
|
|
522
521
|
*/
|
|
523
522
|
jumpSpeed: 4.5,
|
|
524
523
|
/** Fraction of walking speed while sneaking. */
|
|
@@ -537,6 +536,17 @@ export class B3dBiped extends B3dControllable {
|
|
|
537
536
|
* A string enum rather than a boolean because a boolean attribute cannot
|
|
538
537
|
* default to true, and the useful default here is "strafing off".
|
|
539
538
|
*/
|
|
539
|
+
/**
|
|
540
|
+
* **How high a ledge the character can pull itself onto, metres.** Below
|
|
541
|
+
* `STEP_UP` (0.5) the walking code just steps up; above this it is a wall.
|
|
542
|
+
*
|
|
543
|
+
* `2.2` is a touch over shoulder height on a 1.83 m rig — a decent mantle
|
|
544
|
+
* for someone athletic. Lower it for a heavier or clumsier character; that
|
|
545
|
+
* is the mobility half of the skill dial AI-DESIGN argues for, and it costs
|
|
546
|
+
* nothing to expose because the band it defines is read from geometry
|
|
547
|
+
* rather than painted onto it.
|
|
548
|
+
*/
|
|
549
|
+
climbReach: 2.2,
|
|
540
550
|
/**
|
|
541
551
|
* **How deep the water gets before you swim, as a fraction of standing
|
|
542
552
|
* height.** Below this you wade — feet on the bottom, walking; above it
|
|
@@ -552,20 +562,11 @@ export class B3dBiped extends B3dControllable {
|
|
|
552
562
|
* fraction tracks that for free. Metres would be right for a fact about the
|
|
553
563
|
* WORLD; the two are easy to confuse and worth keeping apart.
|
|
554
564
|
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
565
|
+
* Hysteresis, so the boundary does not flicker: you START swimming a bit
|
|
566
|
+
* deeper than this (1.3 × `wadeDepth`, about 0.59 of your height at the
|
|
567
|
+
* default) and stop once the water drops back to `wadeDepth` itself; see
|
|
568
|
+
* `buoyancy.isSwimming`.
|
|
557
569
|
*/
|
|
558
|
-
/**
|
|
559
|
-
* **How high a ledge the character can pull itself onto, metres.** Below
|
|
560
|
-
* `STEP_UP` (0.5) the walking code just steps up; above this it is a wall.
|
|
561
|
-
*
|
|
562
|
-
* `2.2` is a touch over shoulder height on a 1.83 m rig — a decent mantle
|
|
563
|
-
* for someone athletic. Lower it for a heavier or clumsier character; that
|
|
564
|
-
* is the mobility half of the skill dial AI-DESIGN argues for, and it costs
|
|
565
|
-
* nothing to expose because the band it defines is read from geometry
|
|
566
|
-
* rather than painted onto it.
|
|
567
|
-
*/
|
|
568
|
-
climbReach: 2.2,
|
|
569
570
|
wadeDepth: 0.45,
|
|
570
571
|
strafing: 'off',
|
|
571
572
|
/**
|
|
@@ -2369,10 +2370,10 @@ export class B3dBiped extends B3dControllable {
|
|
|
2369
2370
|
mid-torso, so measuring from it asks "how deep would it be if I
|
|
2370
2371
|
stood with my feet where my chest is".
|
|
2371
2372
|
|
|
2372
|
-
Scaled so `wadeDepth` lands
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
as the fraction it is.
|
|
2373
|
+
Scaled so `wadeDepth` lands on `isSwimming`'s 0.5 EXIT threshold:
|
|
2374
|
+
you start swimming at 1.3 × wadeDepth (its 0.65 entry) and stop at
|
|
2375
|
+
wadeDepth, which keeps that model's tested hysteresis while letting
|
|
2376
|
+
the threshold be stated as the fraction it is.
|
|
2376
2377
|
*/
|
|
2377
2378
|
submergedFraction(groundY, standHeight, surfaceY) /
|
|
2378
2379
|
(2 * Math.max(0.05, attrs.wadeDepth))
|