@sangwonl/pocato-core 0.2.1 → 0.3.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/index.d.ts +27 -7
- package/dist/index.js +535 -194
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,16 +7,22 @@ declare class EventEmitter {
|
|
|
7
7
|
protected removeAllListeners(): void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
interface LayerSource {
|
|
11
|
+
src: string;
|
|
12
|
+
type?: 'image' | 'video';
|
|
13
|
+
freeze?: number | 'random';
|
|
14
|
+
}
|
|
15
|
+
interface FaceOptions {
|
|
16
|
+
shader?: string;
|
|
17
|
+
layers: LayerSource[];
|
|
18
|
+
}
|
|
19
|
+
|
|
10
20
|
interface PocaCardOptions {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
popupImage?: string;
|
|
14
|
-
maskImage?: string;
|
|
15
|
-
backImage?: string;
|
|
21
|
+
front: FaceOptions;
|
|
22
|
+
back?: FaceOptions;
|
|
16
23
|
flippable?: boolean;
|
|
17
24
|
initialFlipped?: boolean;
|
|
18
25
|
flipSpeed?: number;
|
|
19
|
-
customShader?: string;
|
|
20
26
|
}
|
|
21
27
|
declare class PocaCard extends EventEmitter {
|
|
22
28
|
private renderer;
|
|
@@ -32,4 +38,18 @@ declare class PocaCard extends EventEmitter {
|
|
|
32
38
|
destroy(): void;
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Recursively resolve #include directives using THREE.ShaderChunk.
|
|
43
|
+
* Handles:
|
|
44
|
+
* - #include <lygia/math/mod289> (angle bracket, full path)
|
|
45
|
+
* - #include <utils/defaultLighting> (angle bracket, registered key)
|
|
46
|
+
* - #include "mod289.glsl" (quote, short name from LYGIA internals)
|
|
47
|
+
* - #include "../math/cubic.glsl" (quote, relative path from LYGIA internals)
|
|
48
|
+
*/
|
|
49
|
+
declare function resolveIncludes(source: string): string;
|
|
50
|
+
|
|
51
|
+
declare const builtinShaders: Record<string, string>;
|
|
52
|
+
|
|
53
|
+
declare const FRAG_SHADERS: Record<string, string>;
|
|
54
|
+
|
|
55
|
+
export { FRAG_SHADERS, type FaceOptions, type LayerSource, PocaCard, type PocaCardOptions, builtinShaders, resolveIncludes };
|