nucleation 0.1.126 → 0.1.128
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 +265 -0
- package/nucleation.d.ts +162 -45
- package/nucleation_bg.wasm +0 -0
- package/package.json +1 -1
package/nucleation-original.js
CHANGED
|
@@ -470,6 +470,9 @@ export class CircuitBuilderWrapper {
|
|
|
470
470
|
}
|
|
471
471
|
/**
|
|
472
472
|
* Add an input with full control
|
|
473
|
+
*
|
|
474
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
475
|
+
* For custom ordering, use `withInputSorted`.
|
|
473
476
|
* @param {string} name
|
|
474
477
|
* @param {IoTypeWrapper} io_type
|
|
475
478
|
* @param {LayoutFunctionWrapper} layout
|
|
@@ -522,6 +525,9 @@ export class CircuitBuilderWrapper {
|
|
|
522
525
|
}
|
|
523
526
|
/**
|
|
524
527
|
* Add an output with full control
|
|
528
|
+
*
|
|
529
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
530
|
+
* For custom ordering, use `withOutputSorted`.
|
|
525
531
|
* @param {string} name
|
|
526
532
|
* @param {IoTypeWrapper} io_type
|
|
527
533
|
* @param {LayoutFunctionWrapper} layout
|
|
@@ -584,6 +590,9 @@ export class CircuitBuilderWrapper {
|
|
|
584
590
|
}
|
|
585
591
|
/**
|
|
586
592
|
* Add an input with automatic layout inference
|
|
593
|
+
*
|
|
594
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
595
|
+
* For custom ordering, use `withInputAutoSorted`.
|
|
587
596
|
* @param {string} name
|
|
588
597
|
* @param {IoTypeWrapper} io_type
|
|
589
598
|
* @param {DefinitionRegionWrapper} region
|
|
@@ -618,6 +627,9 @@ export class CircuitBuilderWrapper {
|
|
|
618
627
|
}
|
|
619
628
|
/**
|
|
620
629
|
* Add an output with automatic layout inference
|
|
630
|
+
*
|
|
631
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
632
|
+
* For custom ordering, use `withOutputAutoSorted`.
|
|
621
633
|
* @param {string} name
|
|
622
634
|
* @param {IoTypeWrapper} io_type
|
|
623
635
|
* @param {DefinitionRegionWrapper} region
|
|
@@ -635,6 +647,94 @@ export class CircuitBuilderWrapper {
|
|
|
635
647
|
}
|
|
636
648
|
return CircuitBuilderWrapper.__wrap(ret[0]);
|
|
637
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* Add an input with full control and custom sort strategy
|
|
652
|
+
* @param {string} name
|
|
653
|
+
* @param {IoTypeWrapper} io_type
|
|
654
|
+
* @param {LayoutFunctionWrapper} layout
|
|
655
|
+
* @param {DefinitionRegionWrapper} region
|
|
656
|
+
* @param {SortStrategyWrapper} sort
|
|
657
|
+
* @returns {CircuitBuilderWrapper}
|
|
658
|
+
*/
|
|
659
|
+
withInputSorted(name, io_type, layout, region, sort) {
|
|
660
|
+
const ptr = this.__destroy_into_raw();
|
|
661
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
662
|
+
const len0 = WASM_VECTOR_LEN;
|
|
663
|
+
_assertClass(io_type, IoTypeWrapper);
|
|
664
|
+
_assertClass(layout, LayoutFunctionWrapper);
|
|
665
|
+
_assertClass(region, DefinitionRegionWrapper);
|
|
666
|
+
_assertClass(sort, SortStrategyWrapper);
|
|
667
|
+
const ret = wasm.circuitbuilderwrapper_withInputSorted(ptr, ptr0, len0, io_type.__wbg_ptr, layout.__wbg_ptr, region.__wbg_ptr, sort.__wbg_ptr);
|
|
668
|
+
if (ret[2]) {
|
|
669
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
670
|
+
}
|
|
671
|
+
return CircuitBuilderWrapper.__wrap(ret[0]);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Add an output with full control and custom sort strategy
|
|
675
|
+
* @param {string} name
|
|
676
|
+
* @param {IoTypeWrapper} io_type
|
|
677
|
+
* @param {LayoutFunctionWrapper} layout
|
|
678
|
+
* @param {DefinitionRegionWrapper} region
|
|
679
|
+
* @param {SortStrategyWrapper} sort
|
|
680
|
+
* @returns {CircuitBuilderWrapper}
|
|
681
|
+
*/
|
|
682
|
+
withOutputSorted(name, io_type, layout, region, sort) {
|
|
683
|
+
const ptr = this.__destroy_into_raw();
|
|
684
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
685
|
+
const len0 = WASM_VECTOR_LEN;
|
|
686
|
+
_assertClass(io_type, IoTypeWrapper);
|
|
687
|
+
_assertClass(layout, LayoutFunctionWrapper);
|
|
688
|
+
_assertClass(region, DefinitionRegionWrapper);
|
|
689
|
+
_assertClass(sort, SortStrategyWrapper);
|
|
690
|
+
const ret = wasm.circuitbuilderwrapper_withOutputSorted(ptr, ptr0, len0, io_type.__wbg_ptr, layout.__wbg_ptr, region.__wbg_ptr, sort.__wbg_ptr);
|
|
691
|
+
if (ret[2]) {
|
|
692
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
693
|
+
}
|
|
694
|
+
return CircuitBuilderWrapper.__wrap(ret[0]);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Add an input with automatic layout inference and custom sort strategy
|
|
698
|
+
* @param {string} name
|
|
699
|
+
* @param {IoTypeWrapper} io_type
|
|
700
|
+
* @param {DefinitionRegionWrapper} region
|
|
701
|
+
* @param {SortStrategyWrapper} sort
|
|
702
|
+
* @returns {CircuitBuilderWrapper}
|
|
703
|
+
*/
|
|
704
|
+
withInputAutoSorted(name, io_type, region, sort) {
|
|
705
|
+
const ptr = this.__destroy_into_raw();
|
|
706
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
707
|
+
const len0 = WASM_VECTOR_LEN;
|
|
708
|
+
_assertClass(io_type, IoTypeWrapper);
|
|
709
|
+
_assertClass(region, DefinitionRegionWrapper);
|
|
710
|
+
_assertClass(sort, SortStrategyWrapper);
|
|
711
|
+
const ret = wasm.circuitbuilderwrapper_withInputAutoSorted(ptr, ptr0, len0, io_type.__wbg_ptr, region.__wbg_ptr, sort.__wbg_ptr);
|
|
712
|
+
if (ret[2]) {
|
|
713
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
714
|
+
}
|
|
715
|
+
return CircuitBuilderWrapper.__wrap(ret[0]);
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Add an output with automatic layout inference and custom sort strategy
|
|
719
|
+
* @param {string} name
|
|
720
|
+
* @param {IoTypeWrapper} io_type
|
|
721
|
+
* @param {DefinitionRegionWrapper} region
|
|
722
|
+
* @param {SortStrategyWrapper} sort
|
|
723
|
+
* @returns {CircuitBuilderWrapper}
|
|
724
|
+
*/
|
|
725
|
+
withOutputAutoSorted(name, io_type, region, sort) {
|
|
726
|
+
const ptr = this.__destroy_into_raw();
|
|
727
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
728
|
+
const len0 = WASM_VECTOR_LEN;
|
|
729
|
+
_assertClass(io_type, IoTypeWrapper);
|
|
730
|
+
_assertClass(region, DefinitionRegionWrapper);
|
|
731
|
+
_assertClass(sort, SortStrategyWrapper);
|
|
732
|
+
const ret = wasm.circuitbuilderwrapper_withOutputAutoSorted(ptr, ptr0, len0, io_type.__wbg_ptr, region.__wbg_ptr, sort.__wbg_ptr);
|
|
733
|
+
if (ret[2]) {
|
|
734
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
735
|
+
}
|
|
736
|
+
return CircuitBuilderWrapper.__wrap(ret[0]);
|
|
737
|
+
}
|
|
638
738
|
/**
|
|
639
739
|
* Create a new CircuitBuilder from a schematic
|
|
640
740
|
* @param {SchematicWrapper} schematic
|
|
@@ -2922,6 +3022,171 @@ export class SimulationOptionsWrapper {
|
|
|
2922
3022
|
}
|
|
2923
3023
|
if (Symbol.dispose) SimulationOptionsWrapper.prototype[Symbol.dispose] = SimulationOptionsWrapper.prototype.free;
|
|
2924
3024
|
|
|
3025
|
+
const SortStrategyWrapperFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3026
|
+
? { register: () => {}, unregister: () => {} }
|
|
3027
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sortstrategywrapper_free(ptr >>> 0, 1));
|
|
3028
|
+
/**
|
|
3029
|
+
* Sort strategy for ordering positions in IO layouts
|
|
3030
|
+
*
|
|
3031
|
+
* Controls how positions are ordered when assigned to bits.
|
|
3032
|
+
* Position 0 corresponds to bit 0 (LSB), position 1 to bit 1, etc.
|
|
3033
|
+
*/
|
|
3034
|
+
export class SortStrategyWrapper {
|
|
3035
|
+
|
|
3036
|
+
static __wrap(ptr) {
|
|
3037
|
+
ptr = ptr >>> 0;
|
|
3038
|
+
const obj = Object.create(SortStrategyWrapper.prototype);
|
|
3039
|
+
obj.__wbg_ptr = ptr;
|
|
3040
|
+
SortStrategyWrapperFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3041
|
+
return obj;
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
__destroy_into_raw() {
|
|
3045
|
+
const ptr = this.__wbg_ptr;
|
|
3046
|
+
this.__wbg_ptr = 0;
|
|
3047
|
+
SortStrategyWrapperFinalization.unregister(this);
|
|
3048
|
+
return ptr;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
free() {
|
|
3052
|
+
const ptr = this.__destroy_into_raw();
|
|
3053
|
+
wasm.__wbg_sortstrategywrapper_free(ptr, 0);
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3056
|
+
* Sort by Y descending, then X descending, then Z descending
|
|
3057
|
+
* @returns {SortStrategyWrapper}
|
|
3058
|
+
*/
|
|
3059
|
+
static descending() {
|
|
3060
|
+
const ret = wasm.sortstrategywrapper_descending();
|
|
3061
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3062
|
+
}
|
|
3063
|
+
/**
|
|
3064
|
+
* Parse sort strategy from string
|
|
3065
|
+
*
|
|
3066
|
+
* Accepts: "yxz", "xyz", "zyx", "y_desc", "x_desc", "z_desc",
|
|
3067
|
+
* "descending", "preserve", "reverse"
|
|
3068
|
+
* @param {string} s
|
|
3069
|
+
* @returns {SortStrategyWrapper}
|
|
3070
|
+
*/
|
|
3071
|
+
static fromString(s) {
|
|
3072
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3073
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3074
|
+
const ret = wasm.sortstrategywrapper_fromString(ptr0, len0);
|
|
3075
|
+
if (ret[2]) {
|
|
3076
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3077
|
+
}
|
|
3078
|
+
return SortStrategyWrapper.__wrap(ret[0]);
|
|
3079
|
+
}
|
|
3080
|
+
/**
|
|
3081
|
+
* Sort by Euclidean distance from a reference point (ascending)
|
|
3082
|
+
* Closest positions first. Useful for radial layouts.
|
|
3083
|
+
* @param {number} x
|
|
3084
|
+
* @param {number} y
|
|
3085
|
+
* @param {number} z
|
|
3086
|
+
* @returns {SortStrategyWrapper}
|
|
3087
|
+
*/
|
|
3088
|
+
static distanceFrom(x, y, z) {
|
|
3089
|
+
const ret = wasm.sortstrategywrapper_distanceFrom(x, y, z);
|
|
3090
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3091
|
+
}
|
|
3092
|
+
/**
|
|
3093
|
+
* Sort by Euclidean distance from a reference point (descending)
|
|
3094
|
+
* Farthest positions first.
|
|
3095
|
+
* @param {number} x
|
|
3096
|
+
* @param {number} y
|
|
3097
|
+
* @param {number} z
|
|
3098
|
+
* @returns {SortStrategyWrapper}
|
|
3099
|
+
*/
|
|
3100
|
+
static distanceFromDesc(x, y, z) {
|
|
3101
|
+
const ret = wasm.sortstrategywrapper_distanceFromDesc(x, y, z);
|
|
3102
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3103
|
+
}
|
|
3104
|
+
/**
|
|
3105
|
+
* Sort by X first (ascending), then Y, then Z
|
|
3106
|
+
* @returns {SortStrategyWrapper}
|
|
3107
|
+
*/
|
|
3108
|
+
static xyz() {
|
|
3109
|
+
const ret = wasm.sortstrategywrapper_xyz();
|
|
3110
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3111
|
+
}
|
|
3112
|
+
/**
|
|
3113
|
+
* Sort by Y first (ascending), then X, then Z
|
|
3114
|
+
* Standard Minecraft layer-based ordering. This is the default.
|
|
3115
|
+
* @returns {SortStrategyWrapper}
|
|
3116
|
+
*/
|
|
3117
|
+
static yxz() {
|
|
3118
|
+
const ret = wasm.sortstrategywrapper_yxz();
|
|
3119
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3120
|
+
}
|
|
3121
|
+
/**
|
|
3122
|
+
* Sort by Z first (ascending), then Y, then X
|
|
3123
|
+
* @returns {SortStrategyWrapper}
|
|
3124
|
+
*/
|
|
3125
|
+
static zyx() {
|
|
3126
|
+
const ret = wasm.iotypewrapper_float32();
|
|
3127
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3128
|
+
}
|
|
3129
|
+
/**
|
|
3130
|
+
* Get the name of this strategy
|
|
3131
|
+
* @returns {string}
|
|
3132
|
+
*/
|
|
3133
|
+
get name() {
|
|
3134
|
+
let deferred1_0;
|
|
3135
|
+
let deferred1_1;
|
|
3136
|
+
try {
|
|
3137
|
+
const ret = wasm.sortstrategywrapper_name(this.__wbg_ptr);
|
|
3138
|
+
deferred1_0 = ret[0];
|
|
3139
|
+
deferred1_1 = ret[1];
|
|
3140
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3141
|
+
} finally {
|
|
3142
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
/**
|
|
3146
|
+
* Reverse of whatever order positions were added
|
|
3147
|
+
* @returns {SortStrategyWrapper}
|
|
3148
|
+
*/
|
|
3149
|
+
static reverse() {
|
|
3150
|
+
const ret = wasm.sortstrategywrapper_reverse();
|
|
3151
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3152
|
+
}
|
|
3153
|
+
/**
|
|
3154
|
+
* Preserve the order positions were added (no sorting)
|
|
3155
|
+
* Useful when you've manually ordered positions or are using `fromBoundingBoxes`
|
|
3156
|
+
* where box order matters.
|
|
3157
|
+
* @returns {SortStrategyWrapper}
|
|
3158
|
+
*/
|
|
3159
|
+
static preserve() {
|
|
3160
|
+
const ret = wasm.sortstrategywrapper_preserve();
|
|
3161
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3162
|
+
}
|
|
3163
|
+
/**
|
|
3164
|
+
* Sort by X first (descending), then Y ascending, then Z ascending
|
|
3165
|
+
* @returns {SortStrategyWrapper}
|
|
3166
|
+
*/
|
|
3167
|
+
static xDescYZ() {
|
|
3168
|
+
const ret = wasm.sortstrategywrapper_xDescYZ();
|
|
3169
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3170
|
+
}
|
|
3171
|
+
/**
|
|
3172
|
+
* Sort by Y first (descending), then X ascending, then Z ascending
|
|
3173
|
+
* @returns {SortStrategyWrapper}
|
|
3174
|
+
*/
|
|
3175
|
+
static yDescXZ() {
|
|
3176
|
+
const ret = wasm.iotypewrapper_boolean();
|
|
3177
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3178
|
+
}
|
|
3179
|
+
/**
|
|
3180
|
+
* Sort by Z first (descending), then Y ascending, then X ascending
|
|
3181
|
+
* @returns {SortStrategyWrapper}
|
|
3182
|
+
*/
|
|
3183
|
+
static zDescYX() {
|
|
3184
|
+
const ret = wasm.sortstrategywrapper_zDescYX();
|
|
3185
|
+
return SortStrategyWrapper.__wrap(ret);
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
if (Symbol.dispose) SortStrategyWrapper.prototype[Symbol.dispose] = SortStrategyWrapper.prototype.free;
|
|
3189
|
+
|
|
2925
3190
|
const StateModeConstantsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2926
3191
|
? { register: () => {}, unregister: () => {} }
|
|
2927
3192
|
: new FinalizationRegistry(ptr => wasm.__wbg_statemodeconstants_free(ptr >>> 0, 1));
|
package/nucleation.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export class CircuitBuilderWrapper {
|
|
|
31
31
|
[Symbol.dispose](): void;
|
|
32
32
|
/**
|
|
33
33
|
* Add an input with full control
|
|
34
|
+
*
|
|
35
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
36
|
+
* For custom ordering, use `withInputSorted`.
|
|
34
37
|
*/
|
|
35
38
|
withInput(name: string, io_type: IoTypeWrapper, layout: LayoutFunctionWrapper, region: DefinitionRegionWrapper): CircuitBuilderWrapper;
|
|
36
39
|
/**
|
|
@@ -47,6 +50,9 @@ export class CircuitBuilderWrapper {
|
|
|
47
50
|
inputNames(): string[];
|
|
48
51
|
/**
|
|
49
52
|
* Add an output with full control
|
|
53
|
+
*
|
|
54
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
55
|
+
* For custom ordering, use `withOutputSorted`.
|
|
50
56
|
*/
|
|
51
57
|
withOutput(name: string, io_type: IoTypeWrapper, layout: LayoutFunctionWrapper, region: DefinitionRegionWrapper): CircuitBuilderWrapper;
|
|
52
58
|
/**
|
|
@@ -67,6 +73,9 @@ export class CircuitBuilderWrapper {
|
|
|
67
73
|
buildValidated(): TypedCircuitExecutorWrapper;
|
|
68
74
|
/**
|
|
69
75
|
* Add an input with automatic layout inference
|
|
76
|
+
*
|
|
77
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
78
|
+
* For custom ordering, use `withInputAutoSorted`.
|
|
70
79
|
*/
|
|
71
80
|
withInputAuto(name: string, io_type: IoTypeWrapper, region: DefinitionRegionWrapper): CircuitBuilderWrapper;
|
|
72
81
|
/**
|
|
@@ -75,8 +84,27 @@ export class CircuitBuilderWrapper {
|
|
|
75
84
|
withStateMode(mode: string): CircuitBuilderWrapper;
|
|
76
85
|
/**
|
|
77
86
|
* Add an output with automatic layout inference
|
|
87
|
+
*
|
|
88
|
+
* Uses the default sort strategy (YXZ - Y first, then X, then Z).
|
|
89
|
+
* For custom ordering, use `withOutputAutoSorted`.
|
|
78
90
|
*/
|
|
79
91
|
withOutputAuto(name: string, io_type: IoTypeWrapper, region: DefinitionRegionWrapper): CircuitBuilderWrapper;
|
|
92
|
+
/**
|
|
93
|
+
* Add an input with full control and custom sort strategy
|
|
94
|
+
*/
|
|
95
|
+
withInputSorted(name: string, io_type: IoTypeWrapper, layout: LayoutFunctionWrapper, region: DefinitionRegionWrapper, sort: SortStrategyWrapper): CircuitBuilderWrapper;
|
|
96
|
+
/**
|
|
97
|
+
* Add an output with full control and custom sort strategy
|
|
98
|
+
*/
|
|
99
|
+
withOutputSorted(name: string, io_type: IoTypeWrapper, layout: LayoutFunctionWrapper, region: DefinitionRegionWrapper, sort: SortStrategyWrapper): CircuitBuilderWrapper;
|
|
100
|
+
/**
|
|
101
|
+
* Add an input with automatic layout inference and custom sort strategy
|
|
102
|
+
*/
|
|
103
|
+
withInputAutoSorted(name: string, io_type: IoTypeWrapper, region: DefinitionRegionWrapper, sort: SortStrategyWrapper): CircuitBuilderWrapper;
|
|
104
|
+
/**
|
|
105
|
+
* Add an output with automatic layout inference and custom sort strategy
|
|
106
|
+
*/
|
|
107
|
+
withOutputAutoSorted(name: string, io_type: IoTypeWrapper, region: DefinitionRegionWrapper, sort: SortStrategyWrapper): CircuitBuilderWrapper;
|
|
80
108
|
/**
|
|
81
109
|
* Create a new CircuitBuilder from a schematic
|
|
82
110
|
*/
|
|
@@ -769,6 +797,77 @@ export class SimulationOptionsWrapper {
|
|
|
769
797
|
io_only: boolean;
|
|
770
798
|
optimize: boolean;
|
|
771
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* Sort strategy for ordering positions in IO layouts
|
|
802
|
+
*
|
|
803
|
+
* Controls how positions are ordered when assigned to bits.
|
|
804
|
+
* Position 0 corresponds to bit 0 (LSB), position 1 to bit 1, etc.
|
|
805
|
+
*/
|
|
806
|
+
export class SortStrategyWrapper {
|
|
807
|
+
private constructor();
|
|
808
|
+
free(): void;
|
|
809
|
+
[Symbol.dispose](): void;
|
|
810
|
+
/**
|
|
811
|
+
* Sort by Y descending, then X descending, then Z descending
|
|
812
|
+
*/
|
|
813
|
+
static descending(): SortStrategyWrapper;
|
|
814
|
+
/**
|
|
815
|
+
* Parse sort strategy from string
|
|
816
|
+
*
|
|
817
|
+
* Accepts: "yxz", "xyz", "zyx", "y_desc", "x_desc", "z_desc",
|
|
818
|
+
* "descending", "preserve", "reverse"
|
|
819
|
+
*/
|
|
820
|
+
static fromString(s: string): SortStrategyWrapper;
|
|
821
|
+
/**
|
|
822
|
+
* Sort by Euclidean distance from a reference point (ascending)
|
|
823
|
+
* Closest positions first. Useful for radial layouts.
|
|
824
|
+
*/
|
|
825
|
+
static distanceFrom(x: number, y: number, z: number): SortStrategyWrapper;
|
|
826
|
+
/**
|
|
827
|
+
* Sort by Euclidean distance from a reference point (descending)
|
|
828
|
+
* Farthest positions first.
|
|
829
|
+
*/
|
|
830
|
+
static distanceFromDesc(x: number, y: number, z: number): SortStrategyWrapper;
|
|
831
|
+
/**
|
|
832
|
+
* Sort by X first (ascending), then Y, then Z
|
|
833
|
+
*/
|
|
834
|
+
static xyz(): SortStrategyWrapper;
|
|
835
|
+
/**
|
|
836
|
+
* Sort by Y first (ascending), then X, then Z
|
|
837
|
+
* Standard Minecraft layer-based ordering. This is the default.
|
|
838
|
+
*/
|
|
839
|
+
static yxz(): SortStrategyWrapper;
|
|
840
|
+
/**
|
|
841
|
+
* Sort by Z first (ascending), then Y, then X
|
|
842
|
+
*/
|
|
843
|
+
static zyx(): SortStrategyWrapper;
|
|
844
|
+
/**
|
|
845
|
+
* Reverse of whatever order positions were added
|
|
846
|
+
*/
|
|
847
|
+
static reverse(): SortStrategyWrapper;
|
|
848
|
+
/**
|
|
849
|
+
* Preserve the order positions were added (no sorting)
|
|
850
|
+
* Useful when you've manually ordered positions or are using `fromBoundingBoxes`
|
|
851
|
+
* where box order matters.
|
|
852
|
+
*/
|
|
853
|
+
static preserve(): SortStrategyWrapper;
|
|
854
|
+
/**
|
|
855
|
+
* Sort by X first (descending), then Y ascending, then Z ascending
|
|
856
|
+
*/
|
|
857
|
+
static xDescYZ(): SortStrategyWrapper;
|
|
858
|
+
/**
|
|
859
|
+
* Sort by Y first (descending), then X ascending, then Z ascending
|
|
860
|
+
*/
|
|
861
|
+
static yDescXZ(): SortStrategyWrapper;
|
|
862
|
+
/**
|
|
863
|
+
* Sort by Z first (descending), then Y ascending, then X ascending
|
|
864
|
+
*/
|
|
865
|
+
static zDescYX(): SortStrategyWrapper;
|
|
866
|
+
/**
|
|
867
|
+
* Get the name of this strategy
|
|
868
|
+
*/
|
|
869
|
+
readonly name: string;
|
|
870
|
+
}
|
|
772
871
|
/**
|
|
773
872
|
* State mode constants for JavaScript
|
|
774
873
|
*/
|
|
@@ -918,13 +1017,16 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
918
1017
|
export interface InitOutput {
|
|
919
1018
|
readonly memory: WebAssembly.Memory;
|
|
920
1019
|
readonly __wbg_circuitbuilderwrapper_free: (a: number, b: number) => void;
|
|
1020
|
+
readonly __wbg_definitionregionwrapper_free: (a: number, b: number) => void;
|
|
921
1021
|
readonly __wbg_executionmodewrapper_free: (a: number, b: number) => void;
|
|
922
1022
|
readonly __wbg_iolayoutbuilderwrapper_free: (a: number, b: number) => void;
|
|
1023
|
+
readonly __wbg_iolayoutwrapper_free: (a: number, b: number) => void;
|
|
923
1024
|
readonly __wbg_iotypewrapper_free: (a: number, b: number) => void;
|
|
924
1025
|
readonly __wbg_layoutfunctionwrapper_free: (a: number, b: number) => void;
|
|
925
1026
|
readonly __wbg_mchprsworldwrapper_free: (a: number, b: number) => void;
|
|
926
1027
|
readonly __wbg_outputconditionwrapper_free: (a: number, b: number) => void;
|
|
927
1028
|
readonly __wbg_simulationoptionswrapper_free: (a: number, b: number) => void;
|
|
1029
|
+
readonly __wbg_sortstrategywrapper_free: (a: number, b: number) => void;
|
|
928
1030
|
readonly __wbg_statemodeconstants_free: (a: number, b: number) => void;
|
|
929
1031
|
readonly __wbg_typedcircuitexecutorwrapper_free: (a: number, b: number) => void;
|
|
930
1032
|
readonly __wbg_valuewrapper_free: (a: number, b: number) => void;
|
|
@@ -939,10 +1041,56 @@ export interface InitOutput {
|
|
|
939
1041
|
readonly circuitbuilderwrapper_validate: (a: number) => [number, number];
|
|
940
1042
|
readonly circuitbuilderwrapper_withInput: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
941
1043
|
readonly circuitbuilderwrapper_withInputAuto: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
1044
|
+
readonly circuitbuilderwrapper_withInputAutoSorted: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1045
|
+
readonly circuitbuilderwrapper_withInputSorted: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
942
1046
|
readonly circuitbuilderwrapper_withOptions: (a: number, b: number) => number;
|
|
943
1047
|
readonly circuitbuilderwrapper_withOutput: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
944
1048
|
readonly circuitbuilderwrapper_withOutputAuto: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
1049
|
+
readonly circuitbuilderwrapper_withOutputAutoSorted: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1050
|
+
readonly circuitbuilderwrapper_withOutputSorted: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
945
1051
|
readonly circuitbuilderwrapper_withStateMode: (a: number, b: number, c: number) => [number, number, number];
|
|
1052
|
+
readonly definitionregionwrapper_addBounds: (a: number, b: number, c: number) => void;
|
|
1053
|
+
readonly definitionregionwrapper_addPoint: (a: number, b: number, c: number, d: number) => void;
|
|
1054
|
+
readonly definitionregionwrapper_boxCount: (a: number) => number;
|
|
1055
|
+
readonly definitionregionwrapper_center: (a: number) => any;
|
|
1056
|
+
readonly definitionregionwrapper_centerF32: (a: number) => any;
|
|
1057
|
+
readonly definitionregionwrapper_clone: (a: number) => number;
|
|
1058
|
+
readonly definitionregionwrapper_connectedComponents: (a: number) => number;
|
|
1059
|
+
readonly definitionregionwrapper_contains: (a: number, b: number, c: number, d: number) => number;
|
|
1060
|
+
readonly definitionregionwrapper_contract: (a: number, b: number) => void;
|
|
1061
|
+
readonly definitionregionwrapper_contracted: (a: number, b: number) => number;
|
|
1062
|
+
readonly definitionregionwrapper_dimensions: (a: number) => any;
|
|
1063
|
+
readonly definitionregionwrapper_expand: (a: number, b: number, c: number, d: number) => void;
|
|
1064
|
+
readonly definitionregionwrapper_expanded: (a: number, b: number, c: number, d: number) => number;
|
|
1065
|
+
readonly definitionregionwrapper_filterByBlock: (a: number, b: number, c: number, d: number) => number;
|
|
1066
|
+
readonly definitionregionwrapper_filterByProperties: (a: number, b: number, c: any) => [number, number, number];
|
|
1067
|
+
readonly definitionregionwrapper_fromBoundingBoxes: (a: any) => [number, number, number];
|
|
1068
|
+
readonly definitionregionwrapper_fromBounds: (a: number, b: number) => number;
|
|
1069
|
+
readonly definitionregionwrapper_fromPositions: (a: any) => [number, number, number];
|
|
1070
|
+
readonly definitionregionwrapper_getAllMetadata: (a: number) => any;
|
|
1071
|
+
readonly definitionregionwrapper_getBounds: (a: number) => any;
|
|
1072
|
+
readonly definitionregionwrapper_getBox: (a: number, b: number) => any;
|
|
1073
|
+
readonly definitionregionwrapper_getBoxes: (a: number) => any;
|
|
1074
|
+
readonly definitionregionwrapper_getMetadata: (a: number, b: number, c: number) => any;
|
|
1075
|
+
readonly definitionregionwrapper_intersect: (a: number, b: number) => void;
|
|
1076
|
+
readonly definitionregionwrapper_intersected: (a: number, b: number) => number;
|
|
1077
|
+
readonly definitionregionwrapper_intersectsBounds: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
1078
|
+
readonly definitionregionwrapper_isContiguous: (a: number) => number;
|
|
1079
|
+
readonly definitionregionwrapper_isEmpty: (a: number) => number;
|
|
1080
|
+
readonly definitionregionwrapper_merge: (a: number, b: number) => void;
|
|
1081
|
+
readonly definitionregionwrapper_metadataKeys: (a: number) => any;
|
|
1082
|
+
readonly definitionregionwrapper_new: () => number;
|
|
1083
|
+
readonly definitionregionwrapper_positions: (a: number) => any;
|
|
1084
|
+
readonly definitionregionwrapper_positionsSorted: (a: number) => any;
|
|
1085
|
+
readonly definitionregionwrapper_setMetadata: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
1086
|
+
readonly definitionregionwrapper_shift: (a: number, b: number, c: number, d: number) => void;
|
|
1087
|
+
readonly definitionregionwrapper_shifted: (a: number, b: number, c: number, d: number) => number;
|
|
1088
|
+
readonly definitionregionwrapper_simplify: (a: number) => void;
|
|
1089
|
+
readonly definitionregionwrapper_subtract: (a: number, b: number) => void;
|
|
1090
|
+
readonly definitionregionwrapper_subtracted: (a: number, b: number) => number;
|
|
1091
|
+
readonly definitionregionwrapper_union: (a: number, b: number) => number;
|
|
1092
|
+
readonly definitionregionwrapper_unionInto: (a: number, b: number) => void;
|
|
1093
|
+
readonly definitionregionwrapper_volume: (a: number) => number;
|
|
946
1094
|
readonly executionmodewrapper_fixedTicks: (a: number) => number;
|
|
947
1095
|
readonly executionmodewrapper_untilChange: (a: number, b: number) => number;
|
|
948
1096
|
readonly executionmodewrapper_untilCondition: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
@@ -1004,6 +1152,17 @@ export interface InitOutput {
|
|
|
1004
1152
|
readonly simulationoptionswrapper_optimize: (a: number) => number;
|
|
1005
1153
|
readonly simulationoptionswrapper_set_io_only: (a: number, b: number) => void;
|
|
1006
1154
|
readonly simulationoptionswrapper_set_optimize: (a: number, b: number) => void;
|
|
1155
|
+
readonly sortstrategywrapper_descending: () => number;
|
|
1156
|
+
readonly sortstrategywrapper_distanceFrom: (a: number, b: number, c: number) => number;
|
|
1157
|
+
readonly sortstrategywrapper_distanceFromDesc: (a: number, b: number, c: number) => number;
|
|
1158
|
+
readonly sortstrategywrapper_fromString: (a: number, b: number) => [number, number, number];
|
|
1159
|
+
readonly sortstrategywrapper_name: (a: number) => [number, number];
|
|
1160
|
+
readonly sortstrategywrapper_preserve: () => number;
|
|
1161
|
+
readonly sortstrategywrapper_reverse: () => number;
|
|
1162
|
+
readonly sortstrategywrapper_xDescYZ: () => number;
|
|
1163
|
+
readonly sortstrategywrapper_xyz: () => number;
|
|
1164
|
+
readonly sortstrategywrapper_yxz: () => number;
|
|
1165
|
+
readonly sortstrategywrapper_zDescYX: () => number;
|
|
1007
1166
|
readonly statemodeconstants_manual: () => [number, number];
|
|
1008
1167
|
readonly statemodeconstants_stateful: () => [number, number];
|
|
1009
1168
|
readonly statemodeconstants_stateless: () => [number, number];
|
|
@@ -1029,53 +1188,11 @@ export interface InitOutput {
|
|
|
1029
1188
|
readonly valuewrapper_fromU32: (a: number) => number;
|
|
1030
1189
|
readonly valuewrapper_toJs: (a: number) => any;
|
|
1031
1190
|
readonly valuewrapper_typeName: (a: number) => [number, number];
|
|
1191
|
+
readonly definitionregionwrapper_copy: (a: number) => number;
|
|
1032
1192
|
readonly schematicwrapper_create_simulation_world_with_options: (a: number, b: number) => [number, number, number];
|
|
1193
|
+
readonly sortstrategywrapper_yDescXZ: () => number;
|
|
1194
|
+
readonly sortstrategywrapper_zyx: () => number;
|
|
1033
1195
|
readonly schematicwrapper_create_simulation_world: (a: number) => [number, number, number];
|
|
1034
|
-
readonly __wbg_iolayoutwrapper_free: (a: number, b: number) => void;
|
|
1035
|
-
readonly __wbg_definitionregionwrapper_free: (a: number, b: number) => void;
|
|
1036
|
-
readonly definitionregionwrapper_addBounds: (a: number, b: number, c: number) => void;
|
|
1037
|
-
readonly definitionregionwrapper_addPoint: (a: number, b: number, c: number, d: number) => void;
|
|
1038
|
-
readonly definitionregionwrapper_boxCount: (a: number) => number;
|
|
1039
|
-
readonly definitionregionwrapper_center: (a: number) => any;
|
|
1040
|
-
readonly definitionregionwrapper_centerF32: (a: number) => any;
|
|
1041
|
-
readonly definitionregionwrapper_clone: (a: number) => number;
|
|
1042
|
-
readonly definitionregionwrapper_connectedComponents: (a: number) => number;
|
|
1043
|
-
readonly definitionregionwrapper_contains: (a: number, b: number, c: number, d: number) => number;
|
|
1044
|
-
readonly definitionregionwrapper_contract: (a: number, b: number) => void;
|
|
1045
|
-
readonly definitionregionwrapper_contracted: (a: number, b: number) => number;
|
|
1046
|
-
readonly definitionregionwrapper_dimensions: (a: number) => any;
|
|
1047
|
-
readonly definitionregionwrapper_expand: (a: number, b: number, c: number, d: number) => void;
|
|
1048
|
-
readonly definitionregionwrapper_expanded: (a: number, b: number, c: number, d: number) => number;
|
|
1049
|
-
readonly definitionregionwrapper_filterByBlock: (a: number, b: number, c: number, d: number) => number;
|
|
1050
|
-
readonly definitionregionwrapper_filterByProperties: (a: number, b: number, c: any) => [number, number, number];
|
|
1051
|
-
readonly definitionregionwrapper_fromBoundingBoxes: (a: any) => [number, number, number];
|
|
1052
|
-
readonly definitionregionwrapper_fromBounds: (a: number, b: number) => number;
|
|
1053
|
-
readonly definitionregionwrapper_fromPositions: (a: any) => [number, number, number];
|
|
1054
|
-
readonly definitionregionwrapper_getAllMetadata: (a: number) => any;
|
|
1055
|
-
readonly definitionregionwrapper_getBounds: (a: number) => any;
|
|
1056
|
-
readonly definitionregionwrapper_getBox: (a: number, b: number) => any;
|
|
1057
|
-
readonly definitionregionwrapper_getBoxes: (a: number) => any;
|
|
1058
|
-
readonly definitionregionwrapper_getMetadata: (a: number, b: number, c: number) => any;
|
|
1059
|
-
readonly definitionregionwrapper_intersect: (a: number, b: number) => void;
|
|
1060
|
-
readonly definitionregionwrapper_intersected: (a: number, b: number) => number;
|
|
1061
|
-
readonly definitionregionwrapper_intersectsBounds: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
1062
|
-
readonly definitionregionwrapper_isContiguous: (a: number) => number;
|
|
1063
|
-
readonly definitionregionwrapper_isEmpty: (a: number) => number;
|
|
1064
|
-
readonly definitionregionwrapper_merge: (a: number, b: number) => void;
|
|
1065
|
-
readonly definitionregionwrapper_metadataKeys: (a: number) => any;
|
|
1066
|
-
readonly definitionregionwrapper_new: () => number;
|
|
1067
|
-
readonly definitionregionwrapper_positions: (a: number) => any;
|
|
1068
|
-
readonly definitionregionwrapper_positionsSorted: (a: number) => any;
|
|
1069
|
-
readonly definitionregionwrapper_setMetadata: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
1070
|
-
readonly definitionregionwrapper_shift: (a: number, b: number, c: number, d: number) => void;
|
|
1071
|
-
readonly definitionregionwrapper_shifted: (a: number, b: number, c: number, d: number) => number;
|
|
1072
|
-
readonly definitionregionwrapper_simplify: (a: number) => void;
|
|
1073
|
-
readonly definitionregionwrapper_subtract: (a: number, b: number) => void;
|
|
1074
|
-
readonly definitionregionwrapper_subtracted: (a: number, b: number) => number;
|
|
1075
|
-
readonly definitionregionwrapper_union: (a: number, b: number) => number;
|
|
1076
|
-
readonly definitionregionwrapper_unionInto: (a: number, b: number) => void;
|
|
1077
|
-
readonly definitionregionwrapper_volume: (a: number) => number;
|
|
1078
|
-
readonly definitionregionwrapper_copy: (a: number) => number;
|
|
1079
1196
|
readonly __wbg_blockposition_free: (a: number, b: number) => void;
|
|
1080
1197
|
readonly __wbg_get_blockposition_x: (a: number) => number;
|
|
1081
1198
|
readonly __wbg_get_blockposition_y: (a: number) => number;
|
package/nucleation_bg.wasm
CHANGED
|
Binary file
|