postext-folio 0.52.1 → 0.52.3
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/pageFlip/constants.d.ts +28 -0
- package/dist/pageFlip/constants.d.ts.map +1 -0
- package/dist/pageFlip/constants.js +31 -0
- package/dist/pageFlip/constants.js.map +1 -0
- package/dist/pageFlip/leaf.d.ts +125 -0
- package/dist/pageFlip/leaf.d.ts.map +1 -0
- package/dist/pageFlip/leaf.js +327 -0
- package/dist/pageFlip/leaf.js.map +1 -0
- package/dist/pageFlip/materials.d.ts +176 -0
- package/dist/pageFlip/materials.d.ts.map +1 -0
- package/dist/pageFlip/materials.js +362 -0
- package/dist/pageFlip/materials.js.map +1 -0
- package/dist/pageFlip/occlusion.d.ts +44 -0
- package/dist/pageFlip/occlusion.d.ts.map +1 -0
- package/dist/pageFlip/occlusion.js +202 -0
- package/dist/pageFlip/occlusion.js.map +1 -0
- package/dist/pageFlip.d.ts +4 -73
- package/dist/pageFlip.d.ts.map +1 -1
- package/dist/pageFlip.js +20 -911
- package/dist/pageFlip.js.map +1 -1
- package/dist/pageFlipFlat/leaf.d.ts +79 -0
- package/dist/pageFlipFlat/leaf.d.ts.map +1 -0
- package/dist/pageFlipFlat/leaf.js +100 -0
- package/dist/pageFlipFlat/leaf.js.map +1 -0
- package/dist/pageFlipFlat/shaders.d.ts +30 -0
- package/dist/pageFlipFlat/shaders.d.ts.map +1 -0
- package/dist/pageFlipFlat/shaders.js +214 -0
- package/dist/pageFlipFlat/shaders.js.map +1 -0
- package/dist/pageFlipFlat.d.ts +1 -1
- package/dist/pageFlipFlat.d.ts.map +1 -1
- package/dist/pageFlipFlat.js +4 -310
- package/dist/pageFlipFlat.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Columns and rows of a leaf's mesh: fine enough for a tight roll. */
|
|
2
|
+
export declare const NX = 96;
|
|
3
|
+
/** How far a leaf's folded paper stays over its own paper beneath it. */
|
|
4
|
+
export declare const OWN_GAP = 1.2;
|
|
5
|
+
/** How much higher than at rest a leaf in the air stays over a block. */
|
|
6
|
+
export declare const BLOCK_GAP = 1.5;
|
|
7
|
+
export declare const NY = 120;
|
|
8
|
+
/** Columns of a page lying open (its curve runs across only). */
|
|
9
|
+
export declare const NX_OPEN = 72;
|
|
10
|
+
/** Vertical field of view. */
|
|
11
|
+
export declare const FOV = 24;
|
|
12
|
+
/** Radius of the roll at mid-turn for 90 g/m² offset, against the page's width. */
|
|
13
|
+
export declare const ROLL = 0.11;
|
|
14
|
+
/** Milliseconds one leaf takes to turn. */
|
|
15
|
+
export declare const DURATION = 1000;
|
|
16
|
+
/** A jump of more pages than this is made in one move: the block of
|
|
17
|
+
* leaves in between is lifted together and laid over on the other side,
|
|
18
|
+
* instead of every leaf turning on its own. */
|
|
19
|
+
export declare const BLOCK_PAGES = 10;
|
|
20
|
+
/** How long a block of leaves takes to go over (ms), a little longer for
|
|
21
|
+
* a thicker one. */
|
|
22
|
+
export declare const BLOCK_DURATION = 1150;
|
|
23
|
+
/** A page is taken by its outer part only: from this fraction of its
|
|
24
|
+
* width from the spine out to the fore-edge (#494). */
|
|
25
|
+
export declare const GRIP = 0.5;
|
|
26
|
+
/** A leaf follows the one before it once that one is this far through its turn. */
|
|
27
|
+
export declare const GAP = 0.14;
|
|
28
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/pageFlip/constants.ts"],"names":[],"mappings":"AAKA,uEAAuE;AACvE,eAAO,MAAM,EAAE,KAAK,CAAC;AACrB,yEAAyE;AACzE,eAAO,MAAM,OAAO,MAAM,CAAC;AAC3B,yEAAyE;AACzE,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,EAAE,MAAM,CAAC;AACtB,iEAAiE;AACjE,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,8BAA8B;AAC9B,eAAO,MAAM,GAAG,KAAK,CAAC;AACtB,mFAAmF;AACnF,eAAO,MAAM,IAAI,OAAO,CAAC;AACzB,2CAA2C;AAC3C,eAAO,MAAM,QAAQ,OAAO,CAAC;AAC7B;;gDAEgD;AAChD,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B;qBACqB;AACrB,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC;wDACwD;AACxD,eAAO,MAAM,IAAI,MAAM,CAAC;AACxB,mFAAmF;AACnF,eAAO,MAAM,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// The page flipper's numbers: mesh columns and rows, the gaps leaves keep
|
|
2
|
+
// over the paper below, field of view, roll radius, turn and block timings
|
|
3
|
+
// and where a page is taken (#1276: split out of pageFlip.ts).
|
|
4
|
+
/** Columns and rows of a leaf's mesh: fine enough for a tight roll. */
|
|
5
|
+
export const NX = 96;
|
|
6
|
+
/** How far a leaf's folded paper stays over its own paper beneath it. */
|
|
7
|
+
export const OWN_GAP = 1.2;
|
|
8
|
+
/** How much higher than at rest a leaf in the air stays over a block. */
|
|
9
|
+
export const BLOCK_GAP = 1.5;
|
|
10
|
+
export const NY = 120;
|
|
11
|
+
/** Columns of a page lying open (its curve runs across only). */
|
|
12
|
+
export const NX_OPEN = 72;
|
|
13
|
+
/** Vertical field of view. */
|
|
14
|
+
export const FOV = 24;
|
|
15
|
+
/** Radius of the roll at mid-turn for 90 g/m² offset, against the page's width. */
|
|
16
|
+
export const ROLL = 0.11;
|
|
17
|
+
/** Milliseconds one leaf takes to turn. */
|
|
18
|
+
export const DURATION = 1000;
|
|
19
|
+
/** A jump of more pages than this is made in one move: the block of
|
|
20
|
+
* leaves in between is lifted together and laid over on the other side,
|
|
21
|
+
* instead of every leaf turning on its own. */
|
|
22
|
+
export const BLOCK_PAGES = 10;
|
|
23
|
+
/** How long a block of leaves takes to go over (ms), a little longer for
|
|
24
|
+
* a thicker one. */
|
|
25
|
+
export const BLOCK_DURATION = 1150;
|
|
26
|
+
/** A page is taken by its outer part only: from this fraction of its
|
|
27
|
+
* width from the spine out to the fore-edge (#494). */
|
|
28
|
+
export const GRIP = 0.5;
|
|
29
|
+
/** A leaf follows the one before it once that one is this far through its turn. */
|
|
30
|
+
export const GAP = 0.14;
|
|
31
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/pageFlip/constants.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,+DAA+D;AAG/D,uEAAuE;AACvE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;AACrB,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAC3B,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC;AAC7B,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;AACtB,iEAAiE;AACjE,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAC1B,8BAA8B;AAC9B,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;AACtB,mFAAmF;AACnF,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC;AACzB,2CAA2C;AAC3C,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC;AAC7B;;gDAEgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAC9B;qBACqB;AACrB,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AACnC;wDACwD;AACxD,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC;AACxB,mFAAmF;AACnF,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { BufferGeometry, Mesh, BoxGeometry, MeshStandardMaterial, Plane } from 'three';
|
|
2
|
+
import { type Profile } from '../bookGeometry.js';
|
|
3
|
+
import type { PaperSpec } from '../paper.js';
|
|
4
|
+
import { type PageMaterial } from './materials.js';
|
|
5
|
+
/** The lowest the reader may orbit the view: 70° from straight above. */
|
|
6
|
+
export declare const MAX_PITCH: number;
|
|
7
|
+
/** Where column `t` (0 … 1) of a page's mesh lies across it: closer
|
|
8
|
+
* together near the spine, where the gutter bends tightest. */
|
|
9
|
+
export declare const column: (t: number) => number;
|
|
10
|
+
/** Sets a page mesh's u coordinates to its columns. */
|
|
11
|
+
export declare function spreadColumns(geometry: BufferGeometry, nx: number): void;
|
|
12
|
+
/** A point in a leaf's own coordinates: `u` from the spine (0 … W), `v`
|
|
13
|
+
* from the middle of the page (−H/2 … H/2). Backward turns mirror x. */
|
|
14
|
+
export interface Pt {
|
|
15
|
+
u: number;
|
|
16
|
+
v: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* How a leaf folds when the point `G` of it has been carried to `P`: the
|
|
20
|
+
* paper stays flat up to a fold line, rolls round a cylinder of radius R
|
|
21
|
+
* and lies over itself beyond it, back up (the page-curl cylinder). The
|
|
22
|
+
* fold is square to the pull, placed so the point taken lands under the
|
|
23
|
+
* hand, and never crosses the spine the leaf is sewn to. R grows as the
|
|
24
|
+
* page lifts and shrinks to nothing as it lands on the other side; a
|
|
25
|
+
* stiffer paper (`roll`) bends in a wider roll.
|
|
26
|
+
*/
|
|
27
|
+
export declare function foldOf(G: Pt, P: Pt, W: number, H: number, roll?: number): {
|
|
28
|
+
F: {
|
|
29
|
+
u: number;
|
|
30
|
+
v: number;
|
|
31
|
+
};
|
|
32
|
+
n: {
|
|
33
|
+
u: number;
|
|
34
|
+
v: number;
|
|
35
|
+
};
|
|
36
|
+
R: number;
|
|
37
|
+
theta: number;
|
|
38
|
+
} | null;
|
|
39
|
+
type Fold = NonNullable<ReturnType<typeof foldOf>>;
|
|
40
|
+
/** How far through its turn a leaf is: the point taken, from where it
|
|
41
|
+
* was to its mirror image across the spine. */
|
|
42
|
+
export declare function progressFrom(G: Pt, P: Pt): number;
|
|
43
|
+
/** The hand can carry the point taken no farther from the spine's ends
|
|
44
|
+
* than the paper reaches. */
|
|
45
|
+
export declare function reach(G: Pt, P: Pt, H: number): Pt;
|
|
46
|
+
/** The open book's two surfaces, which a leaf lies on at rest. */
|
|
47
|
+
export interface Surfaces {
|
|
48
|
+
left: Profile;
|
|
49
|
+
right: Profile;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Lays a leaf's mesh out. The curl is worked out on the flat page (u from
|
|
53
|
+
* the spine), then wrapped onto the book: the part on the right follows
|
|
54
|
+
* the right stack's top (into the gutter and out), the part carried over
|
|
55
|
+
* the spine the left one's. A stiff leaf (`rigidity`) turns more as a
|
|
56
|
+
* plate on its hinge: a board does not bend at all.
|
|
57
|
+
*/
|
|
58
|
+
export declare function layLeaf(geometry: BufferGeometry, fold: Fold | null, forward: boolean, W: number, H: number, lift: number, book: Surfaces, rigidity: number, q: number, flutter?: number, time?: number, board?: {
|
|
59
|
+
thick: number;
|
|
60
|
+
face: number;
|
|
61
|
+
}): {
|
|
62
|
+
phi: number;
|
|
63
|
+
pivot: number;
|
|
64
|
+
};
|
|
65
|
+
export type PageMesh = Mesh<BufferGeometry, PageMaterial>;
|
|
66
|
+
export interface BoardParts {
|
|
67
|
+
back: PageMesh;
|
|
68
|
+
slab: Mesh<BoxGeometry, MeshStandardMaterial>;
|
|
69
|
+
}
|
|
70
|
+
/** Frees a leaf's mesh and a board's parts. */
|
|
71
|
+
export declare function disposeLeaf(mesh: PageMesh): void;
|
|
72
|
+
export interface Turn {
|
|
73
|
+
forward: boolean;
|
|
74
|
+
/** A board: it turns as a rigid slab on the joint. */
|
|
75
|
+
rigid?: boolean;
|
|
76
|
+
/** The point taken, and where the hand holds it now. */
|
|
77
|
+
G: Pt;
|
|
78
|
+
P: Pt;
|
|
79
|
+
/** Held by the reader's pointer: `P` follows `aim`. */
|
|
80
|
+
held?: {
|
|
81
|
+
aim: Pt;
|
|
82
|
+
samples: {
|
|
83
|
+
t: number;
|
|
84
|
+
p: Pt;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
/** Carried by the animation: from → to, lifted `arc` on the way. */
|
|
88
|
+
anim?: {
|
|
89
|
+
start: number;
|
|
90
|
+
duration: number;
|
|
91
|
+
from: Pt;
|
|
92
|
+
to: Pt;
|
|
93
|
+
arc: number;
|
|
94
|
+
lands: boolean;
|
|
95
|
+
};
|
|
96
|
+
/** Let go: the point eases from where the hand left it (`from`, at the
|
|
97
|
+
* hand's speed `vel`, px/ms) to `to`, arriving at rest after `duration`
|
|
98
|
+
* ms (a cubic Hermite curve: no jump, no lingering tail). */
|
|
99
|
+
spring?: {
|
|
100
|
+
from: Pt;
|
|
101
|
+
to: Pt;
|
|
102
|
+
vel: Pt;
|
|
103
|
+
start: number;
|
|
104
|
+
duration: number;
|
|
105
|
+
lands: boolean;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export interface Airborne {
|
|
109
|
+
k: number;
|
|
110
|
+
q: number;
|
|
111
|
+
forward: boolean;
|
|
112
|
+
fold: Fold | null;
|
|
113
|
+
mesh: PageMesh;
|
|
114
|
+
spec: PaperSpec;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The plane an open page lies in past the gutter's shoulder (world,
|
|
118
|
+
* normal up), its side running out from the spine along world x as
|
|
119
|
+
* `out` (±1): level on a block lying on the desk, sloping down to it on
|
|
120
|
+
* the thin side of a thick book, which hangs from the top of the spine.
|
|
121
|
+
* A gloss page mirrors the leaves in the air in it (#483).
|
|
122
|
+
*/
|
|
123
|
+
export declare function pagePlane(p: Profile, W: number, out: number): Plane;
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=leaf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leaf.d.ts","sourceRoot":"","sources":["../../src/pageFlip/leaf.ts"],"names":[],"mappings":"AAGA,OAA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C;IAC1F;;kEAE8D;IAC9D,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,EAAE,CAAC;QAAC,EAAE,EAAE,EAAE,CAAC;QAAC,GAAG,EAAE,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CACzF;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAOnE"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
// A leaf's shape: the open book's two surfaces, the fold and roll of a
|
|
2
|
+
// turning leaf, how far through its turn it is, and laying its mesh out
|
|
3
|
+
// (#1276: split out of pageFlip.ts).
|
|
4
|
+
import { Plane, Vector3 } from 'three';
|
|
5
|
+
import { along, topAt } from '../bookGeometry.js';
|
|
6
|
+
import { ROLL, BLOCK_GAP, NX, NY, OWN_GAP } from './constants.js';
|
|
7
|
+
import { smooth } from './materials.js';
|
|
8
|
+
/** The lowest the reader may orbit the view: 70° from straight above. */
|
|
9
|
+
export const MAX_PITCH = (70 * Math.PI) / 180;
|
|
10
|
+
/** How far (radians) a leaf in mid-turn stands off the pages at the spine:
|
|
11
|
+
* barely; it is sewn there, and more reads as the leaf lifting off the
|
|
12
|
+
* book parallel to it and dropping back. */
|
|
13
|
+
const LEAN = 0.02;
|
|
14
|
+
/** Where column `t` (0 … 1) of a page's mesh lies across it: closer
|
|
15
|
+
* together near the spine, where the gutter bends tightest. */
|
|
16
|
+
export const column = (t) => Math.pow(t, 1.45);
|
|
17
|
+
/** Sets a page mesh's u coordinates to its columns. */
|
|
18
|
+
export function spreadColumns(geometry, nx) {
|
|
19
|
+
const uv = geometry.attributes.uv;
|
|
20
|
+
for (let i = 0; i < uv.count; i++)
|
|
21
|
+
uv.setX(i, column((i % (nx + 1)) / nx));
|
|
22
|
+
uv.needsUpdate = true;
|
|
23
|
+
}
|
|
24
|
+
/** max(a, b), rounded over a band `k` wide (no crease where they meet). */
|
|
25
|
+
function smoothMax(a, b, k) {
|
|
26
|
+
return (a + b + Math.sqrt((a - b) * (a - b) + k * k)) / 2;
|
|
27
|
+
}
|
|
28
|
+
/** Where arc length `signed` from the spine lies on the open book's
|
|
29
|
+
* surface (right page positive): [x, z]. */
|
|
30
|
+
function surfaceAt(book, signed) {
|
|
31
|
+
const [bx, bz] = along(signed >= 0 ? book.right : book.left, Math.abs(signed));
|
|
32
|
+
return [(signed >= 0 ? 1 : -1) * bx, bz];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* How a leaf folds when the point `G` of it has been carried to `P`: the
|
|
36
|
+
* paper stays flat up to a fold line, rolls round a cylinder of radius R
|
|
37
|
+
* and lies over itself beyond it, back up (the page-curl cylinder). The
|
|
38
|
+
* fold is square to the pull, placed so the point taken lands under the
|
|
39
|
+
* hand, and never crosses the spine the leaf is sewn to. R grows as the
|
|
40
|
+
* page lifts and shrinks to nothing as it lands on the other side; a
|
|
41
|
+
* stiffer paper (`roll`) bends in a wider roll.
|
|
42
|
+
*/
|
|
43
|
+
export function foldOf(G, P, W, H, roll = 1) {
|
|
44
|
+
const du = G.u - P.u;
|
|
45
|
+
const dv = G.v - P.v;
|
|
46
|
+
const D = Math.hypot(du, dv);
|
|
47
|
+
if (D < 0.5)
|
|
48
|
+
return null;
|
|
49
|
+
const n = { u: du / D, v: dv / D };
|
|
50
|
+
const q = progressFrom(G, P);
|
|
51
|
+
const R = Math.min(0.5, ROLL * roll) * W * (0.3 + 0.7 * smooth(0, 0.2, q)) * (1 - smooth(0.62, 1, q)) * Math.min(1, D / (0.1 * W));
|
|
52
|
+
// How far the paper past the fold has turned: a leaf held up by the hand
|
|
53
|
+
// stands in the air (about 110° early in the turn), and only lies back
|
|
54
|
+
// flat (180°) as it lands. Folding it flat over itself all the way (the
|
|
55
|
+
// table-paper curl) made a tent of a leaf dragged across the spine.
|
|
56
|
+
const theta = Math.PI * (0.62 + 0.38 * smooth(0.05, 1, q));
|
|
57
|
+
// The fold sits where the point taken, carried round the roll and on
|
|
58
|
+
// straight, lands over the hand: R sinθ + (c − Rθ) cosθ = c − D.
|
|
59
|
+
const arc = R * theta;
|
|
60
|
+
const k = arc > 0 ? Math.min(1, D / arc) : 0;
|
|
61
|
+
const free = (D + k * (R * Math.sin(theta) - arc * Math.cos(theta))) / (1 - Math.cos(theta));
|
|
62
|
+
let c = free;
|
|
63
|
+
for (const S of [-H / 2, H / 2])
|
|
64
|
+
c = Math.min(c, G.u * n.u + (G.v - S) * n.v);
|
|
65
|
+
if (c <= 0)
|
|
66
|
+
return null;
|
|
67
|
+
const F = { u: G.u - n.u * c, v: G.v - n.v * c };
|
|
68
|
+
// Never all at once (#502). Paper lying beyond the point taken, along
|
|
69
|
+
// the pull (a page taken by the middle of an edge and pulled across),
|
|
70
|
+
// turns over as the hand carries it away, not the moment it moves (a
|
|
71
|
+
// pixel's pull stood half the page up). A fold held off the spine short
|
|
72
|
+
// of the hand turns the less the nearer it comes to the point taken, so
|
|
73
|
+
// that it is gone, not dropped, when it reaches it.
|
|
74
|
+
let beyond = 0;
|
|
75
|
+
for (const u of [0, W])
|
|
76
|
+
for (const v of [-H / 2, H / 2])
|
|
77
|
+
beyond = Math.max(beyond, (u - G.u) * n.u + (v - G.v) * n.v);
|
|
78
|
+
const turns = (c / free) * (beyond > 0 ? smooth(0, 0.5 * beyond, D) : 1);
|
|
79
|
+
return { F, n, R, theta: theta * turns };
|
|
80
|
+
}
|
|
81
|
+
/** Paper `d` past the fold, round a roll of radius R and straight on at
|
|
82
|
+
* θ: how far it reaches back across the page, and how high it stands. */
|
|
83
|
+
function rollOf(d, R, theta) {
|
|
84
|
+
if (R > 1e-3 && d < R * theta)
|
|
85
|
+
return [R * Math.sin(d / R), R * (1 - Math.cos(d / R))];
|
|
86
|
+
const rest = d - R * theta;
|
|
87
|
+
return [R * Math.sin(theta) + rest * Math.cos(theta), R * (1 - Math.cos(theta)) + rest * Math.sin(theta)];
|
|
88
|
+
}
|
|
89
|
+
/** How far through its turn a leaf is: the point taken, from where it
|
|
90
|
+
* was to its mirror image across the spine. */
|
|
91
|
+
export function progressFrom(G, P) {
|
|
92
|
+
return Math.min(1, Math.max(0, (G.u - P.u) / (2 * G.u)));
|
|
93
|
+
}
|
|
94
|
+
/** The hand can carry the point taken no farther from the spine's ends
|
|
95
|
+
* than the paper reaches. */
|
|
96
|
+
export function reach(G, P, H) {
|
|
97
|
+
let { u, v } = P;
|
|
98
|
+
for (let i = 0; i < 4; i++) {
|
|
99
|
+
for (const S of [-H / 2, H / 2]) {
|
|
100
|
+
const r = Math.hypot(G.u, G.v - S);
|
|
101
|
+
const d = Math.hypot(u, v - S);
|
|
102
|
+
if (d > r) {
|
|
103
|
+
u *= r / d;
|
|
104
|
+
v = S + ((v - S) * r) / d;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return { u, v };
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Lays a leaf's mesh out. The curl is worked out on the flat page (u from
|
|
112
|
+
* the spine), then wrapped onto the book: the part on the right follows
|
|
113
|
+
* the right stack's top (into the gutter and out), the part carried over
|
|
114
|
+
* the spine the left one's. A stiff leaf (`rigidity`) turns more as a
|
|
115
|
+
* plate on its hinge: a board does not bend at all.
|
|
116
|
+
*/
|
|
117
|
+
export function layLeaf(geometry, fold, forward, W, H, lift, book, rigidity, q, flutter = 0, time = 0, board) {
|
|
118
|
+
const pos = geometry.attributes.position;
|
|
119
|
+
const sx = forward ? 1 : -1;
|
|
120
|
+
const [xr, zr] = along(book.right, W);
|
|
121
|
+
const [xl, zl] = along(book.left, W);
|
|
122
|
+
const zr0 = along(book.right, 0)[1];
|
|
123
|
+
const zl0 = along(book.left, 0)[1];
|
|
124
|
+
const qa = forward ? q : 1 - q;
|
|
125
|
+
let hinge;
|
|
126
|
+
let phi;
|
|
127
|
+
let r;
|
|
128
|
+
let offset = 0;
|
|
129
|
+
if (board) {
|
|
130
|
+
// A board (a cover): a rigid slab `thick` deep, turning on the joint at
|
|
131
|
+
// the top of the spine. It leaves the block it lay on (its chord, from
|
|
132
|
+
// the spine to the fore-edge) and lands on the other side's, however
|
|
133
|
+
// that lies: flat on an open book, hanging down to the desk from a
|
|
134
|
+
// spine still standing. As it comes down to the lower side the joint
|
|
135
|
+
// comes down the spine with it (the cloth flexes), so it lands instead
|
|
136
|
+
// of dropping. The pivot is its middle plane: it lies with its inner
|
|
137
|
+
// face on the block under it and lands with its outer face on the
|
|
138
|
+
// other, and `face` sets which of its faces this mesh draws.
|
|
139
|
+
const descend = zl0 < zr0 ? smooth(0.4, 1, qa) : 1 - smooth(0.4, 1, 1 - qa);
|
|
140
|
+
hinge = zr0 + (zl0 - zr0) * descend + board.thick / 2;
|
|
141
|
+
const a0 = Math.atan2(zr - zr0, xr);
|
|
142
|
+
const a1 = Math.PI - Math.atan2(zl - zl0, xl);
|
|
143
|
+
// The hand holds the point it took over the desk: a rigid plate turned
|
|
144
|
+
// by φ brings it to u·cos φ, so the board stands where the hand has
|
|
145
|
+
// carried that point (q = (1 − cos)/2), not on an eased curve that laid
|
|
146
|
+
// it level in the air while the hand was still over the slope.
|
|
147
|
+
phi = a0 + ((a1 - a0) * Math.acos(Math.min(1, Math.max(-1, 1 - 2 * qa)))) / Math.PI;
|
|
148
|
+
r = 1;
|
|
149
|
+
offset = (board.face * board.thick) / 2;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
// A stiff leaf rests on its stack's fore-edge and swings over the gutter.
|
|
153
|
+
r = rigidity * smooth(0, 0.06, q) * smooth(0, 0.06, 1 - q);
|
|
154
|
+
hinge = along(book.right, 0)[1];
|
|
155
|
+
const a0 = Math.atan2(zr - hinge, xr);
|
|
156
|
+
const a1 = Math.PI - Math.atan2(zl - hinge, xl);
|
|
157
|
+
phi = a0 + (a1 - a0) * qa;
|
|
158
|
+
}
|
|
159
|
+
// How far a turning leaf stands off the pages: none at rest or for a
|
|
160
|
+
// corner barely lifted, a few degrees through the middle of the turn.
|
|
161
|
+
const inAir = smooth(0.02, 0.22, q) * smooth(0.02, 0.22, 1 - q);
|
|
162
|
+
const lean = LEAN * inAir;
|
|
163
|
+
// Each side's chord, from the spine to its fore-edge: a side hanging
|
|
164
|
+
// from a standing spine slopes down to the desk, and a leaf leaning off
|
|
165
|
+
// it leans off that slope, not off a level plane over it.
|
|
166
|
+
const chordR = (zr - zr0) / (xr || 1);
|
|
167
|
+
const chordL = (zl - zl0) / (xl || 1);
|
|
168
|
+
// The plane a leaf lifts off along, by side: the chord turned up by the
|
|
169
|
+
// lean. A leaf keeps its width along it (stepping the chord's rise per
|
|
170
|
+
// unit across, on a side sloping to the desk, stretched it by a tenth
|
|
171
|
+
// and more, #495).
|
|
172
|
+
const tiltR = Math.atan(chordR) + lean;
|
|
173
|
+
const tiltL = Math.atan(chordL) + lean;
|
|
174
|
+
// Onto the book. At rest (and as it lands) the leaf lies on the open
|
|
175
|
+
// book's surface, into the gutter and out. In the air it is lifted off
|
|
176
|
+
// at the spine: its own plane rises from the gutter's floor at a small
|
|
177
|
+
// angle, and it touches the pages only where they stand higher (the
|
|
178
|
+
// gutter's walls), joined smoothly. `z`: how far over that it stands.
|
|
179
|
+
const onBook = (s, z) => {
|
|
180
|
+
const [rx, rz] = surfaceAt(book, s);
|
|
181
|
+
let px = rx;
|
|
182
|
+
let pz = rz + z + lift;
|
|
183
|
+
if (inAir > 0) {
|
|
184
|
+
const tilt = s >= 0 ? tiltR : tiltL;
|
|
185
|
+
const fx = (s >= 0 ? 1 : -1) * Math.abs(s) * Math.cos(tilt);
|
|
186
|
+
const plane = (s >= 0 ? zr0 : zl0) + Math.abs(s) * Math.sin(tilt) + z + lift;
|
|
187
|
+
const under = surfaceAt(book, fx)[1] + lift + 0.6;
|
|
188
|
+
const flying = smoothMax(plane, under, 0.006 * W);
|
|
189
|
+
px += (fx - px) * inAir;
|
|
190
|
+
pz += (flying - pz) * inAir;
|
|
191
|
+
}
|
|
192
|
+
return [px, pz];
|
|
193
|
+
};
|
|
194
|
+
// Thin paper ripples in the air, more towards its free edge. Never
|
|
195
|
+
// down into the pages under it: the ripple dies away where the leaf
|
|
196
|
+
// lies close over them (it stays at least `lift` above them), or a
|
|
197
|
+
// leaf held low over its stack dipped into the page under it, whose
|
|
198
|
+
// print then showed through (#447).
|
|
199
|
+
const ripple = (u, v, px, pz) => {
|
|
200
|
+
const amp = flutter * W * (u / W) * (u / W);
|
|
201
|
+
if (flutter <= 0 || amp <= 1e-6)
|
|
202
|
+
return 0;
|
|
203
|
+
const clear = pz - surfaceAt(book, px)[1] - lift;
|
|
204
|
+
return amp * smooth(0, 2 * amp, clear) * Math.sin(2 * Math.PI * (time / 520) - (3 * u) / W + (2 * v) / H);
|
|
205
|
+
};
|
|
206
|
+
// Where the leaf's paper lies unfolded, column by column (before it
|
|
207
|
+
// ripples): [out from the spine, u, height].
|
|
208
|
+
const clearing = BLOCK_GAP * smooth(0, 0.06, q) * smooth(0, 0.06, 1 - q);
|
|
209
|
+
const own = [];
|
|
210
|
+
if (fold) {
|
|
211
|
+
for (let ix = 0; ix <= NX; ix++) {
|
|
212
|
+
const u = column(ix / NX) * W;
|
|
213
|
+
let [ox, oz] = onBook(sx * u, 0);
|
|
214
|
+
if (r > 0) {
|
|
215
|
+
ox += (u * Math.cos(phi) - offset * Math.sin(phi) - ox) * r;
|
|
216
|
+
oz += (hinge + lift + u * Math.sin(phi) + offset * Math.cos(phi) - oz) * r;
|
|
217
|
+
}
|
|
218
|
+
own.push([sx * ox, u, oz]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
for (let iy = 0; iy <= NY; iy++) {
|
|
222
|
+
const v = (0.5 - iy / NY) * H;
|
|
223
|
+
for (let ix = 0; ix <= NX; ix++) {
|
|
224
|
+
const u = column(ix / NX) * W;
|
|
225
|
+
let x = u;
|
|
226
|
+
let y = v;
|
|
227
|
+
let z = 0;
|
|
228
|
+
let d = 0;
|
|
229
|
+
let dd = 0;
|
|
230
|
+
if (fold) {
|
|
231
|
+
const { F, n } = fold;
|
|
232
|
+
d = (u - F.u) * n.u + (v - F.v) * n.v;
|
|
233
|
+
if (d > 0) {
|
|
234
|
+
// Round the roll, then straight on at the fold's angle.
|
|
235
|
+
[dd, z] = rollOf(d, fold.R, fold.theta);
|
|
236
|
+
y = v - n.v * (d - dd);
|
|
237
|
+
x = u - n.u * (d - dd);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
let [px, pz] = onBook(sx * x, z);
|
|
241
|
+
if (fold && d > 0) {
|
|
242
|
+
// Paper up in the air is not pressed onto the pages under it: wrapped
|
|
243
|
+
// onto them it dipped into the gutter and was squeezed across it (a
|
|
244
|
+
// crease where the curl passed over the spine). It goes on from the
|
|
245
|
+
// foot of its fold, level, as the fold has it, and only comes down
|
|
246
|
+
// onto the pages as it does (lying back over itself, landing).
|
|
247
|
+
const [fx, fz] = onBook(sx * (u - fold.n.u * d), 0);
|
|
248
|
+
const w = smooth(0, 0.05 * W, z);
|
|
249
|
+
px += (fx + sx * fold.n.u * dd - px) * w;
|
|
250
|
+
pz += (fz + z - pz) * w;
|
|
251
|
+
}
|
|
252
|
+
if (r > 0) {
|
|
253
|
+
px += (u * Math.cos(phi) - offset * Math.sin(phi) - px) * r;
|
|
254
|
+
y += (v - y) * r;
|
|
255
|
+
pz += (hinge + lift + u * Math.sin(phi) + offset * Math.cos(phi) - pz) * r;
|
|
256
|
+
}
|
|
257
|
+
pz += ripple(u, v, px, pz);
|
|
258
|
+
// Never through the leaf's own paper not yet folded, as it ripples
|
|
259
|
+
// too: carried level from a fold low on a side sloping up to the
|
|
260
|
+
// spine, the paper folded back over it ran under it, crossing it.
|
|
261
|
+
if (fold && d > 0) {
|
|
262
|
+
const at = sx * px;
|
|
263
|
+
// (A row past the head and foot too: a triangle reaching past them
|
|
264
|
+
// from paper kept over sagged through.)
|
|
265
|
+
if (at > own[0][0] && at < own[NX][0] && Math.abs(y) <= H / 2 + (1.5 * H) / NY) {
|
|
266
|
+
let lo = 0;
|
|
267
|
+
let hi = NX;
|
|
268
|
+
while (hi - lo > 1) {
|
|
269
|
+
const mid = (lo + hi) >> 1;
|
|
270
|
+
if (own[mid][0] <= at)
|
|
271
|
+
lo = mid;
|
|
272
|
+
else
|
|
273
|
+
hi = mid;
|
|
274
|
+
}
|
|
275
|
+
const f = (at - own[lo][0]) / (own[hi][0] - own[lo][0] || 1);
|
|
276
|
+
const ou = own[lo][1] + (own[hi][1] - own[lo][1]) * f;
|
|
277
|
+
if ((ou - fold.F.u) * fold.n.u + (y - fold.F.v) * fold.n.v < 0) {
|
|
278
|
+
const oz = own[lo][2] + (own[hi][2] - own[lo][2]) * f;
|
|
279
|
+
pz = Math.max(pz, oz + ripple(ou, y, px, oz) + OWN_GAP);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
// Never into the book: over a block (and past its head or foot) a
|
|
284
|
+
// leaf stands at least just over its top. A fold's flap is carried
|
|
285
|
+
// level from the foot of its fold, and on a thin side hanging from
|
|
286
|
+
// the spine that foot lies low: the flap went through the tall block
|
|
287
|
+
// on the other side (#489).
|
|
288
|
+
// In the air a little higher still (until it lands): half a pixel
|
|
289
|
+
// over the block is hardly any depth at the view's distance, and a
|
|
290
|
+
// leaf lying over a tall block's top drew through its page in teeth.
|
|
291
|
+
if (!board && Math.abs(px) < (px >= 0 ? xr : xl))
|
|
292
|
+
pz = Math.max(pz, topAt(px >= 0 ? book.right : book.left, Math.abs(px)) + Math.min(lift, 0.5) + clearing);
|
|
293
|
+
pos.setXYZ(iy * (NX + 1) + ix, px, y, pz);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
pos.needsUpdate = true;
|
|
297
|
+
geometry.computeVertexNormals();
|
|
298
|
+
return { phi, pivot: hinge + lift };
|
|
299
|
+
}
|
|
300
|
+
/** Frees a leaf's mesh and a board's parts. */
|
|
301
|
+
export function disposeLeaf(mesh) {
|
|
302
|
+
const parts = mesh.userData.board;
|
|
303
|
+
if (parts) {
|
|
304
|
+
parts.back.geometry.dispose();
|
|
305
|
+
parts.slab.geometry.dispose();
|
|
306
|
+
parts.slab.material.dispose();
|
|
307
|
+
}
|
|
308
|
+
mesh.userData.caster?.geometry.dispose();
|
|
309
|
+
mesh.geometry.dispose();
|
|
310
|
+
mesh.material.dispose();
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* The plane an open page lies in past the gutter's shoulder (world,
|
|
314
|
+
* normal up), its side running out from the spine along world x as
|
|
315
|
+
* `out` (±1): level on a block lying on the desk, sloping down to it on
|
|
316
|
+
* the thin side of a thick book, which hangs from the top of the spine.
|
|
317
|
+
* A gloss page mirrors the leaves in the air in it (#483).
|
|
318
|
+
*/
|
|
319
|
+
export function pagePlane(p, W, out) {
|
|
320
|
+
const [x0, z0] = along(p, W * 0.55);
|
|
321
|
+
const [x1, z1] = along(p, W);
|
|
322
|
+
const dx = out * (x1 - x0);
|
|
323
|
+
const dz = z1 - z0;
|
|
324
|
+
const normal = new Vector3(-dz * Math.sign(dx || 1), 0, Math.abs(dx)).normalize();
|
|
325
|
+
return new Plane().setFromNormalAndCoplanarPoint(normal, new Vector3(out * x0, 0, z0));
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=leaf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leaf.js","sourceRoot":"","sources":["../../src/pageFlip/leaf.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wEAAwE;AACxE,qCAAqC;AACr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