@johnmorrisdotca/kyogijo-stadiums 0.44.0 → 0.44.1
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 +6 -0
- package/dist/turn.camera.d.ts +5 -0
- package/dist/turn.camera.js +5 -0
- package/dist/turn.dom.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ All notable changes to this project are written here. The format follows
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.44.1] - 2026-10-28
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **The wheel over a focused 3D view tips it the way a drag does**: the wheel up lifts the near edge of the surface toward the viewer, like a drag up (it did the opposite, so the wheel and the hand disagreed), and the wheel down lowers it. A drag, the arrow keys and the "Tip the surface away" and "Tip the surface toward you" buttons already agreed (up lifts the near edge); a test now holds all four to one direction, and a finger that is let to turn tips it as a mouse does. Left and right are unchanged. The `pitch` of a view, in the address and in `TurnView`, keeps its meaning.
|
|
15
|
+
|
|
10
16
|
## [0.44.0] - 2026-10-22
|
|
11
17
|
|
|
12
18
|
### Added
|
package/dist/turn.camera.d.ts
CHANGED
|
@@ -78,6 +78,11 @@ export declare function nudge(view: TurnView, toward: TurnToward, amount: number
|
|
|
78
78
|
* yaw falls) and a drag down tips the top toward the eye (the pitch falls).
|
|
79
79
|
*/
|
|
80
80
|
export declare function drag(view: TurnView, dx: number, dy: number, tilt?: boolean, degreesPerPixel?: number): TurnView;
|
|
81
|
+
/**
|
|
82
|
+
* The view after the wheel turns by `deltaY` (positive is down, as `WheelEvent.deltaY` says) while the view has focus: the wheel up tips the surface as a drag up does (the near edge goes up, the
|
|
83
|
+
* front is lifted: the pitch rises) and the wheel down as a drag down does.
|
|
84
|
+
*/
|
|
85
|
+
export declare const wheelTip: (view: TurnView, deltaY: number) => TurnView;
|
|
81
86
|
/** A box in the scene, in pixels from the scene's middle, the floor at `z0` and the highest thing at `z1`. */
|
|
82
87
|
export interface Box3 {
|
|
83
88
|
x0: number;
|
package/dist/turn.camera.js
CHANGED
|
@@ -100,6 +100,11 @@ export function nudge(view, toward, amount) {
|
|
|
100
100
|
export function drag(view, dx, dy, tilt = true, degreesPerPixel = 0.4) {
|
|
101
101
|
return clampView({ ...view, yaw: view.yaw - dx * degreesPerPixel, pitch: tilt ? view.pitch - dy * degreesPerPixel * 0.75 : view.pitch });
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* The view after the wheel turns by `deltaY` (positive is down, as `WheelEvent.deltaY` says) while the view has focus: the wheel up tips the surface as a drag up does (the near edge goes up, the
|
|
105
|
+
* front is lifted: the pitch rises) and the wheel down as a drag down does.
|
|
106
|
+
*/
|
|
107
|
+
export const wheelTip = (view, deltaY) => clampView({ ...view, pitch: view.pitch - deltaY * 0.15 });
|
|
103
108
|
const RAD = Math.PI / 180;
|
|
104
109
|
/** Where a point of the scene falls on the screen, in pixels from the middle of the container, when the scene is placed as given and the eye is `distance` pixels away. */
|
|
105
110
|
export function project(point, view, at, distance) {
|
package/dist/turn.dom.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// reduced motion gets jumps for glides, and where the browser cannot draw in 3D the flat drawing stays. Nothing is polled and nothing runs while the view is
|
|
4
4
|
// still: the elements' `transform`s are written when the view changes, and a glide between viewpoints is a short run of animation frames.
|
|
5
5
|
import { drawKyogijo } from "./draw.js";
|
|
6
|
-
import { STEP, TURN_PRESET_NAMES, clampView, drag, nearest, nudge, presetOf, presetView, step, turnDirection } from "./turn.camera.js";
|
|
6
|
+
import { STEP, TURN_PRESET_NAMES, clampView, drag, nearest, nudge, presetOf, presetView, step, turnDirection, wheelTip } from "./turn.camera.js";
|
|
7
7
|
import { buildTurn, floorOptions, openingView, turnWords } from "./turn.model.js";
|
|
8
8
|
import { controlsMarkup, layoutOf, turnMarkupOf, worldMarkup } from "./turn.markup.js";
|
|
9
9
|
import { KYOGIJO_TURN_STYLE } from "./turn.style.js";
|
|
@@ -438,7 +438,7 @@ export function mountTurn(host, options, settings, build) {
|
|
|
438
438
|
else if (doc.activeElement === stage) {
|
|
439
439
|
event.preventDefault();
|
|
440
440
|
grab();
|
|
441
|
-
view = event.shiftKey || Math.abs(event.deltaX) > Math.abs(event.deltaY) ? clampView({ ...view, yaw: view.yaw + (event.deltaX || event.deltaY) * 0.25 }) :
|
|
441
|
+
view = event.shiftKey || Math.abs(event.deltaX) > Math.abs(event.deltaY) ? clampView({ ...view, yaw: view.yaw + (event.deltaX || event.deltaY) * 0.25 }) : wheelTip(view, event.deltaY);
|
|
442
442
|
}
|
|
443
443
|
else
|
|
444
444
|
return;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The package's version: the same as package.json's, and a test holds them to each other. */
|
|
2
|
-
export declare const VERSION = "0.44.
|
|
2
|
+
export declare const VERSION = "0.44.1";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The package's version: the same as package.json's, and a test holds them to each other. */
|
|
2
|
-
export const VERSION = "0.44.
|
|
2
|
+
export const VERSION = "0.44.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/kyogijo-stadiums",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.1",
|
|
4
4
|
"description": "Kyogijo Stadiums 競技場, 40 sports' surfaces as SVG, drawn to scale from the rulebooks: NFL, CFL and IFAF football fields, an NHL rink, an NBA court, MLB ballparks, soccer pitches, curling sheets, athletics stadiums, speed skating, short track and figure skating rinks, swimming pools, water polo fields, diving wells, artistic swimming areas, and the courts and fields of tennis, volleyball (indoor, beach and sitting), badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet, netball, lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey and handball, and the budo of judo, karate, kendo, sumo and kyudo with a dojo of tatami laid as real units, the MMA cage, with each team's name and logo on its side and the score in the middle, stands and a crowd, a pageant of flags, and a 3D view. Light and dark, accessible, a compact badge for lists, a helper for React and a custom element. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sports",
|