leafthrough 0.1.3 → 0.1.4
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 +69 -4
- package/dist/LeafThrough.d.ts +2 -9
- package/dist/LeafThroughObject.d.ts +151 -0
- package/dist/{chunk-XPIDTVB5.js → chunk-GYSQO7QZ.js} +758 -619
- package/dist/chunk-GYSQO7QZ.js.map +1 -0
- package/dist/element.js +1 -1
- package/dist/engine.d.ts +25 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +367 -2
- package/dist/index.js.map +1 -1
- package/dist/navigation.d.ts +26 -0
- package/dist/options.d.ts +14 -0
- package/dist/paper/paperTextures.d.ts +25 -0
- package/dist/react.js +1 -1
- package/dist/single/SingleEngine.d.ts +7 -9
- package/dist/spread/SpreadEngine.d.ts +7 -8
- package/dist/svelte.js +1 -1
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XPIDTVB5.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import type
|
|
2
|
+
import { type Engine, type EngineContext } from '../engine.js';
|
|
3
3
|
/**
|
|
4
4
|
* The open magazine: sheets rotate over the spine, bending as they go. Horizontal drag
|
|
5
5
|
* drives the turn; where the hand is around the spine tilts the fold.
|
|
@@ -9,10 +9,9 @@ export declare class SpreadEngine implements Engine {
|
|
|
9
9
|
readonly maxPosition: number;
|
|
10
10
|
private readonly settings;
|
|
11
11
|
private readonly halfHeight;
|
|
12
|
-
private readonly
|
|
13
|
-
private readonly canvas;
|
|
14
|
-
private readonly hitArea;
|
|
12
|
+
private readonly input;
|
|
15
13
|
private readonly metrics;
|
|
14
|
+
private readonly requestFrame;
|
|
16
15
|
private readonly geometry;
|
|
17
16
|
private readonly sheets;
|
|
18
17
|
private readonly abort;
|
|
@@ -27,11 +26,8 @@ export declare class SpreadEngine implements Engine {
|
|
|
27
26
|
private leader;
|
|
28
27
|
private dirty;
|
|
29
28
|
private last;
|
|
30
|
-
private readonly
|
|
31
|
-
private readonly ndc;
|
|
32
|
-
private readonly floor;
|
|
29
|
+
private readonly ray;
|
|
33
30
|
private readonly hit;
|
|
34
|
-
private readonly spine;
|
|
35
31
|
constructor(ctx: EngineContext);
|
|
36
32
|
get position(): number;
|
|
37
33
|
get turning(): boolean;
|
|
@@ -41,9 +37,12 @@ export declare class SpreadEngine implements Engine {
|
|
|
41
37
|
};
|
|
42
38
|
get activeSide(): "both" | "left" | "right";
|
|
43
39
|
setPageTexture(page: number, texture: THREE.Texture): void;
|
|
40
|
+
cancelInput(): void;
|
|
44
41
|
dispose(): void;
|
|
45
42
|
private randomWobble;
|
|
46
43
|
private seconds;
|
|
44
|
+
private wake;
|
|
45
|
+
private pointAt;
|
|
47
46
|
private arcLimit;
|
|
48
47
|
private restingArc;
|
|
49
48
|
private inFlight;
|
package/dist/svelte.js
CHANGED
package/dist/vue.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leafthrough",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "A 3D magazine you can flip through, with paper that bends, rolls and casts shadows. Built on three.js, with React, Vue, Svelte and Web Component bindings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"magazine",
|