cavi 0.1.0 → 0.1.2
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/cavi.d.ts +270 -210
- package/cavi.js +476 -366
- package/cavi_bg.wasm +0 -0
- package/package.json +3 -3
package/cavi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
-
export class
|
|
4
|
+
export class WasmNode {
|
|
5
5
|
free(): void;
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
7
|
/**
|
|
@@ -11,15 +11,15 @@ export class Node {
|
|
|
11
11
|
/**
|
|
12
12
|
* Applies a force from a Point
|
|
13
13
|
*/
|
|
14
|
-
apply_force_point(force:
|
|
14
|
+
apply_force_point(force: WasmPoint): void;
|
|
15
15
|
/**
|
|
16
16
|
* Returns the squared distance to another node (faster)
|
|
17
17
|
*/
|
|
18
|
-
distance_squared_to(other:
|
|
18
|
+
distance_squared_to(other: WasmNode): number;
|
|
19
19
|
/**
|
|
20
20
|
* Returns the distance to another node
|
|
21
21
|
*/
|
|
22
|
-
distance_to(other:
|
|
22
|
+
distance_to(other: WasmNode): number;
|
|
23
23
|
/**
|
|
24
24
|
* Returns the fixed value (0.0 = movable, 1.0 = fixed)
|
|
25
25
|
*/
|
|
@@ -27,7 +27,7 @@ export class Node {
|
|
|
27
27
|
/**
|
|
28
28
|
* Returns the current position as a Point
|
|
29
29
|
*/
|
|
30
|
-
get_position():
|
|
30
|
+
get_position(): WasmPoint;
|
|
31
31
|
/**
|
|
32
32
|
* Returns the speed (magnitude of velocity)
|
|
33
33
|
*/
|
|
@@ -35,7 +35,7 @@ export class Node {
|
|
|
35
35
|
/**
|
|
36
36
|
* Returns the velocity as a Point
|
|
37
37
|
*/
|
|
38
|
-
get_velocity():
|
|
38
|
+
get_velocity(): WasmPoint;
|
|
39
39
|
/**
|
|
40
40
|
* Returns the velocity x component
|
|
41
41
|
*/
|
|
@@ -68,15 +68,15 @@ export class Node {
|
|
|
68
68
|
* Makes the node movable
|
|
69
69
|
*/
|
|
70
70
|
make_movable(): void;
|
|
71
|
-
constructor(pos:
|
|
71
|
+
constructor(pos: WasmPosition, vel: WasmPoint, fix: boolean);
|
|
72
72
|
/**
|
|
73
73
|
* Creates a fixed Node at the given position
|
|
74
74
|
*/
|
|
75
|
-
static new_fixed(x: number, y: number):
|
|
75
|
+
static new_fixed(x: number, y: number): WasmNode;
|
|
76
76
|
/**
|
|
77
77
|
* Creates a Node with no initial velocity
|
|
78
78
|
*/
|
|
79
|
-
static new_no_vel(x: number, y: number, fix: boolean):
|
|
79
|
+
static new_no_vel(x: number, y: number, fix: boolean): WasmNode;
|
|
80
80
|
/**
|
|
81
81
|
* Converts to a string representation
|
|
82
82
|
*/
|
|
@@ -104,21 +104,21 @@ export class Node {
|
|
|
104
104
|
/**
|
|
105
105
|
* Updates the position based on velocity and acceleration
|
|
106
106
|
*/
|
|
107
|
-
update_position(dt: number, friction: number, acceleration:
|
|
107
|
+
update_position(dt: number, friction: number, acceleration: WasmPoint): void;
|
|
108
108
|
/**
|
|
109
109
|
* Updates position with custom acceleration
|
|
110
110
|
*/
|
|
111
|
-
update_with_acceleration(acceleration:
|
|
111
|
+
update_with_acceleration(acceleration: WasmPoint, dt: number, friction: number): void;
|
|
112
112
|
/**
|
|
113
113
|
* Creates a Node at origin with no velocity
|
|
114
114
|
*/
|
|
115
|
-
static zero():
|
|
115
|
+
static zero(): WasmNode;
|
|
116
116
|
fixed: boolean;
|
|
117
|
-
position:
|
|
118
|
-
velocity:
|
|
117
|
+
position: WasmPosition;
|
|
118
|
+
velocity: WasmPoint;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
export class
|
|
121
|
+
export class WasmPoint {
|
|
122
122
|
free(): void;
|
|
123
123
|
[Symbol.dispose](): void;
|
|
124
124
|
/**
|
|
@@ -128,31 +128,31 @@ export class Point {
|
|
|
128
128
|
/**
|
|
129
129
|
* Returns the angle to another point in radians
|
|
130
130
|
*/
|
|
131
|
-
angle_to(other:
|
|
131
|
+
angle_to(other: WasmPoint): number;
|
|
132
132
|
/**
|
|
133
133
|
* Returns true if this point is approximately equal to another
|
|
134
134
|
*/
|
|
135
|
-
approx_equal(other:
|
|
135
|
+
approx_equal(other: WasmPoint, epsilon: number): boolean;
|
|
136
136
|
/**
|
|
137
137
|
* Clamps the length of the vector to a maximum value
|
|
138
138
|
*/
|
|
139
|
-
clamped(max_length: number):
|
|
139
|
+
clamped(max_length: number): WasmPoint;
|
|
140
140
|
/**
|
|
141
141
|
* Returns the cross product (z component) with another point
|
|
142
142
|
*/
|
|
143
|
-
cross(other:
|
|
143
|
+
cross(other: WasmPoint): number;
|
|
144
144
|
/**
|
|
145
145
|
* Returns the squared distance to another point (avoids sqrt)
|
|
146
146
|
*/
|
|
147
|
-
distance_squared_to(other:
|
|
147
|
+
distance_squared_to(other: WasmPoint): number;
|
|
148
148
|
/**
|
|
149
149
|
* Returns the distance to another point
|
|
150
150
|
*/
|
|
151
|
-
distance_to(other:
|
|
151
|
+
distance_to(other: WasmPoint): number;
|
|
152
152
|
/**
|
|
153
153
|
* Returns the dot product with another point
|
|
154
154
|
*/
|
|
155
|
-
dot(other:
|
|
155
|
+
dot(other: WasmPoint): number;
|
|
156
156
|
/**
|
|
157
157
|
* Returns the length (magnitude) of the vector
|
|
158
158
|
*/
|
|
@@ -164,7 +164,7 @@ export class Point {
|
|
|
164
164
|
/**
|
|
165
165
|
* Linear interpolation between this point and another
|
|
166
166
|
*/
|
|
167
|
-
lerp(other:
|
|
167
|
+
lerp(other: WasmPoint, t: number): WasmPoint;
|
|
168
168
|
constructor(x: number, y: number);
|
|
169
169
|
/**
|
|
170
170
|
* Normalizes this point in place
|
|
@@ -173,19 +173,19 @@ export class Point {
|
|
|
173
173
|
/**
|
|
174
174
|
* Returns a normalized version of this point (unit vector)
|
|
175
175
|
*/
|
|
176
|
-
normalized():
|
|
176
|
+
normalized(): WasmPoint;
|
|
177
177
|
/**
|
|
178
178
|
* Returns a point with both components set to 1
|
|
179
179
|
*/
|
|
180
|
-
static one():
|
|
180
|
+
static one(): WasmPoint;
|
|
181
181
|
/**
|
|
182
182
|
* Returns a perpendicular vector (rotated 90 degrees CCW)
|
|
183
183
|
*/
|
|
184
|
-
perpendicular():
|
|
184
|
+
perpendicular(): WasmPoint;
|
|
185
185
|
/**
|
|
186
186
|
* Reflects this vector across a normal vector
|
|
187
187
|
*/
|
|
188
|
-
reflect(normal:
|
|
188
|
+
reflect(normal: WasmPoint): WasmPoint;
|
|
189
189
|
/**
|
|
190
190
|
* Rotates this point in place by the given angle (in radians)
|
|
191
191
|
*/
|
|
@@ -193,30 +193,30 @@ export class Point {
|
|
|
193
193
|
/**
|
|
194
194
|
* Returns a point rotated by the given angle (in radians)
|
|
195
195
|
*/
|
|
196
|
-
rotated(angle: number):
|
|
196
|
+
rotated(angle: number): WasmPoint;
|
|
197
197
|
/**
|
|
198
198
|
* Returns a unit point in the X direction (1, 0)
|
|
199
199
|
*/
|
|
200
|
-
static unit_x():
|
|
200
|
+
static unit_x(): WasmPoint;
|
|
201
201
|
/**
|
|
202
202
|
* Returns a unit point in the Y direction (0, 1)
|
|
203
203
|
*/
|
|
204
|
-
static unit_y():
|
|
204
|
+
static unit_y(): WasmPoint;
|
|
205
205
|
/**
|
|
206
206
|
* Returns a zero point (0, 0)
|
|
207
207
|
*/
|
|
208
|
-
static zero():
|
|
208
|
+
static zero(): WasmPoint;
|
|
209
209
|
x: number;
|
|
210
210
|
y: number;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
export class
|
|
213
|
+
export class WasmPosition {
|
|
214
214
|
free(): void;
|
|
215
215
|
[Symbol.dispose](): void;
|
|
216
216
|
/**
|
|
217
217
|
* Applies a constraint by moving the current position
|
|
218
218
|
*/
|
|
219
|
-
constrain(target:
|
|
219
|
+
constrain(target: WasmPoint): void;
|
|
220
220
|
/**
|
|
221
221
|
* Returns the distance between current and old positions
|
|
222
222
|
*/
|
|
@@ -224,11 +224,11 @@ export class Position {
|
|
|
224
224
|
/**
|
|
225
225
|
* Creates a Position from two Points
|
|
226
226
|
*/
|
|
227
|
-
static from_points(curr:
|
|
227
|
+
static from_points(curr: WasmPoint, old: WasmPoint): WasmPosition;
|
|
228
228
|
/**
|
|
229
229
|
* Returns the current position as a Point
|
|
230
230
|
*/
|
|
231
|
-
get_curr():
|
|
231
|
+
get_curr(): WasmPoint;
|
|
232
232
|
/**
|
|
233
233
|
* Returns the current x coordinate
|
|
234
234
|
*/
|
|
@@ -240,7 +240,7 @@ export class Position {
|
|
|
240
240
|
/**
|
|
241
241
|
* Returns the old position as a Point
|
|
242
242
|
*/
|
|
243
|
-
get_old():
|
|
243
|
+
get_old(): WasmPoint;
|
|
244
244
|
/**
|
|
245
245
|
* Returns the old x coordinate
|
|
246
246
|
*/
|
|
@@ -253,12 +253,12 @@ export class Position {
|
|
|
253
253
|
* Integrates the position using Verlet integration
|
|
254
254
|
* new_pos = curr + (curr - old) * damping + acceleration * dt^2
|
|
255
255
|
*/
|
|
256
|
-
integrate(acceleration:
|
|
256
|
+
integrate(acceleration: WasmPoint, dt: number, damping: number): void;
|
|
257
257
|
constructor(x: number, y: number);
|
|
258
258
|
/**
|
|
259
259
|
* Creates a Position with different current and old positions
|
|
260
260
|
*/
|
|
261
|
-
static new_with_old(curr_x: number, curr_y: number, old_x: number, old_y: number):
|
|
261
|
+
static new_with_old(curr_x: number, curr_y: number, old_x: number, old_y: number): WasmPosition;
|
|
262
262
|
/**
|
|
263
263
|
* Resets old position to match current (stops motion)
|
|
264
264
|
*/
|
|
@@ -270,7 +270,7 @@ export class Position {
|
|
|
270
270
|
/**
|
|
271
271
|
* Sets the current position from a Point
|
|
272
272
|
*/
|
|
273
|
-
set_curr_point(point:
|
|
273
|
+
set_curr_point(point: WasmPoint): void;
|
|
274
274
|
/**
|
|
275
275
|
* Sets the old position
|
|
276
276
|
*/
|
|
@@ -278,7 +278,7 @@ export class Position {
|
|
|
278
278
|
/**
|
|
279
279
|
* Sets the old position from a Point
|
|
280
280
|
*/
|
|
281
|
-
set_old_point(point:
|
|
281
|
+
set_old_point(point: WasmPoint): void;
|
|
282
282
|
/**
|
|
283
283
|
* Returns the speed (magnitude of velocity)
|
|
284
284
|
*/
|
|
@@ -290,26 +290,34 @@ export class Position {
|
|
|
290
290
|
/**
|
|
291
291
|
* Updates the position from a Point
|
|
292
292
|
*/
|
|
293
|
-
update_point(point:
|
|
293
|
+
update_point(point: WasmPoint): void;
|
|
294
294
|
/**
|
|
295
295
|
* Returns the velocity (difference between current and old positions)
|
|
296
296
|
*/
|
|
297
|
-
velocity():
|
|
298
|
-
curr:
|
|
299
|
-
old:
|
|
297
|
+
velocity(): WasmPoint;
|
|
298
|
+
curr: WasmPoint;
|
|
299
|
+
old: WasmPoint;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
export class
|
|
302
|
+
export class WasmWire {
|
|
303
303
|
free(): void;
|
|
304
304
|
[Symbol.dispose](): void;
|
|
305
|
+
/**
|
|
306
|
+
* Adds a new node at the specified position
|
|
307
|
+
*/
|
|
308
|
+
add_node(x: number, y: number, fixed: boolean): void;
|
|
309
|
+
/**
|
|
310
|
+
* Adds a new node at a specific index
|
|
311
|
+
*/
|
|
312
|
+
add_node_at(index: number, x: number, y: number, fixed: boolean): void;
|
|
305
313
|
/**
|
|
306
314
|
* Checks collision with a point and adjusts nodes
|
|
307
315
|
*/
|
|
308
|
-
check_collision(point:
|
|
316
|
+
check_collision(point: WasmPoint, pointer_radius: number): void;
|
|
309
317
|
/**
|
|
310
318
|
* Checks collision with mouse/pointer position
|
|
311
319
|
*/
|
|
312
|
-
check_mouse_collision(mouse:
|
|
320
|
+
check_mouse_collision(mouse: WasmPoint, mouse_radius: number): void;
|
|
313
321
|
/**
|
|
314
322
|
* Checks for collisions between wire elements
|
|
315
323
|
*/
|
|
@@ -317,11 +325,11 @@ export class Wire {
|
|
|
317
325
|
/**
|
|
318
326
|
* Gets the end point of the wire
|
|
319
327
|
*/
|
|
320
|
-
get_end():
|
|
328
|
+
get_end(): WasmPoint;
|
|
321
329
|
/**
|
|
322
330
|
* Gets a specific node by index
|
|
323
331
|
*/
|
|
324
|
-
get_node(index: number):
|
|
332
|
+
get_node(index: number): WasmNode | undefined;
|
|
325
333
|
/**
|
|
326
334
|
* Gets the x coordinate of a node at the given index
|
|
327
335
|
*/
|
|
@@ -338,7 +346,7 @@ export class Wire {
|
|
|
338
346
|
/**
|
|
339
347
|
* Gets the start point of the wire
|
|
340
348
|
*/
|
|
341
|
-
get_start():
|
|
349
|
+
get_start(): WasmPoint;
|
|
342
350
|
/**
|
|
343
351
|
* Resets the iteration counter
|
|
344
352
|
*/
|
|
@@ -351,16 +359,20 @@ export class Wire {
|
|
|
351
359
|
/**
|
|
352
360
|
* Creates a wire between two points with specified radius
|
|
353
361
|
*/
|
|
354
|
-
static new_wire(xs: number, ys: number, xe: number, ye: number, radius: number):
|
|
362
|
+
static new_wire(xs: number, ys: number, xe: number, ye: number, radius: number): WasmWire;
|
|
355
363
|
/**
|
|
356
364
|
* Creates a wire with specific node count and link target distance
|
|
357
365
|
*/
|
|
358
|
-
static new_with_count(xs: number, ys: number, xe: number, ye: number, node_count: number, link_target: number, radius: number, render_type: number):
|
|
366
|
+
static new_with_count(xs: number, ys: number, xe: number, ye: number, node_count: number, link_target: number, radius: number, render_type: number): WasmWire;
|
|
359
367
|
/**
|
|
360
368
|
* Returns the number of nodes in the wire
|
|
361
369
|
*/
|
|
362
370
|
node_count(): number;
|
|
363
|
-
static optimal_length(start:
|
|
371
|
+
static optimal_length(start: WasmPoint, end: WasmPoint, node_radius: number): number;
|
|
372
|
+
/**
|
|
373
|
+
* Removes a node at the specified index
|
|
374
|
+
*/
|
|
375
|
+
remove_node(index: number): boolean;
|
|
364
376
|
/**
|
|
365
377
|
* Sets the end point position (if it's fixed)
|
|
366
378
|
*/
|
|
@@ -374,6 +386,10 @@ export class Wire {
|
|
|
374
386
|
* Sets the fixed state of a specific node
|
|
375
387
|
*/
|
|
376
388
|
set_node_fixed(node_idx: number, fixed: boolean): void;
|
|
389
|
+
/**
|
|
390
|
+
* Sets the position of a specific node
|
|
391
|
+
*/
|
|
392
|
+
set_node_position(node_idx: number, x: number, y: number): void;
|
|
377
393
|
/**
|
|
378
394
|
* Sets the radius of the wire
|
|
379
395
|
*/
|
|
@@ -389,14 +405,14 @@ export class Wire {
|
|
|
389
405
|
/**
|
|
390
406
|
* Updates the wire physics simulation
|
|
391
407
|
*/
|
|
392
|
-
update(dt: number, friction: number, acceleration:
|
|
408
|
+
update(dt: number, friction: number, acceleration: WasmPoint): void;
|
|
393
409
|
iterations: number;
|
|
394
410
|
link_target_distance: number;
|
|
395
411
|
radius: number;
|
|
396
412
|
render_type: number;
|
|
397
413
|
}
|
|
398
414
|
|
|
399
|
-
export class
|
|
415
|
+
export class WasmWorld {
|
|
400
416
|
free(): void;
|
|
401
417
|
[Symbol.dispose](): void;
|
|
402
418
|
/**
|
|
@@ -407,14 +423,34 @@ export class World {
|
|
|
407
423
|
* Adds a default wire to the world
|
|
408
424
|
*/
|
|
409
425
|
add_wire_debug(): void;
|
|
426
|
+
/**
|
|
427
|
+
* Adds a node to a specific wire
|
|
428
|
+
*/
|
|
429
|
+
add_wire_node(wire_idx: number, x: number, y: number, fixed: boolean): void;
|
|
430
|
+
/**
|
|
431
|
+
* Adds a node to a specific wire at a specific index
|
|
432
|
+
*/
|
|
433
|
+
add_wire_node_at(wire_idx: number, node_idx: number, x: number, y: number, fixed: boolean): void;
|
|
410
434
|
/**
|
|
411
435
|
* Adds a wire with specific node count and link target distance
|
|
412
436
|
*/
|
|
413
437
|
add_wire_with_count(xs: number, ys: number, xe: number, ye: number, node_count: number, link_target: number, radius: number, render_type: number): void;
|
|
438
|
+
/**
|
|
439
|
+
* Deletes a wire by index
|
|
440
|
+
*/
|
|
441
|
+
delete_wire(index: number): boolean;
|
|
414
442
|
/**
|
|
415
443
|
* Gets the acceleration vector
|
|
416
444
|
*/
|
|
417
|
-
get_acceleration():
|
|
445
|
+
get_acceleration(): WasmPoint;
|
|
446
|
+
/**
|
|
447
|
+
* Gets the x component of acceleration
|
|
448
|
+
*/
|
|
449
|
+
get_acceleration_x(): number;
|
|
450
|
+
/**
|
|
451
|
+
* Gets the y component of acceleration
|
|
452
|
+
*/
|
|
453
|
+
get_acceleration_y(): number;
|
|
418
454
|
/**
|
|
419
455
|
* Gets the friction coefficient
|
|
420
456
|
*/
|
|
@@ -434,11 +470,11 @@ export class World {
|
|
|
434
470
|
/**
|
|
435
471
|
* Gets a specific wire by index
|
|
436
472
|
*/
|
|
437
|
-
get_wire(index: number):
|
|
473
|
+
get_wire(index: number): WasmWire | undefined;
|
|
438
474
|
/**
|
|
439
475
|
* Gets a node from a specific wire
|
|
440
476
|
*/
|
|
441
|
-
get_wire_node(wire_idx: number, node_idx: number):
|
|
477
|
+
get_wire_node(wire_idx: number, node_idx: number): WasmNode | undefined;
|
|
442
478
|
/**
|
|
443
479
|
* Gets the number of nodes in a specific wire
|
|
444
480
|
*/
|
|
@@ -453,6 +489,10 @@ export class World {
|
|
|
453
489
|
get_wire_node_y(wire_idx: number, node_idx: number): number;
|
|
454
490
|
get_wire_radius(wire_idx: number): number;
|
|
455
491
|
constructor();
|
|
492
|
+
/**
|
|
493
|
+
* Removes a node from a specific wire
|
|
494
|
+
*/
|
|
495
|
+
remove_wire_node(wire_idx: number, node_idx: number): boolean;
|
|
456
496
|
/**
|
|
457
497
|
* Sets the acceleration vector
|
|
458
498
|
*/
|
|
@@ -489,6 +529,14 @@ export class World {
|
|
|
489
529
|
* Sets the fixed state of a specific node in a wire
|
|
490
530
|
*/
|
|
491
531
|
set_wire_node_fixed(wire_idx: number, node_idx: number, fixed: boolean): void;
|
|
532
|
+
/**
|
|
533
|
+
* Sets the position of a specific node in a wire
|
|
534
|
+
*/
|
|
535
|
+
set_wire_node_position(wire_idx: number, node_idx: number, x: number, y: number): void;
|
|
536
|
+
/**
|
|
537
|
+
* Sets the radius of a specific wire
|
|
538
|
+
*/
|
|
539
|
+
set_wire_radius(wire_idx: number, radius: number): void;
|
|
492
540
|
/**
|
|
493
541
|
* Sets the position of the first node (start) of a wire
|
|
494
542
|
*/
|
|
@@ -520,158 +568,170 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
520
568
|
|
|
521
569
|
export interface InitOutput {
|
|
522
570
|
readonly memory: WebAssembly.Memory;
|
|
523
|
-
readonly
|
|
524
|
-
readonly
|
|
525
|
-
readonly
|
|
526
|
-
readonly
|
|
527
|
-
readonly
|
|
528
|
-
readonly
|
|
529
|
-
readonly
|
|
530
|
-
readonly
|
|
531
|
-
readonly
|
|
532
|
-
readonly
|
|
533
|
-
readonly
|
|
534
|
-
readonly
|
|
535
|
-
readonly
|
|
536
|
-
readonly
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
539
|
-
readonly
|
|
540
|
-
readonly
|
|
541
|
-
readonly
|
|
542
|
-
readonly
|
|
543
|
-
readonly
|
|
544
|
-
readonly
|
|
545
|
-
readonly
|
|
546
|
-
readonly
|
|
547
|
-
readonly
|
|
548
|
-
readonly
|
|
549
|
-
readonly
|
|
550
|
-
readonly
|
|
551
|
-
readonly
|
|
552
|
-
readonly
|
|
553
|
-
readonly
|
|
554
|
-
readonly
|
|
555
|
-
readonly
|
|
556
|
-
readonly
|
|
557
|
-
readonly
|
|
558
|
-
readonly
|
|
559
|
-
readonly
|
|
560
|
-
readonly
|
|
561
|
-
readonly
|
|
562
|
-
readonly
|
|
563
|
-
readonly
|
|
564
|
-
readonly
|
|
565
|
-
readonly
|
|
566
|
-
readonly
|
|
567
|
-
readonly
|
|
568
|
-
readonly
|
|
569
|
-
readonly
|
|
570
|
-
readonly
|
|
571
|
-
readonly
|
|
572
|
-
readonly
|
|
573
|
-
readonly
|
|
574
|
-
readonly
|
|
575
|
-
readonly
|
|
576
|
-
readonly
|
|
577
|
-
readonly
|
|
578
|
-
readonly
|
|
579
|
-
readonly
|
|
580
|
-
readonly
|
|
581
|
-
readonly
|
|
582
|
-
readonly
|
|
583
|
-
readonly
|
|
584
|
-
readonly
|
|
585
|
-
readonly
|
|
586
|
-
readonly
|
|
587
|
-
readonly
|
|
588
|
-
readonly
|
|
589
|
-
readonly
|
|
590
|
-
readonly
|
|
591
|
-
readonly
|
|
592
|
-
readonly
|
|
593
|
-
readonly
|
|
594
|
-
readonly
|
|
595
|
-
readonly
|
|
596
|
-
readonly
|
|
597
|
-
readonly
|
|
598
|
-
readonly
|
|
599
|
-
readonly
|
|
600
|
-
readonly
|
|
601
|
-
readonly
|
|
602
|
-
readonly
|
|
603
|
-
readonly
|
|
604
|
-
readonly
|
|
605
|
-
readonly
|
|
606
|
-
readonly
|
|
607
|
-
readonly
|
|
608
|
-
readonly
|
|
609
|
-
readonly
|
|
610
|
-
readonly
|
|
611
|
-
readonly
|
|
612
|
-
readonly
|
|
613
|
-
readonly
|
|
614
|
-
readonly
|
|
615
|
-
readonly
|
|
616
|
-
readonly
|
|
617
|
-
readonly
|
|
618
|
-
readonly
|
|
619
|
-
readonly
|
|
620
|
-
readonly
|
|
621
|
-
readonly
|
|
622
|
-
readonly
|
|
623
|
-
readonly
|
|
624
|
-
readonly
|
|
625
|
-
readonly
|
|
626
|
-
readonly
|
|
627
|
-
readonly
|
|
628
|
-
readonly
|
|
629
|
-
readonly
|
|
630
|
-
readonly
|
|
631
|
-
readonly
|
|
632
|
-
readonly
|
|
633
|
-
readonly
|
|
634
|
-
readonly
|
|
635
|
-
readonly
|
|
636
|
-
readonly
|
|
637
|
-
readonly
|
|
638
|
-
readonly
|
|
639
|
-
readonly
|
|
640
|
-
readonly
|
|
641
|
-
readonly
|
|
642
|
-
readonly
|
|
643
|
-
readonly
|
|
644
|
-
readonly
|
|
645
|
-
readonly
|
|
646
|
-
readonly
|
|
647
|
-
readonly
|
|
648
|
-
readonly
|
|
649
|
-
readonly
|
|
650
|
-
readonly
|
|
651
|
-
readonly
|
|
652
|
-
readonly
|
|
653
|
-
readonly
|
|
654
|
-
readonly
|
|
655
|
-
readonly
|
|
656
|
-
readonly
|
|
657
|
-
readonly
|
|
658
|
-
readonly
|
|
659
|
-
readonly
|
|
660
|
-
readonly
|
|
661
|
-
readonly
|
|
662
|
-
readonly
|
|
663
|
-
readonly
|
|
664
|
-
readonly
|
|
665
|
-
readonly
|
|
666
|
-
readonly
|
|
667
|
-
readonly
|
|
668
|
-
readonly
|
|
669
|
-
readonly
|
|
670
|
-
readonly
|
|
671
|
-
readonly
|
|
672
|
-
readonly
|
|
673
|
-
readonly
|
|
674
|
-
readonly
|
|
571
|
+
readonly __wbg_get_wasmnode_fixed: (a: number) => number;
|
|
572
|
+
readonly __wbg_get_wasmnode_position: (a: number) => number;
|
|
573
|
+
readonly __wbg_get_wasmnode_velocity: (a: number) => number;
|
|
574
|
+
readonly __wbg_set_wasmnode_fixed: (a: number, b: number) => void;
|
|
575
|
+
readonly __wbg_set_wasmnode_position: (a: number, b: number) => void;
|
|
576
|
+
readonly __wbg_set_wasmnode_velocity: (a: number, b: number) => void;
|
|
577
|
+
readonly __wbg_wasmnode_free: (a: number, b: number) => void;
|
|
578
|
+
readonly wasmnode_apply_force: (a: number, b: number, c: number) => void;
|
|
579
|
+
readonly wasmnode_apply_force_point: (a: number, b: number) => void;
|
|
580
|
+
readonly wasmnode_distance_squared_to: (a: number, b: number) => number;
|
|
581
|
+
readonly wasmnode_distance_to: (a: number, b: number) => number;
|
|
582
|
+
readonly wasmnode_get_fixed: (a: number) => number;
|
|
583
|
+
readonly wasmnode_get_position: (a: number) => number;
|
|
584
|
+
readonly wasmnode_get_speed: (a: number) => number;
|
|
585
|
+
readonly wasmnode_get_velocity: (a: number) => number;
|
|
586
|
+
readonly wasmnode_get_velocity_x: (a: number) => number;
|
|
587
|
+
readonly wasmnode_get_velocity_y: (a: number) => number;
|
|
588
|
+
readonly wasmnode_get_x: (a: number) => number;
|
|
589
|
+
readonly wasmnode_get_y: (a: number) => number;
|
|
590
|
+
readonly wasmnode_is_movable: (a: number) => number;
|
|
591
|
+
readonly wasmnode_make_fixed: (a: number) => void;
|
|
592
|
+
readonly wasmnode_make_movable: (a: number) => void;
|
|
593
|
+
readonly wasmnode_new: (a: number, b: number, c: number) => number;
|
|
594
|
+
readonly wasmnode_new_fixed: (a: number, b: number) => number;
|
|
595
|
+
readonly wasmnode_new_no_vel: (a: number, b: number, c: number) => number;
|
|
596
|
+
readonly wasmnode_print: (a: number) => [number, number];
|
|
597
|
+
readonly wasmnode_reset_velocity: (a: number) => void;
|
|
598
|
+
readonly wasmnode_set_fixed: (a: number, b: number) => void;
|
|
599
|
+
readonly wasmnode_set_position: (a: number, b: number, c: number) => void;
|
|
600
|
+
readonly wasmnode_set_velocity: (a: number, b: number, c: number) => void;
|
|
601
|
+
readonly wasmnode_translate: (a: number, b: number, c: number) => void;
|
|
602
|
+
readonly wasmnode_update_position: (a: number, b: number, c: number, d: number) => void;
|
|
603
|
+
readonly wasmnode_update_with_acceleration: (a: number, b: number, c: number, d: number) => void;
|
|
604
|
+
readonly wasmnode_zero: () => number;
|
|
605
|
+
readonly wasmnode_is_fixed: (a: number) => number;
|
|
606
|
+
readonly __wbg_get_wasmwire_iterations: (a: number) => number;
|
|
607
|
+
readonly __wbg_get_wasmwire_link_target_distance: (a: number) => number;
|
|
608
|
+
readonly __wbg_get_wasmwire_radius: (a: number) => number;
|
|
609
|
+
readonly __wbg_get_wasmwire_render_type: (a: number) => number;
|
|
610
|
+
readonly __wbg_set_wasmwire_iterations: (a: number, b: number) => void;
|
|
611
|
+
readonly __wbg_set_wasmwire_link_target_distance: (a: number, b: number) => void;
|
|
612
|
+
readonly __wbg_set_wasmwire_radius: (a: number, b: number) => void;
|
|
613
|
+
readonly __wbg_set_wasmwire_render_type: (a: number, b: number) => void;
|
|
614
|
+
readonly __wbg_wasmwire_free: (a: number, b: number) => void;
|
|
615
|
+
readonly wasmwire_add_node: (a: number, b: number, c: number, d: number) => void;
|
|
616
|
+
readonly wasmwire_add_node_at: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
617
|
+
readonly wasmwire_check_collision: (a: number, b: number, c: number) => void;
|
|
618
|
+
readonly wasmwire_check_mouse_collision: (a: number, b: number, c: number) => void;
|
|
619
|
+
readonly wasmwire_check_wire_elements_collisions: (a: number, b: number) => void;
|
|
620
|
+
readonly wasmwire_get_end: (a: number) => number;
|
|
621
|
+
readonly wasmwire_get_node: (a: number, b: number) => number;
|
|
622
|
+
readonly wasmwire_get_node_x: (a: number, b: number) => number;
|
|
623
|
+
readonly wasmwire_get_node_y: (a: number, b: number) => number;
|
|
624
|
+
readonly wasmwire_get_radius: (a: number) => number;
|
|
625
|
+
readonly wasmwire_get_render_type: (a: number) => number;
|
|
626
|
+
readonly wasmwire_get_start: (a: number) => number;
|
|
627
|
+
readonly wasmwire_invalidate: (a: number) => void;
|
|
628
|
+
readonly wasmwire_length: (a: number) => number;
|
|
629
|
+
readonly wasmwire_new: () => number;
|
|
630
|
+
readonly wasmwire_new_wire: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
631
|
+
readonly wasmwire_new_with_count: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
632
|
+
readonly wasmwire_node_count: (a: number) => number;
|
|
633
|
+
readonly wasmwire_optimal_length: (a: number, b: number, c: number) => number;
|
|
634
|
+
readonly wasmwire_remove_node: (a: number, b: number) => number;
|
|
635
|
+
readonly wasmwire_set_end: (a: number, b: number, c: number) => void;
|
|
636
|
+
readonly wasmwire_set_node_count: (a: number, b: number) => void;
|
|
637
|
+
readonly wasmwire_set_node_fixed: (a: number, b: number, c: number) => void;
|
|
638
|
+
readonly wasmwire_set_node_position: (a: number, b: number, c: number, d: number) => void;
|
|
639
|
+
readonly wasmwire_set_radius: (a: number, b: number) => void;
|
|
640
|
+
readonly wasmwire_set_render_type: (a: number, b: number) => void;
|
|
641
|
+
readonly wasmwire_set_start: (a: number, b: number, c: number) => void;
|
|
642
|
+
readonly wasmwire_update: (a: number, b: number, c: number, d: number) => void;
|
|
643
|
+
readonly __wbg_wasmworld_free: (a: number, b: number) => void;
|
|
644
|
+
readonly wasmworld_add_wire: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
645
|
+
readonly wasmworld_add_wire_debug: (a: number) => void;
|
|
646
|
+
readonly wasmworld_add_wire_node: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
647
|
+
readonly wasmworld_add_wire_node_at: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
648
|
+
readonly wasmworld_add_wire_with_count: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
649
|
+
readonly wasmworld_delete_wire: (a: number, b: number) => number;
|
|
650
|
+
readonly wasmworld_get_acceleration: (a: number) => number;
|
|
651
|
+
readonly wasmworld_get_acceleration_x: (a: number) => number;
|
|
652
|
+
readonly wasmworld_get_acceleration_y: (a: number) => number;
|
|
653
|
+
readonly wasmworld_get_friction: (a: number) => number;
|
|
654
|
+
readonly wasmworld_get_mouse_radius: (a: number) => number;
|
|
655
|
+
readonly wasmworld_get_pointer_radius: (a: number) => number;
|
|
656
|
+
readonly wasmworld_get_response_coef: (a: number) => number;
|
|
657
|
+
readonly wasmworld_get_wire: (a: number, b: number) => number;
|
|
658
|
+
readonly wasmworld_get_wire_node: (a: number, b: number, c: number) => number;
|
|
659
|
+
readonly wasmworld_get_wire_node_count: (a: number, b: number) => number;
|
|
660
|
+
readonly wasmworld_get_wire_node_x: (a: number, b: number, c: number) => number;
|
|
661
|
+
readonly wasmworld_get_wire_node_y: (a: number, b: number, c: number) => number;
|
|
662
|
+
readonly wasmworld_get_wire_radius: (a: number, b: number) => number;
|
|
663
|
+
readonly wasmworld_new: () => number;
|
|
664
|
+
readonly wasmworld_remove_wire_node: (a: number, b: number, c: number) => number;
|
|
665
|
+
readonly wasmworld_set_acceleration: (a: number, b: number, c: number) => void;
|
|
666
|
+
readonly wasmworld_set_friction: (a: number, b: number) => void;
|
|
667
|
+
readonly wasmworld_set_mouse: (a: number, b: number, c: number) => void;
|
|
668
|
+
readonly wasmworld_set_mouse_radius: (a: number, b: number) => void;
|
|
669
|
+
readonly wasmworld_set_pointer_radius: (a: number, b: number) => void;
|
|
670
|
+
readonly wasmworld_set_response_coef: (a: number, b: number) => void;
|
|
671
|
+
readonly wasmworld_set_wire_end: (a: number, b: number, c: number, d: number) => void;
|
|
672
|
+
readonly wasmworld_set_wire_node_count: (a: number, b: number, c: number) => void;
|
|
673
|
+
readonly wasmworld_set_wire_node_fixed: (a: number, b: number, c: number, d: number) => void;
|
|
674
|
+
readonly wasmworld_set_wire_node_position: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
675
|
+
readonly wasmworld_set_wire_radius: (a: number, b: number, c: number) => void;
|
|
676
|
+
readonly wasmworld_set_wire_start: (a: number, b: number, c: number, d: number) => void;
|
|
677
|
+
readonly wasmworld_update: (a: number) => void;
|
|
678
|
+
readonly wasmworld_wire_count: (a: number) => number;
|
|
679
|
+
readonly wasmworld_wire_data_len: (a: number) => number;
|
|
680
|
+
readonly wasmworld_wire_data_ptr: (a: number) => number;
|
|
681
|
+
readonly wasmworld_wire_optimal_length: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
682
|
+
readonly __wbg_get_wasmpoint_x: (a: number) => number;
|
|
683
|
+
readonly __wbg_get_wasmpoint_y: (a: number) => number;
|
|
684
|
+
readonly __wbg_get_wasmposition_curr: (a: number) => number;
|
|
685
|
+
readonly __wbg_get_wasmposition_old: (a: number) => number;
|
|
686
|
+
readonly __wbg_set_wasmpoint_x: (a: number, b: number) => void;
|
|
687
|
+
readonly __wbg_set_wasmpoint_y: (a: number, b: number) => void;
|
|
688
|
+
readonly __wbg_set_wasmposition_curr: (a: number, b: number) => void;
|
|
689
|
+
readonly __wbg_set_wasmposition_old: (a: number, b: number) => void;
|
|
690
|
+
readonly __wbg_wasmpoint_free: (a: number, b: number) => void;
|
|
691
|
+
readonly __wbg_wasmposition_free: (a: number, b: number) => void;
|
|
692
|
+
readonly wasmpoint_angle: (a: number) => number;
|
|
693
|
+
readonly wasmpoint_angle_to: (a: number, b: number) => number;
|
|
694
|
+
readonly wasmpoint_approx_equal: (a: number, b: number, c: number) => number;
|
|
695
|
+
readonly wasmpoint_clamped: (a: number, b: number) => number;
|
|
696
|
+
readonly wasmpoint_cross: (a: number, b: number) => number;
|
|
697
|
+
readonly wasmpoint_distance_squared_to: (a: number, b: number) => number;
|
|
698
|
+
readonly wasmpoint_distance_to: (a: number, b: number) => number;
|
|
699
|
+
readonly wasmpoint_dot: (a: number, b: number) => number;
|
|
700
|
+
readonly wasmpoint_length: (a: number) => number;
|
|
701
|
+
readonly wasmpoint_length_squared: (a: number) => number;
|
|
702
|
+
readonly wasmpoint_lerp: (a: number, b: number, c: number) => number;
|
|
703
|
+
readonly wasmpoint_normalize: (a: number) => void;
|
|
704
|
+
readonly wasmpoint_normalized: (a: number) => number;
|
|
705
|
+
readonly wasmpoint_one: () => number;
|
|
706
|
+
readonly wasmpoint_perpendicular: (a: number) => number;
|
|
707
|
+
readonly wasmpoint_reflect: (a: number, b: number) => number;
|
|
708
|
+
readonly wasmpoint_rotate: (a: number, b: number) => void;
|
|
709
|
+
readonly wasmpoint_rotated: (a: number, b: number) => number;
|
|
710
|
+
readonly wasmpoint_unit_x: () => number;
|
|
711
|
+
readonly wasmpoint_unit_y: () => number;
|
|
712
|
+
readonly wasmpoint_zero: () => number;
|
|
713
|
+
readonly wasmposition_constrain: (a: number, b: number) => void;
|
|
714
|
+
readonly wasmposition_displacement: (a: number) => number;
|
|
715
|
+
readonly wasmposition_from_points: (a: number, b: number) => number;
|
|
716
|
+
readonly wasmposition_get_curr: (a: number) => number;
|
|
717
|
+
readonly wasmposition_get_curr_x: (a: number) => number;
|
|
718
|
+
readonly wasmposition_get_curr_y: (a: number) => number;
|
|
719
|
+
readonly wasmposition_get_old: (a: number) => number;
|
|
720
|
+
readonly wasmposition_get_old_x: (a: number) => number;
|
|
721
|
+
readonly wasmposition_get_old_y: (a: number) => number;
|
|
722
|
+
readonly wasmposition_integrate: (a: number, b: number, c: number, d: number) => void;
|
|
723
|
+
readonly wasmposition_new: (a: number, b: number) => number;
|
|
724
|
+
readonly wasmposition_new_with_old: (a: number, b: number, c: number, d: number) => number;
|
|
725
|
+
readonly wasmposition_reset_velocity: (a: number) => void;
|
|
726
|
+
readonly wasmposition_set_curr: (a: number, b: number, c: number) => void;
|
|
727
|
+
readonly wasmposition_set_curr_point: (a: number, b: number) => void;
|
|
728
|
+
readonly wasmposition_set_old: (a: number, b: number, c: number) => void;
|
|
729
|
+
readonly wasmposition_set_old_point: (a: number, b: number) => void;
|
|
730
|
+
readonly wasmposition_speed: (a: number) => number;
|
|
731
|
+
readonly wasmposition_update: (a: number, b: number, c: number) => void;
|
|
732
|
+
readonly wasmposition_update_point: (a: number, b: number) => void;
|
|
733
|
+
readonly wasmposition_velocity: (a: number) => number;
|
|
734
|
+
readonly wasmpoint_new: (a: number, b: number) => number;
|
|
675
735
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
676
736
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
677
737
|
readonly __wbindgen_start: () => void;
|