@splinetool/viewer 0.9.388 → 0.9.390

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.
@@ -0,0 +1,73 @@
1
+ import { LitElement } from 'lit';
2
+ export declare type LoadingType = 'auto' | 'lazy' | 'eager';
3
+ export declare type EventsTargetType = 'local' | 'global';
4
+ export declare type HintType = 'drag';
5
+ /**
6
+ * Spline scene viewer
7
+ */
8
+ export declare class SplineViewer extends LitElement {
9
+ static styles: import("lit").CSSResult;
10
+ /**
11
+ * The url of the .splinecode file as exported from Spline Editor.
12
+ */
13
+ url: string | null;
14
+ /**
15
+ * The width of the canvas
16
+ */
17
+ width: number | undefined;
18
+ /**
19
+ * The height of the canvas
20
+ */
21
+ height: number | undefined;
22
+ /**
23
+ * Background color
24
+ */
25
+ background: string | undefined;
26
+ /**
27
+ * Preloading strategy ('auto', 'lazy' or 'eager')
28
+ */
29
+ loading: LoadingType;
30
+ /**
31
+ * Enables auto unloading of the canvas / spline when it leaves the viewport
32
+ */
33
+ unloadable: boolean;
34
+ /**
35
+ * Target of the mouse events, can either be 'local' (ie the canvas) or global (window)
36
+ */
37
+ eventsTarget: EventsTargetType | undefined;
38
+ /**
39
+ * Target of the mouse events, can either be 'local' (ie the canvas) or global (window)
40
+ */
41
+ hint?: boolean;
42
+ /**
43
+ * When true it displays the spinner preloader
44
+ */
45
+ loadingAnim: boolean;
46
+ private _spline;
47
+ protected _intersectionObserver: IntersectionObserver | null;
48
+ protected _isElementInViewport: boolean;
49
+ protected _loaded: boolean;
50
+ protected _container: HTMLElement;
51
+ protected _canvas: HTMLCanvasElement;
52
+ protected _logo: HTMLElement;
53
+ protected _hintDrag: HTMLElement;
54
+ protected _preloader: HTMLElement;
55
+ private _loadedUrl;
56
+ private _wasContextLost;
57
+ constructor();
58
+ protected unload(): void;
59
+ protected _handleContextLost: () => void;
60
+ protected _handleContextRestored: () => void;
61
+ protected recreateCanvas(): void;
62
+ protected load(): void;
63
+ protected onLoaded: () => void;
64
+ protected onInteract: () => void;
65
+ updated(changedProperties: Map<string | number | symbol, any>): void;
66
+ connectedCallback(): void;
67
+ disconnectedCallback(): void;
68
+ }
69
+ declare global {
70
+ interface HTMLElementTagNameMap {
71
+ 'spline-viewer': SplineViewer;
72
+ }
73
+ }