@tscircuit/3d-viewer 0.0.301 → 0.0.302
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/dist/index.js +16 -8
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -13734,7 +13734,7 @@ var require_common = __commonJS({
|
|
|
13734
13734
|
createDebug.namespaces = namespaces;
|
|
13735
13735
|
createDebug.names = [];
|
|
13736
13736
|
createDebug.skips = [];
|
|
13737
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(
|
|
13737
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
13738
13738
|
for (const ns of split) {
|
|
13739
13739
|
if (ns[0] === "-") {
|
|
13740
13740
|
createDebug.skips.push(ns.slice(1));
|
|
@@ -13953,7 +13953,7 @@ var require_browser = __commonJS({
|
|
|
13953
13953
|
function load() {
|
|
13954
13954
|
let r;
|
|
13955
13955
|
try {
|
|
13956
|
-
r = exports.storage.getItem("debug");
|
|
13956
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
13957
13957
|
} catch (error) {
|
|
13958
13958
|
}
|
|
13959
13959
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -14767,7 +14767,11 @@ var GLTFWriter = class {
|
|
|
14767
14767
|
default:
|
|
14768
14768
|
componentSize = 4;
|
|
14769
14769
|
}
|
|
14770
|
-
|
|
14770
|
+
let byteStride = attribute.itemSize * componentSize;
|
|
14771
|
+
if (target === WEBGL_CONSTANTS.ARRAY_BUFFER) {
|
|
14772
|
+
byteStride = Math.ceil(byteStride / 4) * 4;
|
|
14773
|
+
}
|
|
14774
|
+
const byteLength = getPaddedBufferSize(count * byteStride);
|
|
14771
14775
|
const dataView = new DataView(new ArrayBuffer(byteLength));
|
|
14772
14776
|
let offset = 0;
|
|
14773
14777
|
for (let i = start; i < start + count; i++) {
|
|
@@ -14805,6 +14809,9 @@ var GLTFWriter = class {
|
|
|
14805
14809
|
}
|
|
14806
14810
|
offset += componentSize;
|
|
14807
14811
|
}
|
|
14812
|
+
if (offset % byteStride !== 0) {
|
|
14813
|
+
offset += byteStride - offset % byteStride;
|
|
14814
|
+
}
|
|
14808
14815
|
}
|
|
14809
14816
|
const bufferViewDef = {
|
|
14810
14817
|
buffer: this.processBuffer(dataView.buffer),
|
|
@@ -14814,7 +14821,7 @@ var GLTFWriter = class {
|
|
|
14814
14821
|
if (target !== void 0)
|
|
14815
14822
|
bufferViewDef.target = target;
|
|
14816
14823
|
if (target === WEBGL_CONSTANTS.ARRAY_BUFFER) {
|
|
14817
|
-
bufferViewDef.byteStride =
|
|
14824
|
+
bufferViewDef.byteStride = byteStride;
|
|
14818
14825
|
}
|
|
14819
14826
|
this.byteOffset += byteLength;
|
|
14820
14827
|
json.bufferViews.push(bufferViewDef);
|
|
@@ -17279,7 +17286,7 @@ import {
|
|
|
17279
17286
|
// package.json
|
|
17280
17287
|
var package_default = {
|
|
17281
17288
|
name: "@tscircuit/3d-viewer",
|
|
17282
|
-
version: "0.0.
|
|
17289
|
+
version: "0.0.301",
|
|
17283
17290
|
main: "./dist/index.js",
|
|
17284
17291
|
module: "./dist/index.js",
|
|
17285
17292
|
type: "module",
|
|
@@ -17311,7 +17318,7 @@ var package_default = {
|
|
|
17311
17318
|
"@react-three/drei": "^9.121.4",
|
|
17312
17319
|
"@react-three/fiber": "^8.17.14",
|
|
17313
17320
|
"@tscircuit/core": "^0.0.454",
|
|
17314
|
-
"@tscircuit/props": "^0.0.
|
|
17321
|
+
"@tscircuit/props": "^0.0.262",
|
|
17315
17322
|
"@tscircuit/soup-util": "^0.0.41",
|
|
17316
17323
|
"jscad-electronics": "^0.0.29",
|
|
17317
17324
|
"jscad-fiber": "^0.0.79",
|
|
@@ -17322,7 +17329,8 @@ var package_default = {
|
|
|
17322
17329
|
"react-use-gesture": "^9.1.3"
|
|
17323
17330
|
},
|
|
17324
17331
|
peerDependencies: {
|
|
17325
|
-
three: "*"
|
|
17332
|
+
three: "*",
|
|
17333
|
+
zod: "3"
|
|
17326
17334
|
},
|
|
17327
17335
|
devDependencies: {
|
|
17328
17336
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -20328,7 +20336,7 @@ var useContextMenu = ({ containerRef }) => {
|
|
|
20328
20336
|
// src/CadViewer.tsx
|
|
20329
20337
|
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
20330
20338
|
var CadViewer = (props) => {
|
|
20331
|
-
const [engine, setEngine] = useState11("
|
|
20339
|
+
const [engine, setEngine] = useState11("manifold");
|
|
20332
20340
|
const containerRef = useRef8(null);
|
|
20333
20341
|
const {
|
|
20334
20342
|
menuVisible,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/3d-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.302",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@react-three/drei": "^9.121.4",
|
|
33
33
|
"@react-three/fiber": "^8.17.14",
|
|
34
34
|
"@tscircuit/core": "^0.0.454",
|
|
35
|
-
"@tscircuit/props": "^0.0.
|
|
35
|
+
"@tscircuit/props": "^0.0.262",
|
|
36
36
|
"@tscircuit/soup-util": "^0.0.41",
|
|
37
37
|
"jscad-electronics": "^0.0.29",
|
|
38
38
|
"jscad-fiber": "^0.0.79",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"react-use-gesture": "^9.1.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"three": "*"
|
|
46
|
+
"three": "*",
|
|
47
|
+
"zod": "3"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@biomejs/biome": "^1.9.4",
|