opengeometry 2.0.4 → 2.0.5
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/index.js +32 -31
- package/index.js.map +1 -1
- package/opengeometry/pkg/opengeometry.d.ts +153 -153
- package/opengeometry/pkg/opengeometry.js +30 -29
- package/opengeometry/pkg/opengeometry_bg.wasm +0 -0
- package/opengeometry/pkg/opengeometry_bg.wasm.d.ts +152 -152
- package/opengeometry_bg.wasm +0 -0
- package/opengeometry_bg.wasm.d.ts +152 -152
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -138,11 +138,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
138
138
|
WASM_VECTOR_LEN = offset;
|
|
139
139
|
return ptr;
|
|
140
140
|
}
|
|
141
|
-
function _assertClass(instance, klass) {
|
|
142
|
-
if (!(instance instanceof klass)) {
|
|
143
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
141
|
function takeFromExternrefTable0(idx) {
|
|
147
142
|
const value = wasm.__wbindgen_export_2.get(idx);
|
|
148
143
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -159,30 +154,9 @@ function getArrayF64FromWasm0(ptr, len) {
|
|
|
159
154
|
ptr = ptr >>> 0;
|
|
160
155
|
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
161
156
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
* @returns {string}
|
|
166
|
-
*/
|
|
167
|
-
function extrudeBrepFace$1(local_brep_serialized, height) {
|
|
168
|
-
let deferred3_0;
|
|
169
|
-
let deferred3_1;
|
|
170
|
-
try {
|
|
171
|
-
const ptr0 = passStringToWasm0(local_brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
172
|
-
const len0 = WASM_VECTOR_LEN;
|
|
173
|
-
const ret = wasm.extrudeBrepFace(ptr0, len0, height);
|
|
174
|
-
var ptr2 = ret[0];
|
|
175
|
-
var len2 = ret[1];
|
|
176
|
-
if (ret[3]) {
|
|
177
|
-
ptr2 = 0;
|
|
178
|
-
len2 = 0;
|
|
179
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
180
|
-
}
|
|
181
|
-
deferred3_0 = ptr2;
|
|
182
|
-
deferred3_1 = len2;
|
|
183
|
-
return getStringFromWasm0(ptr2, len2);
|
|
184
|
-
} finally {
|
|
185
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
157
|
+
function _assertClass(instance, klass) {
|
|
158
|
+
if (!(instance instanceof klass)) {
|
|
159
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
186
160
|
}
|
|
187
161
|
}
|
|
188
162
|
let cachedDataViewMemory0 = null;
|
|
@@ -297,6 +271,33 @@ function booleanSubtractionMany(lhs_brep_serialized, cutters_brep_serialized, op
|
|
|
297
271
|
}
|
|
298
272
|
return OGBooleanResult.__wrap(ret[0]);
|
|
299
273
|
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @param {string} local_brep_serialized
|
|
277
|
+
* @param {number} height
|
|
278
|
+
* @returns {string}
|
|
279
|
+
*/
|
|
280
|
+
function extrudeBrepFace$1(local_brep_serialized, height) {
|
|
281
|
+
let deferred3_0;
|
|
282
|
+
let deferred3_1;
|
|
283
|
+
try {
|
|
284
|
+
const ptr0 = passStringToWasm0(local_brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
285
|
+
const len0 = WASM_VECTOR_LEN;
|
|
286
|
+
const ret = wasm.extrudeBrepFace(ptr0, len0, height);
|
|
287
|
+
var ptr2 = ret[0];
|
|
288
|
+
var len2 = ret[1];
|
|
289
|
+
if (ret[3]) {
|
|
290
|
+
ptr2 = 0;
|
|
291
|
+
len2 = 0;
|
|
292
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
293
|
+
}
|
|
294
|
+
deferred3_0 = ptr2;
|
|
295
|
+
deferred3_1 = len2;
|
|
296
|
+
return getStringFromWasm0(ptr2, len2);
|
|
297
|
+
} finally {
|
|
298
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
300
301
|
const Matrix3Finalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
301
302
|
register: () => {},
|
|
302
303
|
unregister: () => {}
|
|
@@ -10222,7 +10223,7 @@ function createOffsetExample(scene) {
|
|
|
10222
10223
|
],
|
|
10223
10224
|
color: 0x0f172a,
|
|
10224
10225
|
});
|
|
10225
|
-
const polylineOffset = basePolyline.getOffset(0.45,
|
|
10226
|
+
const polylineOffset = basePolyline.getOffset(0.45, 35.0, true);
|
|
10226
10227
|
const polylineOffsetPrimitive = new Polyline({
|
|
10227
10228
|
points: polylineOffset.points,
|
|
10228
10229
|
color: 0xdc2626,
|
|
@@ -10308,7 +10309,7 @@ function createWallFromOffsetsExample(scene) {
|
|
|
10308
10309
|
});
|
|
10309
10310
|
const wallThickness = 0.45;
|
|
10310
10311
|
const half = wallThickness * 0.5;
|
|
10311
|
-
const acuteThreshold =
|
|
10312
|
+
const acuteThreshold = 35.0;
|
|
10312
10313
|
const bevel = true;
|
|
10313
10314
|
const leftOffset = centerline.getOffset(half, acuteThreshold, bevel);
|
|
10314
10315
|
const rightOffset = centerline.getOffset(-0.225, acuteThreshold, bevel);
|