nucleation 0.2.12 → 0.2.13
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/nucleation-original.js +40 -21
- package/nucleation.d.ts +30 -22
- package/nucleation_bg.wasm +0 -0
- package/package.json +1 -1
package/nucleation-original.js
CHANGED
|
@@ -4255,6 +4255,25 @@ export class SchematicWrapper {
|
|
|
4255
4255
|
}
|
|
4256
4256
|
return ret[0];
|
|
4257
4257
|
}
|
|
4258
|
+
/**
|
|
4259
|
+
* The translation/scale-invariant FFT shape footprint as a fixed-length
|
|
4260
|
+
* vector (the raw feature for clustering / nearest-neighbour search).
|
|
4261
|
+
*
|
|
4262
|
+
* `preset` defaults to `"exact"`. Unknown preset → Err.
|
|
4263
|
+
* @param {string | null} [preset]
|
|
4264
|
+
* @returns {Float32Array}
|
|
4265
|
+
*/
|
|
4266
|
+
footprint(preset) {
|
|
4267
|
+
var ptr0 = isLikeNone(preset) ? 0 : passStringToWasm0(preset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4268
|
+
var len0 = WASM_VECTOR_LEN;
|
|
4269
|
+
const ret = wasm.schematicwrapper_footprint(this.__wbg_ptr, ptr0, len0);
|
|
4270
|
+
if (ret[3]) {
|
|
4271
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4272
|
+
}
|
|
4273
|
+
var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
4274
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
4275
|
+
return v2;
|
|
4276
|
+
}
|
|
4258
4277
|
/**
|
|
4259
4278
|
* Compute the structural signature as a JSON string.
|
|
4260
4279
|
*
|
|
@@ -5651,6 +5670,27 @@ export class SchematicWrapper {
|
|
|
5651
5670
|
const len0 = WASM_VECTOR_LEN;
|
|
5652
5671
|
wasm.schematicwrapper_set_block(this.__wbg_ptr, x, y, z, ptr0, len0);
|
|
5653
5672
|
}
|
|
5673
|
+
/**
|
|
5674
|
+
* Structurally diff this schematic against `other`.
|
|
5675
|
+
*
|
|
5676
|
+
* `preset` defaults to `"exact"`. `options` is an optional object
|
|
5677
|
+
* `{cost_add?, cost_delete?, cost_change?, cost_swap?, symmetry?}`.
|
|
5678
|
+
* Returns a [`DiffWrapper`]. Unknown preset/symmetry → Err.
|
|
5679
|
+
* @param {SchematicWrapper} other
|
|
5680
|
+
* @param {string | null | undefined} preset
|
|
5681
|
+
* @param {any} options
|
|
5682
|
+
* @returns {DiffWrapper}
|
|
5683
|
+
*/
|
|
5684
|
+
diff(other, preset, options) {
|
|
5685
|
+
_assertClass(other, SchematicWrapper);
|
|
5686
|
+
var ptr0 = isLikeNone(preset) ? 0 : passStringToWasm0(preset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5687
|
+
var len0 = WASM_VECTOR_LEN;
|
|
5688
|
+
const ret = wasm.schematicwrapper_diff(this.__wbg_ptr, other.__wbg_ptr, ptr0, len0, options);
|
|
5689
|
+
if (ret[2]) {
|
|
5690
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5691
|
+
}
|
|
5692
|
+
return DiffWrapper.__wrap(ret[0]);
|
|
5693
|
+
}
|
|
5654
5694
|
/**
|
|
5655
5695
|
* Creates a simulation world for this schematic with default options
|
|
5656
5696
|
*
|
|
@@ -5679,27 +5719,6 @@ export class SchematicWrapper {
|
|
|
5679
5719
|
}
|
|
5680
5720
|
return MchprsWorldWrapper.__wrap(ret[0]);
|
|
5681
5721
|
}
|
|
5682
|
-
/**
|
|
5683
|
-
* Structurally diff this schematic against `other`.
|
|
5684
|
-
*
|
|
5685
|
-
* `preset` defaults to `"exact"`. `options` is an optional object
|
|
5686
|
-
* `{cost_add?, cost_delete?, cost_change?, cost_swap?, symmetry?}`.
|
|
5687
|
-
* Returns a [`DiffWrapper`]. Unknown preset/symmetry → Err.
|
|
5688
|
-
* @param {SchematicWrapper} other
|
|
5689
|
-
* @param {string | null | undefined} preset
|
|
5690
|
-
* @param {any} options
|
|
5691
|
-
* @returns {DiffWrapper}
|
|
5692
|
-
*/
|
|
5693
|
-
diff(other, preset, options) {
|
|
5694
|
-
_assertClass(other, SchematicWrapper);
|
|
5695
|
-
var ptr0 = isLikeNone(preset) ? 0 : passStringToWasm0(preset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5696
|
-
var len0 = WASM_VECTOR_LEN;
|
|
5697
|
-
const ret = wasm.schematicwrapper_diff(this.__wbg_ptr, other.__wbg_ptr, ptr0, len0, options);
|
|
5698
|
-
if (ret[2]) {
|
|
5699
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5700
|
-
}
|
|
5701
|
-
return DiffWrapper.__wrap(ret[0]);
|
|
5702
|
-
}
|
|
5703
5722
|
/**
|
|
5704
5723
|
* Generate raw mesh data for custom rendering pipelines.
|
|
5705
5724
|
* @param {ResourcePackWrapper} pack
|
package/nucleation.d.ts
CHANGED
|
@@ -1274,6 +1274,13 @@ export class SchematicWrapper {
|
|
|
1274
1274
|
* `preset` defaults to `"exact"`. Unknown preset → Err.
|
|
1275
1275
|
*/
|
|
1276
1276
|
footprintDistance(other: SchematicWrapper, preset?: string | null): number;
|
|
1277
|
+
/**
|
|
1278
|
+
* The translation/scale-invariant FFT shape footprint as a fixed-length
|
|
1279
|
+
* vector (the raw feature for clustering / nearest-neighbour search).
|
|
1280
|
+
*
|
|
1281
|
+
* `preset` defaults to `"exact"`. Unknown preset → Err.
|
|
1282
|
+
*/
|
|
1283
|
+
footprint(preset?: string | null): Float32Array;
|
|
1277
1284
|
/**
|
|
1278
1285
|
* Compute the structural signature as a JSON string.
|
|
1279
1286
|
*
|
|
@@ -1548,6 +1555,14 @@ export class SchematicWrapper {
|
|
|
1548
1555
|
from_data(data: Uint8Array): void;
|
|
1549
1556
|
get_block(x: number, y: number, z: number): string | undefined;
|
|
1550
1557
|
set_block(x: number, y: number, z: number, block_name: string): void;
|
|
1558
|
+
/**
|
|
1559
|
+
* Structurally diff this schematic against `other`.
|
|
1560
|
+
*
|
|
1561
|
+
* `preset` defaults to `"exact"`. `options` is an optional object
|
|
1562
|
+
* `{cost_add?, cost_delete?, cost_change?, cost_swap?, symmetry?}`.
|
|
1563
|
+
* Returns a [`DiffWrapper`]. Unknown preset/symmetry → Err.
|
|
1564
|
+
*/
|
|
1565
|
+
diff(other: SchematicWrapper, preset: string | null | undefined, options: any): DiffWrapper;
|
|
1551
1566
|
/**
|
|
1552
1567
|
* Creates a simulation world for this schematic with default options
|
|
1553
1568
|
*
|
|
@@ -1560,14 +1575,6 @@ export class SchematicWrapper {
|
|
|
1560
1575
|
* This allows you to configure simulation behavior like wire state tracking.
|
|
1561
1576
|
*/
|
|
1562
1577
|
create_simulation_world_with_options(options: SimulationOptionsWrapper): MchprsWorldWrapper;
|
|
1563
|
-
/**
|
|
1564
|
-
* Structurally diff this schematic against `other`.
|
|
1565
|
-
*
|
|
1566
|
-
* `preset` defaults to `"exact"`. `options` is an optional object
|
|
1567
|
-
* `{cost_add?, cost_delete?, cost_change?, cost_swap?, symmetry?}`.
|
|
1568
|
-
* Returns a [`DiffWrapper`]. Unknown preset/symmetry → Err.
|
|
1569
|
-
*/
|
|
1570
|
-
diff(other: SchematicWrapper, preset: string | null | undefined, options: any): DiffWrapper;
|
|
1571
1578
|
/**
|
|
1572
1579
|
* Generate raw mesh data for custom rendering pipelines.
|
|
1573
1580
|
*/
|
|
@@ -2154,6 +2161,7 @@ export interface InitOutput {
|
|
|
2154
2161
|
readonly schematicwrapper_flip_x: (a: number) => void;
|
|
2155
2162
|
readonly schematicwrapper_flip_y: (a: number) => void;
|
|
2156
2163
|
readonly schematicwrapper_flip_z: (a: number) => void;
|
|
2164
|
+
readonly schematicwrapper_footprint: (a: number, b: number, c: number) => [number, number, number, number];
|
|
2157
2165
|
readonly schematicwrapper_footprintDistance: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
2158
2166
|
readonly schematicwrapper_fromSnapshot: (a: number, b: number, c: number) => [number, number];
|
|
2159
2167
|
readonly schematicwrapper_from_data: (a: number, b: number, c: number) => [number, number];
|
|
@@ -2362,6 +2370,20 @@ export interface InitOutput {
|
|
|
2362
2370
|
readonly __wbg_set_blockposition_y: (a: number, b: number) => void;
|
|
2363
2371
|
readonly __wbg_set_blockposition_z: (a: number, b: number) => void;
|
|
2364
2372
|
readonly blockposition_new: (a: number, b: number, c: number) => number;
|
|
2373
|
+
readonly __wbg_diffwrapper_free: (a: number, b: number) => void;
|
|
2374
|
+
readonly diffwrapper_added: (a: number) => number;
|
|
2375
|
+
readonly diffwrapper_changed: (a: number) => number;
|
|
2376
|
+
readonly diffwrapper_distance: (a: number) => number;
|
|
2377
|
+
readonly diffwrapper_fromJson: (a: number, b: number) => [number, number, number];
|
|
2378
|
+
readonly diffwrapper_markers: (a: number) => number;
|
|
2379
|
+
readonly diffwrapper_regionsJson: (a: number) => [number, number];
|
|
2380
|
+
readonly diffwrapper_removed: (a: number) => number;
|
|
2381
|
+
readonly diffwrapper_summaryJson: (a: number) => [number, number];
|
|
2382
|
+
readonly diffwrapper_support: (a: number) => number;
|
|
2383
|
+
readonly diffwrapper_swapped: (a: number) => number;
|
|
2384
|
+
readonly diffwrapper_toJson: (a: number) => [number, number];
|
|
2385
|
+
readonly diffwrapper_toOverlayGlb: (a: number, b: number, c: number) => [number, number, number];
|
|
2386
|
+
readonly schematicwrapper_diff: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
2365
2387
|
readonly __wbg_circuitbuilderwrapper_free: (a: number, b: number) => void;
|
|
2366
2388
|
readonly __wbg_mchprsworldwrapper_free: (a: number, b: number) => void;
|
|
2367
2389
|
readonly __wbg_schematicbuilderwrapper_free: (a: number, b: number) => void;
|
|
@@ -2444,20 +2466,6 @@ export interface InitOutput {
|
|
|
2444
2466
|
readonly statemodeconstants_stateless: () => [number, number];
|
|
2445
2467
|
readonly schematicwrapper_create_simulation_world: (a: number) => [number, number, number];
|
|
2446
2468
|
readonly schematicwrapper_create_simulation_world_with_options: (a: number, b: number) => [number, number, number];
|
|
2447
|
-
readonly __wbg_diffwrapper_free: (a: number, b: number) => void;
|
|
2448
|
-
readonly diffwrapper_added: (a: number) => number;
|
|
2449
|
-
readonly diffwrapper_changed: (a: number) => number;
|
|
2450
|
-
readonly diffwrapper_distance: (a: number) => number;
|
|
2451
|
-
readonly diffwrapper_fromJson: (a: number, b: number) => [number, number, number];
|
|
2452
|
-
readonly diffwrapper_markers: (a: number) => number;
|
|
2453
|
-
readonly diffwrapper_regionsJson: (a: number) => [number, number];
|
|
2454
|
-
readonly diffwrapper_removed: (a: number) => number;
|
|
2455
|
-
readonly diffwrapper_summaryJson: (a: number) => [number, number];
|
|
2456
|
-
readonly diffwrapper_support: (a: number) => number;
|
|
2457
|
-
readonly diffwrapper_swapped: (a: number) => number;
|
|
2458
|
-
readonly diffwrapper_toJson: (a: number) => [number, number];
|
|
2459
|
-
readonly diffwrapper_toOverlayGlb: (a: number, b: number, c: number) => [number, number, number];
|
|
2460
|
-
readonly schematicwrapper_diff: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
2461
2469
|
readonly __wbg_chunkmeshiteratorwrapper_free: (a: number, b: number) => void;
|
|
2462
2470
|
readonly __wbg_chunkmeshresultwrapper_free: (a: number, b: number) => void;
|
|
2463
2471
|
readonly __wbg_itemmodelconfigwrapper_free: (a: number, b: number) => void;
|
package/nucleation_bg.wasm
CHANGED
|
Binary file
|