jscad-electronics 0.0.23 → 0.0.24
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.d.ts +25 -1
- package/dist/index.js +724 -472
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7730,7 +7730,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7730
7730
|
var HostPortal = 4;
|
|
7731
7731
|
var HostComponent = 5;
|
|
7732
7732
|
var HostText = 6;
|
|
7733
|
-
var
|
|
7733
|
+
var Fragment22 = 7;
|
|
7734
7734
|
var Mode = 8;
|
|
7735
7735
|
var ContextConsumer = 9;
|
|
7736
7736
|
var ContextProvider = 10;
|
|
@@ -7870,7 +7870,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7870
7870
|
return "DehydratedFragment";
|
|
7871
7871
|
case ForwardRef:
|
|
7872
7872
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
|
7873
|
-
case
|
|
7873
|
+
case Fragment22:
|
|
7874
7874
|
return "Fragment";
|
|
7875
7875
|
case HostComponent:
|
|
7876
7876
|
return type;
|
|
@@ -11004,7 +11004,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
11004
11004
|
}
|
|
11005
11005
|
}
|
|
11006
11006
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
|
11007
|
-
if (current2 === null || current2.tag !==
|
|
11007
|
+
if (current2 === null || current2.tag !== Fragment22) {
|
|
11008
11008
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
|
11009
11009
|
created.return = returnFiber;
|
|
11010
11010
|
return created;
|
|
@@ -11407,7 +11407,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
11407
11407
|
if (child.key === key) {
|
|
11408
11408
|
var elementType = element.type;
|
|
11409
11409
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
11410
|
-
if (child.tag ===
|
|
11410
|
+
if (child.tag === Fragment22) {
|
|
11411
11411
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
11412
11412
|
var existing = useFiber(child, element.props.children);
|
|
11413
11413
|
existing.return = returnFiber;
|
|
@@ -16898,7 +16898,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
16898
16898
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
|
16899
16899
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
|
16900
16900
|
}
|
|
16901
|
-
case
|
|
16901
|
+
case Fragment22:
|
|
16902
16902
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
|
16903
16903
|
case Mode:
|
|
16904
16904
|
return updateMode(current2, workInProgress2, renderLanes2);
|
|
@@ -17335,7 +17335,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17335
17335
|
case SimpleMemoComponent:
|
|
17336
17336
|
case FunctionComponent:
|
|
17337
17337
|
case ForwardRef:
|
|
17338
|
-
case
|
|
17338
|
+
case Fragment22:
|
|
17339
17339
|
case Mode:
|
|
17340
17340
|
case Profiler:
|
|
17341
17341
|
case ContextConsumer:
|
|
@@ -22103,7 +22103,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
22103
22103
|
return fiber;
|
|
22104
22104
|
}
|
|
22105
22105
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
|
22106
|
-
var fiber = createFiber(
|
|
22106
|
+
var fiber = createFiber(Fragment22, elements, key, mode);
|
|
22107
22107
|
fiber.lanes = lanes;
|
|
22108
22108
|
return fiber;
|
|
22109
22109
|
}
|
|
@@ -23704,11 +23704,11 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
23704
23704
|
return jsxWithValidation(type, props, key, false);
|
|
23705
23705
|
}
|
|
23706
23706
|
}
|
|
23707
|
-
var
|
|
23708
|
-
var
|
|
23707
|
+
var jsx27 = jsxWithValidationDynamic;
|
|
23708
|
+
var jsxs23 = jsxWithValidationStatic;
|
|
23709
23709
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
23710
|
-
exports.jsx =
|
|
23711
|
-
exports.jsxs =
|
|
23710
|
+
exports.jsx = jsx27;
|
|
23711
|
+
exports.jsxs = jsxs23;
|
|
23712
23712
|
})();
|
|
23713
23713
|
}
|
|
23714
23714
|
}
|
|
@@ -32686,9 +32686,9 @@ var require_cylinderElliptic = __commonJS({
|
|
|
32686
32686
|
endAngle: TAU,
|
|
32687
32687
|
segments: 32
|
|
32688
32688
|
};
|
|
32689
|
-
let { center, height:
|
|
32689
|
+
let { center, height: height10, startRadius, startAngle, endRadius, endAngle, segments } = Object.assign({}, defaults, options);
|
|
32690
32690
|
if (!isNumberArray(center, 3)) throw new Error("center must be an array of X, Y and Z values");
|
|
32691
|
-
if (!isGT(
|
|
32691
|
+
if (!isGT(height10, 0)) throw new Error("height must be greater then zero");
|
|
32692
32692
|
if (!isNumberArray(startRadius, 2)) throw new Error("startRadius must be an array of X and Y values");
|
|
32693
32693
|
if (!startRadius.every((n) => n >= 0)) throw new Error("startRadius values must be positive");
|
|
32694
32694
|
if (!isNumberArray(endRadius, 2)) throw new Error("endRadius must be an array of X and Y values");
|
|
@@ -32710,8 +32710,8 @@ var require_cylinderElliptic = __commonJS({
|
|
|
32710
32710
|
const minangle = Math.acos((minradius * minradius + minradius * minradius - EPS * EPS) / (2 * minradius * minradius));
|
|
32711
32711
|
if (rotation < minangle) throw new Error("startAngle and endAngle do not define a significant rotation");
|
|
32712
32712
|
const slices = Math.floor(segments * (rotation / TAU));
|
|
32713
|
-
const start = vec3.fromValues(0, 0, -(
|
|
32714
|
-
const end = vec3.fromValues(0, 0,
|
|
32713
|
+
const start = vec3.fromValues(0, 0, -(height10 / 2));
|
|
32714
|
+
const end = vec3.fromValues(0, 0, height10 / 2);
|
|
32715
32715
|
const ray = vec3.subtract(vec3.create(), end, start);
|
|
32716
32716
|
const axisX = vec3.fromValues(1, 0, 0);
|
|
32717
32717
|
const axisY = vec3.fromValues(0, 1, 0);
|
|
@@ -32782,12 +32782,12 @@ var require_cylinder = __commonJS({
|
|
|
32782
32782
|
radius: 1,
|
|
32783
32783
|
segments: 32
|
|
32784
32784
|
};
|
|
32785
|
-
const { center, height:
|
|
32785
|
+
const { center, height: height10, radius, segments } = Object.assign({}, defaults, options);
|
|
32786
32786
|
if (!isGTE(radius, 0)) throw new Error("radius must be positive");
|
|
32787
|
-
if (
|
|
32787
|
+
if (height10 === 0 || radius === 0) return geom3.create();
|
|
32788
32788
|
const newoptions = {
|
|
32789
32789
|
center,
|
|
32790
|
-
height:
|
|
32790
|
+
height: height10,
|
|
32791
32791
|
startRadius: [radius, radius],
|
|
32792
32792
|
endRadius: [radius, radius],
|
|
32793
32793
|
segments
|
|
@@ -33324,17 +33324,17 @@ var require_roundedCylinder = __commonJS({
|
|
|
33324
33324
|
roundRadius: 0.2,
|
|
33325
33325
|
segments: 32
|
|
33326
33326
|
};
|
|
33327
|
-
const { center, height:
|
|
33327
|
+
const { center, height: height10, radius, roundRadius, segments } = Object.assign({}, defaults, options);
|
|
33328
33328
|
if (!isNumberArray(center, 3)) throw new Error("center must be an array of X, Y and Z values");
|
|
33329
|
-
if (!isGTE(
|
|
33329
|
+
if (!isGTE(height10, 0)) throw new Error("height must be positive");
|
|
33330
33330
|
if (!isGTE(radius, 0)) throw new Error("radius must be positive");
|
|
33331
33331
|
if (!isGTE(roundRadius, 0)) throw new Error("roundRadius must be positive");
|
|
33332
33332
|
if (roundRadius > radius) throw new Error("roundRadius must be smaller than the radius");
|
|
33333
33333
|
if (!isGTE(segments, 4)) throw new Error("segments must be four or more");
|
|
33334
|
-
if (
|
|
33335
|
-
if (roundRadius === 0) return cylinder({ center, height:
|
|
33336
|
-
const start = [0, 0, -(
|
|
33337
|
-
const end = [0, 0,
|
|
33334
|
+
if (height10 === 0 || radius === 0) return geom3.create();
|
|
33335
|
+
if (roundRadius === 0) return cylinder({ center, height: height10, radius });
|
|
33336
|
+
const start = [0, 0, -(height10 / 2)];
|
|
33337
|
+
const end = [0, 0, height10 / 2];
|
|
33338
33338
|
const direction = vec3.subtract(vec3.create(), end, start);
|
|
33339
33339
|
const length = vec3.length(direction);
|
|
33340
33340
|
if (2 * roundRadius > length - EPS) throw new Error("height must be larger than twice roundRadius");
|
|
@@ -35139,7 +35139,7 @@ var require_vectorChar = __commonJS({
|
|
|
35139
35139
|
yOffset,
|
|
35140
35140
|
input,
|
|
35141
35141
|
font,
|
|
35142
|
-
height:
|
|
35142
|
+
height: height10,
|
|
35143
35143
|
extrudeOffset
|
|
35144
35144
|
} = vectorParams(options, char);
|
|
35145
35145
|
let code = input.charCodeAt(0);
|
|
@@ -35147,9 +35147,9 @@ var require_vectorChar = __commonJS({
|
|
|
35147
35147
|
code = 63;
|
|
35148
35148
|
}
|
|
35149
35149
|
const glyph = [].concat(font[code]);
|
|
35150
|
-
const ratio = (
|
|
35150
|
+
const ratio = (height10 - extrudeOffset) / font.height;
|
|
35151
35151
|
const extrudeYOffset = extrudeOffset / 2;
|
|
35152
|
-
const
|
|
35152
|
+
const width10 = glyph.shift() * ratio;
|
|
35153
35153
|
const segments = [];
|
|
35154
35154
|
let polyline = [];
|
|
35155
35155
|
for (let i = 0, il = glyph.length; i < il; i += 2) {
|
|
@@ -35166,7 +35166,7 @@ var require_vectorChar = __commonJS({
|
|
|
35166
35166
|
if (polyline.length) {
|
|
35167
35167
|
segments.push(polyline);
|
|
35168
35168
|
}
|
|
35169
|
-
return { width:
|
|
35169
|
+
return { width: width10, height: height10, segments };
|
|
35170
35170
|
};
|
|
35171
35171
|
module.exports = vectorChar;
|
|
35172
35172
|
}
|
|
@@ -35198,14 +35198,14 @@ var require_vectorText = __commonJS({
|
|
|
35198
35198
|
yOffset,
|
|
35199
35199
|
input,
|
|
35200
35200
|
font,
|
|
35201
|
-
height:
|
|
35201
|
+
height: height10,
|
|
35202
35202
|
align,
|
|
35203
35203
|
extrudeOffset,
|
|
35204
35204
|
lineSpacing,
|
|
35205
35205
|
letterSpacing
|
|
35206
35206
|
} = vectorParams(options, text);
|
|
35207
35207
|
let [x, y] = [xOffset, yOffset];
|
|
35208
|
-
let i, il, char, vect,
|
|
35208
|
+
let i, il, char, vect, width10, diff;
|
|
35209
35209
|
let line = { width: 0, segments: [] };
|
|
35210
35210
|
const lines = [];
|
|
35211
35211
|
let output = [];
|
|
@@ -35218,16 +35218,16 @@ var require_vectorText = __commonJS({
|
|
|
35218
35218
|
};
|
|
35219
35219
|
for (i = 0, il = input.length; i < il; i++) {
|
|
35220
35220
|
char = input[i];
|
|
35221
|
-
vect = vectorChar({ xOffset: x, yOffset: y, font, height:
|
|
35221
|
+
vect = vectorChar({ xOffset: x, yOffset: y, font, height: height10, extrudeOffset }, char);
|
|
35222
35222
|
if (char === "\n") {
|
|
35223
35223
|
x = lineStart;
|
|
35224
35224
|
y -= vect.height * lineSpacing;
|
|
35225
35225
|
pushLine();
|
|
35226
35226
|
continue;
|
|
35227
35227
|
}
|
|
35228
|
-
|
|
35229
|
-
line.width +=
|
|
35230
|
-
x +=
|
|
35228
|
+
width10 = vect.width * letterSpacing;
|
|
35229
|
+
line.width += width10;
|
|
35230
|
+
x += width10;
|
|
35231
35231
|
if (char !== " ") {
|
|
35232
35232
|
line.segments = line.segments.concat(vect.segments);
|
|
35233
35233
|
}
|
|
@@ -37594,10 +37594,10 @@ var require_extrudeLinear = __commonJS({
|
|
|
37594
37594
|
twistSteps: 1,
|
|
37595
37595
|
repair: true
|
|
37596
37596
|
};
|
|
37597
|
-
const { height:
|
|
37597
|
+
const { height: height10, twistAngle, twistSteps, repair } = Object.assign({}, defaults, options);
|
|
37598
37598
|
objects = flatten(objects);
|
|
37599
37599
|
if (objects.length === 0) throw new Error("wrong number of arguments");
|
|
37600
|
-
options = { offset: [0, 0,
|
|
37600
|
+
options = { offset: [0, 0, height10], twistAngle, twistSteps, repair };
|
|
37601
37601
|
const results = objects.map((object) => {
|
|
37602
37602
|
if (path2.isA(object)) return extrudeLinearPath2(options, object);
|
|
37603
37603
|
if (geom2.isA(object)) return extrudeLinearGeom2(options, object);
|
|
@@ -37621,9 +37621,9 @@ var require_extrudeRectangularPath2 = __commonJS({
|
|
|
37621
37621
|
size: 1,
|
|
37622
37622
|
height: 1
|
|
37623
37623
|
};
|
|
37624
|
-
const { size, height:
|
|
37624
|
+
const { size, height: height10 } = Object.assign({}, defaults, options);
|
|
37625
37625
|
options.delta = size;
|
|
37626
|
-
options.offset = [0, 0,
|
|
37626
|
+
options.offset = [0, 0, height10];
|
|
37627
37627
|
const points = path2.toPoints(geometry);
|
|
37628
37628
|
if (points.length === 0) throw new Error("the given geometry cannot be empty");
|
|
37629
37629
|
const newgeometry = expand(options, geometry);
|
|
@@ -37647,9 +37647,9 @@ var require_extrudeRectangularGeom2 = __commonJS({
|
|
|
37647
37647
|
size: 1,
|
|
37648
37648
|
height: 1
|
|
37649
37649
|
};
|
|
37650
|
-
const { size, height:
|
|
37650
|
+
const { size, height: height10 } = Object.assign({}, defaults, options);
|
|
37651
37651
|
options.delta = size;
|
|
37652
|
-
options.offset = [0, 0,
|
|
37652
|
+
options.offset = [0, 0, height10];
|
|
37653
37653
|
const outlines = geom2.toOutlines(geometry);
|
|
37654
37654
|
if (outlines.length === 0) throw new Error("the given geometry cannot be empty");
|
|
37655
37655
|
const newparts = outlines.map((outline) => {
|
|
@@ -37678,11 +37678,11 @@ var require_extrudeRectangular = __commonJS({
|
|
|
37678
37678
|
size: 1,
|
|
37679
37679
|
height: 1
|
|
37680
37680
|
};
|
|
37681
|
-
const { size, height:
|
|
37681
|
+
const { size, height: height10 } = Object.assign({}, defaults, options);
|
|
37682
37682
|
objects = flatten(objects);
|
|
37683
37683
|
if (objects.length === 0) throw new Error("wrong number of arguments");
|
|
37684
37684
|
if (size <= 0) throw new Error("size must be positive");
|
|
37685
|
-
if (
|
|
37685
|
+
if (height10 <= 0) throw new Error("height must be positive");
|
|
37686
37686
|
const results = objects.map((object) => {
|
|
37687
37687
|
if (path2.isA(object)) return extrudeRectangularPath2(options, object);
|
|
37688
37688
|
if (geom2.isA(object)) return extrudeRectangularGeom2(options, object);
|
|
@@ -40719,16 +40719,16 @@ var require_three = __commonJS({
|
|
|
40719
40719
|
}
|
|
40720
40720
|
};
|
|
40721
40721
|
var RenderTarget = class extends EventDispatcher2 {
|
|
40722
|
-
constructor(
|
|
40722
|
+
constructor(width10 = 1, height10 = 1, options = {}) {
|
|
40723
40723
|
super();
|
|
40724
40724
|
this.isRenderTarget = true;
|
|
40725
|
-
this.width =
|
|
40726
|
-
this.height =
|
|
40725
|
+
this.width = width10;
|
|
40726
|
+
this.height = height10;
|
|
40727
40727
|
this.depth = 1;
|
|
40728
|
-
this.scissor = new Vector4(0, 0,
|
|
40728
|
+
this.scissor = new Vector4(0, 0, width10, height10);
|
|
40729
40729
|
this.scissorTest = false;
|
|
40730
|
-
this.viewport = new Vector4(0, 0,
|
|
40731
|
-
const image = { width:
|
|
40730
|
+
this.viewport = new Vector4(0, 0, width10, height10);
|
|
40731
|
+
const image = { width: width10, height: height10, depth: 1 };
|
|
40732
40732
|
options = Object.assign({
|
|
40733
40733
|
generateMipmaps: false,
|
|
40734
40734
|
internalFormat: null,
|
|
@@ -40764,20 +40764,20 @@ var require_three = __commonJS({
|
|
|
40764
40764
|
set texture(value) {
|
|
40765
40765
|
this.textures[0] = value;
|
|
40766
40766
|
}
|
|
40767
|
-
setSize(
|
|
40768
|
-
if (this.width !==
|
|
40769
|
-
this.width =
|
|
40770
|
-
this.height =
|
|
40767
|
+
setSize(width10, height10, depth = 1) {
|
|
40768
|
+
if (this.width !== width10 || this.height !== height10 || this.depth !== depth) {
|
|
40769
|
+
this.width = width10;
|
|
40770
|
+
this.height = height10;
|
|
40771
40771
|
this.depth = depth;
|
|
40772
40772
|
for (let i = 0, il = this.textures.length; i < il; i++) {
|
|
40773
|
-
this.textures[i].image.width =
|
|
40774
|
-
this.textures[i].image.height =
|
|
40773
|
+
this.textures[i].image.width = width10;
|
|
40774
|
+
this.textures[i].image.height = height10;
|
|
40775
40775
|
this.textures[i].image.depth = depth;
|
|
40776
40776
|
}
|
|
40777
40777
|
this.dispose();
|
|
40778
40778
|
}
|
|
40779
|
-
this.viewport.set(0, 0,
|
|
40780
|
-
this.scissor.set(0, 0,
|
|
40779
|
+
this.viewport.set(0, 0, width10, height10);
|
|
40780
|
+
this.scissor.set(0, 0, width10, height10);
|
|
40781
40781
|
}
|
|
40782
40782
|
clone() {
|
|
40783
40783
|
return new this.constructor().copy(this);
|
|
@@ -40809,16 +40809,16 @@ var require_three = __commonJS({
|
|
|
40809
40809
|
}
|
|
40810
40810
|
};
|
|
40811
40811
|
var WebGLRenderTarget = class extends RenderTarget {
|
|
40812
|
-
constructor(
|
|
40813
|
-
super(
|
|
40812
|
+
constructor(width10 = 1, height10 = 1, options = {}) {
|
|
40813
|
+
super(width10, height10, options);
|
|
40814
40814
|
this.isWebGLRenderTarget = true;
|
|
40815
40815
|
}
|
|
40816
40816
|
};
|
|
40817
40817
|
var DataArrayTexture = class extends Texture2 {
|
|
40818
|
-
constructor(data = null,
|
|
40818
|
+
constructor(data = null, width10 = 1, height10 = 1, depth = 1) {
|
|
40819
40819
|
super(null);
|
|
40820
40820
|
this.isDataArrayTexture = true;
|
|
40821
|
-
this.image = { data, width:
|
|
40821
|
+
this.image = { data, width: width10, height: height10, depth };
|
|
40822
40822
|
this.magFilter = NearestFilter;
|
|
40823
40823
|
this.minFilter = NearestFilter;
|
|
40824
40824
|
this.wrapR = ClampToEdgeWrapping2;
|
|
@@ -40835,19 +40835,19 @@ var require_three = __commonJS({
|
|
|
40835
40835
|
}
|
|
40836
40836
|
};
|
|
40837
40837
|
var WebGLArrayRenderTarget = class extends WebGLRenderTarget {
|
|
40838
|
-
constructor(
|
|
40839
|
-
super(
|
|
40838
|
+
constructor(width10 = 1, height10 = 1, depth = 1, options = {}) {
|
|
40839
|
+
super(width10, height10, options);
|
|
40840
40840
|
this.isWebGLArrayRenderTarget = true;
|
|
40841
40841
|
this.depth = depth;
|
|
40842
|
-
this.texture = new DataArrayTexture(null,
|
|
40842
|
+
this.texture = new DataArrayTexture(null, width10, height10, depth);
|
|
40843
40843
|
this.texture.isRenderTargetTexture = true;
|
|
40844
40844
|
}
|
|
40845
40845
|
};
|
|
40846
40846
|
var Data3DTexture = class extends Texture2 {
|
|
40847
|
-
constructor(data = null,
|
|
40847
|
+
constructor(data = null, width10 = 1, height10 = 1, depth = 1) {
|
|
40848
40848
|
super(null);
|
|
40849
40849
|
this.isData3DTexture = true;
|
|
40850
|
-
this.image = { data, width:
|
|
40850
|
+
this.image = { data, width: width10, height: height10, depth };
|
|
40851
40851
|
this.magFilter = NearestFilter;
|
|
40852
40852
|
this.minFilter = NearestFilter;
|
|
40853
40853
|
this.wrapR = ClampToEdgeWrapping2;
|
|
@@ -40857,11 +40857,11 @@ var require_three = __commonJS({
|
|
|
40857
40857
|
}
|
|
40858
40858
|
};
|
|
40859
40859
|
var WebGL3DRenderTarget = class extends WebGLRenderTarget {
|
|
40860
|
-
constructor(
|
|
40861
|
-
super(
|
|
40860
|
+
constructor(width10 = 1, height10 = 1, depth = 1, options = {}) {
|
|
40861
|
+
super(width10, height10, options);
|
|
40862
40862
|
this.isWebGL3DRenderTarget = true;
|
|
40863
40863
|
this.depth = depth;
|
|
40864
|
-
this.texture = new Data3DTexture(null,
|
|
40864
|
+
this.texture = new Data3DTexture(null, width10, height10, depth);
|
|
40865
40865
|
this.texture.isRenderTargetTexture = true;
|
|
40866
40866
|
}
|
|
40867
40867
|
};
|
|
@@ -46116,12 +46116,12 @@ var require_three = __commonJS({
|
|
|
46116
46116
|
return intersection;
|
|
46117
46117
|
}
|
|
46118
46118
|
var BoxGeometry = class _BoxGeometry extends BufferGeometry {
|
|
46119
|
-
constructor(
|
|
46119
|
+
constructor(width10 = 1, height10 = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1) {
|
|
46120
46120
|
super();
|
|
46121
46121
|
this.type = "BoxGeometry";
|
|
46122
46122
|
this.parameters = {
|
|
46123
|
-
width:
|
|
46124
|
-
height:
|
|
46123
|
+
width: width10,
|
|
46124
|
+
height: height10,
|
|
46125
46125
|
depth,
|
|
46126
46126
|
widthSegments,
|
|
46127
46127
|
heightSegments,
|
|
@@ -46137,21 +46137,21 @@ var require_three = __commonJS({
|
|
|
46137
46137
|
const uvs = [];
|
|
46138
46138
|
let numberOfVertices = 0;
|
|
46139
46139
|
let groupStart = 0;
|
|
46140
|
-
buildPlane("z", "y", "x", -1, -1, depth,
|
|
46141
|
-
buildPlane("z", "y", "x", 1, -1, depth,
|
|
46142
|
-
buildPlane("x", "z", "y", 1, 1,
|
|
46143
|
-
buildPlane("x", "z", "y", 1, -1,
|
|
46144
|
-
buildPlane("x", "y", "z", 1, -1,
|
|
46145
|
-
buildPlane("x", "y", "z", -1, -1,
|
|
46140
|
+
buildPlane("z", "y", "x", -1, -1, depth, height10, width10, depthSegments, heightSegments, 0);
|
|
46141
|
+
buildPlane("z", "y", "x", 1, -1, depth, height10, -width10, depthSegments, heightSegments, 1);
|
|
46142
|
+
buildPlane("x", "z", "y", 1, 1, width10, depth, height10, widthSegments, depthSegments, 2);
|
|
46143
|
+
buildPlane("x", "z", "y", 1, -1, width10, depth, -height10, widthSegments, depthSegments, 3);
|
|
46144
|
+
buildPlane("x", "y", "z", 1, -1, width10, height10, depth, widthSegments, heightSegments, 4);
|
|
46145
|
+
buildPlane("x", "y", "z", -1, -1, width10, height10, -depth, widthSegments, heightSegments, 5);
|
|
46146
46146
|
this.setIndex(indices);
|
|
46147
46147
|
this.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
|
46148
46148
|
this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
|
|
46149
46149
|
this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
|
46150
|
-
function buildPlane(u, v, w, udir, vdir,
|
|
46151
|
-
const segmentWidth =
|
|
46152
|
-
const segmentHeight =
|
|
46153
|
-
const widthHalf =
|
|
46154
|
-
const heightHalf =
|
|
46150
|
+
function buildPlane(u, v, w, udir, vdir, width11, height11, depth2, gridX, gridY, materialIndex) {
|
|
46151
|
+
const segmentWidth = width11 / gridX;
|
|
46152
|
+
const segmentHeight = height11 / gridY;
|
|
46153
|
+
const widthHalf = width11 / 2;
|
|
46154
|
+
const heightHalf = height11 / 2;
|
|
46155
46155
|
const depthHalf = depth2 / 2;
|
|
46156
46156
|
const gridX1 = gridX + 1;
|
|
46157
46157
|
const gridY1 = gridY + 1;
|
|
@@ -46513,7 +46513,7 @@ var require_three = __commonJS({
|
|
|
46513
46513
|
*
|
|
46514
46514
|
* Note there is no reason monitors have to be the same size or in a grid.
|
|
46515
46515
|
*/
|
|
46516
|
-
setViewOffset(fullWidth, fullHeight, x, y,
|
|
46516
|
+
setViewOffset(fullWidth, fullHeight, x, y, width10, height10) {
|
|
46517
46517
|
this.aspect = fullWidth / fullHeight;
|
|
46518
46518
|
if (this.view === null) {
|
|
46519
46519
|
this.view = {
|
|
@@ -46531,8 +46531,8 @@ var require_three = __commonJS({
|
|
|
46531
46531
|
this.view.fullHeight = fullHeight;
|
|
46532
46532
|
this.view.offsetX = x;
|
|
46533
46533
|
this.view.offsetY = y;
|
|
46534
|
-
this.view.width =
|
|
46535
|
-
this.view.height =
|
|
46534
|
+
this.view.width = width10;
|
|
46535
|
+
this.view.height = height10;
|
|
46536
46536
|
this.updateProjectionMatrix();
|
|
46537
46537
|
}
|
|
46538
46538
|
clearViewOffset() {
|
|
@@ -46544,20 +46544,20 @@ var require_three = __commonJS({
|
|
|
46544
46544
|
updateProjectionMatrix() {
|
|
46545
46545
|
const near = this.near;
|
|
46546
46546
|
let top = near * Math.tan(DEG2RAD2 * 0.5 * this.fov) / this.zoom;
|
|
46547
|
-
let
|
|
46548
|
-
let
|
|
46549
|
-
let left = -0.5 *
|
|
46547
|
+
let height10 = 2 * top;
|
|
46548
|
+
let width10 = this.aspect * height10;
|
|
46549
|
+
let left = -0.5 * width10;
|
|
46550
46550
|
const view = this.view;
|
|
46551
46551
|
if (this.view !== null && this.view.enabled) {
|
|
46552
46552
|
const fullWidth = view.fullWidth, fullHeight = view.fullHeight;
|
|
46553
|
-
left += view.offsetX *
|
|
46554
|
-
top -= view.offsetY *
|
|
46555
|
-
|
|
46556
|
-
|
|
46553
|
+
left += view.offsetX * width10 / fullWidth;
|
|
46554
|
+
top -= view.offsetY * height10 / fullHeight;
|
|
46555
|
+
width10 *= view.width / fullWidth;
|
|
46556
|
+
height10 *= view.height / fullHeight;
|
|
46557
46557
|
}
|
|
46558
46558
|
const skew = this.filmOffset;
|
|
46559
46559
|
if (skew !== 0) left += near * skew / this.getFilmWidth();
|
|
46560
|
-
this.projectionMatrix.makePerspective(left, left +
|
|
46560
|
+
this.projectionMatrix.makePerspective(left, left + width10, top, top - height10, near, this.far, this.coordinateSystem);
|
|
46561
46561
|
this.projectionMatrixInverse.copy(this.projectionMatrix).invert();
|
|
46562
46562
|
}
|
|
46563
46563
|
toJSON(meta) {
|
|
@@ -47134,23 +47134,23 @@ var require_three = __commonJS({
|
|
|
47134
47134
|
};
|
|
47135
47135
|
}
|
|
47136
47136
|
var PlaneGeometry = class _PlaneGeometry extends BufferGeometry {
|
|
47137
|
-
constructor(
|
|
47137
|
+
constructor(width10 = 1, height10 = 1, widthSegments = 1, heightSegments = 1) {
|
|
47138
47138
|
super();
|
|
47139
47139
|
this.type = "PlaneGeometry";
|
|
47140
47140
|
this.parameters = {
|
|
47141
|
-
width:
|
|
47142
|
-
height:
|
|
47141
|
+
width: width10,
|
|
47142
|
+
height: height10,
|
|
47143
47143
|
widthSegments,
|
|
47144
47144
|
heightSegments
|
|
47145
47145
|
};
|
|
47146
|
-
const width_half =
|
|
47147
|
-
const height_half =
|
|
47146
|
+
const width_half = width10 / 2;
|
|
47147
|
+
const height_half = height10 / 2;
|
|
47148
47148
|
const gridX = Math.floor(widthSegments);
|
|
47149
47149
|
const gridY = Math.floor(heightSegments);
|
|
47150
47150
|
const gridX1 = gridX + 1;
|
|
47151
47151
|
const gridY1 = gridY + 1;
|
|
47152
|
-
const segment_width =
|
|
47153
|
-
const segment_height =
|
|
47152
|
+
const segment_width = width10 / gridX;
|
|
47153
|
+
const segment_height = height10 / gridY;
|
|
47154
47154
|
const indices = [];
|
|
47155
47155
|
const vertices = [];
|
|
47156
47156
|
const normals = [];
|
|
@@ -48685,7 +48685,7 @@ var require_three = __commonJS({
|
|
|
48685
48685
|
this.view = source.view === null ? null : Object.assign({}, source.view);
|
|
48686
48686
|
return this;
|
|
48687
48687
|
}
|
|
48688
|
-
setViewOffset(fullWidth, fullHeight, x, y,
|
|
48688
|
+
setViewOffset(fullWidth, fullHeight, x, y, width10, height10) {
|
|
48689
48689
|
if (this.view === null) {
|
|
48690
48690
|
this.view = {
|
|
48691
48691
|
enabled: true,
|
|
@@ -48702,8 +48702,8 @@ var require_three = __commonJS({
|
|
|
48702
48702
|
this.view.fullHeight = fullHeight;
|
|
48703
48703
|
this.view.offsetX = x;
|
|
48704
48704
|
this.view.offsetY = y;
|
|
48705
|
-
this.view.width =
|
|
48706
|
-
this.view.height =
|
|
48705
|
+
this.view.width = width10;
|
|
48706
|
+
this.view.height = height10;
|
|
48707
48707
|
this.updateProjectionMatrix();
|
|
48708
48708
|
}
|
|
48709
48709
|
clearViewOffset() {
|
|
@@ -48890,8 +48890,8 @@ var require_three = __commonJS({
|
|
|
48890
48890
|
return cubeUVRenderTarget;
|
|
48891
48891
|
}
|
|
48892
48892
|
_allocateTargets() {
|
|
48893
|
-
const
|
|
48894
|
-
const
|
|
48893
|
+
const width10 = 3 * Math.max(this._cubeSize, 16 * 7);
|
|
48894
|
+
const height10 = 4 * this._cubeSize;
|
|
48895
48895
|
const params = {
|
|
48896
48896
|
magFilter: LinearFilter2,
|
|
48897
48897
|
minFilter: LinearFilter2,
|
|
@@ -48901,15 +48901,15 @@ var require_three = __commonJS({
|
|
|
48901
48901
|
colorSpace: LinearSRGBColorSpace2,
|
|
48902
48902
|
depthBuffer: false
|
|
48903
48903
|
};
|
|
48904
|
-
const cubeUVRenderTarget = _createRenderTarget(
|
|
48905
|
-
if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !==
|
|
48904
|
+
const cubeUVRenderTarget = _createRenderTarget(width10, height10, params);
|
|
48905
|
+
if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width10 || this._pingPongRenderTarget.height !== height10) {
|
|
48906
48906
|
if (this._pingPongRenderTarget !== null) {
|
|
48907
48907
|
this._dispose();
|
|
48908
48908
|
}
|
|
48909
|
-
this._pingPongRenderTarget = _createRenderTarget(
|
|
48909
|
+
this._pingPongRenderTarget = _createRenderTarget(width10, height10, params);
|
|
48910
48910
|
const { _lodMax } = this;
|
|
48911
48911
|
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = _createPlanes(_lodMax));
|
|
48912
|
-
this._blurMaterial = _getBlurShader(_lodMax,
|
|
48912
|
+
this._blurMaterial = _getBlurShader(_lodMax, width10, height10);
|
|
48913
48913
|
}
|
|
48914
48914
|
return cubeUVRenderTarget;
|
|
48915
48915
|
}
|
|
@@ -49154,26 +49154,26 @@ var require_three = __commonJS({
|
|
|
49154
49154
|
}
|
|
49155
49155
|
return { lodPlanes, sizeLods, sigmas };
|
|
49156
49156
|
}
|
|
49157
|
-
function _createRenderTarget(
|
|
49158
|
-
const cubeUVRenderTarget = new WebGLRenderTarget(
|
|
49157
|
+
function _createRenderTarget(width10, height10, params) {
|
|
49158
|
+
const cubeUVRenderTarget = new WebGLRenderTarget(width10, height10, params);
|
|
49159
49159
|
cubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;
|
|
49160
49160
|
cubeUVRenderTarget.texture.name = "PMREM.cubeUv";
|
|
49161
49161
|
cubeUVRenderTarget.scissorTest = true;
|
|
49162
49162
|
return cubeUVRenderTarget;
|
|
49163
49163
|
}
|
|
49164
|
-
function _setViewport(target, x, y,
|
|
49165
|
-
target.viewport.set(x, y,
|
|
49166
|
-
target.scissor.set(x, y,
|
|
49164
|
+
function _setViewport(target, x, y, width10, height10) {
|
|
49165
|
+
target.viewport.set(x, y, width10, height10);
|
|
49166
|
+
target.scissor.set(x, y, width10, height10);
|
|
49167
49167
|
}
|
|
49168
|
-
function _getBlurShader(lodMax,
|
|
49168
|
+
function _getBlurShader(lodMax, width10, height10) {
|
|
49169
49169
|
const weights = new Float32Array(MAX_SAMPLES);
|
|
49170
49170
|
const poleAxis = new Vector32(0, 1, 0);
|
|
49171
49171
|
const shaderMaterial = new ShaderMaterial({
|
|
49172
49172
|
name: "SphericalGaussianBlur",
|
|
49173
49173
|
defines: {
|
|
49174
49174
|
"n": MAX_SAMPLES,
|
|
49175
|
-
"CUBEUV_TEXEL_WIDTH": 1 /
|
|
49176
|
-
"CUBEUV_TEXEL_HEIGHT": 1 /
|
|
49175
|
+
"CUBEUV_TEXEL_WIDTH": 1 / width10,
|
|
49176
|
+
"CUBEUV_TEXEL_HEIGHT": 1 / height10,
|
|
49177
49177
|
"CUBEUV_MAX_MIP": `${lodMax}.0`
|
|
49178
49178
|
},
|
|
49179
49179
|
uniforms: {
|
|
@@ -49730,14 +49730,14 @@ var require_three = __commonJS({
|
|
|
49730
49730
|
if (hasMorphPosition === true) vertexDataCount = 1;
|
|
49731
49731
|
if (hasMorphNormals === true) vertexDataCount = 2;
|
|
49732
49732
|
if (hasMorphColors === true) vertexDataCount = 3;
|
|
49733
|
-
let
|
|
49734
|
-
let
|
|
49735
|
-
if (
|
|
49736
|
-
|
|
49737
|
-
|
|
49738
|
-
}
|
|
49739
|
-
const buffer = new Float32Array(
|
|
49740
|
-
const texture = new DataArrayTexture(buffer,
|
|
49733
|
+
let width10 = geometry.attributes.position.count * vertexDataCount;
|
|
49734
|
+
let height10 = 1;
|
|
49735
|
+
if (width10 > capabilities.maxTextureSize) {
|
|
49736
|
+
height10 = Math.ceil(width10 / capabilities.maxTextureSize);
|
|
49737
|
+
width10 = capabilities.maxTextureSize;
|
|
49738
|
+
}
|
|
49739
|
+
const buffer = new Float32Array(width10 * height10 * 4 * morphTargetsCount);
|
|
49740
|
+
const texture = new DataArrayTexture(buffer, width10, height10, morphTargetsCount);
|
|
49741
49741
|
texture.type = FloatType;
|
|
49742
49742
|
texture.needsUpdate = true;
|
|
49743
49743
|
const vertexDataStride = vertexDataCount * 4;
|
|
@@ -49745,7 +49745,7 @@ var require_three = __commonJS({
|
|
|
49745
49745
|
const morphTarget = morphTargets[i];
|
|
49746
49746
|
const morphNormal = morphNormals[i];
|
|
49747
49747
|
const morphColor = morphColors[i];
|
|
49748
|
-
const offset =
|
|
49748
|
+
const offset = width10 * height10 * 4 * i;
|
|
49749
49749
|
for (let j = 0; j < morphTarget.count; j++) {
|
|
49750
49750
|
const stride = j * vertexDataStride;
|
|
49751
49751
|
if (hasMorphPosition === true) {
|
|
@@ -49774,7 +49774,7 @@ var require_three = __commonJS({
|
|
|
49774
49774
|
entry = {
|
|
49775
49775
|
count: morphTargetsCount,
|
|
49776
49776
|
texture,
|
|
49777
|
-
size: new Vector22(
|
|
49777
|
+
size: new Vector22(width10, height10)
|
|
49778
49778
|
};
|
|
49779
49779
|
morphTextures.set(geometry, entry);
|
|
49780
49780
|
geometry.addEventListener("dispose", disposeTexture);
|
|
@@ -49843,7 +49843,7 @@ var require_three = __commonJS({
|
|
|
49843
49843
|
};
|
|
49844
49844
|
}
|
|
49845
49845
|
var DepthTexture = class extends Texture2 {
|
|
49846
|
-
constructor(
|
|
49846
|
+
constructor(width10, height10, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format = DepthFormat) {
|
|
49847
49847
|
if (format !== DepthFormat && format !== DepthStencilFormat) {
|
|
49848
49848
|
throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
49849
49849
|
}
|
|
@@ -49851,7 +49851,7 @@ var require_three = __commonJS({
|
|
|
49851
49851
|
if (type === void 0 && format === DepthStencilFormat) type = UnsignedInt248Type;
|
|
49852
49852
|
super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);
|
|
49853
49853
|
this.isDepthTexture = true;
|
|
49854
|
-
this.image = { width:
|
|
49854
|
+
this.image = { width: width10, height: height10 };
|
|
49855
49855
|
this.magFilter = magFilter !== void 0 ? magFilter : NearestFilter;
|
|
49856
49856
|
this.minFilter = minFilter !== void 0 ? minFilter : NearestFilter;
|
|
49857
49857
|
this.flipY = false;
|
|
@@ -53034,10 +53034,10 @@ var require_three = __commonJS({
|
|
|
53034
53034
|
}
|
|
53035
53035
|
currentCullFace = cullFace;
|
|
53036
53036
|
}
|
|
53037
|
-
function setLineWidth(
|
|
53038
|
-
if (
|
|
53039
|
-
if (lineWidthAvailable) gl.lineWidth(
|
|
53040
|
-
currentLineWidth =
|
|
53037
|
+
function setLineWidth(width10) {
|
|
53038
|
+
if (width10 !== currentLineWidth) {
|
|
53039
|
+
if (lineWidthAvailable) gl.lineWidth(width10);
|
|
53040
|
+
currentLineWidth = width10;
|
|
53041
53041
|
}
|
|
53042
53042
|
}
|
|
53043
53043
|
function setPolygonOffset(polygonOffset, factor, units) {
|
|
@@ -53335,91 +53335,91 @@ var require_three = __commonJS({
|
|
|
53335
53335
|
texture.offset.y = 0;
|
|
53336
53336
|
return texture;
|
|
53337
53337
|
}
|
|
53338
|
-
function getByteLength(
|
|
53338
|
+
function getByteLength(width10, height10, format, type) {
|
|
53339
53339
|
const typeByteLength = getTextureTypeByteLength(type);
|
|
53340
53340
|
switch (format) {
|
|
53341
53341
|
// https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
|
|
53342
53342
|
case AlphaFormat:
|
|
53343
|
-
return
|
|
53343
|
+
return width10 * height10;
|
|
53344
53344
|
case LuminanceFormat:
|
|
53345
|
-
return
|
|
53345
|
+
return width10 * height10;
|
|
53346
53346
|
case LuminanceAlphaFormat:
|
|
53347
|
-
return
|
|
53347
|
+
return width10 * height10 * 2;
|
|
53348
53348
|
case RedFormat:
|
|
53349
|
-
return
|
|
53349
|
+
return width10 * height10 / typeByteLength.components * typeByteLength.byteLength;
|
|
53350
53350
|
case RedIntegerFormat:
|
|
53351
|
-
return
|
|
53351
|
+
return width10 * height10 / typeByteLength.components * typeByteLength.byteLength;
|
|
53352
53352
|
case RGFormat:
|
|
53353
|
-
return
|
|
53353
|
+
return width10 * height10 * 2 / typeByteLength.components * typeByteLength.byteLength;
|
|
53354
53354
|
case RGIntegerFormat:
|
|
53355
|
-
return
|
|
53355
|
+
return width10 * height10 * 2 / typeByteLength.components * typeByteLength.byteLength;
|
|
53356
53356
|
case RGBFormat:
|
|
53357
|
-
return
|
|
53357
|
+
return width10 * height10 * 3 / typeByteLength.components * typeByteLength.byteLength;
|
|
53358
53358
|
case RGBAFormat2:
|
|
53359
|
-
return
|
|
53359
|
+
return width10 * height10 * 4 / typeByteLength.components * typeByteLength.byteLength;
|
|
53360
53360
|
case RGBAIntegerFormat:
|
|
53361
|
-
return
|
|
53361
|
+
return width10 * height10 * 4 / typeByteLength.components * typeByteLength.byteLength;
|
|
53362
53362
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/
|
|
53363
53363
|
case RGB_S3TC_DXT1_Format:
|
|
53364
53364
|
case RGBA_S3TC_DXT1_Format:
|
|
53365
|
-
return Math.floor((
|
|
53365
|
+
return Math.floor((width10 + 3) / 4) * Math.floor((height10 + 3) / 4) * 8;
|
|
53366
53366
|
case RGBA_S3TC_DXT3_Format:
|
|
53367
53367
|
case RGBA_S3TC_DXT5_Format:
|
|
53368
|
-
return Math.floor((
|
|
53368
|
+
return Math.floor((width10 + 3) / 4) * Math.floor((height10 + 3) / 4) * 16;
|
|
53369
53369
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_pvrtc/
|
|
53370
53370
|
case RGB_PVRTC_2BPPV1_Format:
|
|
53371
53371
|
case RGBA_PVRTC_2BPPV1_Format:
|
|
53372
|
-
return Math.max(
|
|
53372
|
+
return Math.max(width10, 16) * Math.max(height10, 8) / 4;
|
|
53373
53373
|
case RGB_PVRTC_4BPPV1_Format:
|
|
53374
53374
|
case RGBA_PVRTC_4BPPV1_Format:
|
|
53375
|
-
return Math.max(
|
|
53375
|
+
return Math.max(width10, 8) * Math.max(height10, 8) / 2;
|
|
53376
53376
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_etc/
|
|
53377
53377
|
case RGB_ETC1_Format:
|
|
53378
53378
|
case RGB_ETC2_Format:
|
|
53379
|
-
return Math.floor((
|
|
53379
|
+
return Math.floor((width10 + 3) / 4) * Math.floor((height10 + 3) / 4) * 8;
|
|
53380
53380
|
case RGBA_ETC2_EAC_Format:
|
|
53381
|
-
return Math.floor((
|
|
53381
|
+
return Math.floor((width10 + 3) / 4) * Math.floor((height10 + 3) / 4) * 16;
|
|
53382
53382
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_astc/
|
|
53383
53383
|
case RGBA_ASTC_4x4_Format:
|
|
53384
|
-
return Math.floor((
|
|
53384
|
+
return Math.floor((width10 + 3) / 4) * Math.floor((height10 + 3) / 4) * 16;
|
|
53385
53385
|
case RGBA_ASTC_5x4_Format:
|
|
53386
|
-
return Math.floor((
|
|
53386
|
+
return Math.floor((width10 + 4) / 5) * Math.floor((height10 + 3) / 4) * 16;
|
|
53387
53387
|
case RGBA_ASTC_5x5_Format:
|
|
53388
|
-
return Math.floor((
|
|
53388
|
+
return Math.floor((width10 + 4) / 5) * Math.floor((height10 + 4) / 5) * 16;
|
|
53389
53389
|
case RGBA_ASTC_6x5_Format:
|
|
53390
|
-
return Math.floor((
|
|
53390
|
+
return Math.floor((width10 + 5) / 6) * Math.floor((height10 + 4) / 5) * 16;
|
|
53391
53391
|
case RGBA_ASTC_6x6_Format:
|
|
53392
|
-
return Math.floor((
|
|
53392
|
+
return Math.floor((width10 + 5) / 6) * Math.floor((height10 + 5) / 6) * 16;
|
|
53393
53393
|
case RGBA_ASTC_8x5_Format:
|
|
53394
|
-
return Math.floor((
|
|
53394
|
+
return Math.floor((width10 + 7) / 8) * Math.floor((height10 + 4) / 5) * 16;
|
|
53395
53395
|
case RGBA_ASTC_8x6_Format:
|
|
53396
|
-
return Math.floor((
|
|
53396
|
+
return Math.floor((width10 + 7) / 8) * Math.floor((height10 + 5) / 6) * 16;
|
|
53397
53397
|
case RGBA_ASTC_8x8_Format:
|
|
53398
|
-
return Math.floor((
|
|
53398
|
+
return Math.floor((width10 + 7) / 8) * Math.floor((height10 + 7) / 8) * 16;
|
|
53399
53399
|
case RGBA_ASTC_10x5_Format:
|
|
53400
|
-
return Math.floor((
|
|
53400
|
+
return Math.floor((width10 + 9) / 10) * Math.floor((height10 + 4) / 5) * 16;
|
|
53401
53401
|
case RGBA_ASTC_10x6_Format:
|
|
53402
|
-
return Math.floor((
|
|
53402
|
+
return Math.floor((width10 + 9) / 10) * Math.floor((height10 + 5) / 6) * 16;
|
|
53403
53403
|
case RGBA_ASTC_10x8_Format:
|
|
53404
|
-
return Math.floor((
|
|
53404
|
+
return Math.floor((width10 + 9) / 10) * Math.floor((height10 + 7) / 8) * 16;
|
|
53405
53405
|
case RGBA_ASTC_10x10_Format:
|
|
53406
|
-
return Math.floor((
|
|
53406
|
+
return Math.floor((width10 + 9) / 10) * Math.floor((height10 + 9) / 10) * 16;
|
|
53407
53407
|
case RGBA_ASTC_12x10_Format:
|
|
53408
|
-
return Math.floor((
|
|
53408
|
+
return Math.floor((width10 + 11) / 12) * Math.floor((height10 + 9) / 10) * 16;
|
|
53409
53409
|
case RGBA_ASTC_12x12_Format:
|
|
53410
|
-
return Math.floor((
|
|
53410
|
+
return Math.floor((width10 + 11) / 12) * Math.floor((height10 + 11) / 12) * 16;
|
|
53411
53411
|
// https://registry.khronos.org/webgl/extensions/EXT_texture_compression_bptc/
|
|
53412
53412
|
case RGBA_BPTC_Format:
|
|
53413
53413
|
case RGB_BPTC_SIGNED_Format:
|
|
53414
53414
|
case RGB_BPTC_UNSIGNED_Format:
|
|
53415
|
-
return Math.ceil(
|
|
53415
|
+
return Math.ceil(width10 / 4) * Math.ceil(height10 / 4) * 16;
|
|
53416
53416
|
// https://registry.khronos.org/webgl/extensions/EXT_texture_compression_rgtc/
|
|
53417
53417
|
case RED_RGTC1_Format:
|
|
53418
53418
|
case SIGNED_RED_RGTC1_Format:
|
|
53419
|
-
return Math.ceil(
|
|
53419
|
+
return Math.ceil(width10 / 4) * Math.ceil(height10 / 4) * 8;
|
|
53420
53420
|
case RED_GREEN_RGTC2_Format:
|
|
53421
53421
|
case SIGNED_RED_GREEN_RGTC2_Format:
|
|
53422
|
-
return Math.ceil(
|
|
53422
|
+
return Math.ceil(width10 / 4) * Math.ceil(height10 / 4) * 16;
|
|
53423
53423
|
}
|
|
53424
53424
|
throw new Error(
|
|
53425
53425
|
`Unable to determine texture byte length for ${format} format.`
|
|
@@ -53464,10 +53464,10 @@ var require_three = __commonJS({
|
|
|
53464
53464
|
useOffscreenCanvas = typeof OffscreenCanvas !== "undefined" && new OffscreenCanvas(1, 1).getContext("2d") !== null;
|
|
53465
53465
|
} catch (err) {
|
|
53466
53466
|
}
|
|
53467
|
-
function createCanvas(
|
|
53467
|
+
function createCanvas(width10, height10) {
|
|
53468
53468
|
return useOffscreenCanvas ? (
|
|
53469
53469
|
// eslint-disable-next-line compat/compat
|
|
53470
|
-
new OffscreenCanvas(
|
|
53470
|
+
new OffscreenCanvas(width10, height10)
|
|
53471
53471
|
) : createElementNS2("canvas");
|
|
53472
53472
|
}
|
|
53473
53473
|
function resizeImage(image, needsNewCanvas, maxSize) {
|
|
@@ -53478,15 +53478,15 @@ var require_three = __commonJS({
|
|
|
53478
53478
|
}
|
|
53479
53479
|
if (scale < 1) {
|
|
53480
53480
|
if (typeof HTMLImageElement !== "undefined" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== "undefined" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== "undefined" && image instanceof ImageBitmap || typeof VideoFrame !== "undefined" && image instanceof VideoFrame) {
|
|
53481
|
-
const
|
|
53482
|
-
const
|
|
53483
|
-
if (_canvas3 === void 0) _canvas3 = createCanvas(
|
|
53484
|
-
const canvas = needsNewCanvas ? createCanvas(
|
|
53485
|
-
canvas.width =
|
|
53486
|
-
canvas.height =
|
|
53481
|
+
const width10 = Math.floor(scale * dimensions.width);
|
|
53482
|
+
const height10 = Math.floor(scale * dimensions.height);
|
|
53483
|
+
if (_canvas3 === void 0) _canvas3 = createCanvas(width10, height10);
|
|
53484
|
+
const canvas = needsNewCanvas ? createCanvas(width10, height10) : _canvas3;
|
|
53485
|
+
canvas.width = width10;
|
|
53486
|
+
canvas.height = height10;
|
|
53487
53487
|
const context = canvas.getContext("2d");
|
|
53488
|
-
context.drawImage(image, 0, 0,
|
|
53489
|
-
console.warn("THREE.WebGLRenderer: Texture has been resized from (" + dimensions.width + "x" + dimensions.height + ") to (" +
|
|
53488
|
+
context.drawImage(image, 0, 0, width10, height10);
|
|
53489
|
+
console.warn("THREE.WebGLRenderer: Texture has been resized from (" + dimensions.width + "x" + dimensions.height + ") to (" + width10 + "x" + height10 + ").");
|
|
53490
53490
|
return canvas;
|
|
53491
53491
|
} else {
|
|
53492
53492
|
if ("data" in image) {
|
|
@@ -54007,11 +54007,11 @@ var require_three = __commonJS({
|
|
|
54007
54007
|
if (useTexStorage) {
|
|
54008
54008
|
state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);
|
|
54009
54009
|
} else {
|
|
54010
|
-
let
|
|
54010
|
+
let width10 = image.width, height10 = image.height;
|
|
54011
54011
|
for (let i = 0; i < levels; i++) {
|
|
54012
|
-
state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat,
|
|
54013
|
-
|
|
54014
|
-
|
|
54012
|
+
state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, width10, height10, 0, glFormat, glType, null);
|
|
54013
|
+
width10 >>= 1;
|
|
54014
|
+
height10 >>= 1;
|
|
54015
54015
|
}
|
|
54016
54016
|
}
|
|
54017
54017
|
}
|
|
@@ -54180,12 +54180,12 @@ var require_three = __commonJS({
|
|
|
54180
54180
|
const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);
|
|
54181
54181
|
const renderTargetProperties = properties.get(renderTarget);
|
|
54182
54182
|
if (!renderTargetProperties.__hasExternalTextures) {
|
|
54183
|
-
const
|
|
54184
|
-
const
|
|
54183
|
+
const width10 = Math.max(1, renderTarget.width >> level);
|
|
54184
|
+
const height10 = Math.max(1, renderTarget.height >> level);
|
|
54185
54185
|
if (textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY) {
|
|
54186
|
-
state.texImage3D(textureTarget, level, glInternalFormat,
|
|
54186
|
+
state.texImage3D(textureTarget, level, glInternalFormat, width10, height10, renderTarget.depth, 0, glFormat, glType, null);
|
|
54187
54187
|
} else {
|
|
54188
|
-
state.texImage2D(textureTarget, level, glInternalFormat,
|
|
54188
|
+
state.texImage2D(textureTarget, level, glInternalFormat, width10, height10, 0, glFormat, glType, null);
|
|
54189
54189
|
}
|
|
54190
54190
|
}
|
|
54191
54191
|
state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);
|
|
@@ -54462,8 +54462,8 @@ var require_three = __commonJS({
|
|
|
54462
54462
|
if (renderTarget.samples > 0) {
|
|
54463
54463
|
if (useMultisampledRTT(renderTarget) === false) {
|
|
54464
54464
|
const textures = renderTarget.textures;
|
|
54465
|
-
const
|
|
54466
|
-
const
|
|
54465
|
+
const width10 = renderTarget.width;
|
|
54466
|
+
const height10 = renderTarget.height;
|
|
54467
54467
|
let mask = _gl.COLOR_BUFFER_BIT;
|
|
54468
54468
|
const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT;
|
|
54469
54469
|
const renderTargetProperties = properties.get(renderTarget);
|
|
@@ -54488,7 +54488,7 @@ var require_three = __commonJS({
|
|
|
54488
54488
|
const webglTexture = properties.get(textures[i]).__webglTexture;
|
|
54489
54489
|
_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0);
|
|
54490
54490
|
}
|
|
54491
|
-
_gl.blitFramebuffer(0, 0,
|
|
54491
|
+
_gl.blitFramebuffer(0, 0, width10, height10, 0, 0, width10, height10, mask, _gl.NEAREST);
|
|
54492
54492
|
if (supportsInvalidateFramebuffer === true) {
|
|
54493
54493
|
invalidationArrayRead.length = 0;
|
|
54494
54494
|
invalidationArrayDraw.length = 0;
|
|
@@ -55441,7 +55441,7 @@ void main() {
|
|
|
55441
55441
|
uniforms.fogDensity.value = fog.density;
|
|
55442
55442
|
}
|
|
55443
55443
|
}
|
|
55444
|
-
function refreshMaterialUniforms(uniforms, material, pixelRatio,
|
|
55444
|
+
function refreshMaterialUniforms(uniforms, material, pixelRatio, height10, transmissionRenderTarget) {
|
|
55445
55445
|
if (material.isMeshBasicMaterial) {
|
|
55446
55446
|
refreshUniformsCommon(uniforms, material);
|
|
55447
55447
|
} else if (material.isMeshLambertMaterial) {
|
|
@@ -55474,7 +55474,7 @@ void main() {
|
|
|
55474
55474
|
refreshUniformsDash(uniforms, material);
|
|
55475
55475
|
}
|
|
55476
55476
|
} else if (material.isPointsMaterial) {
|
|
55477
|
-
refreshUniformsPoints(uniforms, material, pixelRatio,
|
|
55477
|
+
refreshUniformsPoints(uniforms, material, pixelRatio, height10);
|
|
55478
55478
|
} else if (material.isSpriteMaterial) {
|
|
55479
55479
|
refreshUniformsSprites(uniforms, material);
|
|
55480
55480
|
} else if (material.isShadowMaterial) {
|
|
@@ -55576,11 +55576,11 @@ void main() {
|
|
|
55576
55576
|
uniforms.totalSize.value = material.dashSize + material.gapSize;
|
|
55577
55577
|
uniforms.scale.value = material.scale;
|
|
55578
55578
|
}
|
|
55579
|
-
function refreshUniformsPoints(uniforms, material, pixelRatio,
|
|
55579
|
+
function refreshUniformsPoints(uniforms, material, pixelRatio, height10) {
|
|
55580
55580
|
uniforms.diffuse.value.copy(material.color);
|
|
55581
55581
|
uniforms.opacity.value = material.opacity;
|
|
55582
55582
|
uniforms.size.value = material.size * pixelRatio;
|
|
55583
|
-
uniforms.scale.value =
|
|
55583
|
+
uniforms.scale.value = height10 * 0.5;
|
|
55584
55584
|
if (material.map) {
|
|
55585
55585
|
uniforms.map.value = material.map;
|
|
55586
55586
|
refreshTransformUniform(material.map, uniforms.uvTransform);
|
|
@@ -56124,31 +56124,31 @@ void main() {
|
|
|
56124
56124
|
this.getSize = function(target) {
|
|
56125
56125
|
return target.set(_width, _height);
|
|
56126
56126
|
};
|
|
56127
|
-
this.setSize = function(
|
|
56127
|
+
this.setSize = function(width10, height10, updateStyle = true) {
|
|
56128
56128
|
if (xr.isPresenting) {
|
|
56129
56129
|
console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");
|
|
56130
56130
|
return;
|
|
56131
56131
|
}
|
|
56132
|
-
_width =
|
|
56133
|
-
_height =
|
|
56134
|
-
canvas.width = Math.floor(
|
|
56135
|
-
canvas.height = Math.floor(
|
|
56132
|
+
_width = width10;
|
|
56133
|
+
_height = height10;
|
|
56134
|
+
canvas.width = Math.floor(width10 * _pixelRatio);
|
|
56135
|
+
canvas.height = Math.floor(height10 * _pixelRatio);
|
|
56136
56136
|
if (updateStyle === true) {
|
|
56137
|
-
canvas.style.width =
|
|
56138
|
-
canvas.style.height =
|
|
56137
|
+
canvas.style.width = width10 + "px";
|
|
56138
|
+
canvas.style.height = height10 + "px";
|
|
56139
56139
|
}
|
|
56140
|
-
this.setViewport(0, 0,
|
|
56140
|
+
this.setViewport(0, 0, width10, height10);
|
|
56141
56141
|
};
|
|
56142
56142
|
this.getDrawingBufferSize = function(target) {
|
|
56143
56143
|
return target.set(_width * _pixelRatio, _height * _pixelRatio).floor();
|
|
56144
56144
|
};
|
|
56145
|
-
this.setDrawingBufferSize = function(
|
|
56146
|
-
_width =
|
|
56147
|
-
_height =
|
|
56145
|
+
this.setDrawingBufferSize = function(width10, height10, pixelRatio) {
|
|
56146
|
+
_width = width10;
|
|
56147
|
+
_height = height10;
|
|
56148
56148
|
_pixelRatio = pixelRatio;
|
|
56149
|
-
canvas.width = Math.floor(
|
|
56150
|
-
canvas.height = Math.floor(
|
|
56151
|
-
this.setViewport(0, 0,
|
|
56149
|
+
canvas.width = Math.floor(width10 * pixelRatio);
|
|
56150
|
+
canvas.height = Math.floor(height10 * pixelRatio);
|
|
56151
|
+
this.setViewport(0, 0, width10, height10);
|
|
56152
56152
|
};
|
|
56153
56153
|
this.getCurrentViewport = function(target) {
|
|
56154
56154
|
return target.copy(_currentViewport);
|
|
@@ -56156,22 +56156,22 @@ void main() {
|
|
|
56156
56156
|
this.getViewport = function(target) {
|
|
56157
56157
|
return target.copy(_viewport);
|
|
56158
56158
|
};
|
|
56159
|
-
this.setViewport = function(x, y,
|
|
56159
|
+
this.setViewport = function(x, y, width10, height10) {
|
|
56160
56160
|
if (x.isVector4) {
|
|
56161
56161
|
_viewport.set(x.x, x.y, x.z, x.w);
|
|
56162
56162
|
} else {
|
|
56163
|
-
_viewport.set(x, y,
|
|
56163
|
+
_viewport.set(x, y, width10, height10);
|
|
56164
56164
|
}
|
|
56165
56165
|
state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).round());
|
|
56166
56166
|
};
|
|
56167
56167
|
this.getScissor = function(target) {
|
|
56168
56168
|
return target.copy(_scissor);
|
|
56169
56169
|
};
|
|
56170
|
-
this.setScissor = function(x, y,
|
|
56170
|
+
this.setScissor = function(x, y, width10, height10) {
|
|
56171
56171
|
if (x.isVector4) {
|
|
56172
56172
|
_scissor.set(x.x, x.y, x.z, x.w);
|
|
56173
56173
|
} else {
|
|
56174
|
-
_scissor.set(x, y,
|
|
56174
|
+
_scissor.set(x, y, width10, height10);
|
|
56175
56175
|
}
|
|
56176
56176
|
state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).round());
|
|
56177
56177
|
};
|
|
@@ -57157,7 +57157,7 @@ void main() {
|
|
|
57157
57157
|
}
|
|
57158
57158
|
_currentMaterialId = -1;
|
|
57159
57159
|
};
|
|
57160
|
-
this.readRenderTargetPixels = function(renderTarget, x, y,
|
|
57160
|
+
this.readRenderTargetPixels = function(renderTarget, x, y, width10, height10, buffer, activeCubeFaceIndex) {
|
|
57161
57161
|
if (!(renderTarget && renderTarget.isWebGLRenderTarget)) {
|
|
57162
57162
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
57163
57163
|
return;
|
|
@@ -57180,8 +57180,8 @@ void main() {
|
|
|
57180
57180
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
57181
57181
|
return;
|
|
57182
57182
|
}
|
|
57183
|
-
if (x >= 0 && x <= renderTarget.width -
|
|
57184
|
-
_gl.readPixels(x, y,
|
|
57183
|
+
if (x >= 0 && x <= renderTarget.width - width10 && (y >= 0 && y <= renderTarget.height - height10)) {
|
|
57184
|
+
_gl.readPixels(x, y, width10, height10, utils.convert(textureFormat), utils.convert(textureType), buffer);
|
|
57185
57185
|
}
|
|
57186
57186
|
} finally {
|
|
57187
57187
|
const framebuffer2 = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null;
|
|
@@ -57189,7 +57189,7 @@ void main() {
|
|
|
57189
57189
|
}
|
|
57190
57190
|
}
|
|
57191
57191
|
};
|
|
57192
|
-
this.readRenderTargetPixelsAsync = async function(renderTarget, x, y,
|
|
57192
|
+
this.readRenderTargetPixelsAsync = async function(renderTarget, x, y, width10, height10, buffer, activeCubeFaceIndex) {
|
|
57193
57193
|
if (!(renderTarget && renderTarget.isWebGLRenderTarget)) {
|
|
57194
57194
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
57195
57195
|
}
|
|
@@ -57207,12 +57207,12 @@ void main() {
|
|
|
57207
57207
|
if (!capabilities.textureTypeReadable(textureType)) {
|
|
57208
57208
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
57209
57209
|
}
|
|
57210
|
-
if (x >= 0 && x <= renderTarget.width -
|
|
57210
|
+
if (x >= 0 && x <= renderTarget.width - width10 && (y >= 0 && y <= renderTarget.height - height10)) {
|
|
57211
57211
|
state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);
|
|
57212
57212
|
const glBuffer = _gl.createBuffer();
|
|
57213
57213
|
_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER, glBuffer);
|
|
57214
57214
|
_gl.bufferData(_gl.PIXEL_PACK_BUFFER, buffer.byteLength, _gl.STREAM_READ);
|
|
57215
|
-
_gl.readPixels(x, y,
|
|
57215
|
+
_gl.readPixels(x, y, width10, height10, utils.convert(textureFormat), utils.convert(textureType), 0);
|
|
57216
57216
|
const currFramebuffer = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null;
|
|
57217
57217
|
state.bindFramebuffer(_gl.FRAMEBUFFER, currFramebuffer);
|
|
57218
57218
|
const sync = _gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
@@ -57235,12 +57235,12 @@ void main() {
|
|
|
57235
57235
|
texture = arguments[1];
|
|
57236
57236
|
}
|
|
57237
57237
|
const levelScale = Math.pow(2, -level);
|
|
57238
|
-
const
|
|
57239
|
-
const
|
|
57238
|
+
const width10 = Math.floor(texture.image.width * levelScale);
|
|
57239
|
+
const height10 = Math.floor(texture.image.height * levelScale);
|
|
57240
57240
|
const x = position !== null ? position.x : 0;
|
|
57241
57241
|
const y = position !== null ? position.y : 0;
|
|
57242
57242
|
textures.setTexture2D(texture, 0);
|
|
57243
|
-
_gl.copyTexSubImage2D(_gl.TEXTURE_2D, level, 0, 0, x, y,
|
|
57243
|
+
_gl.copyTexSubImage2D(_gl.TEXTURE_2D, level, 0, 0, x, y, width10, height10);
|
|
57244
57244
|
state.unbindTexture();
|
|
57245
57245
|
};
|
|
57246
57246
|
this.copyTextureToTexture = function(srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0) {
|
|
@@ -57252,16 +57252,16 @@ void main() {
|
|
|
57252
57252
|
level = arguments[3] || 0;
|
|
57253
57253
|
srcRegion = null;
|
|
57254
57254
|
}
|
|
57255
|
-
let
|
|
57255
|
+
let width10, height10, minX, minY;
|
|
57256
57256
|
let dstX, dstY;
|
|
57257
57257
|
if (srcRegion !== null) {
|
|
57258
|
-
|
|
57259
|
-
|
|
57258
|
+
width10 = srcRegion.max.x - srcRegion.min.x;
|
|
57259
|
+
height10 = srcRegion.max.y - srcRegion.min.y;
|
|
57260
57260
|
minX = srcRegion.min.x;
|
|
57261
57261
|
minY = srcRegion.min.y;
|
|
57262
57262
|
} else {
|
|
57263
|
-
|
|
57264
|
-
|
|
57263
|
+
width10 = srcTexture.image.width;
|
|
57264
|
+
height10 = srcTexture.image.height;
|
|
57265
57265
|
minX = 0;
|
|
57266
57266
|
minY = 0;
|
|
57267
57267
|
}
|
|
@@ -57289,12 +57289,12 @@ void main() {
|
|
|
57289
57289
|
_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, minX);
|
|
57290
57290
|
_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, minY);
|
|
57291
57291
|
if (srcTexture.isDataTexture) {
|
|
57292
|
-
_gl.texSubImage2D(_gl.TEXTURE_2D, level, dstX, dstY,
|
|
57292
|
+
_gl.texSubImage2D(_gl.TEXTURE_2D, level, dstX, dstY, width10, height10, glFormat, glType, image.data);
|
|
57293
57293
|
} else {
|
|
57294
57294
|
if (srcTexture.isCompressedTexture) {
|
|
57295
57295
|
_gl.compressedTexSubImage2D(_gl.TEXTURE_2D, level, dstX, dstY, image.width, image.height, glFormat, image.data);
|
|
57296
57296
|
} else {
|
|
57297
|
-
_gl.texSubImage2D(_gl.TEXTURE_2D, level, dstX, dstY,
|
|
57297
|
+
_gl.texSubImage2D(_gl.TEXTURE_2D, level, dstX, dstY, width10, height10, glFormat, glType, image);
|
|
57298
57298
|
}
|
|
57299
57299
|
}
|
|
57300
57300
|
_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, currentUnpackRowLen);
|
|
@@ -57314,19 +57314,19 @@ void main() {
|
|
|
57314
57314
|
dstTexture = arguments[3];
|
|
57315
57315
|
level = arguments[4] || 0;
|
|
57316
57316
|
}
|
|
57317
|
-
let
|
|
57317
|
+
let width10, height10, depth2, minX, minY, minZ;
|
|
57318
57318
|
let dstX, dstY, dstZ;
|
|
57319
57319
|
const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[level] : srcTexture.image;
|
|
57320
57320
|
if (srcRegion !== null) {
|
|
57321
|
-
|
|
57322
|
-
|
|
57321
|
+
width10 = srcRegion.max.x - srcRegion.min.x;
|
|
57322
|
+
height10 = srcRegion.max.y - srcRegion.min.y;
|
|
57323
57323
|
depth2 = srcRegion.max.z - srcRegion.min.z;
|
|
57324
57324
|
minX = srcRegion.min.x;
|
|
57325
57325
|
minY = srcRegion.min.y;
|
|
57326
57326
|
minZ = srcRegion.min.z;
|
|
57327
57327
|
} else {
|
|
57328
|
-
|
|
57329
|
-
|
|
57328
|
+
width10 = image.width;
|
|
57329
|
+
height10 = image.height;
|
|
57330
57330
|
depth2 = image.depth;
|
|
57331
57331
|
minX = 0;
|
|
57332
57332
|
minY = 0;
|
|
@@ -57368,12 +57368,12 @@ void main() {
|
|
|
57368
57368
|
_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, minY);
|
|
57369
57369
|
_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, minZ);
|
|
57370
57370
|
if (srcTexture.isDataTexture || srcTexture.isData3DTexture) {
|
|
57371
|
-
_gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ,
|
|
57371
|
+
_gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ, width10, height10, depth2, glFormat, glType, image.data);
|
|
57372
57372
|
} else {
|
|
57373
57373
|
if (dstTexture.isCompressedArrayTexture) {
|
|
57374
|
-
_gl.compressedTexSubImage3D(glTarget, level, dstX, dstY, dstZ,
|
|
57374
|
+
_gl.compressedTexSubImage3D(glTarget, level, dstX, dstY, dstZ, width10, height10, depth2, glFormat, image.data);
|
|
57375
57375
|
} else {
|
|
57376
|
-
_gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ,
|
|
57376
|
+
_gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ, width10, height10, depth2, glFormat, glType, image);
|
|
57377
57377
|
}
|
|
57378
57378
|
}
|
|
57379
57379
|
_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, currentUnpackRowLen);
|
|
@@ -58171,10 +58171,10 @@ void main() {
|
|
|
58171
58171
|
}
|
|
58172
58172
|
};
|
|
58173
58173
|
var DataTexture = class extends Texture2 {
|
|
58174
|
-
constructor(data = null,
|
|
58174
|
+
constructor(data = null, width10 = 1, height10 = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, colorSpace) {
|
|
58175
58175
|
super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace);
|
|
58176
58176
|
this.isDataTexture = true;
|
|
58177
|
-
this.image = { data, width:
|
|
58177
|
+
this.image = { data, width: width10, height: height10 };
|
|
58178
58178
|
this.generateMipmaps = false;
|
|
58179
58179
|
this.flipY = false;
|
|
58180
58180
|
this.unpackAlignment = 1;
|
|
@@ -59466,8 +59466,8 @@ void main() {
|
|
|
59466
59466
|
}
|
|
59467
59467
|
};
|
|
59468
59468
|
var FramebufferTexture = class extends Texture2 {
|
|
59469
|
-
constructor(
|
|
59470
|
-
super({ width:
|
|
59469
|
+
constructor(width10, height10) {
|
|
59470
|
+
super({ width: width10, height: height10 });
|
|
59471
59471
|
this.isFramebufferTexture = true;
|
|
59472
59472
|
this.magFilter = NearestFilter;
|
|
59473
59473
|
this.minFilter = NearestFilter;
|
|
@@ -59476,18 +59476,18 @@ void main() {
|
|
|
59476
59476
|
}
|
|
59477
59477
|
};
|
|
59478
59478
|
var CompressedTexture = class extends Texture2 {
|
|
59479
|
-
constructor(mipmaps,
|
|
59479
|
+
constructor(mipmaps, width10, height10, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace) {
|
|
59480
59480
|
super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace);
|
|
59481
59481
|
this.isCompressedTexture = true;
|
|
59482
|
-
this.image = { width:
|
|
59482
|
+
this.image = { width: width10, height: height10 };
|
|
59483
59483
|
this.mipmaps = mipmaps;
|
|
59484
59484
|
this.flipY = false;
|
|
59485
59485
|
this.generateMipmaps = false;
|
|
59486
59486
|
}
|
|
59487
59487
|
};
|
|
59488
59488
|
var CompressedArrayTexture = class extends CompressedTexture {
|
|
59489
|
-
constructor(mipmaps,
|
|
59490
|
-
super(mipmaps,
|
|
59489
|
+
constructor(mipmaps, width10, height10, depth, format, type) {
|
|
59490
|
+
super(mipmaps, width10, height10, format, type);
|
|
59491
59491
|
this.isCompressedArrayTexture = true;
|
|
59492
59492
|
this.image.depth = depth;
|
|
59493
59493
|
this.wrapR = ClampToEdgeWrapping2;
|
|
@@ -60699,13 +60699,13 @@ void main() {
|
|
|
60699
60699
|
}
|
|
60700
60700
|
};
|
|
60701
60701
|
var CylinderGeometry = class _CylinderGeometry extends BufferGeometry {
|
|
60702
|
-
constructor(radiusTop = 1, radiusBottom = 1,
|
|
60702
|
+
constructor(radiusTop = 1, radiusBottom = 1, height10 = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2) {
|
|
60703
60703
|
super();
|
|
60704
60704
|
this.type = "CylinderGeometry";
|
|
60705
60705
|
this.parameters = {
|
|
60706
60706
|
radiusTop,
|
|
60707
60707
|
radiusBottom,
|
|
60708
|
-
height:
|
|
60708
|
+
height: height10,
|
|
60709
60709
|
radialSegments,
|
|
60710
60710
|
heightSegments,
|
|
60711
60711
|
openEnded,
|
|
@@ -60721,7 +60721,7 @@ void main() {
|
|
|
60721
60721
|
const uvs = [];
|
|
60722
60722
|
let index = 0;
|
|
60723
60723
|
const indexArray = [];
|
|
60724
|
-
const halfHeight =
|
|
60724
|
+
const halfHeight = height10 / 2;
|
|
60725
60725
|
let groupStart = 0;
|
|
60726
60726
|
generateTorso();
|
|
60727
60727
|
if (openEnded === false) {
|
|
@@ -60736,7 +60736,7 @@ void main() {
|
|
|
60736
60736
|
const normal = new Vector32();
|
|
60737
60737
|
const vertex2 = new Vector32();
|
|
60738
60738
|
let groupCount = 0;
|
|
60739
|
-
const slope = (radiusBottom - radiusTop) /
|
|
60739
|
+
const slope = (radiusBottom - radiusTop) / height10;
|
|
60740
60740
|
for (let y = 0; y <= heightSegments; y++) {
|
|
60741
60741
|
const indexRow = [];
|
|
60742
60742
|
const v = y / heightSegments;
|
|
@@ -60747,7 +60747,7 @@ void main() {
|
|
|
60747
60747
|
const sinTheta = Math.sin(theta);
|
|
60748
60748
|
const cosTheta = Math.cos(theta);
|
|
60749
60749
|
vertex2.x = radius * sinTheta;
|
|
60750
|
-
vertex2.y = -v *
|
|
60750
|
+
vertex2.y = -v * height10 + halfHeight;
|
|
60751
60751
|
vertex2.z = radius * cosTheta;
|
|
60752
60752
|
vertices.push(vertex2.x, vertex2.y, vertex2.z);
|
|
60753
60753
|
normal.set(sinTheta, slope, cosTheta).normalize();
|
|
@@ -60829,12 +60829,12 @@ void main() {
|
|
|
60829
60829
|
}
|
|
60830
60830
|
};
|
|
60831
60831
|
var ConeGeometry = class _ConeGeometry extends CylinderGeometry {
|
|
60832
|
-
constructor(radius = 1,
|
|
60833
|
-
super(0, radius,
|
|
60832
|
+
constructor(radius = 1, height10 = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2) {
|
|
60833
|
+
super(0, radius, height10, radialSegments, heightSegments, openEnded, thetaStart, thetaLength);
|
|
60834
60834
|
this.type = "ConeGeometry";
|
|
60835
60835
|
this.parameters = {
|
|
60836
60836
|
radius,
|
|
60837
|
-
height:
|
|
60837
|
+
height: height10,
|
|
60838
60838
|
radialSegments,
|
|
60839
60839
|
heightSegments,
|
|
60840
60840
|
openEnded,
|
|
@@ -65236,12 +65236,12 @@ void main() {
|
|
|
65236
65236
|
}
|
|
65237
65237
|
};
|
|
65238
65238
|
var RectAreaLight = class extends Light {
|
|
65239
|
-
constructor(color, intensity,
|
|
65239
|
+
constructor(color, intensity, width10 = 10, height10 = 10) {
|
|
65240
65240
|
super(color, intensity);
|
|
65241
65241
|
this.isRectAreaLight = true;
|
|
65242
65242
|
this.type = "RectAreaLight";
|
|
65243
|
-
this.width =
|
|
65244
|
-
this.height =
|
|
65243
|
+
this.width = width10;
|
|
65244
|
+
this.height = height10;
|
|
65245
65245
|
}
|
|
65246
65246
|
get power() {
|
|
65247
65247
|
return this.intensity * this.width * this.height * Math.PI;
|
|
@@ -69811,9 +69811,9 @@ void main() {
|
|
|
69811
69811
|
};
|
|
69812
69812
|
var WebGLMultipleRenderTargets = class extends WebGLRenderTarget {
|
|
69813
69813
|
// @deprecated, r162
|
|
69814
|
-
constructor(
|
|
69814
|
+
constructor(width10 = 1, height10 = 1, count = 1, options = {}) {
|
|
69815
69815
|
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.');
|
|
69816
|
-
super(
|
|
69816
|
+
super(width10, height10, { ...options, count });
|
|
69817
69817
|
this.isWebGLMultipleRenderTargets = true;
|
|
69818
69818
|
}
|
|
69819
69819
|
get texture() {
|
|
@@ -77298,7 +77298,7 @@ var require_dist = __commonJS({
|
|
|
77298
77298
|
Circle: () => Circle,
|
|
77299
77299
|
Colorize: () => Colorize10,
|
|
77300
77300
|
Cube: () => Cube2,
|
|
77301
|
-
Cuboid: () =>
|
|
77301
|
+
Cuboid: () => Cuboid17,
|
|
77302
77302
|
Custom: () => Custom,
|
|
77303
77303
|
Cylinder: () => Cylinder3,
|
|
77304
77304
|
CylinderElliptic: () => CylinderElliptic,
|
|
@@ -77715,17 +77715,17 @@ var require_dist = __commonJS({
|
|
|
77715
77715
|
};
|
|
77716
77716
|
return hostConfig2;
|
|
77717
77717
|
}
|
|
77718
|
-
var
|
|
77718
|
+
var import_jsx_runtime27 = require_jsx_runtime();
|
|
77719
77719
|
function Circle({ radius }) {
|
|
77720
|
-
return /* @__PURE__ */ (0,
|
|
77720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { radius });
|
|
77721
77721
|
}
|
|
77722
77722
|
var import_color = __toESM2(require_color(), 1);
|
|
77723
|
-
var
|
|
77723
|
+
var import_jsx_runtime28 = require_jsx_runtime();
|
|
77724
77724
|
function Colorize10({ color, children }) {
|
|
77725
77725
|
if (!Array.isArray(color)) {
|
|
77726
77726
|
color = (0, import_color.default)(color).rgb().array().map((v) => v / 255);
|
|
77727
77727
|
}
|
|
77728
|
-
return /* @__PURE__ */ (0,
|
|
77728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("colorize", { color, children });
|
|
77729
77729
|
}
|
|
77730
77730
|
var import_jsx_runtime32 = require_jsx_runtime();
|
|
77731
77731
|
function withColorProp(WrappedComponent) {
|
|
@@ -77785,7 +77785,7 @@ var require_dist = __commonJS({
|
|
|
77785
77785
|
var CuboidBase = ({ size }) => {
|
|
77786
77786
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("cuboid", { size });
|
|
77787
77787
|
};
|
|
77788
|
-
var
|
|
77788
|
+
var Cuboid17 = withOffsetProp(withColorProp(CuboidBase));
|
|
77789
77789
|
var import_jsx_runtime82 = require_jsx_runtime();
|
|
77790
77790
|
function Custom({ geometry }) {
|
|
77791
77791
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("custom", { geometry });
|
|
@@ -77838,15 +77838,15 @@ var require_dist = __commonJS({
|
|
|
77838
77838
|
return WithRotation;
|
|
77839
77839
|
}
|
|
77840
77840
|
var import_jsx_runtime112 = require_jsx_runtime();
|
|
77841
|
-
var CylinderBase = ({ radius, height:
|
|
77842
|
-
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("cylinder", { radius, height:
|
|
77841
|
+
var CylinderBase = ({ radius, height: height10 }) => {
|
|
77842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("cylinder", { radius, height: height10 });
|
|
77843
77843
|
};
|
|
77844
77844
|
var Cylinder3 = withColorProp(
|
|
77845
77845
|
withOffsetProp(withRotationProp(CylinderBase))
|
|
77846
77846
|
);
|
|
77847
77847
|
var import_jsx_runtime122 = require_jsx_runtime();
|
|
77848
77848
|
var CylinderEllipticBase = ({
|
|
77849
|
-
height:
|
|
77849
|
+
height: height10,
|
|
77850
77850
|
startRadius,
|
|
77851
77851
|
endRadius,
|
|
77852
77852
|
segments = 32,
|
|
@@ -77856,7 +77856,7 @@ var require_dist = __commonJS({
|
|
|
77856
77856
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
77857
77857
|
"cylinderElliptic",
|
|
77858
77858
|
{
|
|
77859
|
-
height:
|
|
77859
|
+
height: height10,
|
|
77860
77860
|
startRadius,
|
|
77861
77861
|
endRadius,
|
|
77862
77862
|
segments,
|
|
@@ -77875,7 +77875,7 @@ var require_dist = __commonJS({
|
|
|
77875
77875
|
var Ellipsoid = withOffsetProp(withColorProp(EllipsoidBase));
|
|
77876
77876
|
var import_jsx_runtime142 = require_jsx_runtime();
|
|
77877
77877
|
var ExtrudeHelicalBase = ({
|
|
77878
|
-
height:
|
|
77878
|
+
height: height10,
|
|
77879
77879
|
angle,
|
|
77880
77880
|
startAngle,
|
|
77881
77881
|
pitch,
|
|
@@ -77886,7 +77886,7 @@ var require_dist = __commonJS({
|
|
|
77886
77886
|
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
77887
77887
|
"extrudeHelical",
|
|
77888
77888
|
{
|
|
77889
|
-
height:
|
|
77889
|
+
height: height10,
|
|
77890
77890
|
angle,
|
|
77891
77891
|
startAngle,
|
|
77892
77892
|
pitch,
|
|
@@ -77899,7 +77899,7 @@ var require_dist = __commonJS({
|
|
|
77899
77899
|
var ExtrudeHelical = withOffsetProp(withColorProp(ExtrudeHelicalBase));
|
|
77900
77900
|
var import_jsx_runtime152 = require_jsx_runtime();
|
|
77901
77901
|
var ExtrudeLinearBase = ({
|
|
77902
|
-
height:
|
|
77902
|
+
height: height10,
|
|
77903
77903
|
twistAngle,
|
|
77904
77904
|
twistSteps,
|
|
77905
77905
|
children
|
|
@@ -77907,7 +77907,7 @@ var require_dist = __commonJS({
|
|
|
77907
77907
|
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
77908
77908
|
"extrudeLinear",
|
|
77909
77909
|
{
|
|
77910
|
-
height:
|
|
77910
|
+
height: height10,
|
|
77911
77911
|
twistAngle,
|
|
77912
77912
|
twistSteps,
|
|
77913
77913
|
children
|
|
@@ -77918,10 +77918,10 @@ var require_dist = __commonJS({
|
|
|
77918
77918
|
var import_jsx_runtime162 = require_jsx_runtime();
|
|
77919
77919
|
var ExtrudeRectangularBase = ({
|
|
77920
77920
|
size,
|
|
77921
|
-
height:
|
|
77921
|
+
height: height10,
|
|
77922
77922
|
children
|
|
77923
77923
|
}) => {
|
|
77924
|
-
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("extrudeRectangular", { size, height:
|
|
77924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("extrudeRectangular", { size, height: height10, children });
|
|
77925
77925
|
};
|
|
77926
77926
|
var ExtrudeRectangular = withOffsetProp(
|
|
77927
77927
|
withColorProp(ExtrudeRectangularBase)
|
|
@@ -77959,26 +77959,26 @@ var require_dist = __commonJS({
|
|
|
77959
77959
|
function Project({ axis, origin, children }) {
|
|
77960
77960
|
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)("project", { axis, origin, children });
|
|
77961
77961
|
}
|
|
77962
|
-
var
|
|
77962
|
+
var import_jsx_runtime232 = require_jsx_runtime();
|
|
77963
77963
|
function Rectangle({ size }) {
|
|
77964
|
-
return /* @__PURE__ */ (0,
|
|
77964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("rectangle", { size });
|
|
77965
77965
|
}
|
|
77966
|
-
var
|
|
77966
|
+
var import_jsx_runtime242 = require_jsx_runtime();
|
|
77967
77967
|
var RoundedCuboidBase = ({ size, roundRadius }) => {
|
|
77968
|
-
return /* @__PURE__ */ (0,
|
|
77968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)("roundedCuboid", { size, roundRadius });
|
|
77969
77969
|
};
|
|
77970
77970
|
var RoundedCuboid2 = withOffsetProp(withColorProp(RoundedCuboidBase));
|
|
77971
|
-
var
|
|
77971
|
+
var import_jsx_runtime252 = require_jsx_runtime();
|
|
77972
77972
|
var RoundedCylinderBase = ({
|
|
77973
77973
|
radius,
|
|
77974
|
-
height:
|
|
77974
|
+
height: height10,
|
|
77975
77975
|
roundRadius
|
|
77976
77976
|
}) => {
|
|
77977
|
-
return /* @__PURE__ */ (0,
|
|
77977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
77978
77978
|
"roundedCylinder",
|
|
77979
77979
|
{
|
|
77980
77980
|
radius,
|
|
77981
|
-
height:
|
|
77981
|
+
height: height10,
|
|
77982
77982
|
roundRadius
|
|
77983
77983
|
}
|
|
77984
77984
|
);
|
|
@@ -77986,20 +77986,20 @@ var require_dist = __commonJS({
|
|
|
77986
77986
|
var RoundedCylinder = withOffsetProp(
|
|
77987
77987
|
withColorProp(RoundedCylinderBase)
|
|
77988
77988
|
);
|
|
77989
|
-
var
|
|
77989
|
+
var import_jsx_runtime262 = require_jsx_runtime();
|
|
77990
77990
|
var SphereBase = ({ radius, segments }) => {
|
|
77991
|
-
return /* @__PURE__ */ (0,
|
|
77991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("sphere", { radius, segments: segments || 32 });
|
|
77992
77992
|
};
|
|
77993
77993
|
var Sphere2 = withColorProp(withOffsetProp(SphereBase));
|
|
77994
|
-
var
|
|
77994
|
+
var import_jsx_runtime272 = require_jsx_runtime();
|
|
77995
77995
|
var SubtractBase = ({ children }) => {
|
|
77996
77996
|
if (!Array.isArray(children) || children.length < 2) {
|
|
77997
77997
|
throw new Error("Subtract must have at least two children");
|
|
77998
77998
|
}
|
|
77999
|
-
return /* @__PURE__ */ (0,
|
|
77999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("subtract", { children });
|
|
78000
78000
|
};
|
|
78001
78001
|
var Subtract2 = withOffsetProp(withColorProp(SubtractBase));
|
|
78002
|
-
var
|
|
78002
|
+
var import_jsx_runtime282 = require_jsx_runtime();
|
|
78003
78003
|
var TorusBase = ({
|
|
78004
78004
|
innerRadius,
|
|
78005
78005
|
outerRadius,
|
|
@@ -78009,7 +78009,7 @@ var require_dist = __commonJS({
|
|
|
78009
78009
|
outerRotation = 1,
|
|
78010
78010
|
startAngle = 0
|
|
78011
78011
|
}) => {
|
|
78012
|
-
return /* @__PURE__ */ (0,
|
|
78012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
|
|
78013
78013
|
"torus",
|
|
78014
78014
|
{
|
|
78015
78015
|
innerRadius,
|
|
@@ -78349,15 +78349,15 @@ var require_dist = __commonJS({
|
|
|
78349
78349
|
}
|
|
78350
78350
|
});
|
|
78351
78351
|
|
|
78352
|
-
// lib/
|
|
78352
|
+
// lib/A01005.tsx
|
|
78353
78353
|
var import_jscad_fiber = __toESM(require_dist(), 1);
|
|
78354
78354
|
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
78355
|
-
var fullLength =
|
|
78356
|
-
var width = 0.
|
|
78357
|
-
var height = 0.
|
|
78358
|
-
var terminatorWidth = 0.
|
|
78355
|
+
var fullLength = 0.4;
|
|
78356
|
+
var width = 0.2;
|
|
78357
|
+
var height = 0.13;
|
|
78358
|
+
var terminatorWidth = 0.07;
|
|
78359
78359
|
var bodyLength = fullLength - terminatorWidth * 2;
|
|
78360
|
-
var
|
|
78360
|
+
var A01005 = ({ color = "#333" }) => {
|
|
78361
78361
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
78362
78362
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78363
78363
|
import_jscad_fiber.Cuboid,
|
|
@@ -78370,7 +78370,7 @@ var A0402 = ({ color = "#333" }) => {
|
|
|
78370
78370
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78371
78371
|
import_jscad_fiber.Cuboid,
|
|
78372
78372
|
{
|
|
78373
|
-
size: [terminatorWidth,
|
|
78373
|
+
size: [terminatorWidth, width, height],
|
|
78374
78374
|
offset: [fullLength / 2 - terminatorWidth / 2, 0, height / 2],
|
|
78375
78375
|
color: "#ccc"
|
|
78376
78376
|
}
|
|
@@ -78378,7 +78378,7 @@ var A0402 = ({ color = "#333" }) => {
|
|
|
78378
78378
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78379
78379
|
import_jscad_fiber.Cuboid,
|
|
78380
78380
|
{
|
|
78381
|
-
size: [terminatorWidth,
|
|
78381
|
+
size: [terminatorWidth, width, height],
|
|
78382
78382
|
offset: [-fullLength / 2 + terminatorWidth / 2, 0, height / 2],
|
|
78383
78383
|
color: "#ccc"
|
|
78384
78384
|
}
|
|
@@ -78386,15 +78386,15 @@ var A0402 = ({ color = "#333" }) => {
|
|
|
78386
78386
|
] });
|
|
78387
78387
|
};
|
|
78388
78388
|
|
|
78389
|
-
// lib/
|
|
78389
|
+
// lib/A0201.tsx
|
|
78390
78390
|
var import_jscad_fiber2 = __toESM(require_dist(), 1);
|
|
78391
78391
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
78392
|
-
var fullLength2 =
|
|
78393
|
-
var
|
|
78394
|
-
var
|
|
78395
|
-
var
|
|
78396
|
-
var
|
|
78397
|
-
var
|
|
78392
|
+
var fullLength2 = 0.6;
|
|
78393
|
+
var width2 = 0.3;
|
|
78394
|
+
var height2 = 0.33;
|
|
78395
|
+
var terminatorWidth2 = 0.1;
|
|
78396
|
+
var bodyLength2 = fullLength2 - terminatorWidth2 * 2;
|
|
78397
|
+
var A0201 = ({ color = "#333" }) => {
|
|
78398
78398
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
78399
78399
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
78400
78400
|
import_jscad_fiber2.Cuboid,
|
|
@@ -78407,31 +78407,31 @@ var A0603 = ({ color = "#333" }) => {
|
|
|
78407
78407
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
78408
78408
|
import_jscad_fiber2.Cuboid,
|
|
78409
78409
|
{
|
|
78410
|
-
size: [
|
|
78411
|
-
offset: [fullLength2 / 2 -
|
|
78410
|
+
size: [terminatorWidth2, width2, height2],
|
|
78411
|
+
offset: [fullLength2 / 2 - terminatorWidth2 / 2, 0, height2 / 2],
|
|
78412
78412
|
color: "#ccc"
|
|
78413
78413
|
}
|
|
78414
78414
|
),
|
|
78415
78415
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
78416
78416
|
import_jscad_fiber2.Cuboid,
|
|
78417
78417
|
{
|
|
78418
|
-
size: [
|
|
78419
|
-
offset: [-fullLength2 / 2 +
|
|
78418
|
+
size: [terminatorWidth2, width2, height2],
|
|
78419
|
+
offset: [-fullLength2 / 2 + terminatorWidth2 / 2, 0, height2 / 2],
|
|
78420
78420
|
color: "#ccc"
|
|
78421
78421
|
}
|
|
78422
78422
|
)
|
|
78423
78423
|
] });
|
|
78424
78424
|
};
|
|
78425
78425
|
|
|
78426
|
-
// lib/
|
|
78426
|
+
// lib/A0402.tsx
|
|
78427
78427
|
var import_jscad_fiber3 = __toESM(require_dist(), 1);
|
|
78428
78428
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
78429
|
-
var fullLength3 =
|
|
78430
|
-
var width3 =
|
|
78431
|
-
var height3 = 0.
|
|
78432
|
-
var
|
|
78433
|
-
var bodyLength3 = fullLength3 -
|
|
78434
|
-
var
|
|
78429
|
+
var fullLength3 = 1;
|
|
78430
|
+
var width3 = 0.5;
|
|
78431
|
+
var height3 = 0.5;
|
|
78432
|
+
var terminatorWidth3 = 0.2;
|
|
78433
|
+
var bodyLength3 = fullLength3 - terminatorWidth3 * 2;
|
|
78434
|
+
var A0402 = ({ color = "#333" }) => {
|
|
78435
78435
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
78436
78436
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
78437
78437
|
import_jscad_fiber3.Cuboid,
|
|
@@ -78444,26 +78444,248 @@ var A0805 = ({ color = "#333" }) => {
|
|
|
78444
78444
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
78445
78445
|
import_jscad_fiber3.Cuboid,
|
|
78446
78446
|
{
|
|
78447
|
-
size: [
|
|
78448
|
-
offset: [fullLength3 / 2 -
|
|
78447
|
+
size: [terminatorWidth3, height3, width3],
|
|
78448
|
+
offset: [fullLength3 / 2 - terminatorWidth3 / 2, 0, height3 / 2],
|
|
78449
78449
|
color: "#ccc"
|
|
78450
78450
|
}
|
|
78451
78451
|
),
|
|
78452
78452
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
78453
78453
|
import_jscad_fiber3.Cuboid,
|
|
78454
78454
|
{
|
|
78455
|
-
size: [
|
|
78456
|
-
offset: [-fullLength3 / 2 +
|
|
78455
|
+
size: [terminatorWidth3, height3, width3],
|
|
78456
|
+
offset: [-fullLength3 / 2 + terminatorWidth3 / 2, 0, height3 / 2],
|
|
78457
78457
|
color: "#ccc"
|
|
78458
78458
|
}
|
|
78459
78459
|
)
|
|
78460
78460
|
] });
|
|
78461
78461
|
};
|
|
78462
78462
|
|
|
78463
|
-
// lib/
|
|
78463
|
+
// lib/A0603.tsx
|
|
78464
78464
|
var import_jscad_fiber4 = __toESM(require_dist(), 1);
|
|
78465
|
-
var import_react = __toESM(require_react(), 1);
|
|
78466
78465
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
78466
|
+
var fullLength4 = 1.6;
|
|
78467
|
+
var bodyLength4 = fullLength4 - 0.3 * 2;
|
|
78468
|
+
var terminatorLength = 0.3;
|
|
78469
|
+
var width4 = 0.85;
|
|
78470
|
+
var height4 = 0.6;
|
|
78471
|
+
var A0603 = ({ color = "#333" }) => {
|
|
78472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
78473
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
78474
|
+
import_jscad_fiber4.Cuboid,
|
|
78475
|
+
{
|
|
78476
|
+
size: [bodyLength4, width4, height4],
|
|
78477
|
+
offset: [0, 0, height4 / 2],
|
|
78478
|
+
color
|
|
78479
|
+
}
|
|
78480
|
+
),
|
|
78481
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
78482
|
+
import_jscad_fiber4.Cuboid,
|
|
78483
|
+
{
|
|
78484
|
+
size: [terminatorLength, width4, height4],
|
|
78485
|
+
offset: [fullLength4 / 2 - terminatorLength / 2, 0, height4 / 2],
|
|
78486
|
+
color: "#ccc"
|
|
78487
|
+
}
|
|
78488
|
+
),
|
|
78489
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
78490
|
+
import_jscad_fiber4.Cuboid,
|
|
78491
|
+
{
|
|
78492
|
+
size: [terminatorLength, width4, height4],
|
|
78493
|
+
offset: [-fullLength4 / 2 + terminatorLength / 2, 0, height4 / 2],
|
|
78494
|
+
color: "#ccc"
|
|
78495
|
+
}
|
|
78496
|
+
)
|
|
78497
|
+
] });
|
|
78498
|
+
};
|
|
78499
|
+
|
|
78500
|
+
// lib/A0805.tsx
|
|
78501
|
+
var import_jscad_fiber5 = __toESM(require_dist(), 1);
|
|
78502
|
+
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
78503
|
+
var fullLength5 = 2;
|
|
78504
|
+
var width5 = 1.25;
|
|
78505
|
+
var height5 = 0.55;
|
|
78506
|
+
var terminatorWidth4 = 0.5;
|
|
78507
|
+
var bodyLength5 = fullLength5 - terminatorWidth4 * 2;
|
|
78508
|
+
var A0805 = ({ color = "#333" }) => {
|
|
78509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
78510
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
78511
|
+
import_jscad_fiber5.Cuboid,
|
|
78512
|
+
{
|
|
78513
|
+
size: [bodyLength5, width5, height5],
|
|
78514
|
+
offset: [0, 0, height5 / 2],
|
|
78515
|
+
color
|
|
78516
|
+
}
|
|
78517
|
+
),
|
|
78518
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
78519
|
+
import_jscad_fiber5.Cuboid,
|
|
78520
|
+
{
|
|
78521
|
+
size: [terminatorWidth4, width5, height5],
|
|
78522
|
+
offset: [fullLength5 / 2 - terminatorWidth4 / 2, 0, height5 / 2],
|
|
78523
|
+
color: "#ccc"
|
|
78524
|
+
}
|
|
78525
|
+
),
|
|
78526
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
78527
|
+
import_jscad_fiber5.Cuboid,
|
|
78528
|
+
{
|
|
78529
|
+
size: [terminatorWidth4, width5, height5],
|
|
78530
|
+
offset: [-fullLength5 / 2 + terminatorWidth4 / 2, 0, height5 / 2],
|
|
78531
|
+
color: "#ccc"
|
|
78532
|
+
}
|
|
78533
|
+
)
|
|
78534
|
+
] });
|
|
78535
|
+
};
|
|
78536
|
+
|
|
78537
|
+
// lib/A1206.tsx
|
|
78538
|
+
var import_jscad_fiber6 = __toESM(require_dist(), 1);
|
|
78539
|
+
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
78540
|
+
var fullLength6 = 3.2;
|
|
78541
|
+
var width6 = 1.6;
|
|
78542
|
+
var height6 = 0.9;
|
|
78543
|
+
var terminatorWidth5 = 0.5;
|
|
78544
|
+
var bodyLength6 = fullLength6 - terminatorWidth5 * 2;
|
|
78545
|
+
var A1206 = ({ color = "#333" }) => {
|
|
78546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
78547
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
78548
|
+
import_jscad_fiber6.Cuboid,
|
|
78549
|
+
{
|
|
78550
|
+
size: [bodyLength6, width6, height6],
|
|
78551
|
+
offset: [0, 0, height6 / 2],
|
|
78552
|
+
color
|
|
78553
|
+
}
|
|
78554
|
+
),
|
|
78555
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
78556
|
+
import_jscad_fiber6.Cuboid,
|
|
78557
|
+
{
|
|
78558
|
+
size: [terminatorWidth5, width6, height6],
|
|
78559
|
+
offset: [fullLength6 / 2 - terminatorWidth5 / 2, 0, height6 / 2],
|
|
78560
|
+
color: "#ccc"
|
|
78561
|
+
}
|
|
78562
|
+
),
|
|
78563
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
78564
|
+
import_jscad_fiber6.Cuboid,
|
|
78565
|
+
{
|
|
78566
|
+
size: [terminatorWidth5, width6, height6],
|
|
78567
|
+
offset: [-fullLength6 / 2 + terminatorWidth5 / 2, 0, height6 / 2],
|
|
78568
|
+
color: "#ccc"
|
|
78569
|
+
}
|
|
78570
|
+
)
|
|
78571
|
+
] });
|
|
78572
|
+
};
|
|
78573
|
+
|
|
78574
|
+
// lib/A1210.tsx
|
|
78575
|
+
var import_jscad_fiber7 = __toESM(require_dist(), 1);
|
|
78576
|
+
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
78577
|
+
var fullLength7 = 3.2;
|
|
78578
|
+
var width7 = 2.5;
|
|
78579
|
+
var height7 = 1;
|
|
78580
|
+
var terminatorWidth6 = 0.6;
|
|
78581
|
+
var bodyLength7 = fullLength7 - terminatorWidth6 * 2;
|
|
78582
|
+
var A1210 = ({ color = "#333" }) => {
|
|
78583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
78584
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
78585
|
+
import_jscad_fiber7.Cuboid,
|
|
78586
|
+
{
|
|
78587
|
+
size: [bodyLength7, width7, height7],
|
|
78588
|
+
offset: [0, 0, height7 / 2],
|
|
78589
|
+
color
|
|
78590
|
+
}
|
|
78591
|
+
),
|
|
78592
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
78593
|
+
import_jscad_fiber7.Cuboid,
|
|
78594
|
+
{
|
|
78595
|
+
size: [terminatorWidth6, width7, height7],
|
|
78596
|
+
offset: [fullLength7 / 2 - terminatorWidth6 / 2, 0, height7 / 2],
|
|
78597
|
+
color: "#ccc"
|
|
78598
|
+
}
|
|
78599
|
+
),
|
|
78600
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
78601
|
+
import_jscad_fiber7.Cuboid,
|
|
78602
|
+
{
|
|
78603
|
+
size: [terminatorWidth6, width7, height7],
|
|
78604
|
+
offset: [-fullLength7 / 2 + terminatorWidth6 / 2, 0, height7 / 2],
|
|
78605
|
+
color: "#ccc"
|
|
78606
|
+
}
|
|
78607
|
+
)
|
|
78608
|
+
] });
|
|
78609
|
+
};
|
|
78610
|
+
|
|
78611
|
+
// lib/A2010.tsx
|
|
78612
|
+
var import_jscad_fiber8 = __toESM(require_dist(), 1);
|
|
78613
|
+
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
78614
|
+
var fullLength8 = 5;
|
|
78615
|
+
var width8 = 2.5;
|
|
78616
|
+
var height8 = 1.4;
|
|
78617
|
+
var terminatorWidth7 = 0.6;
|
|
78618
|
+
var bodyLength8 = fullLength8 - terminatorWidth7 * 2;
|
|
78619
|
+
var A2010 = ({ color = "#333" }) => {
|
|
78620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
78621
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
78622
|
+
import_jscad_fiber8.Cuboid,
|
|
78623
|
+
{
|
|
78624
|
+
size: [bodyLength8, width8, height8],
|
|
78625
|
+
offset: [0, 0, height8 / 2],
|
|
78626
|
+
color
|
|
78627
|
+
}
|
|
78628
|
+
),
|
|
78629
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
78630
|
+
import_jscad_fiber8.Cuboid,
|
|
78631
|
+
{
|
|
78632
|
+
size: [terminatorWidth7, width8, height8],
|
|
78633
|
+
offset: [fullLength8 / 2 - terminatorWidth7 / 2, 0, height8 / 2],
|
|
78634
|
+
color: "#ccc"
|
|
78635
|
+
}
|
|
78636
|
+
),
|
|
78637
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
78638
|
+
import_jscad_fiber8.Cuboid,
|
|
78639
|
+
{
|
|
78640
|
+
size: [terminatorWidth7, width8, height8],
|
|
78641
|
+
offset: [-fullLength8 / 2 + terminatorWidth7 / 2, 0, height8 / 2],
|
|
78642
|
+
color: "#ccc"
|
|
78643
|
+
}
|
|
78644
|
+
)
|
|
78645
|
+
] });
|
|
78646
|
+
};
|
|
78647
|
+
|
|
78648
|
+
// lib/A2512.tsx
|
|
78649
|
+
var import_jscad_fiber9 = __toESM(require_dist(), 1);
|
|
78650
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
78651
|
+
var fullLength9 = 6.3;
|
|
78652
|
+
var width9 = 3.2;
|
|
78653
|
+
var height9 = 1.8;
|
|
78654
|
+
var terminatorWidth8 = 0.8;
|
|
78655
|
+
var bodyLength9 = fullLength9 - terminatorWidth8 * 2;
|
|
78656
|
+
var A2512 = ({ color = "#333" }) => {
|
|
78657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
78658
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78659
|
+
import_jscad_fiber9.Cuboid,
|
|
78660
|
+
{
|
|
78661
|
+
size: [bodyLength9, width9, height9],
|
|
78662
|
+
offset: [0, 0, height9 / 2],
|
|
78663
|
+
color
|
|
78664
|
+
}
|
|
78665
|
+
),
|
|
78666
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78667
|
+
import_jscad_fiber9.Cuboid,
|
|
78668
|
+
{
|
|
78669
|
+
size: [terminatorWidth8, width9, height9],
|
|
78670
|
+
offset: [fullLength9 / 2 - terminatorWidth8 / 2, 0, height9 / 2],
|
|
78671
|
+
color: "#ccc"
|
|
78672
|
+
}
|
|
78673
|
+
),
|
|
78674
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78675
|
+
import_jscad_fiber9.Cuboid,
|
|
78676
|
+
{
|
|
78677
|
+
size: [terminatorWidth8, width9, height9],
|
|
78678
|
+
offset: [-fullLength9 / 2 + terminatorWidth8 / 2, 0, height9 / 2],
|
|
78679
|
+
color: "#ccc"
|
|
78680
|
+
}
|
|
78681
|
+
)
|
|
78682
|
+
] });
|
|
78683
|
+
};
|
|
78684
|
+
|
|
78685
|
+
// lib/BGA.tsx
|
|
78686
|
+
var import_jscad_fiber10 = __toESM(require_dist(), 1);
|
|
78687
|
+
var import_react = __toESM(require_react(), 1);
|
|
78688
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
78467
78689
|
import { fp } from "@tscircuit/footprinter";
|
|
78468
78690
|
var BGA = ({
|
|
78469
78691
|
packageWidth = 10,
|
|
@@ -78485,19 +78707,19 @@ var BGA = ({
|
|
|
78485
78707
|
const result = fp.string(footprintString);
|
|
78486
78708
|
return result.circuitJson();
|
|
78487
78709
|
}, [footprintString]);
|
|
78488
|
-
return /* @__PURE__ */ (0,
|
|
78489
|
-
/* @__PURE__ */ (0,
|
|
78710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
78711
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Translate, { z: bodyOffset, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Colorize, { color: "#555", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Cuboid, { size: [packageWidth, packageLength, bodyHeight] }) }) }),
|
|
78490
78712
|
!footprintString && Array.from({ length: ballRows * ballColumns }).map((_, index) => {
|
|
78491
78713
|
if (missingBalls.includes(index + 1)) return null;
|
|
78492
78714
|
const row = Math.floor(index / ballColumns);
|
|
78493
78715
|
const col = index % ballColumns;
|
|
78494
78716
|
const x = (col - (ballColumns - 1) / 2) * ballPitch;
|
|
78495
78717
|
const y = (row - (ballRows - 1) / 2) * ballPitch;
|
|
78496
|
-
return /* @__PURE__ */ (0,
|
|
78718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Translate, { x, y, z: ballOffset, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Sphere, { radius: ballDiameter / 2 }) }, index);
|
|
78497
78719
|
}),
|
|
78498
78720
|
ballsSoup && ballsSoup.map((elm, index) => {
|
|
78499
78721
|
if (elm.type === "pcb_smtpad") {
|
|
78500
|
-
return /* @__PURE__ */ (0,
|
|
78722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Translate, { x: elm.x, y: elm.y, z: ballOffset, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber10.Sphere, { radius: ballDiameter / 2 }) }, index);
|
|
78501
78723
|
}
|
|
78502
78724
|
return null;
|
|
78503
78725
|
})
|
|
@@ -78505,47 +78727,47 @@ var BGA = ({
|
|
|
78505
78727
|
};
|
|
78506
78728
|
|
|
78507
78729
|
// lib/ChipBody.tsx
|
|
78508
|
-
var
|
|
78509
|
-
var
|
|
78730
|
+
var import_jscad_fiber11 = __toESM(require_dist(), 1);
|
|
78731
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
78510
78732
|
var ChipBody = ({
|
|
78511
78733
|
center,
|
|
78512
|
-
width:
|
|
78734
|
+
width: width10,
|
|
78513
78735
|
length,
|
|
78514
|
-
height:
|
|
78736
|
+
height: height10,
|
|
78515
78737
|
heightAboveSurface = 0.15
|
|
78516
78738
|
}) => {
|
|
78517
|
-
return /* @__PURE__ */ (0,
|
|
78739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jscad_fiber11.Colorize, { color: "#555", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jscad_fiber11.Translate, { offset: center, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jscad_fiber11.Translate, { offset: { x: 0, y: 0, z: height10 / 2 + heightAboveSurface }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jscad_fiber11.RoundedCuboid, { roundRadius: 0.2, size: [width10, length, height10] }) }) }) });
|
|
78518
78740
|
};
|
|
78519
78741
|
|
|
78520
78742
|
// lib/ExtrudedPads.tsx
|
|
78521
78743
|
import { fp as fp2 } from "@tscircuit/footprinter";
|
|
78522
78744
|
|
|
78523
78745
|
// lib/FootprintPad.tsx
|
|
78524
|
-
var
|
|
78525
|
-
var
|
|
78746
|
+
var import_jscad_fiber12 = __toESM(require_dist(), 1);
|
|
78747
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
78526
78748
|
var FootprintPad = ({ pad }) => {
|
|
78527
78749
|
if (pad.shape === "rect") {
|
|
78528
|
-
return /* @__PURE__ */ (0,
|
|
78750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jscad_fiber12.Colorize, { color: [255, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jscad_fiber12.Translate, { offset: [pad.x, pad.y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jscad_fiber12.Cuboid, { size: [pad.width, pad.height, 0.01] }) }) });
|
|
78529
78751
|
} else {
|
|
78530
78752
|
throw new Error("Shape not supported: " + pad.shape);
|
|
78531
78753
|
}
|
|
78532
78754
|
};
|
|
78533
78755
|
|
|
78534
78756
|
// lib/FootprintPlatedHole.tsx
|
|
78535
|
-
var
|
|
78536
|
-
var
|
|
78757
|
+
var import_jscad_fiber13 = __toESM(require_dist(), 1);
|
|
78758
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
78537
78759
|
var FootprintPlatedHole = ({ hole }) => {
|
|
78538
78760
|
if (hole.shape === "circle") {
|
|
78539
|
-
return /* @__PURE__ */ (0,
|
|
78540
|
-
/* @__PURE__ */ (0,
|
|
78541
|
-
/* @__PURE__ */ (0,
|
|
78761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jscad_fiber13.Colorize, { color: "#b87333", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jscad_fiber13.Translate, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jscad_fiber13.Subtract, { children: [
|
|
78762
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jscad_fiber13.Cylinder, { radius: hole.outer_diameter / 2, height: 0.01 }),
|
|
78763
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jscad_fiber13.Cylinder, { radius: hole.hole_diameter / 2, height: 0.01 })
|
|
78542
78764
|
] }) }) });
|
|
78543
78765
|
}
|
|
78544
78766
|
throw new Error("Shape not supported: " + hole.shape);
|
|
78545
78767
|
};
|
|
78546
78768
|
|
|
78547
78769
|
// lib/ExtrudedPads.tsx
|
|
78548
|
-
var
|
|
78770
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
78549
78771
|
var ExtrudedPads = ({
|
|
78550
78772
|
soup,
|
|
78551
78773
|
footprint
|
|
@@ -78554,14 +78776,14 @@ var ExtrudedPads = ({
|
|
|
78554
78776
|
soup = fp2.string(footprint).circuitJson();
|
|
78555
78777
|
}
|
|
78556
78778
|
if (!soup) throw new Error("No soup or footprint provided to ExtrudedPads");
|
|
78557
|
-
return /* @__PURE__ */ (0,
|
|
78779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
78558
78780
|
soup.filter((s) => s.type === "pcb_smtpad").map((pad, i) => (
|
|
78559
78781
|
// biome-ignore lint/suspicious/noArrayIndexKey:
|
|
78560
|
-
/* @__PURE__ */ (0,
|
|
78782
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FootprintPad, { pad }, i)
|
|
78561
78783
|
)),
|
|
78562
78784
|
soup.filter((s) => s.type === "pcb_plated_hole").map((hole, i) => (
|
|
78563
78785
|
// biome-ignore lint/suspicious/noArrayIndexKey:
|
|
78564
|
-
/* @__PURE__ */ (0,
|
|
78786
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FootprintPlatedHole, { hole }, i)
|
|
78565
78787
|
))
|
|
78566
78788
|
] });
|
|
78567
78789
|
};
|
|
@@ -78570,18 +78792,18 @@ var ExtrudedPads = ({
|
|
|
78570
78792
|
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
78571
78793
|
|
|
78572
78794
|
// lib/DualInlinePackage.tsx
|
|
78573
|
-
var
|
|
78795
|
+
var import_jscad_fiber14 = __toESM(require_dist(), 1);
|
|
78574
78796
|
|
|
78575
78797
|
// lib/utils/range.ts
|
|
78576
78798
|
var range = (end) => Array.from({ length: end }, (_, i) => i);
|
|
78577
78799
|
|
|
78578
78800
|
// lib/utils/getExpandedStroke.ts
|
|
78579
|
-
function getExpandedStroke(strokeInput,
|
|
78801
|
+
function getExpandedStroke(strokeInput, width10) {
|
|
78580
78802
|
if (strokeInput.length < 2) {
|
|
78581
78803
|
throw new Error("Stroke must have at least two points");
|
|
78582
78804
|
}
|
|
78583
78805
|
const stroke = Array.isArray(strokeInput[0]) ? strokeInput.map(([x, y]) => ({ x, y })) : strokeInput;
|
|
78584
|
-
const halfWidth =
|
|
78806
|
+
const halfWidth = width10 / 2;
|
|
78585
78807
|
const leftSide = [];
|
|
78586
78808
|
const rightSide = [];
|
|
78587
78809
|
function getNormal(p1, p2) {
|
|
@@ -78635,14 +78857,14 @@ function getExpandedStroke(strokeInput, width4) {
|
|
|
78635
78857
|
}
|
|
78636
78858
|
|
|
78637
78859
|
// lib/DualInlinePackage.tsx
|
|
78638
|
-
var
|
|
78860
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
78639
78861
|
var normalizeOnY = (points) => {
|
|
78640
78862
|
const minX = Math.min(...points.map((p) => p.x));
|
|
78641
78863
|
const maxX = Math.max(...points.map((p) => p.x));
|
|
78642
78864
|
const minY = Math.min(...points.map((p) => p.y));
|
|
78643
78865
|
const maxY = Math.max(...points.map((p) => p.y));
|
|
78644
|
-
const
|
|
78645
|
-
const factor = 5.47 /
|
|
78866
|
+
const height10 = maxY - minY;
|
|
78867
|
+
const factor = 5.47 / height10;
|
|
78646
78868
|
return points.map((p) => ({
|
|
78647
78869
|
x: (p.x - minX - (maxX - minX) / 2) * factor,
|
|
78648
78870
|
y: (p.y - minY) * factor
|
|
@@ -78662,18 +78884,18 @@ var svgPathPoints = normalizeOnY([
|
|
|
78662
78884
|
]);
|
|
78663
78885
|
var DipPinLeg = ({ x, y, z }) => {
|
|
78664
78886
|
const isRotated = x > 0;
|
|
78665
|
-
return /* @__PURE__ */ (0,
|
|
78666
|
-
/* @__PURE__ */ (0,
|
|
78667
|
-
/* @__PURE__ */ (0,
|
|
78668
|
-
|
|
78887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
78888
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber14.Translate, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber14.Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber14.ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber14.Polygon, { points: svgPathPoints.map((p) => [p.x, p.y]) }) }) }) }),
|
|
78889
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78890
|
+
import_jscad_fiber14.Translate,
|
|
78669
78891
|
{
|
|
78670
78892
|
offset: {
|
|
78671
78893
|
x,
|
|
78672
78894
|
y: y + (isRotated ? 1 : -1),
|
|
78673
78895
|
z
|
|
78674
78896
|
},
|
|
78675
|
-
children: /* @__PURE__ */ (0,
|
|
78676
|
-
|
|
78897
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber14.Rotate, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber14.ExtrudeLinear, { height: 2, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78898
|
+
import_jscad_fiber14.Polygon,
|
|
78677
78899
|
{
|
|
78678
78900
|
points: getExpandedStroke(
|
|
78679
78901
|
[
|
|
@@ -78696,11 +78918,11 @@ var Dip = ({
|
|
|
78696
78918
|
}) => {
|
|
78697
78919
|
const numPinsOnEachSide = Math.floor(numPins / 2);
|
|
78698
78920
|
const crossBodyPinWidth = bodyWidth + 1;
|
|
78699
|
-
return /* @__PURE__ */ (0,
|
|
78921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
78700
78922
|
range(numPins).map((i) => {
|
|
78701
78923
|
const yRow = i % numPinsOnEachSide;
|
|
78702
78924
|
const xRow = (Math.floor(i / numPinsOnEachSide) - 0.5) * 2;
|
|
78703
|
-
return /* @__PURE__ */ (0,
|
|
78925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78704
78926
|
DipPinLeg,
|
|
78705
78927
|
{
|
|
78706
78928
|
x: xRow * crossBodyPinWidth / 2,
|
|
@@ -78710,7 +78932,7 @@ var Dip = ({
|
|
|
78710
78932
|
i
|
|
78711
78933
|
);
|
|
78712
78934
|
}),
|
|
78713
|
-
/* @__PURE__ */ (0,
|
|
78935
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78714
78936
|
ChipBody,
|
|
78715
78937
|
{
|
|
78716
78938
|
width: bodyWidth,
|
|
@@ -78724,10 +78946,10 @@ var Dip = ({
|
|
|
78724
78946
|
};
|
|
78725
78947
|
|
|
78726
78948
|
// lib/SmdChipLead.tsx
|
|
78727
|
-
var
|
|
78728
|
-
var
|
|
78949
|
+
var import_jscad_fiber15 = __toESM(require_dist(), 1);
|
|
78950
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
78729
78951
|
function calculateSCurve(x, {
|
|
78730
|
-
height:
|
|
78952
|
+
height: height10,
|
|
78731
78953
|
padContactLength,
|
|
78732
78954
|
curveLength,
|
|
78733
78955
|
bodyDistance,
|
|
@@ -78742,20 +78964,20 @@ function calculateSCurve(x, {
|
|
|
78742
78964
|
const curveStart = padContactLength * 0.75;
|
|
78743
78965
|
const curveEnd = padContactLength + curveLength + (bodyDistance - padContactLength - curveLength) * 0.25;
|
|
78744
78966
|
if (x <= curveStart) return 0;
|
|
78745
|
-
if (x >= curveEnd) return
|
|
78967
|
+
if (x >= curveEnd) return height10;
|
|
78746
78968
|
const t = (x - curveStart) / (curveEnd - curveStart);
|
|
78747
|
-
return
|
|
78969
|
+
return height10 / (1 + Math.exp(-steepness * (t - 0.5)));
|
|
78748
78970
|
}
|
|
78749
78971
|
var SmdChipLead = (props) => {
|
|
78750
|
-
const { thickness, width:
|
|
78972
|
+
const { thickness, width: width10, padContactLength, bodyDistance, height: height10, rotation } = props;
|
|
78751
78973
|
const N = 15;
|
|
78752
78974
|
const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
|
|
78753
78975
|
const polygon = getExpandedStroke(points, thickness);
|
|
78754
|
-
return /* @__PURE__ */ (0,
|
|
78976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber15.Colorize, { color: "#fff", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber15.Translate, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber15.Rotate, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber15.Translate, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber15.ExtrudeLinear, { height: width10, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber15.Polygon, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
|
|
78755
78977
|
};
|
|
78756
78978
|
|
|
78757
78979
|
// lib/Tssop.tsx
|
|
78758
|
-
var
|
|
78980
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
78759
78981
|
var Tssop = ({
|
|
78760
78982
|
pinCount,
|
|
78761
78983
|
leadLength,
|
|
@@ -78764,10 +78986,10 @@ var Tssop = ({
|
|
|
78764
78986
|
bodyWidth
|
|
78765
78987
|
}) => {
|
|
78766
78988
|
const sidePinLength = Math.ceil(pinCount / 2);
|
|
78767
|
-
const
|
|
78989
|
+
const fullLength10 = pitch * pinCount / 2 + leadWidth / 2;
|
|
78768
78990
|
const pinOffsetToCenter = (sidePinLength - 1) * pitch / 2;
|
|
78769
|
-
return /* @__PURE__ */ (0,
|
|
78770
|
-
Array.from({ length: sidePinLength }).map((_, i) => /* @__PURE__ */ (0,
|
|
78991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
78992
|
+
Array.from({ length: sidePinLength }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78771
78993
|
SmdChipLead,
|
|
78772
78994
|
{
|
|
78773
78995
|
position: {
|
|
@@ -78783,7 +79005,7 @@ var Tssop = ({
|
|
|
78783
79005
|
},
|
|
78784
79006
|
i
|
|
78785
79007
|
)),
|
|
78786
|
-
Array.from({ length: sidePinLength }).map((_, i) => /* @__PURE__ */ (0,
|
|
79008
|
+
Array.from({ length: sidePinLength }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78787
79009
|
SmdChipLead,
|
|
78788
79010
|
{
|
|
78789
79011
|
rotation: Math.PI,
|
|
@@ -78800,12 +79022,12 @@ var Tssop = ({
|
|
|
78800
79022
|
},
|
|
78801
79023
|
i
|
|
78802
79024
|
)),
|
|
78803
|
-
/* @__PURE__ */ (0,
|
|
79025
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
78804
79026
|
ChipBody,
|
|
78805
79027
|
{
|
|
78806
79028
|
center: { x: 0, y: 0, z: 0 },
|
|
78807
79029
|
width: bodyWidth,
|
|
78808
|
-
length:
|
|
79030
|
+
length: fullLength10,
|
|
78809
79031
|
height: 1.5
|
|
78810
79032
|
}
|
|
78811
79033
|
)
|
|
@@ -78813,7 +79035,7 @@ var Tssop = ({
|
|
|
78813
79035
|
};
|
|
78814
79036
|
|
|
78815
79037
|
// lib/qfp.tsx
|
|
78816
|
-
var
|
|
79038
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
78817
79039
|
var QFP = ({
|
|
78818
79040
|
pinCount,
|
|
78819
79041
|
pitch,
|
|
@@ -78826,15 +79048,15 @@ var QFP = ({
|
|
|
78826
79048
|
if (!padContactLength) padContactLength = getPadContactLength(pinCount);
|
|
78827
79049
|
if (!leadWidth) leadWidth = getLeadWidth(pinCount, bodyWidth);
|
|
78828
79050
|
if (!bodyWidth) bodyWidth = pitch * (sidePinCount + 4);
|
|
78829
|
-
const
|
|
79051
|
+
const bodyLength10 = bodyWidth;
|
|
78830
79052
|
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
78831
|
-
const
|
|
78832
|
-
const fullWidth =
|
|
79053
|
+
const fullLength10 = bodyLength10 + 2 * padContactLength;
|
|
79054
|
+
const fullWidth = fullLength10;
|
|
78833
79055
|
const leadHeight = 0.8;
|
|
78834
79056
|
const leadThickness = 0.15;
|
|
78835
79057
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
78836
|
-
return /* @__PURE__ */ (0,
|
|
78837
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
79058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
79059
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
78838
79060
|
SmdChipLead,
|
|
78839
79061
|
{
|
|
78840
79062
|
position: {
|
|
@@ -78850,7 +79072,7 @@ var QFP = ({
|
|
|
78850
79072
|
},
|
|
78851
79073
|
`left-${i}`
|
|
78852
79074
|
)),
|
|
78853
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
79075
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
78854
79076
|
SmdChipLead,
|
|
78855
79077
|
{
|
|
78856
79078
|
rotation: Math.PI,
|
|
@@ -78867,13 +79089,13 @@ var QFP = ({
|
|
|
78867
79089
|
},
|
|
78868
79090
|
`right-${i}`
|
|
78869
79091
|
)),
|
|
78870
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
79092
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
78871
79093
|
SmdChipLead,
|
|
78872
79094
|
{
|
|
78873
79095
|
rotation: Math.PI / 2,
|
|
78874
79096
|
position: {
|
|
78875
79097
|
x: i * pitch - pinOffsetToCenter,
|
|
78876
|
-
y: -
|
|
79098
|
+
y: -fullLength10 / 2,
|
|
78877
79099
|
z: 0
|
|
78878
79100
|
},
|
|
78879
79101
|
width: leadWidth,
|
|
@@ -78884,13 +79106,13 @@ var QFP = ({
|
|
|
78884
79106
|
},
|
|
78885
79107
|
`bottom-${i}`
|
|
78886
79108
|
)),
|
|
78887
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
79109
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
78888
79110
|
SmdChipLead,
|
|
78889
79111
|
{
|
|
78890
79112
|
rotation: -Math.PI / 2,
|
|
78891
79113
|
position: {
|
|
78892
79114
|
x: i * pitch - pinOffsetToCenter,
|
|
78893
|
-
y:
|
|
79115
|
+
y: fullLength10 / 2,
|
|
78894
79116
|
z: 0
|
|
78895
79117
|
},
|
|
78896
79118
|
width: leadWidth,
|
|
@@ -78901,24 +79123,24 @@ var QFP = ({
|
|
|
78901
79123
|
},
|
|
78902
79124
|
`top-${i}`
|
|
78903
79125
|
)),
|
|
78904
|
-
/* @__PURE__ */ (0,
|
|
79126
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
78905
79127
|
ChipBody,
|
|
78906
79128
|
{
|
|
78907
79129
|
center: { x: 0, y: 0, z: leadHeight / 2 },
|
|
78908
79130
|
width: bodyWidth,
|
|
78909
|
-
length:
|
|
79131
|
+
length: bodyLength10,
|
|
78910
79132
|
height: 1.5
|
|
78911
79133
|
}
|
|
78912
79134
|
)
|
|
78913
79135
|
] });
|
|
78914
79136
|
};
|
|
78915
|
-
var getPitch = (pinCount,
|
|
79137
|
+
var getPitch = (pinCount, width10) => {
|
|
78916
79138
|
switch (pinCount) {
|
|
78917
79139
|
case 44:
|
|
78918
79140
|
case 64:
|
|
78919
79141
|
return 0.8;
|
|
78920
79142
|
case 52:
|
|
78921
|
-
return
|
|
79143
|
+
return width10 === 14 ? 1 : 0.65;
|
|
78922
79144
|
case 208:
|
|
78923
79145
|
return 0.5;
|
|
78924
79146
|
default:
|
|
@@ -78937,13 +79159,13 @@ var getPadContactLength = (pinCount) => {
|
|
|
78937
79159
|
return 1;
|
|
78938
79160
|
}
|
|
78939
79161
|
};
|
|
78940
|
-
var getLeadWidth = (pinCount,
|
|
79162
|
+
var getLeadWidth = (pinCount, width10) => {
|
|
78941
79163
|
switch (pinCount) {
|
|
78942
79164
|
case 44:
|
|
78943
79165
|
case 64:
|
|
78944
79166
|
return 0.5;
|
|
78945
79167
|
case 52:
|
|
78946
|
-
return
|
|
79168
|
+
return width10 === 14 ? 0.45 : 0.55;
|
|
78947
79169
|
case 208:
|
|
78948
79170
|
return 0.3;
|
|
78949
79171
|
default:
|
|
@@ -78952,8 +79174,8 @@ var getLeadWidth = (pinCount, width4) => {
|
|
|
78952
79174
|
};
|
|
78953
79175
|
|
|
78954
79176
|
// lib/PinRow.tsx
|
|
78955
|
-
var
|
|
78956
|
-
var
|
|
79177
|
+
var import_jscad_fiber16 = __toESM(require_dist(), 1);
|
|
79178
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
78957
79179
|
var PinRow = ({
|
|
78958
79180
|
numberOfPins,
|
|
78959
79181
|
pitch = 2.54,
|
|
@@ -78964,19 +79186,19 @@ var PinRow = ({
|
|
|
78964
79186
|
const bodyWidth = numberOfPins * pitch;
|
|
78965
79187
|
const shortSidePinLength = 3;
|
|
78966
79188
|
const xoff = -((numberOfPins - 1) / 2) * pitch;
|
|
78967
|
-
return /* @__PURE__ */ (0,
|
|
78968
|
-
/* @__PURE__ */ (0,
|
|
78969
|
-
|
|
79189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
79190
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
79191
|
+
import_jscad_fiber16.Cuboid,
|
|
78970
79192
|
{
|
|
78971
79193
|
color: "#222",
|
|
78972
79194
|
size: [bodyWidth, pinThickness * 3, bodyHeight],
|
|
78973
79195
|
center: [0, 0, bodyHeight / 2]
|
|
78974
79196
|
}
|
|
78975
79197
|
),
|
|
78976
|
-
Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ (0,
|
|
78977
|
-
/* @__PURE__ */ (0,
|
|
78978
|
-
/* @__PURE__ */ (0,
|
|
78979
|
-
|
|
79198
|
+
Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
79199
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber16.Colorize, { color: "gold", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jscad_fiber16.Hull, { children: [
|
|
79200
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
79201
|
+
import_jscad_fiber16.Cuboid,
|
|
78980
79202
|
{
|
|
78981
79203
|
color: "gold",
|
|
78982
79204
|
size: [pinThickness, pinThickness, shortSidePinLength * 0.9],
|
|
@@ -78987,8 +79209,8 @@ var PinRow = ({
|
|
|
78987
79209
|
]
|
|
78988
79210
|
}
|
|
78989
79211
|
),
|
|
78990
|
-
/* @__PURE__ */ (0,
|
|
78991
|
-
|
|
79212
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
79213
|
+
import_jscad_fiber16.Cuboid,
|
|
78992
79214
|
{
|
|
78993
79215
|
color: "gold",
|
|
78994
79216
|
size: [
|
|
@@ -79000,17 +79222,17 @@ var PinRow = ({
|
|
|
79000
79222
|
}
|
|
79001
79223
|
)
|
|
79002
79224
|
] }) }),
|
|
79003
|
-
/* @__PURE__ */ (0,
|
|
79004
|
-
/* @__PURE__ */ (0,
|
|
79005
|
-
|
|
79225
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jscad_fiber16.Colorize, { color: "gold", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jscad_fiber16.Hull, { children: [
|
|
79226
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
79227
|
+
import_jscad_fiber16.Cuboid,
|
|
79006
79228
|
{
|
|
79007
79229
|
color: "gold",
|
|
79008
79230
|
size: [pinThickness, pinThickness, longSidePinLength * 0.9],
|
|
79009
79231
|
center: [xoff + i * pitch, 0, -longSidePinLength / 2 * 0.9]
|
|
79010
79232
|
}
|
|
79011
79233
|
),
|
|
79012
|
-
/* @__PURE__ */ (0,
|
|
79013
|
-
|
|
79234
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
79235
|
+
import_jscad_fiber16.Cuboid,
|
|
79014
79236
|
{
|
|
79015
79237
|
color: "gold",
|
|
79016
79238
|
size: [
|
|
@@ -79027,7 +79249,7 @@ var PinRow = ({
|
|
|
79027
79249
|
};
|
|
79028
79250
|
|
|
79029
79251
|
// lib/qfn.tsx
|
|
79030
|
-
var
|
|
79252
|
+
var import_jscad_fiber17 = __toESM(require_dist(), 1);
|
|
79031
79253
|
|
|
79032
79254
|
// lib/utils/getQuadCoords.ts
|
|
79033
79255
|
var getQuadCoords = (params) => {
|
|
@@ -79117,11 +79339,11 @@ var getQuadPinMap = ({
|
|
|
79117
79339
|
};
|
|
79118
79340
|
|
|
79119
79341
|
// lib/qfn.tsx
|
|
79120
|
-
var
|
|
79342
|
+
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
79121
79343
|
var QFN = ({
|
|
79122
79344
|
num_pins = 16,
|
|
79123
79345
|
bodyWidth = 9,
|
|
79124
|
-
bodyLength:
|
|
79346
|
+
bodyLength: bodyLength10 = 9,
|
|
79125
79347
|
bodyThickness = 0.8,
|
|
79126
79348
|
thermalPadSize,
|
|
79127
79349
|
padWidth = 0.25,
|
|
@@ -79145,7 +79367,7 @@ var QFN = ({
|
|
|
79145
79367
|
pin_count: num_pins,
|
|
79146
79368
|
pn: i + 1,
|
|
79147
79369
|
w: bodyWidth,
|
|
79148
|
-
h:
|
|
79370
|
+
h: bodyLength10,
|
|
79149
79371
|
p: pitch,
|
|
79150
79372
|
pl: padLength,
|
|
79151
79373
|
legsoutside: false
|
|
@@ -79159,24 +79381,24 @@ var QFN = ({
|
|
|
79159
79381
|
const pn = pin_map[i + 1];
|
|
79160
79382
|
pinPositions.push({ pn, x, y, pw, pl });
|
|
79161
79383
|
}
|
|
79162
|
-
return /* @__PURE__ */ (0,
|
|
79163
|
-
/* @__PURE__ */ (0,
|
|
79164
|
-
|
|
79384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
79385
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jscad_fiber17.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
79386
|
+
import_jscad_fiber17.Cuboid,
|
|
79165
79387
|
{
|
|
79166
79388
|
center: { x: 0, y: 0, z: bodyThickness / 2 },
|
|
79167
|
-
size: [bodyWidth,
|
|
79389
|
+
size: [bodyWidth, bodyLength10, bodyThickness]
|
|
79168
79390
|
}
|
|
79169
79391
|
) }),
|
|
79170
|
-
pinPositions.map((p, i) => /* @__PURE__ */ (0,
|
|
79171
|
-
|
|
79392
|
+
pinPositions.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
79393
|
+
import_jscad_fiber17.Cuboid,
|
|
79172
79394
|
{
|
|
79173
79395
|
center: { x: p.x, y: p.y, z: 0 },
|
|
79174
79396
|
size: [p.pw, p.pl, thermalPadThickness]
|
|
79175
79397
|
},
|
|
79176
79398
|
i
|
|
79177
79399
|
)),
|
|
79178
|
-
thermalPadSize?.length !== void 0 && thermalPadSize?.width !== void 0 && /* @__PURE__ */ (0,
|
|
79179
|
-
|
|
79400
|
+
thermalPadSize?.length !== void 0 && thermalPadSize?.width !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
79401
|
+
import_jscad_fiber17.Cuboid,
|
|
79180
79402
|
{
|
|
79181
79403
|
center: { x: 0, y: 0, z: 0 },
|
|
79182
79404
|
size: [
|
|
@@ -79191,11 +79413,11 @@ var QFN = ({
|
|
|
79191
79413
|
var qfn_default = QFN;
|
|
79192
79414
|
|
|
79193
79415
|
// lib/SOT-235.tsx
|
|
79194
|
-
var
|
|
79416
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
79195
79417
|
var SOT235 = () => {
|
|
79196
79418
|
const fullWidth = 2.8;
|
|
79197
79419
|
const bodyWidth = 1.6;
|
|
79198
|
-
const
|
|
79420
|
+
const bodyLength10 = 2.9;
|
|
79199
79421
|
const bodyHeight = 1.2;
|
|
79200
79422
|
const leadWidth = 0.4;
|
|
79201
79423
|
const leadThickness = 0.15;
|
|
@@ -79203,8 +79425,8 @@ var SOT235 = () => {
|
|
|
79203
79425
|
const padContactLength = 0.5;
|
|
79204
79426
|
const padPitch = 0.95;
|
|
79205
79427
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
79206
|
-
return /* @__PURE__ */ (0,
|
|
79207
|
-
/* @__PURE__ */ (0,
|
|
79428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
79429
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
79208
79430
|
SmdChipLead,
|
|
79209
79431
|
{
|
|
79210
79432
|
rotation: Math.PI,
|
|
@@ -79221,7 +79443,7 @@ var SOT235 = () => {
|
|
|
79221
79443
|
},
|
|
79222
79444
|
1
|
|
79223
79445
|
),
|
|
79224
|
-
/* @__PURE__ */ (0,
|
|
79446
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
79225
79447
|
SmdChipLead,
|
|
79226
79448
|
{
|
|
79227
79449
|
rotation: Math.PI,
|
|
@@ -79238,7 +79460,7 @@ var SOT235 = () => {
|
|
|
79238
79460
|
},
|
|
79239
79461
|
2
|
|
79240
79462
|
),
|
|
79241
|
-
/* @__PURE__ */ (0,
|
|
79463
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
79242
79464
|
SmdChipLead,
|
|
79243
79465
|
{
|
|
79244
79466
|
position: {
|
|
@@ -79254,7 +79476,7 @@ var SOT235 = () => {
|
|
|
79254
79476
|
},
|
|
79255
79477
|
3
|
|
79256
79478
|
),
|
|
79257
|
-
/* @__PURE__ */ (0,
|
|
79479
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
79258
79480
|
SmdChipLead,
|
|
79259
79481
|
{
|
|
79260
79482
|
position: {
|
|
@@ -79270,7 +79492,7 @@ var SOT235 = () => {
|
|
|
79270
79492
|
},
|
|
79271
79493
|
1
|
|
79272
79494
|
),
|
|
79273
|
-
/* @__PURE__ */ (0,
|
|
79495
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
79274
79496
|
SmdChipLead,
|
|
79275
79497
|
{
|
|
79276
79498
|
position: {
|
|
@@ -79286,12 +79508,12 @@ var SOT235 = () => {
|
|
|
79286
79508
|
},
|
|
79287
79509
|
2
|
|
79288
79510
|
),
|
|
79289
|
-
/* @__PURE__ */ (0,
|
|
79511
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
79290
79512
|
ChipBody,
|
|
79291
79513
|
{
|
|
79292
79514
|
center: { x: 0, y: 0, z: 0 },
|
|
79293
79515
|
width: bodyWidth,
|
|
79294
|
-
length:
|
|
79516
|
+
length: bodyLength10,
|
|
79295
79517
|
height: bodyHeight
|
|
79296
79518
|
}
|
|
79297
79519
|
)
|
|
@@ -79300,14 +79522,14 @@ var SOT235 = () => {
|
|
|
79300
79522
|
var SOT_235_default = SOT235;
|
|
79301
79523
|
|
|
79302
79524
|
// lib/Footprinter3d.tsx
|
|
79303
|
-
var
|
|
79525
|
+
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
79304
79526
|
var Footprinter3d = ({ footprint }) => {
|
|
79305
79527
|
const fpJson = fp3.string(footprint).json();
|
|
79306
79528
|
switch (fpJson.fn) {
|
|
79307
79529
|
case "dip":
|
|
79308
|
-
return /* @__PURE__ */ (0,
|
|
79530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
79309
79531
|
case "tssop":
|
|
79310
|
-
return /* @__PURE__ */ (0,
|
|
79532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79311
79533
|
Tssop,
|
|
79312
79534
|
{
|
|
79313
79535
|
pinCount: fpJson.num_pins,
|
|
@@ -79318,7 +79540,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79318
79540
|
}
|
|
79319
79541
|
);
|
|
79320
79542
|
case "qfp":
|
|
79321
|
-
return /* @__PURE__ */ (0,
|
|
79543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79322
79544
|
QFP,
|
|
79323
79545
|
{
|
|
79324
79546
|
pinCount: fpJson.num_pins,
|
|
@@ -79329,7 +79551,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79329
79551
|
}
|
|
79330
79552
|
);
|
|
79331
79553
|
case "qfn":
|
|
79332
|
-
return /* @__PURE__ */ (0,
|
|
79554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79333
79555
|
qfn_default,
|
|
79334
79556
|
{
|
|
79335
79557
|
num_pins: fpJson.num_pins,
|
|
@@ -79345,21 +79567,33 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79345
79567
|
}
|
|
79346
79568
|
);
|
|
79347
79569
|
case "pinrow":
|
|
79348
|
-
return /* @__PURE__ */ (0,
|
|
79570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
79349
79571
|
case "cap": {
|
|
79350
79572
|
switch (fpJson.imperial) {
|
|
79351
79573
|
case "0402":
|
|
79352
|
-
return /* @__PURE__ */ (0,
|
|
79574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0402, { color: "#856c4d" });
|
|
79353
79575
|
case "0603":
|
|
79354
|
-
return /* @__PURE__ */ (0,
|
|
79576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0603, { color: "#856c4d" });
|
|
79355
79577
|
case "0805":
|
|
79356
|
-
return /* @__PURE__ */ (0,
|
|
79578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0805, { color: "#856c4d" });
|
|
79579
|
+
case "0201":
|
|
79580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0201, { color: "#856c4d" });
|
|
79581
|
+
case "01005":
|
|
79582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A01005, { color: "#856c4d" });
|
|
79583
|
+
case "1206":
|
|
79584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A1206, { color: "#856c4d" });
|
|
79585
|
+
case "1210":
|
|
79586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A1210, { color: "#856c4d" });
|
|
79587
|
+
case "2010":
|
|
79588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A2010, { color: "#856c4d" });
|
|
79589
|
+
case "2512":
|
|
79590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A2512, { color: "#856c4d" });
|
|
79357
79591
|
}
|
|
79358
79592
|
}
|
|
79359
79593
|
case "sot235":
|
|
79360
|
-
return /* @__PURE__ */ (0,
|
|
79594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SOT_235_default, {});
|
|
79361
79595
|
case "soic":
|
|
79362
|
-
return /* @__PURE__ */ (0,
|
|
79596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79363
79597
|
Tssop,
|
|
79364
79598
|
{
|
|
79365
79599
|
pinCount: fpJson.num_pins,
|
|
@@ -79372,28 +79606,40 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
79372
79606
|
}
|
|
79373
79607
|
switch (fpJson.imperial) {
|
|
79374
79608
|
case "0402":
|
|
79375
|
-
return /* @__PURE__ */ (0,
|
|
79609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0402, {});
|
|
79376
79610
|
case "0603":
|
|
79377
|
-
return /* @__PURE__ */ (0,
|
|
79611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0603, {});
|
|
79378
79612
|
case "0805":
|
|
79379
|
-
return /* @__PURE__ */ (0,
|
|
79613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0805, {});
|
|
79614
|
+
case "0201":
|
|
79615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A0201, {});
|
|
79616
|
+
case "01005":
|
|
79617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A01005, {});
|
|
79618
|
+
case "1206":
|
|
79619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A1206, {});
|
|
79620
|
+
case "1210":
|
|
79621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A1210, {});
|
|
79622
|
+
case "2010":
|
|
79623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A2010, {});
|
|
79624
|
+
case "2512":
|
|
79625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(A2512, {});
|
|
79380
79626
|
}
|
|
79381
79627
|
return null;
|
|
79382
79628
|
};
|
|
79383
79629
|
|
|
79384
79630
|
// lib/SOT-23-3P.tsx
|
|
79385
|
-
var
|
|
79386
|
-
var SOT233P = ({ fullWidth = 2.9, fullLength:
|
|
79631
|
+
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
|
|
79632
|
+
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
79387
79633
|
const bodyWidth = 1.3;
|
|
79388
|
-
const
|
|
79634
|
+
const bodyLength10 = 2.9;
|
|
79389
79635
|
const bodyHeight = 1.1;
|
|
79390
79636
|
const leadWidth = 0.4;
|
|
79391
79637
|
const leadThickness = 0.15;
|
|
79392
79638
|
const leadHeight = 0.95;
|
|
79393
79639
|
const padContactLength = 0.4;
|
|
79394
79640
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
79395
|
-
return /* @__PURE__ */ (0,
|
|
79396
|
-
/* @__PURE__ */ (0,
|
|
79641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
79642
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79397
79643
|
SmdChipLead,
|
|
79398
79644
|
{
|
|
79399
79645
|
rotation: Math.PI,
|
|
@@ -79410,7 +79656,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79410
79656
|
},
|
|
79411
79657
|
1
|
|
79412
79658
|
),
|
|
79413
|
-
/* @__PURE__ */ (0,
|
|
79659
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79414
79660
|
SmdChipLead,
|
|
79415
79661
|
{
|
|
79416
79662
|
rotation: Math.PI,
|
|
@@ -79427,7 +79673,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79427
79673
|
},
|
|
79428
79674
|
2
|
|
79429
79675
|
),
|
|
79430
|
-
/* @__PURE__ */ (0,
|
|
79676
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79431
79677
|
SmdChipLead,
|
|
79432
79678
|
{
|
|
79433
79679
|
position: {
|
|
@@ -79443,12 +79689,12 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79443
79689
|
},
|
|
79444
79690
|
3
|
|
79445
79691
|
),
|
|
79446
|
-
/* @__PURE__ */ (0,
|
|
79692
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
79447
79693
|
ChipBody,
|
|
79448
79694
|
{
|
|
79449
79695
|
center: { x: 0, y: 0, z: 0 },
|
|
79450
79696
|
width: bodyWidth,
|
|
79451
|
-
length:
|
|
79697
|
+
length: bodyLength10,
|
|
79452
79698
|
height: bodyHeight
|
|
79453
79699
|
}
|
|
79454
79700
|
)
|
|
@@ -79456,35 +79702,35 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
79456
79702
|
};
|
|
79457
79703
|
|
|
79458
79704
|
// lib/SOT-563.tsx
|
|
79459
|
-
var
|
|
79460
|
-
var
|
|
79461
|
-
var SOT563 = ({ fullWidth = 1.94, fullLength:
|
|
79705
|
+
var import_jscad_fiber18 = __toESM(require_dist(), 1);
|
|
79706
|
+
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
79707
|
+
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
79462
79708
|
const bodyWidth = 1.2;
|
|
79463
|
-
const
|
|
79709
|
+
const bodyLength10 = 1.6;
|
|
79464
79710
|
const bodyHeight = 0.55;
|
|
79465
79711
|
const leadWidth = 0.3;
|
|
79466
79712
|
const leadLength = 0.67;
|
|
79467
79713
|
const leadHeight = 0.13;
|
|
79468
79714
|
const leadSpacing = 0.5;
|
|
79469
79715
|
const bodyZOffset = -0.3;
|
|
79470
|
-
return /* @__PURE__ */ (0,
|
|
79471
|
-
/* @__PURE__ */ (0,
|
|
79716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
79717
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jscad_fiber18.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jscad_fiber18.Translate, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jscad_fiber18.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jscad_fiber18.Cuboid, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
79472
79718
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
79473
79719
|
// Left lead
|
|
79474
|
-
/* @__PURE__ */ (0,
|
|
79475
|
-
|
|
79720
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79721
|
+
import_jscad_fiber18.Translate,
|
|
79476
79722
|
{
|
|
79477
79723
|
center: [-bodyWidth / 2 - 0.03, yOffset * leadSpacing, 0],
|
|
79478
|
-
children: /* @__PURE__ */ (0,
|
|
79724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jscad_fiber18.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
79479
79725
|
},
|
|
79480
79726
|
`left-${index}`
|
|
79481
79727
|
),
|
|
79482
79728
|
// Right lead
|
|
79483
|
-
/* @__PURE__ */ (0,
|
|
79484
|
-
|
|
79729
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
79730
|
+
import_jscad_fiber18.Translate,
|
|
79485
79731
|
{
|
|
79486
79732
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, 0],
|
|
79487
|
-
children: /* @__PURE__ */ (0,
|
|
79733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jscad_fiber18.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
79488
79734
|
},
|
|
79489
79735
|
`right-${index}`
|
|
79490
79736
|
)
|
|
@@ -79493,8 +79739,8 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79493
79739
|
};
|
|
79494
79740
|
|
|
79495
79741
|
// lib/SOT-723.tsx
|
|
79496
|
-
var
|
|
79497
|
-
var
|
|
79742
|
+
var import_jscad_fiber19 = __toESM(require_dist(), 1);
|
|
79743
|
+
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
|
|
79498
79744
|
var getCcwSot723Coords = (pn) => {
|
|
79499
79745
|
if (pn === 1) {
|
|
79500
79746
|
return { x: 0, y: 0 };
|
|
@@ -79506,18 +79752,18 @@ var getCcwSot723Coords = (pn) => {
|
|
|
79506
79752
|
};
|
|
79507
79753
|
var SOT723 = () => {
|
|
79508
79754
|
const bodyWidth = 0.8;
|
|
79509
|
-
const
|
|
79755
|
+
const bodyLength10 = 1.2;
|
|
79510
79756
|
const bodyHeight = 0.5;
|
|
79511
79757
|
const leadWidth = 0.32;
|
|
79512
79758
|
const leadLength = 0.3;
|
|
79513
79759
|
const leadHeight = 0.1;
|
|
79514
79760
|
const centerLeadWidth = 0.42;
|
|
79515
|
-
return /* @__PURE__ */ (0,
|
|
79516
|
-
/* @__PURE__ */ (0,
|
|
79761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
79762
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jscad_fiber19.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jscad_fiber19.Translate, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jscad_fiber19.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jscad_fiber19.Cuboid, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
79517
79763
|
[1, 2, 3].map((pn) => {
|
|
79518
79764
|
const { x, y } = getCcwSot723Coords(pn);
|
|
79519
|
-
return /* @__PURE__ */ (0,
|
|
79520
|
-
|
|
79765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jscad_fiber19.Translate, { center: [x, y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
79766
|
+
import_jscad_fiber19.Cuboid,
|
|
79521
79767
|
{
|
|
79522
79768
|
size: [
|
|
79523
79769
|
leadLength,
|
|
@@ -79531,10 +79777,10 @@ var SOT723 = () => {
|
|
|
79531
79777
|
};
|
|
79532
79778
|
|
|
79533
79779
|
// lib/sod-123.tsx
|
|
79534
|
-
var
|
|
79535
|
-
var SOD123 = ({ fullWidth = 3.8, fullLength:
|
|
79780
|
+
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
79781
|
+
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
79536
79782
|
const bodyWidth = 2.9;
|
|
79537
|
-
const
|
|
79783
|
+
const bodyLength10 = 1.3;
|
|
79538
79784
|
const bodyHeight = 1.1;
|
|
79539
79785
|
const leadWidth = 0.8;
|
|
79540
79786
|
const leadThickness = 0.15;
|
|
@@ -79543,8 +79789,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79543
79789
|
const leadYOffset = leadHeight / 1 - 0.4;
|
|
79544
79790
|
const bodyYOffset = leadHeight / 2 - 0.4;
|
|
79545
79791
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
79546
|
-
return /* @__PURE__ */ (0,
|
|
79547
|
-
/* @__PURE__ */ (0,
|
|
79792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
79793
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
79548
79794
|
SmdChipLead,
|
|
79549
79795
|
{
|
|
79550
79796
|
position: {
|
|
@@ -79560,7 +79806,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79560
79806
|
},
|
|
79561
79807
|
1
|
|
79562
79808
|
),
|
|
79563
|
-
/* @__PURE__ */ (0,
|
|
79809
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
79564
79810
|
SmdChipLead,
|
|
79565
79811
|
{
|
|
79566
79812
|
rotation: Math.PI,
|
|
@@ -79577,21 +79823,27 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79577
79823
|
},
|
|
79578
79824
|
2
|
|
79579
79825
|
),
|
|
79580
|
-
/* @__PURE__ */ (0,
|
|
79826
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
79581
79827
|
ChipBody,
|
|
79582
79828
|
{
|
|
79583
79829
|
center: { x: 0, y: bodyYOffset, z: 0 },
|
|
79584
79830
|
width: bodyWidth,
|
|
79585
|
-
length:
|
|
79831
|
+
length: bodyLength10,
|
|
79586
79832
|
height: bodyHeight
|
|
79587
79833
|
}
|
|
79588
79834
|
)
|
|
79589
79835
|
] });
|
|
79590
79836
|
};
|
|
79591
79837
|
export {
|
|
79838
|
+
A01005,
|
|
79839
|
+
A0201,
|
|
79592
79840
|
A0402,
|
|
79593
79841
|
A0603,
|
|
79594
79842
|
A0805,
|
|
79843
|
+
A1206,
|
|
79844
|
+
A1210,
|
|
79845
|
+
A2010,
|
|
79846
|
+
A2512,
|
|
79595
79847
|
BGA,
|
|
79596
79848
|
ChipBody,
|
|
79597
79849
|
ExtrudedPads,
|