@sarmal/core 0.3.0 → 0.4.1
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 +1 -1
- package/dist/auto-init.cjs +78 -42
- package/dist/auto-init.cjs.map +1 -1
- package/dist/auto-init.d.cts +1 -2
- package/dist/auto-init.d.ts +1 -2
- package/dist/auto-init.js +77 -41
- package/dist/auto-init.js.map +1 -1
- package/dist/index.cjs +87 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +164 -96
- package/dist/index.d.ts +164 -96
- package/dist/index.js +86 -40
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,112 +1,155 @@
|
|
|
1
1
|
interface Point {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
4
|
}
|
|
5
5
|
interface CurveDef {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
name: string;
|
|
7
|
+
fn: (t: number, time: number, params: Record<string, number>) => Point;
|
|
8
|
+
/**
|
|
9
|
+
* @default (Math.PI * 2)
|
|
10
|
+
*/
|
|
11
|
+
period?: number;
|
|
12
|
+
/**
|
|
13
|
+
* @default 1
|
|
14
|
+
*/
|
|
15
|
+
speed?: number;
|
|
16
|
+
/**
|
|
17
|
+
* To indicate a compatible library version when providing the curve definitions
|
|
18
|
+
* Intended for potential backwards compatibility scenarios and futureproofing
|
|
19
|
+
*/
|
|
20
|
+
version?: number;
|
|
21
21
|
}
|
|
22
|
+
type SeekOptions = {
|
|
23
|
+
/**
|
|
24
|
+
* Decides whether the sarmal trail should be cleared when `seek` is called
|
|
25
|
+
*/
|
|
26
|
+
clearTrail?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type SeekWithTrailOptions = {
|
|
29
|
+
/**
|
|
30
|
+
* When true, the trail wraps around the period boundary,
|
|
31
|
+
* which results in a full trail even near `t=0`
|
|
32
|
+
* By default, the trail stops at `t=0`, which results in a partial trail near the start
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
wrap?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Time gap between each trail point (in same units as `t`)
|
|
38
|
+
* Smaller value means a trail that is more dense
|
|
39
|
+
* @default period / trailLength
|
|
40
|
+
*/
|
|
41
|
+
step?: number;
|
|
42
|
+
};
|
|
22
43
|
interface Engine {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Advances the Sarmal simulation by the given delta time (dt) in seconds.
|
|
46
|
+
* Internally, this increases the simulation time `t` by `speed * dt`,
|
|
47
|
+
* wraps `t` at `period`, evaluates the curve's parametric function `fn(t)`,
|
|
48
|
+
* and appends the new point to the trail.
|
|
49
|
+
* Returns the pre-allocated trail buffer, which has the *same* reference every call
|
|
50
|
+
* ! Do not use `Array.length` to determine size
|
|
51
|
+
* @param deltaTime Delta time in seconds (typically frame time from **requestAnimationFrame** or similar)
|
|
52
|
+
*/
|
|
53
|
+
tick(deltaTime: number): Array<Point>;
|
|
54
|
+
/**
|
|
55
|
+
* Number of valid points in the trail buffer returned by the last `tick()` call
|
|
56
|
+
* ! Use this instead of `trail.length`
|
|
57
|
+
*/
|
|
58
|
+
readonly trailCount: number;
|
|
59
|
+
/**
|
|
60
|
+
* Resets the simulation state, by clearing the trail and reverting internal time `t` to 0.
|
|
61
|
+
* The next call to `tick` will start fresh from the beginning of the curve.
|
|
62
|
+
*/
|
|
63
|
+
reset(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the *skeleton* of the curve.
|
|
66
|
+
* In technicality, it just represents the complete traversal of the curve over one full period,
|
|
67
|
+
* which is sampled at points from `t=0` to `t=period`
|
|
68
|
+
*
|
|
69
|
+
* The skeleton is always derived from the curve's state at `t=0` using `fn(t, 0)`
|
|
70
|
+
* This represents the full path the sarmal would trace on its first complete cycle,
|
|
71
|
+
* rendered as a static background reference.
|
|
72
|
+
*
|
|
73
|
+
* The number of sample points is automatically derived from the curve's period.
|
|
74
|
+
*/
|
|
75
|
+
getSarmalSkeleton(): Array<Point>;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the simulation time `t` directly to the specified value.
|
|
78
|
+
* By default, the trail is preserved
|
|
79
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
80
|
+
*/
|
|
81
|
+
seek(t: number, options?: SeekOptions): void;
|
|
82
|
+
/**
|
|
83
|
+
* Seeks to `t` and rebuilds the trail as if the animation naturally arrived there from `t=0`
|
|
84
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
85
|
+
*/
|
|
86
|
+
seekWithTrail(t: number, options?: SeekWithTrailOptions): void;
|
|
55
87
|
}
|
|
56
88
|
interface SarmalInstance {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
89
|
+
start(): void;
|
|
90
|
+
stop(): void;
|
|
91
|
+
/** Resets the engine and clears the trail */
|
|
92
|
+
reset(): void;
|
|
93
|
+
/** Stops the animation and cleans up resources */
|
|
94
|
+
destroy(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Sets the simulation time `t` directly to the specified value.
|
|
97
|
+
* By default, the trail is preserved
|
|
98
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
99
|
+
*/
|
|
100
|
+
seek(t: number, options?: SeekOptions): void;
|
|
101
|
+
/**
|
|
102
|
+
* Seeks to `t` and rebuilds the trail as if the animation naturally arrived there from `t=0`
|
|
103
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
104
|
+
*/
|
|
105
|
+
seekWithTrail(t: number, options?: SeekWithTrailOptions): void;
|
|
63
106
|
}
|
|
64
107
|
interface RendererOptions {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
108
|
+
/** Target canvas element that will contain the Sarmal */
|
|
109
|
+
canvas: HTMLCanvasElement;
|
|
110
|
+
engine: Engine;
|
|
111
|
+
/**
|
|
112
|
+
* @default '#ffffff'
|
|
113
|
+
*/
|
|
114
|
+
skeletonColor?: string;
|
|
115
|
+
/**
|
|
116
|
+
* @default '#ffffff'
|
|
117
|
+
*/
|
|
118
|
+
trailColor?: string;
|
|
119
|
+
/**
|
|
120
|
+
* @default '#ffffff'
|
|
121
|
+
*/
|
|
122
|
+
headColor?: string;
|
|
123
|
+
/** @default 4 */
|
|
124
|
+
headRadius?: number;
|
|
125
|
+
/** @default 20 */
|
|
126
|
+
glowSize?: number;
|
|
84
127
|
}
|
|
85
128
|
interface SarmalOptions extends Omit<RendererOptions, "canvas" | "engine"> {
|
|
86
|
-
|
|
87
|
-
|
|
129
|
+
/** @default 120 */
|
|
130
|
+
trailLength?: number;
|
|
88
131
|
}
|
|
89
132
|
|
|
90
133
|
interface SVGRendererOptions {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
134
|
+
/** Container element that will contain the SVG */
|
|
135
|
+
container: Element;
|
|
136
|
+
engine: Engine;
|
|
137
|
+
/** @default '#ffffff' */
|
|
138
|
+
skeletonColor?: string;
|
|
139
|
+
/** @default '#ffffff' */
|
|
140
|
+
trailColor?: string;
|
|
141
|
+
/** @default '#ffffff' */
|
|
142
|
+
headColor?: string;
|
|
143
|
+
/** @default 4 */
|
|
144
|
+
headRadius?: number;
|
|
145
|
+
/** @default 20 */
|
|
146
|
+
glowSize?: number;
|
|
147
|
+
/** @default 'Loading' */
|
|
148
|
+
ariaLabel?: string;
|
|
106
149
|
}
|
|
107
150
|
interface SVGSarmalOptions extends Omit<SVGRendererOptions, "container" | "engine"> {
|
|
108
|
-
|
|
109
|
-
|
|
151
|
+
/** @default 120 */
|
|
152
|
+
trailLength?: number;
|
|
110
153
|
}
|
|
111
154
|
/**
|
|
112
155
|
* Creates a live SVG renderer for sarmal animations
|
|
@@ -124,7 +167,11 @@ declare function createSVGRenderer(options: SVGRendererOptions): SarmalInstance;
|
|
|
124
167
|
* sarmal.start()
|
|
125
168
|
* ```
|
|
126
169
|
*/
|
|
127
|
-
declare function createSarmalSVG(
|
|
170
|
+
declare function createSarmalSVG(
|
|
171
|
+
container: Element,
|
|
172
|
+
curveDef: CurveDef,
|
|
173
|
+
options?: SVGSarmalOptions,
|
|
174
|
+
): SarmalInstance;
|
|
128
175
|
|
|
129
176
|
/**
|
|
130
177
|
* Creates the core simulation engine for a sarmal
|
|
@@ -158,6 +205,27 @@ declare const curves: Record<string, CurveDef>;
|
|
|
158
205
|
* sarmal.start()
|
|
159
206
|
* ```
|
|
160
207
|
*/
|
|
161
|
-
declare function createSarmal(
|
|
208
|
+
declare function createSarmal(
|
|
209
|
+
canvas: HTMLCanvasElement,
|
|
210
|
+
curveDef: CurveDef,
|
|
211
|
+
options?: SarmalOptions,
|
|
212
|
+
): SarmalInstance;
|
|
162
213
|
|
|
163
|
-
export {
|
|
214
|
+
export {
|
|
215
|
+
type CurveDef,
|
|
216
|
+
type Engine,
|
|
217
|
+
type Point,
|
|
218
|
+
type RendererOptions,
|
|
219
|
+
type SVGRendererOptions,
|
|
220
|
+
type SVGSarmalOptions,
|
|
221
|
+
type SarmalInstance,
|
|
222
|
+
type SarmalOptions,
|
|
223
|
+
type SeekOptions,
|
|
224
|
+
type SeekWithTrailOptions,
|
|
225
|
+
createEngine,
|
|
226
|
+
createRenderer,
|
|
227
|
+
createSVGRenderer,
|
|
228
|
+
createSarmal,
|
|
229
|
+
createSarmalSVG,
|
|
230
|
+
curves,
|
|
231
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,112 +1,155 @@
|
|
|
1
1
|
interface Point {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
4
|
}
|
|
5
5
|
interface CurveDef {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
name: string;
|
|
7
|
+
fn: (t: number, time: number, params: Record<string, number>) => Point;
|
|
8
|
+
/**
|
|
9
|
+
* @default (Math.PI * 2)
|
|
10
|
+
*/
|
|
11
|
+
period?: number;
|
|
12
|
+
/**
|
|
13
|
+
* @default 1
|
|
14
|
+
*/
|
|
15
|
+
speed?: number;
|
|
16
|
+
/**
|
|
17
|
+
* To indicate a compatible library version when providing the curve definitions
|
|
18
|
+
* Intended for potential backwards compatibility scenarios and futureproofing
|
|
19
|
+
*/
|
|
20
|
+
version?: number;
|
|
21
21
|
}
|
|
22
|
+
type SeekOptions = {
|
|
23
|
+
/**
|
|
24
|
+
* Decides whether the sarmal trail should be cleared when `seek` is called
|
|
25
|
+
*/
|
|
26
|
+
clearTrail?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type SeekWithTrailOptions = {
|
|
29
|
+
/**
|
|
30
|
+
* When true, the trail wraps around the period boundary,
|
|
31
|
+
* which results in a full trail even near `t=0`
|
|
32
|
+
* By default, the trail stops at `t=0`, which results in a partial trail near the start
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
wrap?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Time gap between each trail point (in same units as `t`)
|
|
38
|
+
* Smaller value means a trail that is more dense
|
|
39
|
+
* @default period / trailLength
|
|
40
|
+
*/
|
|
41
|
+
step?: number;
|
|
42
|
+
};
|
|
22
43
|
interface Engine {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Advances the Sarmal simulation by the given delta time (dt) in seconds.
|
|
46
|
+
* Internally, this increases the simulation time `t` by `speed * dt`,
|
|
47
|
+
* wraps `t` at `period`, evaluates the curve's parametric function `fn(t)`,
|
|
48
|
+
* and appends the new point to the trail.
|
|
49
|
+
* Returns the pre-allocated trail buffer, which has the *same* reference every call
|
|
50
|
+
* ! Do not use `Array.length` to determine size
|
|
51
|
+
* @param deltaTime Delta time in seconds (typically frame time from **requestAnimationFrame** or similar)
|
|
52
|
+
*/
|
|
53
|
+
tick(deltaTime: number): Array<Point>;
|
|
54
|
+
/**
|
|
55
|
+
* Number of valid points in the trail buffer returned by the last `tick()` call
|
|
56
|
+
* ! Use this instead of `trail.length`
|
|
57
|
+
*/
|
|
58
|
+
readonly trailCount: number;
|
|
59
|
+
/**
|
|
60
|
+
* Resets the simulation state, by clearing the trail and reverting internal time `t` to 0.
|
|
61
|
+
* The next call to `tick` will start fresh from the beginning of the curve.
|
|
62
|
+
*/
|
|
63
|
+
reset(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the *skeleton* of the curve.
|
|
66
|
+
* In technicality, it just represents the complete traversal of the curve over one full period,
|
|
67
|
+
* which is sampled at points from `t=0` to `t=period`
|
|
68
|
+
*
|
|
69
|
+
* The skeleton is always derived from the curve's state at `t=0` using `fn(t, 0)`
|
|
70
|
+
* This represents the full path the sarmal would trace on its first complete cycle,
|
|
71
|
+
* rendered as a static background reference.
|
|
72
|
+
*
|
|
73
|
+
* The number of sample points is automatically derived from the curve's period.
|
|
74
|
+
*/
|
|
75
|
+
getSarmalSkeleton(): Array<Point>;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the simulation time `t` directly to the specified value.
|
|
78
|
+
* By default, the trail is preserved
|
|
79
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
80
|
+
*/
|
|
81
|
+
seek(t: number, options?: SeekOptions): void;
|
|
82
|
+
/**
|
|
83
|
+
* Seeks to `t` and rebuilds the trail as if the animation naturally arrived there from `t=0`
|
|
84
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
85
|
+
*/
|
|
86
|
+
seekWithTrail(t: number, options?: SeekWithTrailOptions): void;
|
|
55
87
|
}
|
|
56
88
|
interface SarmalInstance {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
89
|
+
start(): void;
|
|
90
|
+
stop(): void;
|
|
91
|
+
/** Resets the engine and clears the trail */
|
|
92
|
+
reset(): void;
|
|
93
|
+
/** Stops the animation and cleans up resources */
|
|
94
|
+
destroy(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Sets the simulation time `t` directly to the specified value.
|
|
97
|
+
* By default, the trail is preserved
|
|
98
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
99
|
+
*/
|
|
100
|
+
seek(t: number, options?: SeekOptions): void;
|
|
101
|
+
/**
|
|
102
|
+
* Seeks to `t` and rebuilds the trail as if the animation naturally arrived there from `t=0`
|
|
103
|
+
* @param t The time value to seek to (will be wrapped into [0, period))
|
|
104
|
+
*/
|
|
105
|
+
seekWithTrail(t: number, options?: SeekWithTrailOptions): void;
|
|
63
106
|
}
|
|
64
107
|
interface RendererOptions {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
108
|
+
/** Target canvas element that will contain the Sarmal */
|
|
109
|
+
canvas: HTMLCanvasElement;
|
|
110
|
+
engine: Engine;
|
|
111
|
+
/**
|
|
112
|
+
* @default '#ffffff'
|
|
113
|
+
*/
|
|
114
|
+
skeletonColor?: string;
|
|
115
|
+
/**
|
|
116
|
+
* @default '#ffffff'
|
|
117
|
+
*/
|
|
118
|
+
trailColor?: string;
|
|
119
|
+
/**
|
|
120
|
+
* @default '#ffffff'
|
|
121
|
+
*/
|
|
122
|
+
headColor?: string;
|
|
123
|
+
/** @default 4 */
|
|
124
|
+
headRadius?: number;
|
|
125
|
+
/** @default 20 */
|
|
126
|
+
glowSize?: number;
|
|
84
127
|
}
|
|
85
128
|
interface SarmalOptions extends Omit<RendererOptions, "canvas" | "engine"> {
|
|
86
|
-
|
|
87
|
-
|
|
129
|
+
/** @default 120 */
|
|
130
|
+
trailLength?: number;
|
|
88
131
|
}
|
|
89
132
|
|
|
90
133
|
interface SVGRendererOptions {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
134
|
+
/** Container element that will contain the SVG */
|
|
135
|
+
container: Element;
|
|
136
|
+
engine: Engine;
|
|
137
|
+
/** @default '#ffffff' */
|
|
138
|
+
skeletonColor?: string;
|
|
139
|
+
/** @default '#ffffff' */
|
|
140
|
+
trailColor?: string;
|
|
141
|
+
/** @default '#ffffff' */
|
|
142
|
+
headColor?: string;
|
|
143
|
+
/** @default 4 */
|
|
144
|
+
headRadius?: number;
|
|
145
|
+
/** @default 20 */
|
|
146
|
+
glowSize?: number;
|
|
147
|
+
/** @default 'Loading' */
|
|
148
|
+
ariaLabel?: string;
|
|
106
149
|
}
|
|
107
150
|
interface SVGSarmalOptions extends Omit<SVGRendererOptions, "container" | "engine"> {
|
|
108
|
-
|
|
109
|
-
|
|
151
|
+
/** @default 120 */
|
|
152
|
+
trailLength?: number;
|
|
110
153
|
}
|
|
111
154
|
/**
|
|
112
155
|
* Creates a live SVG renderer for sarmal animations
|
|
@@ -124,7 +167,11 @@ declare function createSVGRenderer(options: SVGRendererOptions): SarmalInstance;
|
|
|
124
167
|
* sarmal.start()
|
|
125
168
|
* ```
|
|
126
169
|
*/
|
|
127
|
-
declare function createSarmalSVG(
|
|
170
|
+
declare function createSarmalSVG(
|
|
171
|
+
container: Element,
|
|
172
|
+
curveDef: CurveDef,
|
|
173
|
+
options?: SVGSarmalOptions,
|
|
174
|
+
): SarmalInstance;
|
|
128
175
|
|
|
129
176
|
/**
|
|
130
177
|
* Creates the core simulation engine for a sarmal
|
|
@@ -158,6 +205,27 @@ declare const curves: Record<string, CurveDef>;
|
|
|
158
205
|
* sarmal.start()
|
|
159
206
|
* ```
|
|
160
207
|
*/
|
|
161
|
-
declare function createSarmal(
|
|
208
|
+
declare function createSarmal(
|
|
209
|
+
canvas: HTMLCanvasElement,
|
|
210
|
+
curveDef: CurveDef,
|
|
211
|
+
options?: SarmalOptions,
|
|
212
|
+
): SarmalInstance;
|
|
162
213
|
|
|
163
|
-
export {
|
|
214
|
+
export {
|
|
215
|
+
type CurveDef,
|
|
216
|
+
type Engine,
|
|
217
|
+
type Point,
|
|
218
|
+
type RendererOptions,
|
|
219
|
+
type SVGRendererOptions,
|
|
220
|
+
type SVGSarmalOptions,
|
|
221
|
+
type SarmalInstance,
|
|
222
|
+
type SarmalOptions,
|
|
223
|
+
type SeekOptions,
|
|
224
|
+
type SeekWithTrailOptions,
|
|
225
|
+
createEngine,
|
|
226
|
+
createRenderer,
|
|
227
|
+
createSVGRenderer,
|
|
228
|
+
createSarmal,
|
|
229
|
+
createSarmalSVG,
|
|
230
|
+
curves,
|
|
231
|
+
};
|