@sangwonl/pocato-core 0.4.1 → 0.4.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/index.d.ts CHANGED
@@ -12,8 +12,32 @@ interface LayerSource {
12
12
  type?: 'image' | 'video';
13
13
  freeze?: number | 'random';
14
14
  }
15
+ type EffectUniformValue = string | number | boolean | [number, number] | [number, number, number] | [number, number, number, number];
16
+ interface FaceFrameOptions {
17
+ enabled?: boolean;
18
+ inset?: number;
19
+ padding?: number;
20
+ backgroundColor?: string;
21
+ backgroundGradient?: boolean;
22
+ backgroundGradientFrom?: string;
23
+ backgroundGradientTo?: string;
24
+ width?: number;
25
+ color?: string;
26
+ borderOpacity?: number;
27
+ gradient?: boolean;
28
+ gradientFrom?: string;
29
+ gradientTo?: string;
30
+ animated?: boolean;
31
+ animationSpeed?: number;
32
+ innerShadow?: boolean;
33
+ innerShadowColor?: string;
34
+ innerShadowBlur?: number;
35
+ innerShadowOpacity?: number;
36
+ }
15
37
  interface FaceOptions {
16
38
  shader?: string;
39
+ uniforms?: Record<string, EffectUniformValue>;
40
+ frame?: FaceFrameOptions;
17
41
  layers: LayerSource[];
18
42
  }
19
43
 
@@ -23,6 +47,8 @@ interface PocaCardOptions {
23
47
  flippable?: boolean;
24
48
  initialFlipped?: boolean;
25
49
  flipSpeed?: number;
50
+ interactive?: boolean;
51
+ preventTouchScroll?: boolean;
26
52
  }
27
53
  declare class PocaCard extends EventEmitter {
28
54
  private renderer;
@@ -34,7 +60,10 @@ declare class PocaCard extends EventEmitter {
34
60
  flip(): void;
35
61
  wiggle(): void;
36
62
  reset(): void;
37
- updateOptions(options: Partial<PocaCardOptions>): void;
63
+ updateOptions(options: Omit<Partial<PocaCardOptions>, 'front' | 'back'> & {
64
+ front?: Partial<FaceOptions>;
65
+ back?: Partial<FaceOptions>;
66
+ }): void;
38
67
  destroy(): void;
39
68
  }
40
69
 
@@ -52,4 +81,4 @@ declare const builtinShaders: Record<string, string>;
52
81
 
53
82
  declare const FRAG_SHADERS: Record<string, string>;
54
83
 
55
- export { FRAG_SHADERS, type FaceOptions, type LayerSource, PocaCard, type PocaCardOptions, builtinShaders, resolveIncludes };
84
+ export { type EffectUniformValue, FRAG_SHADERS, type FaceFrameOptions, type FaceOptions, type LayerSource, PocaCard, type PocaCardOptions, builtinShaders, resolveIncludes };