@threepipe/plugins-extra-importers 0.2.6 → 0.2.7
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/CHANGELOG.md +8 -1
- package/README.md +1 -1
- package/dist/dependencies.txt +4 -4
- package/dist/index.d.ts +22 -22
- package/dist/index.js +108 -82
- package/dist/index.js.map +1 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/style.css +3 -3
- package/docs/classes/AMFLoadPlugin.html +2 -2
- package/docs/classes/BVHLoadPlugin.html +2 -2
- package/docs/classes/ColladaLoadPlugin.html +2 -2
- package/docs/classes/GCodeLoadPlugin.html +2 -2
- package/docs/classes/LDrawLoadPlugin.html +2 -2
- package/docs/classes/MDDLoadPlugin.html +2 -2
- package/docs/classes/PCDLoadPlugin.html +2 -2
- package/docs/classes/TDSLoadPlugin.html +2 -2
- package/docs/classes/ThreeMFLoadPlugin.html +2 -2
- package/docs/classes/TiltLoadPlugin.html +2 -2
- package/docs/classes/VOXLoadPlugin.html +2 -2
- package/docs/classes/VRMLLoadPlugin.html +2 -2
- package/docs/classes/VTKLoadPlugin.html +2 -2
- package/docs/classes/XYZLoadPlugin.html +2 -2
- package/docs/variables/extraImportPlugins.html +1 -1
- package/package.json +1 -1
- package/docs/.nojekyll +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Changelog for @threepipe/extra-importers
|
|
1
|
+
# Changelog for @threepipe/plugins-extra-importers
|
|
2
2
|
|
|
3
3
|
All notable changes to this plugin will be documented in this file.
|
|
4
4
|
|
|
@@ -10,6 +10,12 @@ All notable changes to this plugin will be documented in this file.
|
|
|
10
10
|
|
|
11
11
|
- NA
|
|
12
12
|
|
|
13
|
+
## [0.2.7] - 2026-10-23
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Type declarations resolve in consumer projects with `moduleResolution: bundler`, `node16` and `nodenext` ([#60](https://github.com/repalash/threepipe/pull/60)): the `.d.ts` files imported a tsconfig `paths` alias of `three`, which resolves nowhere; relative imports carry `.js`
|
|
18
|
+
|
|
13
19
|
## [0.2.6] - 2025-19-24
|
|
14
20
|
|
|
15
21
|
### Fixes
|
|
@@ -24,5 +30,6 @@ All notable changes to this plugin will be documented in this file.
|
|
|
24
30
|
- Update [threepipe](https://threepipe.org/) `peerDependency` to [0.1.0](https://github.com/repalash/threepipe/releases/tag/v0.1.0)
|
|
25
31
|
|
|
26
32
|
[unreleased]: https://github.com/repalash/threepipe/tree/dev/plugins/extra-importers
|
|
33
|
+
[0.2.7]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugins-extra-importers-0.2.7
|
|
27
34
|
[0.2.5]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugins-extra-importers-0.2.5
|
|
28
35
|
[0.2.4]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugins-extra-importers-0.2.4
|
package/README.md
CHANGED
package/dist/dependencies.txt
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Name: three
|
|
2
|
-
Version: 0.
|
|
1
|
+
Name: three-modded
|
|
2
|
+
Version: 0.168.10008
|
|
3
3
|
License: MIT
|
|
4
4
|
Private: false
|
|
5
5
|
Description: JavaScript 3D library
|
|
6
|
-
Repository: https://github.com/
|
|
6
|
+
Repository: https://github.com/repalash/three.js-modded
|
|
7
7
|
Homepage: https://threejs.org/
|
|
8
8
|
Author: mrdoob
|
|
9
|
-
License
|
|
9
|
+
License Text:
|
|
10
10
|
===
|
|
11
11
|
|
|
12
12
|
The MIT License
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare class ColladaLoadPlugin extends BaseImporterPlugin {
|
|
|
35
35
|
withCredentials: boolean;
|
|
36
36
|
path: string;
|
|
37
37
|
resourcePath: string;
|
|
38
|
-
manager: import('
|
|
38
|
+
manager: import('three').LoadingManager;
|
|
39
39
|
requestHeader: {
|
|
40
40
|
[header: string]: string;
|
|
41
41
|
};
|
|
@@ -78,7 +78,7 @@ export declare class BVHLoadPlugin extends BaseImporterPlugin {
|
|
|
78
78
|
withCredentials: boolean;
|
|
79
79
|
path: string;
|
|
80
80
|
resourcePath: string;
|
|
81
|
-
manager: import('
|
|
81
|
+
manager: import('three').LoadingManager;
|
|
82
82
|
requestHeader: {
|
|
83
83
|
[header: string]: string;
|
|
84
84
|
};
|
|
@@ -105,7 +105,7 @@ export declare class VOXLoadPlugin extends BaseImporterPlugin {
|
|
|
105
105
|
withCredentials: boolean;
|
|
106
106
|
path: string;
|
|
107
107
|
resourcePath: string;
|
|
108
|
-
manager: import('
|
|
108
|
+
manager: import('three').LoadingManager;
|
|
109
109
|
requestHeader: {
|
|
110
110
|
[header: string]: string;
|
|
111
111
|
};
|
|
@@ -132,7 +132,7 @@ export declare class MDDLoadPlugin extends BaseImporterPlugin {
|
|
|
132
132
|
withCredentials: boolean;
|
|
133
133
|
path: string;
|
|
134
134
|
resourcePath: string;
|
|
135
|
-
manager: import('
|
|
135
|
+
manager: import('three').LoadingManager;
|
|
136
136
|
requestHeader: {
|
|
137
137
|
[header: string]: string;
|
|
138
138
|
};
|
|
@@ -160,12 +160,12 @@ export declare class PCDLoadPlugin extends BaseImporterPlugin {
|
|
|
160
160
|
withCredentials: boolean;
|
|
161
161
|
path: string;
|
|
162
162
|
resourcePath: string;
|
|
163
|
-
manager: import('
|
|
163
|
+
manager: import('three').LoadingManager;
|
|
164
164
|
requestHeader: {
|
|
165
165
|
[header: string]: string;
|
|
166
166
|
};
|
|
167
|
-
load(url: string, onLoad: (data: Points<BufferGeometry<import('
|
|
168
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Points<BufferGeometry<import('
|
|
167
|
+
load(url: string, onLoad: (data: Points<BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>, PointsMaterial, import('three').Object3DEventMap>) => void, onProgress?: (event: ProgressEvent) => void, onError?: (err: unknown) => void): void;
|
|
168
|
+
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Points<BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>, PointsMaterial, import('three').Object3DEventMap>>;
|
|
169
169
|
setCrossOrigin(crossOrigin: string): /*elided*/ any;
|
|
170
170
|
setWithCredentials(value: boolean): /*elided*/ any;
|
|
171
171
|
setPath(path: string): /*elided*/ any;
|
|
@@ -196,26 +196,26 @@ export declare class LDrawLoadPlugin extends BaseImporterPlugin {
|
|
|
196
196
|
static readonly PluginType = "LDrawLoadPlugin";
|
|
197
197
|
protected _importer: Importer<{
|
|
198
198
|
transform(res: Group, _: AnyOptions): any;
|
|
199
|
-
materials: import('
|
|
200
|
-
materialsLibrary: Record<string, import('
|
|
199
|
+
materials: import('three').Material[];
|
|
200
|
+
materialsLibrary: Record<string, import('three').Material>;
|
|
201
201
|
fileMap: Record<string, string>;
|
|
202
202
|
smoothNormals: boolean;
|
|
203
203
|
preloadMaterials(url: string): Promise<void>;
|
|
204
204
|
setFileMap(fileMap: Record<string, string>): void;
|
|
205
|
-
setMaterials(materials: import('
|
|
206
|
-
parse(text: string, path: string, onLoad: (data: Group) => void): void;
|
|
207
|
-
addMaterial(material: import('
|
|
208
|
-
getMaterial(colourCode: string): import('
|
|
205
|
+
setMaterials(materials: import('three').Material[]): void;
|
|
206
|
+
parse(text: string, path: string, onLoad: (data: Group) => void, onError?: (error: unknown) => void): void;
|
|
207
|
+
addMaterial(material: import('three').Material): void;
|
|
208
|
+
getMaterial(colourCode: string): import('three').Material | null;
|
|
209
209
|
crossOrigin: string;
|
|
210
210
|
withCredentials: boolean;
|
|
211
211
|
path: string;
|
|
212
212
|
resourcePath: string;
|
|
213
|
-
manager: import('
|
|
213
|
+
manager: import('three').LoadingManager;
|
|
214
214
|
requestHeader: {
|
|
215
215
|
[header: string]: string;
|
|
216
216
|
};
|
|
217
|
-
load(url: string, onLoad: (data: Group<import('
|
|
218
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group<import('
|
|
217
|
+
load(url: string, onLoad: (data: Group<import('three').Object3DEventMap>) => void, onProgress?: (event: ProgressEvent) => void, onError?: (err: unknown) => void): void;
|
|
218
|
+
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group<import('three').Object3DEventMap>>;
|
|
219
219
|
setCrossOrigin(crossOrigin: string): /*elided*/ any;
|
|
220
220
|
setWithCredentials(value: boolean): /*elided*/ any;
|
|
221
221
|
setPath(path: string): /*elided*/ any;
|
|
@@ -237,12 +237,12 @@ export declare class VTKLoadPlugin extends BaseImporterPlugin {
|
|
|
237
237
|
withCredentials: boolean;
|
|
238
238
|
path: string;
|
|
239
239
|
resourcePath: string;
|
|
240
|
-
manager: import('
|
|
240
|
+
manager: import('three').LoadingManager;
|
|
241
241
|
requestHeader: {
|
|
242
242
|
[header: string]: string;
|
|
243
243
|
};
|
|
244
|
-
load(url: string, onLoad: (data: BufferGeometry<import('
|
|
245
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BufferGeometry<import('
|
|
244
|
+
load(url: string, onLoad: (data: BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>) => void, onProgress?: (event: ProgressEvent) => void, onError?: (err: unknown) => void): void;
|
|
245
|
+
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>>;
|
|
246
246
|
setCrossOrigin(crossOrigin: string): /*elided*/ any;
|
|
247
247
|
setWithCredentials(value: boolean): /*elided*/ any;
|
|
248
248
|
setPath(path: string): /*elided*/ any;
|
|
@@ -264,12 +264,12 @@ export declare class XYZLoadPlugin extends BaseImporterPlugin {
|
|
|
264
264
|
withCredentials: boolean;
|
|
265
265
|
path: string;
|
|
266
266
|
resourcePath: string;
|
|
267
|
-
manager: import('
|
|
267
|
+
manager: import('three').LoadingManager;
|
|
268
268
|
requestHeader: {
|
|
269
269
|
[header: string]: string;
|
|
270
270
|
};
|
|
271
|
-
load(url: string, onLoad: (data: BufferGeometry<import('
|
|
272
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BufferGeometry<import('
|
|
271
|
+
load(url: string, onLoad: (data: BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>) => void, onProgress?: (event: ProgressEvent) => void, onError?: (err: unknown) => void): void;
|
|
272
|
+
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<BufferGeometry<import('three').NormalBufferAttributes, import('three').BufferGeometryEventMap>>;
|
|
273
273
|
setCrossOrigin(crossOrigin: string): /*elided*/ any;
|
|
274
274
|
setWithCredentials(value: boolean): /*elided*/ any;
|
|
275
275
|
setPath(path: string): /*elided*/ any;
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* @threepipe/plugins-extra-importers v0.2.6
|
|
4
|
-
* Copyright 2022-2025 repalash <palash@shaders.app>
|
|
5
|
-
* Apache-2.0 License
|
|
6
|
-
* See ./dependencies.txt for any bundled third-party dependencies and licenses.
|
|
7
|
-
*/
|
|
8
1
|
import { Loader, LoaderUtils, FileLoader, Group, MeshPhongMaterial, DoubleSide, AdditiveBlending, BufferGeometry, Mesh, Float32BufferAttribute, Matrix4, TextureLoader, Color, SRGBColorSpace, BufferAttribute, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, LinearFilter, LinearMipmapLinearFilter, NearestFilter, MeshStandardMaterial, DataTextureLoader, Vector3, Quaternion, MeshBasicMaterial, Scene, MathUtils, AnimationClip, MeshLambertMaterial, Vector2, FrontSide, PerspectiveCamera, OrthographicCamera, AmbientLight, SpotLight, PointLight, DirectionalLight, VectorKeyframeTrack, QuaternionKeyframeTrack, Bone, LineBasicMaterial, SkinnedMesh, Line, LineSegments, Skeleton, NumberKeyframeTrack, Int32BufferAttribute, PointsMaterial, Points, RawShaderMaterial, Object3D, SphereGeometry, BackSide, DataTexture, BoxGeometry, ConeGeometry, CylinderGeometry, ShapeUtils, ShaderMaterial, UniformsUtils, UniformsLib, Ray, BaseImporterPlugin, Importer, SkeletonHelper, PhysicalMaterial } from "threepipe";
|
|
9
2
|
class TDSLoader extends Loader {
|
|
10
3
|
constructor(manager) {
|
|
@@ -608,12 +601,6 @@ const FACE_ARRAY = 16672;
|
|
|
608
601
|
const MSH_MAT_GROUP = 16688;
|
|
609
602
|
const TEX_VERTS = 16704;
|
|
610
603
|
const MESH_MATRIX = 16736;
|
|
611
|
-
/*!
|
|
612
|
-
fflate - fast JavaScript compression/decompression
|
|
613
|
-
<https://101arrowz.github.io/fflate>
|
|
614
|
-
Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
|
|
615
|
-
version 0.8.2
|
|
616
|
-
*/
|
|
617
604
|
var u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;
|
|
618
605
|
var fleb = new u8([
|
|
619
606
|
0,
|
|
@@ -5640,15 +5627,15 @@ class PCDLoader extends Loader {
|
|
|
5640
5627
|
PCDheader2.headerLen = result2[0].length + result1;
|
|
5641
5628
|
PCDheader2.str = data2.slice(0, PCDheader2.headerLen);
|
|
5642
5629
|
PCDheader2.str = PCDheader2.str.replace(/#.*/gi, "");
|
|
5643
|
-
PCDheader2.version =
|
|
5644
|
-
PCDheader2.fields =
|
|
5645
|
-
PCDheader2.size =
|
|
5646
|
-
PCDheader2.type =
|
|
5647
|
-
PCDheader2.count =
|
|
5648
|
-
PCDheader2.width =
|
|
5649
|
-
PCDheader2.height =
|
|
5650
|
-
PCDheader2.viewpoint =
|
|
5651
|
-
PCDheader2.points =
|
|
5630
|
+
PCDheader2.version = /^VERSION (.*)/im.exec(PCDheader2.str);
|
|
5631
|
+
PCDheader2.fields = /^FIELDS (.*)/im.exec(PCDheader2.str);
|
|
5632
|
+
PCDheader2.size = /^SIZE (.*)/im.exec(PCDheader2.str);
|
|
5633
|
+
PCDheader2.type = /^TYPE (.*)/im.exec(PCDheader2.str);
|
|
5634
|
+
PCDheader2.count = /^COUNT (.*)/im.exec(PCDheader2.str);
|
|
5635
|
+
PCDheader2.width = /^WIDTH (.*)/im.exec(PCDheader2.str);
|
|
5636
|
+
PCDheader2.height = /^HEIGHT (.*)/im.exec(PCDheader2.str);
|
|
5637
|
+
PCDheader2.viewpoint = /^VIEWPOINT (.*)/im.exec(PCDheader2.str);
|
|
5638
|
+
PCDheader2.points = /^POINTS (.*)/im.exec(PCDheader2.str);
|
|
5652
5639
|
if (PCDheader2.version !== null)
|
|
5653
5640
|
PCDheader2.version = parseFloat(PCDheader2.version[1]);
|
|
5654
5641
|
PCDheader2.fields = PCDheader2.fields !== null ? PCDheader2.fields[1].split(" ") : [];
|
|
@@ -6197,33 +6184,32 @@ function getMaterial(GUID) {
|
|
|
6197
6184
|
return new MeshBasicMaterial({ vertexColors: true, side: DoubleSide });
|
|
6198
6185
|
}
|
|
6199
6186
|
}
|
|
6200
|
-
/*! chevrotain - v9.0.1 */
|
|
6201
6187
|
var R = (t, e) => () => (e || (e = { exports: {} }, t(e.exports, e)), e.exports);
|
|
6202
6188
|
var Er = R((Pt) => {
|
|
6203
6189
|
Object.defineProperty(Pt, "__esModule", { value: true });
|
|
6204
6190
|
Pt.VERSION = void 0;
|
|
6205
6191
|
Pt.VERSION = "9.0.1";
|
|
6206
6192
|
});
|
|
6207
|
-
var k = R((exports, module) => {
|
|
6208
|
-
var __spreadArray = exports && exports.__spreadArray || function(t, e) {
|
|
6193
|
+
var k = R((exports$1, module) => {
|
|
6194
|
+
var __spreadArray = exports$1 && exports$1.__spreadArray || function(t, e) {
|
|
6209
6195
|
for (var r = 0, n = e.length, i = t.length; r < n; r++, i++) t[i] = e[r];
|
|
6210
6196
|
return t;
|
|
6211
6197
|
};
|
|
6212
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6213
|
-
exports.toFastProperties = exports.timer = exports.peek = exports.isES2015MapSupported = exports.PRINT_WARNING = exports.PRINT_ERROR = exports.packArray = exports.IDENTITY = exports.NOOP = exports.merge = exports.groupBy = exports.defaults = exports.assignNoOverwrite = exports.assign = exports.zipObject = exports.sortBy = exports.indexOf = exports.some = exports.difference = exports.every = exports.isObject = exports.isRegExp = exports.isArray = exports.partial = exports.uniq = exports.compact = exports.reduce = exports.findAll = exports.find = exports.cloneObj = exports.cloneArr = exports.contains = exports.has = exports.pick = exports.reject = exports.filter = exports.dropRight = exports.drop = exports.isFunction = exports.isUndefined = exports.isString = exports.forEach = exports.last = exports.first = exports.flatten = exports.map = exports.mapValues = exports.values = exports.keys = exports.isEmpty = void 0;
|
|
6198
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
6199
|
+
exports$1.toFastProperties = exports$1.timer = exports$1.peek = exports$1.isES2015MapSupported = exports$1.PRINT_WARNING = exports$1.PRINT_ERROR = exports$1.packArray = exports$1.IDENTITY = exports$1.NOOP = exports$1.merge = exports$1.groupBy = exports$1.defaults = exports$1.assignNoOverwrite = exports$1.assign = exports$1.zipObject = exports$1.sortBy = exports$1.indexOf = exports$1.some = exports$1.difference = exports$1.every = exports$1.isObject = exports$1.isRegExp = exports$1.isArray = exports$1.partial = exports$1.uniq = exports$1.compact = exports$1.reduce = exports$1.findAll = exports$1.find = exports$1.cloneObj = exports$1.cloneArr = exports$1.contains = exports$1.has = exports$1.pick = exports$1.reject = exports$1.filter = exports$1.dropRight = exports$1.drop = exports$1.isFunction = exports$1.isUndefined = exports$1.isString = exports$1.forEach = exports$1.last = exports$1.first = exports$1.flatten = exports$1.map = exports$1.mapValues = exports$1.values = exports$1.keys = exports$1.isEmpty = void 0;
|
|
6214
6200
|
function isEmpty(t) {
|
|
6215
6201
|
return t && t.length === 0;
|
|
6216
6202
|
}
|
|
6217
|
-
exports.isEmpty = isEmpty;
|
|
6203
|
+
exports$1.isEmpty = isEmpty;
|
|
6218
6204
|
function keys(t) {
|
|
6219
6205
|
return t == null ? [] : Object.keys(t);
|
|
6220
6206
|
}
|
|
6221
|
-
exports.keys = keys;
|
|
6207
|
+
exports$1.keys = keys;
|
|
6222
6208
|
function values(t) {
|
|
6223
6209
|
for (var e = [], r = Object.keys(t), n = 0; n < r.length; n++) e.push(t[r[n]]);
|
|
6224
6210
|
return e;
|
|
6225
6211
|
}
|
|
6226
|
-
exports.values = values;
|
|
6212
|
+
exports$1.values = values;
|
|
6227
6213
|
function mapValues(t, e) {
|
|
6228
6214
|
for (var r = [], n = keys(t), i = 0; i < n.length; i++) {
|
|
6229
6215
|
var a = n[i];
|
|
@@ -6231,12 +6217,12 @@ var k = R((exports, module) => {
|
|
|
6231
6217
|
}
|
|
6232
6218
|
return r;
|
|
6233
6219
|
}
|
|
6234
|
-
exports.mapValues = mapValues;
|
|
6220
|
+
exports$1.mapValues = mapValues;
|
|
6235
6221
|
function map(t, e) {
|
|
6236
6222
|
for (var r = [], n = 0; n < t.length; n++) r.push(e.call(null, t[n], n));
|
|
6237
6223
|
return r;
|
|
6238
6224
|
}
|
|
6239
|
-
exports.map = map;
|
|
6225
|
+
exports$1.map = map;
|
|
6240
6226
|
function flatten(t) {
|
|
6241
6227
|
for (var e = [], r = 0; r < t.length; r++) {
|
|
6242
6228
|
var n = t[r];
|
|
@@ -6244,16 +6230,16 @@ var k = R((exports, module) => {
|
|
|
6244
6230
|
}
|
|
6245
6231
|
return e;
|
|
6246
6232
|
}
|
|
6247
|
-
exports.flatten = flatten;
|
|
6233
|
+
exports$1.flatten = flatten;
|
|
6248
6234
|
function first(t) {
|
|
6249
6235
|
return isEmpty(t) ? void 0 : t[0];
|
|
6250
6236
|
}
|
|
6251
|
-
exports.first = first;
|
|
6237
|
+
exports$1.first = first;
|
|
6252
6238
|
function last(t) {
|
|
6253
6239
|
var e = t && t.length;
|
|
6254
6240
|
return e ? t[e - 1] : void 0;
|
|
6255
6241
|
}
|
|
6256
|
-
exports.last = last;
|
|
6242
|
+
exports$1.last = last;
|
|
6257
6243
|
function forEach(t, e) {
|
|
6258
6244
|
if (Array.isArray(t)) for (var r = 0; r < t.length; r++) e.call(null, t[r], r);
|
|
6259
6245
|
else if (isObject(t)) for (var n = keys(t), r = 0; r < n.length; r++) {
|
|
@@ -6262,27 +6248,27 @@ var k = R((exports, module) => {
|
|
|
6262
6248
|
}
|
|
6263
6249
|
else throw Error("non exhaustive match");
|
|
6264
6250
|
}
|
|
6265
|
-
exports.forEach = forEach;
|
|
6251
|
+
exports$1.forEach = forEach;
|
|
6266
6252
|
function isString(t) {
|
|
6267
6253
|
return typeof t == "string";
|
|
6268
6254
|
}
|
|
6269
|
-
exports.isString = isString;
|
|
6255
|
+
exports$1.isString = isString;
|
|
6270
6256
|
function isUndefined(t) {
|
|
6271
6257
|
return t === void 0;
|
|
6272
6258
|
}
|
|
6273
|
-
exports.isUndefined = isUndefined;
|
|
6259
|
+
exports$1.isUndefined = isUndefined;
|
|
6274
6260
|
function isFunction(t) {
|
|
6275
6261
|
return t instanceof Function;
|
|
6276
6262
|
}
|
|
6277
|
-
exports.isFunction = isFunction;
|
|
6263
|
+
exports$1.isFunction = isFunction;
|
|
6278
6264
|
function drop(t, e) {
|
|
6279
6265
|
return e === void 0 && (e = 1), t.slice(e, t.length);
|
|
6280
6266
|
}
|
|
6281
|
-
exports.drop = drop;
|
|
6267
|
+
exports$1.drop = drop;
|
|
6282
6268
|
function dropRight(t, e) {
|
|
6283
6269
|
return e === void 0 && (e = 1), t.slice(0, t.length - e);
|
|
6284
6270
|
}
|
|
6285
|
-
exports.dropRight = dropRight;
|
|
6271
|
+
exports$1.dropRight = dropRight;
|
|
6286
6272
|
function filter(t, e) {
|
|
6287
6273
|
var r = [];
|
|
6288
6274
|
if (Array.isArray(t)) for (var n = 0; n < t.length; n++) {
|
|
@@ -6291,13 +6277,13 @@ var k = R((exports, module) => {
|
|
|
6291
6277
|
}
|
|
6292
6278
|
return r;
|
|
6293
6279
|
}
|
|
6294
|
-
exports.filter = filter;
|
|
6280
|
+
exports$1.filter = filter;
|
|
6295
6281
|
function reject(t, e) {
|
|
6296
6282
|
return filter(t, function(r) {
|
|
6297
6283
|
return !e(r);
|
|
6298
6284
|
});
|
|
6299
6285
|
}
|
|
6300
|
-
exports.reject = reject;
|
|
6286
|
+
exports$1.reject = reject;
|
|
6301
6287
|
function pick(t, e) {
|
|
6302
6288
|
for (var r = Object.keys(t), n = {}, i = 0; i < r.length; i++) {
|
|
6303
6289
|
var a = r[i], o = t[a];
|
|
@@ -6305,35 +6291,35 @@ var k = R((exports, module) => {
|
|
|
6305
6291
|
}
|
|
6306
6292
|
return n;
|
|
6307
6293
|
}
|
|
6308
|
-
exports.pick = pick;
|
|
6294
|
+
exports$1.pick = pick;
|
|
6309
6295
|
function has(t, e) {
|
|
6310
6296
|
return isObject(t) ? t.hasOwnProperty(e) : false;
|
|
6311
6297
|
}
|
|
6312
|
-
exports.has = has;
|
|
6298
|
+
exports$1.has = has;
|
|
6313
6299
|
function contains(t, e) {
|
|
6314
6300
|
return find(t, function(r) {
|
|
6315
6301
|
return r === e;
|
|
6316
6302
|
}) !== void 0;
|
|
6317
6303
|
}
|
|
6318
|
-
exports.contains = contains;
|
|
6304
|
+
exports$1.contains = contains;
|
|
6319
6305
|
function cloneArr(t) {
|
|
6320
6306
|
for (var e = [], r = 0; r < t.length; r++) e.push(t[r]);
|
|
6321
6307
|
return e;
|
|
6322
6308
|
}
|
|
6323
|
-
exports.cloneArr = cloneArr;
|
|
6309
|
+
exports$1.cloneArr = cloneArr;
|
|
6324
6310
|
function cloneObj(t) {
|
|
6325
6311
|
var e = {};
|
|
6326
6312
|
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
6327
6313
|
return e;
|
|
6328
6314
|
}
|
|
6329
|
-
exports.cloneObj = cloneObj;
|
|
6315
|
+
exports$1.cloneObj = cloneObj;
|
|
6330
6316
|
function find(t, e) {
|
|
6331
6317
|
for (var r = 0; r < t.length; r++) {
|
|
6332
6318
|
var n = t[r];
|
|
6333
6319
|
if (e.call(null, n)) return n;
|
|
6334
6320
|
}
|
|
6335
6321
|
}
|
|
6336
|
-
exports.find = find;
|
|
6322
|
+
exports$1.find = find;
|
|
6337
6323
|
function findAll(t, e) {
|
|
6338
6324
|
for (var r = [], n = 0; n < t.length; n++) {
|
|
6339
6325
|
var i = t[n];
|
|
@@ -6341,18 +6327,18 @@ var k = R((exports, module) => {
|
|
|
6341
6327
|
}
|
|
6342
6328
|
return r;
|
|
6343
6329
|
}
|
|
6344
|
-
exports.findAll = findAll;
|
|
6330
|
+
exports$1.findAll = findAll;
|
|
6345
6331
|
function reduce(t, e, r) {
|
|
6346
6332
|
for (var n = Array.isArray(t), i = n ? t : values(t), a = n ? [] : keys(t), o = r, s = 0; s < i.length; s++) o = e.call(null, o, i[s], n ? s : a[s]);
|
|
6347
6333
|
return o;
|
|
6348
6334
|
}
|
|
6349
|
-
exports.reduce = reduce;
|
|
6335
|
+
exports$1.reduce = reduce;
|
|
6350
6336
|
function compact(t) {
|
|
6351
6337
|
return reject(t, function(e) {
|
|
6352
6338
|
return e == null;
|
|
6353
6339
|
});
|
|
6354
6340
|
}
|
|
6355
|
-
exports.compact = compact;
|
|
6341
|
+
exports$1.compact = compact;
|
|
6356
6342
|
function uniq(t, e) {
|
|
6357
6343
|
e === void 0 && (e = function(n) {
|
|
6358
6344
|
return n;
|
|
@@ -6363,59 +6349,59 @@ var k = R((exports, module) => {
|
|
|
6363
6349
|
return contains(r, a) ? n : (r.push(a), n.concat(i));
|
|
6364
6350
|
}, []);
|
|
6365
6351
|
}
|
|
6366
|
-
exports.uniq = uniq;
|
|
6352
|
+
exports$1.uniq = uniq;
|
|
6367
6353
|
function partial(t) {
|
|
6368
6354
|
for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
|
|
6369
6355
|
var n = [null], i = n.concat(e);
|
|
6370
6356
|
return Function.bind.apply(t, i);
|
|
6371
6357
|
}
|
|
6372
|
-
exports.partial = partial;
|
|
6358
|
+
exports$1.partial = partial;
|
|
6373
6359
|
function isArray(t) {
|
|
6374
6360
|
return Array.isArray(t);
|
|
6375
6361
|
}
|
|
6376
|
-
exports.isArray = isArray;
|
|
6362
|
+
exports$1.isArray = isArray;
|
|
6377
6363
|
function isRegExp(t) {
|
|
6378
6364
|
return t instanceof RegExp;
|
|
6379
6365
|
}
|
|
6380
|
-
exports.isRegExp = isRegExp;
|
|
6366
|
+
exports$1.isRegExp = isRegExp;
|
|
6381
6367
|
function isObject(t) {
|
|
6382
6368
|
return t instanceof Object;
|
|
6383
6369
|
}
|
|
6384
|
-
exports.isObject = isObject;
|
|
6370
|
+
exports$1.isObject = isObject;
|
|
6385
6371
|
function every(t, e) {
|
|
6386
6372
|
for (var r = 0; r < t.length; r++) if (!e(t[r], r)) return false;
|
|
6387
6373
|
return true;
|
|
6388
6374
|
}
|
|
6389
|
-
exports.every = every;
|
|
6375
|
+
exports$1.every = every;
|
|
6390
6376
|
function difference(t, e) {
|
|
6391
6377
|
return reject(t, function(r) {
|
|
6392
6378
|
return contains(e, r);
|
|
6393
6379
|
});
|
|
6394
6380
|
}
|
|
6395
|
-
exports.difference = difference;
|
|
6381
|
+
exports$1.difference = difference;
|
|
6396
6382
|
function some(t, e) {
|
|
6397
6383
|
for (var r = 0; r < t.length; r++) if (e(t[r])) return true;
|
|
6398
6384
|
return false;
|
|
6399
6385
|
}
|
|
6400
|
-
exports.some = some;
|
|
6386
|
+
exports$1.some = some;
|
|
6401
6387
|
function indexOf(t, e) {
|
|
6402
6388
|
for (var r = 0; r < t.length; r++) if (t[r] === e) return r;
|
|
6403
6389
|
return -1;
|
|
6404
6390
|
}
|
|
6405
|
-
exports.indexOf = indexOf;
|
|
6391
|
+
exports$1.indexOf = indexOf;
|
|
6406
6392
|
function sortBy(t, e) {
|
|
6407
6393
|
var r = cloneArr(t);
|
|
6408
6394
|
return r.sort(function(n, i) {
|
|
6409
6395
|
return e(n) - e(i);
|
|
6410
6396
|
}), r;
|
|
6411
6397
|
}
|
|
6412
|
-
exports.sortBy = sortBy;
|
|
6398
|
+
exports$1.sortBy = sortBy;
|
|
6413
6399
|
function zipObject(t, e) {
|
|
6414
6400
|
if (t.length !== e.length) throw Error("can't zipObject with different number of keys and values!");
|
|
6415
6401
|
for (var r = {}, n = 0; n < t.length; n++) r[t[n]] = e[n];
|
|
6416
6402
|
return r;
|
|
6417
6403
|
}
|
|
6418
|
-
exports.zipObject = zipObject;
|
|
6404
|
+
exports$1.zipObject = zipObject;
|
|
6419
6405
|
function assign(t) {
|
|
6420
6406
|
for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
|
|
6421
6407
|
for (var n = 0; n < e.length; n++) for (var i = e[n], a = keys(i), o = 0; o < a.length; o++) {
|
|
@@ -6424,7 +6410,7 @@ var k = R((exports, module) => {
|
|
|
6424
6410
|
}
|
|
6425
6411
|
return t;
|
|
6426
6412
|
}
|
|
6427
|
-
exports.assign = assign;
|
|
6413
|
+
exports$1.assign = assign;
|
|
6428
6414
|
function assignNoOverwrite(t) {
|
|
6429
6415
|
for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
|
|
6430
6416
|
for (var n = 0; n < e.length; n++) for (var i = e[n], a = keys(i), o = 0; o < a.length; o++) {
|
|
@@ -6433,12 +6419,12 @@ var k = R((exports, module) => {
|
|
|
6433
6419
|
}
|
|
6434
6420
|
return t;
|
|
6435
6421
|
}
|
|
6436
|
-
exports.assignNoOverwrite = assignNoOverwrite;
|
|
6422
|
+
exports$1.assignNoOverwrite = assignNoOverwrite;
|
|
6437
6423
|
function defaults() {
|
|
6438
6424
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
6439
6425
|
return assignNoOverwrite.apply(void 0, __spreadArray([{}], t));
|
|
6440
6426
|
}
|
|
6441
|
-
exports.defaults = defaults;
|
|
6427
|
+
exports$1.defaults = defaults;
|
|
6442
6428
|
function groupBy(t, e) {
|
|
6443
6429
|
var r = {};
|
|
6444
6430
|
return forEach(t, function(n) {
|
|
@@ -6446,7 +6432,7 @@ var k = R((exports, module) => {
|
|
|
6446
6432
|
a ? a.push(n) : r[i] = [n];
|
|
6447
6433
|
}), r;
|
|
6448
6434
|
}
|
|
6449
|
-
exports.groupBy = groupBy;
|
|
6435
|
+
exports$1.groupBy = groupBy;
|
|
6450
6436
|
function merge(t, e) {
|
|
6451
6437
|
for (var r = cloneObj(t), n = keys(e), i = 0; i < n.length; i++) {
|
|
6452
6438
|
var a = n[i], o = e[a];
|
|
@@ -6454,14 +6440,14 @@ var k = R((exports, module) => {
|
|
|
6454
6440
|
}
|
|
6455
6441
|
return r;
|
|
6456
6442
|
}
|
|
6457
|
-
exports.merge = merge;
|
|
6443
|
+
exports$1.merge = merge;
|
|
6458
6444
|
function NOOP() {
|
|
6459
6445
|
}
|
|
6460
|
-
exports.NOOP = NOOP;
|
|
6446
|
+
exports$1.NOOP = NOOP;
|
|
6461
6447
|
function IDENTITY(t) {
|
|
6462
6448
|
return t;
|
|
6463
6449
|
}
|
|
6464
|
-
exports.IDENTITY = IDENTITY;
|
|
6450
|
+
exports$1.IDENTITY = IDENTITY;
|
|
6465
6451
|
function packArray(t) {
|
|
6466
6452
|
for (var e = [], r = 0; r < t.length; r++) {
|
|
6467
6453
|
var n = t[r];
|
|
@@ -6469,28 +6455,28 @@ var k = R((exports, module) => {
|
|
|
6469
6455
|
}
|
|
6470
6456
|
return e;
|
|
6471
6457
|
}
|
|
6472
|
-
exports.packArray = packArray;
|
|
6458
|
+
exports$1.packArray = packArray;
|
|
6473
6459
|
function PRINT_ERROR(t) {
|
|
6474
6460
|
console && console.error && console.error("Error: " + t);
|
|
6475
6461
|
}
|
|
6476
|
-
exports.PRINT_ERROR = PRINT_ERROR;
|
|
6462
|
+
exports$1.PRINT_ERROR = PRINT_ERROR;
|
|
6477
6463
|
function PRINT_WARNING(t) {
|
|
6478
6464
|
console && console.warn && console.warn("Warning: " + t);
|
|
6479
6465
|
}
|
|
6480
|
-
exports.PRINT_WARNING = PRINT_WARNING;
|
|
6466
|
+
exports$1.PRINT_WARNING = PRINT_WARNING;
|
|
6481
6467
|
function isES2015MapSupported() {
|
|
6482
6468
|
return typeof Map == "function";
|
|
6483
6469
|
}
|
|
6484
|
-
exports.isES2015MapSupported = isES2015MapSupported;
|
|
6470
|
+
exports$1.isES2015MapSupported = isES2015MapSupported;
|
|
6485
6471
|
function peek(t) {
|
|
6486
6472
|
return t[t.length - 1];
|
|
6487
6473
|
}
|
|
6488
|
-
exports.peek = peek;
|
|
6474
|
+
exports$1.peek = peek;
|
|
6489
6475
|
function timer(t) {
|
|
6490
6476
|
var e = (/* @__PURE__ */ new Date()).getTime(), r = t(), n = (/* @__PURE__ */ new Date()).getTime(), i = n - e;
|
|
6491
6477
|
return { time: i, value: r };
|
|
6492
6478
|
}
|
|
6493
|
-
exports.timer = timer;
|
|
6479
|
+
exports$1.timer = timer;
|
|
6494
6480
|
function toFastProperties(toBecomeFast) {
|
|
6495
6481
|
function FakeConstructor() {
|
|
6496
6482
|
}
|
|
@@ -6501,7 +6487,7 @@ var k = R((exports, module) => {
|
|
|
6501
6487
|
}
|
|
6502
6488
|
return fakeAccess(), fakeAccess(), toBecomeFast;
|
|
6503
6489
|
}
|
|
6504
|
-
exports.toFastProperties = toFastProperties;
|
|
6490
|
+
exports$1.toFastProperties = toFastProperties;
|
|
6505
6491
|
});
|
|
6506
6492
|
var xt = R((sn, St) => {
|
|
6507
6493
|
(function(t, e) {
|
|
@@ -11329,7 +11315,7 @@ class VRMLLoader extends Loader {
|
|
|
11329
11315
|
case "parameter":
|
|
11330
11316
|
break;
|
|
11331
11317
|
case "rotation":
|
|
11332
|
-
const axis = new Vector3(fieldValues[0], fieldValues[1], fieldValues[2]);
|
|
11318
|
+
const axis = new Vector3(fieldValues[0], fieldValues[1], fieldValues[2]).normalize();
|
|
11333
11319
|
const angle = fieldValues[3];
|
|
11334
11320
|
object.quaternion.setFromAxisAngle(axis, angle);
|
|
11335
11321
|
break;
|
|
@@ -14065,13 +14051,13 @@ class LDrawLoader extends Loader {
|
|
|
14065
14051
|
}).catch(onError);
|
|
14066
14052
|
}, onProgress, onError);
|
|
14067
14053
|
}
|
|
14068
|
-
parse(text, onLoad) {
|
|
14054
|
+
parse(text, onLoad, onError) {
|
|
14069
14055
|
this.partsCache.parseModel(text, this.materialLibrary).then((group) => {
|
|
14070
14056
|
this.applyMaterialsToMesh(group, MAIN_COLOUR_CODE, this.materialLibrary, true);
|
|
14071
14057
|
this.computeBuildingSteps(group);
|
|
14072
14058
|
group.userData.fileName = "";
|
|
14073
14059
|
onLoad(group);
|
|
14074
|
-
});
|
|
14060
|
+
}).catch(onError);
|
|
14075
14061
|
}
|
|
14076
14062
|
setMaterials(materials) {
|
|
14077
14063
|
this.materialLibrary = {};
|
|
@@ -14659,14 +14645,24 @@ class VTKLoader extends Loader {
|
|
|
14659
14645
|
const nodeName = item.nodeName;
|
|
14660
14646
|
if (typeof obj[nodeName] === "undefined") {
|
|
14661
14647
|
const tmp = xmlToJson(item);
|
|
14662
|
-
if (tmp !== "")
|
|
14648
|
+
if (tmp !== "") {
|
|
14649
|
+
if (Array.isArray(tmp["#text"])) {
|
|
14650
|
+
tmp["#text"] = tmp["#text"][0];
|
|
14651
|
+
}
|
|
14652
|
+
obj[nodeName] = tmp;
|
|
14653
|
+
}
|
|
14663
14654
|
} else {
|
|
14664
14655
|
if (typeof obj[nodeName].push === "undefined") {
|
|
14665
14656
|
const old = obj[nodeName];
|
|
14666
14657
|
obj[nodeName] = [old];
|
|
14667
14658
|
}
|
|
14668
14659
|
const tmp = xmlToJson(item);
|
|
14669
|
-
if (tmp !== "")
|
|
14660
|
+
if (tmp !== "") {
|
|
14661
|
+
if (Array.isArray(tmp["#text"])) {
|
|
14662
|
+
tmp["#text"] = tmp["#text"][0];
|
|
14663
|
+
}
|
|
14664
|
+
obj[nodeName].push(tmp);
|
|
14665
|
+
}
|
|
14670
14666
|
}
|
|
14671
14667
|
}
|
|
14672
14668
|
}
|
|
@@ -14797,6 +14793,36 @@ class VTKLoader extends Loader {
|
|
|
14797
14793
|
let points = [];
|
|
14798
14794
|
let normals = [];
|
|
14799
14795
|
let indices = [];
|
|
14796
|
+
if (json.AppendedData) {
|
|
14797
|
+
const appendedData = json.AppendedData["#text"].slice(1);
|
|
14798
|
+
const piece = json.PolyData.Piece;
|
|
14799
|
+
const sections = ["PointData", "CellData", "Points", "Verts", "Lines", "Strips", "Polys"];
|
|
14800
|
+
let sectionIndex = 0;
|
|
14801
|
+
const offsets = sections.map((s) => {
|
|
14802
|
+
const sect = piece[s];
|
|
14803
|
+
if (sect && sect.DataArray) {
|
|
14804
|
+
const arr = Array.isArray(sect.DataArray) ? sect.DataArray : [sect.DataArray];
|
|
14805
|
+
return arr.map((a) => a.attributes.offset);
|
|
14806
|
+
}
|
|
14807
|
+
return [];
|
|
14808
|
+
}).flat();
|
|
14809
|
+
for (const sect of sections) {
|
|
14810
|
+
const section = piece[sect];
|
|
14811
|
+
if (section && section.DataArray) {
|
|
14812
|
+
if (Array.isArray(section.DataArray)) {
|
|
14813
|
+
for (const sectionEle of section.DataArray) {
|
|
14814
|
+
sectionEle["#text"] = appendedData.slice(offsets[sectionIndex], offsets[sectionIndex + 1]);
|
|
14815
|
+
sectionEle.attributes.format = "binary";
|
|
14816
|
+
sectionIndex++;
|
|
14817
|
+
}
|
|
14818
|
+
} else {
|
|
14819
|
+
section.DataArray["#text"] = appendedData.slice(offsets[sectionIndex], offsets[sectionIndex + 1]);
|
|
14820
|
+
section.DataArray.attributes.format = "binary";
|
|
14821
|
+
sectionIndex++;
|
|
14822
|
+
}
|
|
14823
|
+
}
|
|
14824
|
+
}
|
|
14825
|
+
}
|
|
14800
14826
|
if (json.PolyData) {
|
|
14801
14827
|
const piece = json.PolyData.Piece;
|
|
14802
14828
|
const compressed = json.attributes.hasOwnProperty("compressor");
|