file-viewer3 1.0.26 → 2.0.1
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/README.en.md +7 -377
- package/README.md +8 -352
- package/dist/file-viewer3.css +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +27 -129
- package/dist/components/3MFLoader.js +0 -527
- package/dist/components/AMFLoader.js +0 -188
- package/dist/components/ArchiveViewer.js +0 -526
- package/dist/components/AudioViewer.js +0 -66
- package/dist/components/CadViewer.js +0 -9040
- package/dist/components/CodeViewer.js +0 -151
- package/dist/components/ColladaLoader.js +0 -2282
- package/dist/components/DrawingViewer.js +0 -295
- package/dist/components/EdaViewer.js +0 -630
- package/dist/components/EmailViewer.js +0 -276
- package/dist/components/EpubViewer.js +0 -172
- package/dist/components/FBXLoader.js +0 -1574
- package/dist/components/GLTFLoader.js +0 -1383
- package/dist/components/ImageViewer.js +0 -1519
- package/dist/components/KMZLoader.js +0 -45
- package/dist/components/MarkdownViewer.js +0 -1476
- package/dist/components/ModelViewer.js +0 -797
- package/dist/components/OBJLoader.js +0 -287
- package/dist/components/OfdViewer.js +0 -133
- package/dist/components/PCDLoader.js +0 -141
- package/dist/components/PLYLoader.js +0 -305
- package/dist/components/PdfView.js +0 -27667
- package/dist/components/PptxRender.js +0 -11217
- package/dist/components/STLLoader.js +0 -83
- package/dist/components/TDSLoader.js +0 -228
- package/dist/components/TypstViewer.js +0 -1697
- package/dist/components/USDLoader.js +0 -2526
- package/dist/components/UmdViewer.js +0 -1873
- package/dist/components/VRMLLoader.js +0 -6422
- package/dist/components/VTKLoader.js +0 -337
- package/dist/components/XYZLoader.js +0 -30
- package/dist/components/XlsxTable.js +0 -7879
- package/dist/components/__vite-browser-external.js +0 -7
- package/dist/components/_plugin-vue_export-helper.js +0 -8
- package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
- package/dist/components/arc.js +0 -79
- package/dist/components/architecture-7EHR7CIX.js +0 -3
- package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
- package/dist/components/archive.js +0 -24
- package/dist/components/asyncToGenerator.js +0 -29
- package/dist/components/audio.js +0 -19
- package/dist/components/az-AZ-76LH7QW2.js +0 -523
- package/dist/components/bash.js +0 -169
- package/dist/components/bg-BG-XCXSNQG7.js +0 -523
- package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
- package/dist/components/bn-BD-2XOGV67Q.js +0 -523
- package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
- package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
- package/dist/components/cad.js +0 -23
- package/dist/components/cfb.js +0 -1174
- package/dist/components/channel.js +0 -5
- package/dist/components/chunk-2J33WTMH.js +0 -26
- package/dist/components/chunk-3OPIFGDE.js +0 -4167
- package/dist/components/chunk-4BX2VUAB.js +0 -19
- package/dist/components/chunk-55IACEB6.js +0 -9
- package/dist/components/chunk-5ZQYHXKU.js +0 -669
- package/dist/components/chunk-6U3AYISY.js +0 -624
- package/dist/components/chunk-727SXJPM.js +0 -3356
- package/dist/components/chunk-AGHRB4JF.js +0 -324
- package/dist/components/chunk-AQP2D5EJ.js +0 -2055
- package/dist/components/chunk-BSJP7CBP.js +0 -83
- package/dist/components/chunk-CSCIHK7Q.js +0 -3500
- package/dist/components/chunk-EIO257PC.js +0 -1836
- package/dist/components/chunk-FMBD7UC4.js +0 -5
- package/dist/components/chunk-K2UTITRG.js +0 -17627
- package/dist/components/chunk-KSCS5N6A.js +0 -572
- package/dist/components/chunk-L5ZTLDWV.js +0 -40
- package/dist/components/chunk-LZXEDZCA.js +0 -60
- package/dist/components/chunk-ND2GUHAM.js +0 -61
- package/dist/components/chunk-NNHCCRGN.js +0 -20425
- package/dist/components/chunk-NZK2D7GU.js +0 -68
- package/dist/components/chunk-O5CBEL6O.js +0 -1894
- package/dist/components/chunk-QZHKN3VN.js +0 -12
- package/dist/components/chunk-SRAX5OIU.js +0 -22
- package/dist/components/chunk-WU5MYG2G.js +0 -14
- package/dist/components/chunk-XPW4576I.js +0 -1146
- package/dist/components/chunk-Z3N5DIM6.js +0 -59
- package/dist/components/chunk-ZUYEQ4TG.js +0 -22
- package/dist/components/chunk.js +0 -23
- package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
- package/dist/components/compiler.js +0 -2
- package/dist/components/core.js +0 -845
- package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
- package/dist/components/cpp.js +0 -225
- package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
- package/dist/components/csharp.js +0 -260
- package/dist/components/css.js +0 -140
- package/dist/components/cytoscape.esm.js +0 -18114
- package/dist/components/da-DK-5WZEPLOC.js +0 -523
- package/dist/components/dagre-BM42HDAG.js +0 -325
- package/dist/components/dagre.js +0 -1936
- package/dist/components/de-DE-XR44H4JA.js +0 -523
- package/dist/components/defaultLocale.js +0 -201
- package/dist/components/defineProperty.js +0 -50
- package/dist/components/diagram-2AECGRRQ.js +0 -229
- package/dist/components/diagram-5GNKFQAL.js +0 -108
- package/dist/components/diagram-KO2AKTUF.js +0 -443
- package/dist/components/diagram-LMA3HP47.js +0 -139
- package/dist/components/diagram-OG6HWLK6.js +0 -541
- package/dist/components/diff.js +0 -39
- package/dist/components/directory-open-01563666.js +0 -26
- package/dist/components/directory-open-4ed118d0.js +0 -83
- package/dist/components/dist.js +0 -50
- package/dist/components/dist2.js +0 -3291
- package/dist/components/dist3.js +0 -1593
- package/dist/components/documentSearch.js +0 -378
- package/dist/components/docx-preview.js +0 -3113
- package/dist/components/drawing.js +0 -19
- package/dist/components/ebook.js +0 -16
- package/dist/components/eda.js +0 -20
- package/dist/components/el-GR-BZB4AONW.js +0 -523
- package/dist/components/email.js +0 -21
- package/dist/components/en-B4ZKOASM.js +0 -3
- package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
- package/dist/components/es-ES-U4NZUMDT.js +0 -523
- package/dist/components/eu-ES-A7QVB2H4.js +0 -523
- package/dist/components/eventmodeling-FCH6USID.js +0 -3
- package/dist/components/fa-IR-HGAKTJCU.js +0 -523
- package/dist/components/fflate.module.js +0 -323
- package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
- package/dist/components/file-open-002ab408.js +0 -38
- package/dist/components/file-open-7c801643.js +0 -24
- package/dist/components/file-save-3189631c.js +0 -40
- package/dist/components/file-save-745eba88.js +0 -36
- package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
- package/dist/components/fr-FR-RHASNOE6.js +0 -523
- package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
- package/dist/components/gitGraph-WXDBUCRP.js +0 -3
- package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
- package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
- package/dist/components/global-compiler.js +0 -23
- package/dist/components/global-renderer.js +0 -23
- package/dist/components/go.js +0 -140
- package/dist/components/graphlib.js +0 -1267
- package/dist/components/he-IL-6SHJWFNN.js +0 -523
- package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
- package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
- package/dist/components/id-ID-SAP4L64H.js +0 -523
- package/dist/components/image-GAAHSSAO.js +0 -3
- package/dist/components/image-blob-reduce.esm.js +0 -1429
- package/dist/components/image.js +0 -17
- package/dist/components/info-J43DQDTF.js +0 -3
- package/dist/components/infoDiagram-5YYISTIA.js +0 -26
- package/dist/components/ini.js +0 -88
- package/dist/components/init.js +0 -15
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
- package/dist/components/it-IT-JPQ66NNP.js +0 -523
- package/dist/components/ja-JP-DBVTYXUO.js +0 -523
- package/dist/components/java.js +0 -169
- package/dist/components/javascript.js +0 -436
- package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
- package/dist/components/json.js +0 -36
- package/dist/components/jszip.min.js +0 -3033
- package/dist/components/kaa-6HZHGXH3.js +0 -523
- package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
- package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
- package/dist/components/katex.js +0 -21979
- package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
- package/dist/components/km-KH-HSX4SM5Z.js +0 -523
- package/dist/components/ko-KR-MTYHY66A.js +0 -523
- package/dist/components/ku-TR-6OUDTVRD.js +0 -523
- package/dist/components/lib.js +0 -4877
- package/dist/components/libarchive.js +0 -360
- package/dist/components/linear.js +0 -289
- package/dist/components/lt-LT-XHIRWOB4.js +0 -523
- package/dist/components/lv-LV-5QDEKY6T.js +0 -523
- package/dist/components/markdown.js +0 -181
- package/dist/components/md.js +0 -17
- package/dist/components/mermaid-parser.core.js +0 -328
- package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
- package/dist/components/model.js +0 -21
- package/dist/components/mp4.js +0 -12
- package/dist/components/mr-IN-CRQNXWMA.js +0 -523
- package/dist/components/my-MM-5M5IBNSE.js +0 -523
- package/dist/components/nb-NO-T6EIAALU.js +0 -523
- package/dist/components/nestedRender.js +0 -158
- package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
- package/dist/components/nn-NO-6E72VCQL.js +0 -523
- package/dist/components/objectSpread2.js +0 -29
- package/dist/components/objectWithoutProperties.js +0 -28
- package/dist/components/oc-FR-POXYY2M6.js +0 -523
- package/dist/components/ofd.js +0 -5261
- package/dist/components/ofd2.js +0 -16
- package/dist/components/ordinal.js +0 -65
- package/dist/components/pa-IN-N4M65BXN.js +0 -523
- package/dist/components/packet-YPE3B663.js +0 -3
- package/dist/components/pdf.js +0 -24
- package/dist/components/percentages-BXMCSKIN.js +0 -3
- package/dist/components/php.js +0 -294
- package/dist/components/pica.js +0 -1009
- package/dist/components/pie-LRSECV5Y.js +0 -3
- package/dist/components/pie.js +0 -47
- package/dist/components/pieDiagram-4H26LBE5.js +0 -130
- package/dist/components/pl-PL-T2D74RX3.js +0 -523
- package/dist/components/postal-mime.js +0 -3146
- package/dist/components/pptx.js +0 -15
- package/dist/components/printLayout.js +0 -42
- package/dist/components/prod.js +0 -21770
- package/dist/components/pt-BR-5N22H2LF.js +0 -523
- package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
- package/dist/components/python.js +0 -238
- package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
- package/dist/components/radar-GUYGQ44K.js +0 -3
- package/dist/components/renderer.js +0 -2
- package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
- package/dist/components/ro-RO-JPDTUUEW.js +0 -523
- package/dist/components/rough.esm.js +0 -1355
- package/dist/components/roundRect.js +0 -90
- package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
- package/dist/components/rust.js +0 -169
- package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
- package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
- package/dist/components/shared.js +0 -175
- package/dist/components/shared2.js +0 -4
- package/dist/components/si-LK-N5RQ5JYF.js +0 -523
- package/dist/components/sk-SK-C5VTKIMK.js +0 -523
- package/dist/components/sl-SI-NN7IZMDC.js +0 -523
- package/dist/components/sourceLoading.js +0 -134
- package/dist/components/sql.js +0 -118
- package/dist/components/src.js +0 -2664
- package/dist/components/src2.js +0 -10722
- package/dist/components/stateDiagram-AJRCARHV.js +0 -217
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
- package/dist/components/subset-shared.chunk.js +0 -3
- package/dist/components/subset-worker.chunk.js +0 -21
- package/dist/components/sv-SE-XGPEYMSR.js +0 -523
- package/dist/components/ta-IN-2NMHFXQM.js +0 -523
- package/dist/components/text.js +0 -20
- package/dist/components/th-TH-HPSO5L25.js +0 -523
- package/dist/components/three.module.js +0 -13134
- package/dist/components/time.js +0 -910
- package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
- package/dist/components/tr-TR-DEFEU3FU.js +0 -523
- package/dist/components/treeView-BLDUP644.js +0 -3
- package/dist/components/treemap-LRROVOQU.js +0 -3
- package/dist/components/typescript.js +0 -521
- package/dist/components/typst.js +0 -25
- package/dist/components/uk-UA-QMV73CPH.js +0 -523
- package/dist/components/umd.js +0 -16
- package/dist/components/use.js +0 -422
- package/dist/components/util.js +0 -49
- package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
- package/dist/components/vi-VN-M7AON7JQ.js +0 -523
- package/dist/components/viewerZoom.js +0 -92
- package/dist/components/wardley-L42UT6IY.js +0 -3
- package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
- package/dist/components/wasm-pack-shim.js +0 -1711
- package/dist/components/wasm-pack-shim2.js +0 -934
- package/dist/components/wasm.js +0 -97
- package/dist/components/word.js +0 -3055
- package/dist/components/worker-ref.js +0 -16
- package/dist/components/xlsx.js +0 -21
- package/dist/components/xml.js +0 -166
- package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
- package/dist/components/yaml.js +0 -144
- package/dist/components/zh-CN-LNUGB5OW.js +0 -523
- package/dist/components/zh-HK-E62DVLB3.js +0 -523
- package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
- package/dist/index.mjs +0 -3293
- package/dist/src/App.vue.d.ts +0 -3
- package/dist/src/compare/CompareApp.vue.d.ts +0 -3
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
- package/dist/src/components/HelloWorld.vue.d.ts +0 -3
- package/dist/src/components/utils.d.ts +0 -4
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +0 -27
- package/dist/src/package/common/printLayout.d.ts +0 -16
- package/dist/src/package/common/sourceLoading.d.ts +0 -10
- package/dist/src/package/common/type.d.ts +0 -544
- package/dist/src/package/common/util.d.ts +0 -5
- package/dist/src/package/common/worker-ref.d.ts +0 -12
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
- package/dist/src/package/components/FileViewer/index.d.ts +0 -2
- package/dist/src/package/components/FileViewer/util.d.ts +0 -3
- package/dist/src/package/index.d.ts +0 -22
- package/dist/src/package/use/documentLocation.d.ts +0 -15
- package/dist/src/package/use/documentSearch.d.ts +0 -234
- package/dist/src/package/use/index.d.ts +0 -5
- package/dist/src/package/use/loading.d.ts +0 -33
- package/dist/src/package/use/viewerZoom.d.ts +0 -42
- package/dist/src/package/use/worker.d.ts +0 -24
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/archive/cache.d.ts +0 -10
- package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
- package/dist/src/package/vendors/archive/index.d.ts +0 -3
- package/dist/src/package/vendors/archive/shared.d.ts +0 -24
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/audio/index.d.ts +0 -7
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/cad/index.d.ts +0 -8
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/drawing/index.d.ts +0 -7
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ebook/index.d.ts +0 -7
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/eda/index.d.ts +0 -2
- package/dist/src/package/vendors/eda/parser.d.ts +0 -77
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
- package/dist/src/package/vendors/email/index.d.ts +0 -2
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/image/index.d.ts +0 -4
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/md/index.d.ts +0 -4
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/model/index.d.ts +0 -3
- package/dist/src/package/vendors/model/shared.d.ts +0 -1
- package/dist/src/package/vendors/mp4/index.d.ts +0 -4
- package/dist/src/package/vendors/nestedRender.d.ts +0 -10
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ofd/index.d.ts +0 -7
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
- package/dist/src/package/vendors/pdf/index.d.ts +0 -2
- package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
- package/dist/src/package/vendors/pptx/index.d.ts +0 -6
- package/dist/src/package/vendors/pptx/options.d.ts +0 -39
- package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
- package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/renders.d.ts +0 -3
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/text/index.d.ts +0 -10
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/typst/index.d.ts +0 -8
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/umd/index.d.ts +0 -7
- package/dist/src/package/vendors/umd/parser.d.ts +0 -30
- package/dist/src/package/vendors/word/doc.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
- package/dist/src/package/vendors/word/index.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
- package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
- package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +0 -24
- package/dist/wasm/cad/libredwg-web.js +0 -15
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import { C as e, K as t, l as n, p as r, u as i, w as a, wt as o } from "./three.module.js";
|
|
2
|
-
import { n as s } from "./fflate.module.js";
|
|
3
|
-
//#region node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/loaders/VTKLoader.js
|
|
4
|
-
var c = class extends t {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
super(e), console.warn("THREE.VTKLoader: The loader has been deprecated and will be removed with r194. Export your VTK files to glTF before using them on the web.");
|
|
7
|
-
}
|
|
8
|
-
load(t, n, r, i) {
|
|
9
|
-
let a = this, o = new e(a.manager);
|
|
10
|
-
o.setPath(a.path), o.setResponseType("arraybuffer"), o.setRequestHeader(a.requestHeader), o.setWithCredentials(a.withCredentials), o.load(t, function(e) {
|
|
11
|
-
try {
|
|
12
|
-
n(a.parse(e));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
i ? i(e) : console.error(e), a.manager.itemError(t);
|
|
15
|
-
}
|
|
16
|
-
}, r, i);
|
|
17
|
-
}
|
|
18
|
-
parse(e) {
|
|
19
|
-
function t(e) {
|
|
20
|
-
let t = [], n = [], s = [], c = [], l, u = /^[^\d.\s-]+/;
|
|
21
|
-
function d(e) {
|
|
22
|
-
let t = [], n = e.split(/\s+/);
|
|
23
|
-
for (let e = 0; e < n.length; e++) n[e] !== "" && t.push(parseFloat(n[e]));
|
|
24
|
-
return t;
|
|
25
|
-
}
|
|
26
|
-
let f = /^(\d+)\s+([\s\d]*)/, p = /^POINTS /, m = /^POLYGONS /, h = /^TRIANGLE_STRIPS /, g = /^POINT_DATA[ ]+(\d+)/, _ = /^CELL_DATA[ ]+(\d+)/, v = /^COLOR_SCALARS[ ]+(\w+)[ ]+3/, y = /^NORMALS[ ]+(\w+)[ ]+(\w+)/, b = !1, x = !1, S = !1, C = !1, w = !1, T = !1, E = !1, D = new r(), O = e.split("\n");
|
|
27
|
-
for (let e in O) {
|
|
28
|
-
let r = O[e].trim();
|
|
29
|
-
if (r.indexOf("DATASET") === 0) {
|
|
30
|
-
let e = r.split(" ")[1];
|
|
31
|
-
if (e !== "POLYDATA") throw Error("Unsupported DATASET type: " + e);
|
|
32
|
-
} else if (b) {
|
|
33
|
-
if (u.exec(r) === null) {
|
|
34
|
-
let e = d(r);
|
|
35
|
-
for (let t = 0; t + 2 < e.length; t += 3) n.push(e[t], e[t + 1], e[t + 2]);
|
|
36
|
-
}
|
|
37
|
-
} else if (x) {
|
|
38
|
-
if ((l = f.exec(r)) !== null) {
|
|
39
|
-
let e = parseInt(l[1]), n = l[2].split(/\s+/);
|
|
40
|
-
if (e >= 3) {
|
|
41
|
-
let r = parseInt(n[0]), i = 1;
|
|
42
|
-
for (let a = 0; a < e - 2; ++a) {
|
|
43
|
-
let e = parseInt(n[i]), a = parseInt(n[i + 1]);
|
|
44
|
-
t.push(r, e, a), i++;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
} else if (S) {
|
|
49
|
-
if ((l = f.exec(r)) !== null) {
|
|
50
|
-
let e = parseInt(l[1]), n = l[2].split(/\s+/);
|
|
51
|
-
if (e >= 3) for (let r = 0; r < e - 2; r++) if (r % 2 == 1) {
|
|
52
|
-
let e = parseInt(n[r]), i = parseInt(n[r + 2]), a = parseInt(n[r + 1]);
|
|
53
|
-
t.push(e, i, a);
|
|
54
|
-
} else {
|
|
55
|
-
let e = parseInt(n[r]), i = parseInt(n[r + 1]), a = parseInt(n[r + 2]);
|
|
56
|
-
t.push(e, i, a);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
} else if (C || w) {
|
|
60
|
-
if (T) {
|
|
61
|
-
if (u.exec(r) === null) {
|
|
62
|
-
let e = d(r);
|
|
63
|
-
for (let t = 0; t + 2 < e.length; t += 3) D.setRGB(e[t], e[t + 1], e[t + 2], o), s.push(D.r, D.g, D.b);
|
|
64
|
-
}
|
|
65
|
-
} else if (E && u.exec(r) === null) {
|
|
66
|
-
let e = d(r);
|
|
67
|
-
for (let t = 0; t + 2 < e.length; t += 3) c.push(e[t], e[t + 1], e[t + 2]);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
m.exec(r) === null ? p.exec(r) === null ? h.exec(r) === null ? g.exec(r) === null ? _.exec(r) === null ? v.exec(r) === null ? y.exec(r) !== null && (E = !0, T = !1, b = !1, x = !1, S = !1) : (T = !0, E = !1, b = !1, x = !1, S = !1) : (w = !0, b = !1, x = !1, S = !1) : (C = !0, b = !1, x = !1, S = !1) : (x = !1, b = !1, S = !0) : (x = !1, b = !0, S = !1) : (x = !0, b = !1, S = !1);
|
|
71
|
-
}
|
|
72
|
-
let k = new i();
|
|
73
|
-
if (k.setIndex(t), k.setAttribute("position", new a(n, 3)), c.length === n.length && k.setAttribute("normal", new a(c, 3)), s.length !== t.length) s.length === n.length && k.setAttribute("color", new a(s, 3));
|
|
74
|
-
else {
|
|
75
|
-
k = k.toNonIndexed();
|
|
76
|
-
let e = k.attributes.position.count / 3;
|
|
77
|
-
if (s.length === e * 3) {
|
|
78
|
-
let t = [];
|
|
79
|
-
for (let n = 0; n < e; n++) {
|
|
80
|
-
let e = s[3 * n + 0], r = s[3 * n + 1], i = s[3 * n + 2];
|
|
81
|
-
D.setRGB(e, r, i, o), t.push(D.r, D.g, D.b), t.push(D.r, D.g, D.b), t.push(D.r, D.g, D.b);
|
|
82
|
-
}
|
|
83
|
-
k.setAttribute("color", new a(t, 3));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return k;
|
|
87
|
-
}
|
|
88
|
-
function c(e) {
|
|
89
|
-
let t = new Uint8Array(e), r = new DataView(e), a = [], o = [], s = [], c = 0;
|
|
90
|
-
function l(e, t) {
|
|
91
|
-
let n = t, r = e[n], i = [];
|
|
92
|
-
for (; r !== 10 && n < e.length;) i.push(String.fromCharCode(r)), n++, r = e[n];
|
|
93
|
-
return {
|
|
94
|
-
start: t,
|
|
95
|
-
end: n,
|
|
96
|
-
next: n + 1,
|
|
97
|
-
parsedString: i.join("")
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
let u, d;
|
|
101
|
-
for (;;) {
|
|
102
|
-
if (u = l(t, c), d = u.parsedString, d.indexOf("DATASET") === 0) {
|
|
103
|
-
let e = d.split(" ")[1];
|
|
104
|
-
if (e !== "POLYDATA") throw Error("Unsupported DATASET type: " + e);
|
|
105
|
-
} else if (d.indexOf("POINTS") === 0) {
|
|
106
|
-
let e = parseInt(d.split(" ")[1], 10), t = e * 4 * 3;
|
|
107
|
-
a = new Float32Array(e * 3);
|
|
108
|
-
let n = u.next;
|
|
109
|
-
for (let t = 0; t < e; t++) a[3 * t] = r.getFloat32(n, !1), a[3 * t + 1] = r.getFloat32(n + 4, !1), a[3 * t + 2] = r.getFloat32(n + 8, !1), n += 12;
|
|
110
|
-
u.next = u.next + t + 1;
|
|
111
|
-
} else if (d.indexOf("TRIANGLE_STRIPS") === 0) {
|
|
112
|
-
let e = parseInt(d.split(" ")[1], 10), t = parseInt(d.split(" ")[2], 10), n = t * 4;
|
|
113
|
-
s = new Uint32Array(3 * t - 9 * e);
|
|
114
|
-
let i = 0, a = u.next;
|
|
115
|
-
for (let t = 0; t < e; t++) {
|
|
116
|
-
let e = r.getInt32(a, !1), t = [];
|
|
117
|
-
a += 4;
|
|
118
|
-
for (let n = 0; n < e; n++) t.push(r.getInt32(a, !1)), a += 4;
|
|
119
|
-
for (let n = 0; n < e - 2; n++) n % 2 ? (s[i++] = t[n], s[i++] = t[n + 2], s[i++] = t[n + 1]) : (s[i++] = t[n], s[i++] = t[n + 1], s[i++] = t[n + 2]);
|
|
120
|
-
}
|
|
121
|
-
u.next = u.next + n + 1;
|
|
122
|
-
} else if (d.indexOf("POLYGONS") === 0) {
|
|
123
|
-
let e = parseInt(d.split(" ")[1], 10), t = parseInt(d.split(" ")[2], 10), n = t * 4;
|
|
124
|
-
s = new Uint32Array(3 * t - 9 * e);
|
|
125
|
-
let i = 0, a = u.next;
|
|
126
|
-
for (let t = 0; t < e; t++) {
|
|
127
|
-
let e = r.getInt32(a, !1), t = [];
|
|
128
|
-
a += 4;
|
|
129
|
-
for (let n = 0; n < e; n++) t.push(r.getInt32(a, !1)), a += 4;
|
|
130
|
-
for (let n = 1; n < e - 1; n++) s[i++] = t[0], s[i++] = t[n], s[i++] = t[n + 1];
|
|
131
|
-
}
|
|
132
|
-
u.next = u.next + n + 1;
|
|
133
|
-
} else if (d.indexOf("POINT_DATA") === 0) {
|
|
134
|
-
let e = parseInt(d.split(" ")[1], 10);
|
|
135
|
-
u = l(t, u.next);
|
|
136
|
-
let n = e * 4 * 3;
|
|
137
|
-
o = new Float32Array(e * 3);
|
|
138
|
-
let i = u.next;
|
|
139
|
-
for (let t = 0; t < e; t++) o[3 * t] = r.getFloat32(i, !1), o[3 * t + 1] = r.getFloat32(i + 4, !1), o[3 * t + 2] = r.getFloat32(i + 8, !1), i += 12;
|
|
140
|
-
u.next += n;
|
|
141
|
-
}
|
|
142
|
-
if (c = u.next, c >= t.byteLength) break;
|
|
143
|
-
}
|
|
144
|
-
let f = new i();
|
|
145
|
-
return f.setIndex(new n(s, 1)), f.setAttribute("position", new n(a, 3)), o.length === a.length && f.setAttribute("normal", new n(o, 3)), f;
|
|
146
|
-
}
|
|
147
|
-
function l(e, t) {
|
|
148
|
-
let n = e.length, r = new Float32Array(n + t.length);
|
|
149
|
-
return r.set(e), r.set(t, n), r;
|
|
150
|
-
}
|
|
151
|
-
function u(e, t) {
|
|
152
|
-
let n = e.length, r = new Int32Array(n + t.length);
|
|
153
|
-
return r.set(e), r.set(t, n), r;
|
|
154
|
-
}
|
|
155
|
-
function d(e) {
|
|
156
|
-
function t(e) {
|
|
157
|
-
let n = {};
|
|
158
|
-
if (e.nodeType === 1) {
|
|
159
|
-
if (e.attributes && e.attributes.length > 0) {
|
|
160
|
-
n.attributes = {};
|
|
161
|
-
for (let t = 0; t < e.attributes.length; t++) {
|
|
162
|
-
let r = e.attributes.item(t);
|
|
163
|
-
n.attributes[r.nodeName] = r.nodeValue.trim();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
} else e.nodeType === 3 && (n = e.nodeValue.trim());
|
|
167
|
-
if (e.hasChildNodes()) for (let r = 0; r < e.childNodes.length; r++) {
|
|
168
|
-
let i = e.childNodes.item(r), a = i.nodeName;
|
|
169
|
-
if (n[a] === void 0) {
|
|
170
|
-
let e = t(i);
|
|
171
|
-
e !== "" && (Array.isArray(e["#text"]) && (e["#text"] = e["#text"][0]), n[a] = e);
|
|
172
|
-
} else {
|
|
173
|
-
if (n[a].push === void 0) {
|
|
174
|
-
let e = n[a];
|
|
175
|
-
n[a] = [e];
|
|
176
|
-
}
|
|
177
|
-
let e = t(i);
|
|
178
|
-
e !== "" && (Array.isArray(e["#text"]) && (e["#text"] = e["#text"][0]), n[a].push(e));
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return n;
|
|
182
|
-
}
|
|
183
|
-
function r(e) {
|
|
184
|
-
let t = typeof Uint8Array < "u" ? Uint8Array : Array, n = [];
|
|
185
|
-
for (let e = 0; e < 64; ++e) n["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)] = e;
|
|
186
|
-
n[45] = 62, n[95] = 63;
|
|
187
|
-
let r = e.length;
|
|
188
|
-
if (r % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
189
|
-
let i = e[r - 2] === "=" ? 2 : +(e[r - 1] === "="), a = new t(r * 3 / 4 - i), o = i > 0 ? r - 4 : r, s = 0, c, l;
|
|
190
|
-
for (c = 0, l = 0; c < o; c += 4, l += 3) {
|
|
191
|
-
let t = n[e.charCodeAt(c)] << 18 | n[e.charCodeAt(c + 1)] << 12 | n[e.charCodeAt(c + 2)] << 6 | n[e.charCodeAt(c + 3)];
|
|
192
|
-
a[s++] = (t & 16711680) >> 16, a[s++] = (t & 65280) >> 8, a[s++] = t & 255;
|
|
193
|
-
}
|
|
194
|
-
if (i === 2) {
|
|
195
|
-
let t = n[e.charCodeAt(c)] << 2 | n[e.charCodeAt(c + 1)] >> 4;
|
|
196
|
-
a[s++] = t & 255;
|
|
197
|
-
} else if (i === 1) {
|
|
198
|
-
let t = n[e.charCodeAt(c)] << 10 | n[e.charCodeAt(c + 1)] << 4 | n[e.charCodeAt(c + 2)] >> 2;
|
|
199
|
-
a[s++] = t >> 8 & 255, a[s++] = t & 255;
|
|
200
|
-
}
|
|
201
|
-
return a;
|
|
202
|
-
}
|
|
203
|
-
function a(e, t) {
|
|
204
|
-
let n = 0;
|
|
205
|
-
c.attributes.header_type === "UInt64" ? n = 8 : c.attributes.header_type === "UInt32" && (n = 4);
|
|
206
|
-
let i, a;
|
|
207
|
-
if (e.attributes.format === "binary" && t) {
|
|
208
|
-
e.attributes.type === "Float32" ? i = new Float32Array() : (e.attributes.type === "Int32" || e.attributes.type === "Int64") && (i = new Int32Array());
|
|
209
|
-
let t = e["#text"], o = r(Array.isArray(t) ? t[0] : t), c = o[0];
|
|
210
|
-
for (let e = 1; e < n - 1; e++) c |= o[e] << e * 8;
|
|
211
|
-
let d = (c + 3) * n, f = d % 3 > 0 ? 3 - d % 3 : 0;
|
|
212
|
-
d += f;
|
|
213
|
-
let p = [], m = d;
|
|
214
|
-
p.push(m);
|
|
215
|
-
let h = 3 * n;
|
|
216
|
-
for (let e = 0; e < c; e++) {
|
|
217
|
-
let t = o[e * n + h];
|
|
218
|
-
for (let r = 1; r < n - 1; r++) t |= o[e * n + h + r] << r * 8;
|
|
219
|
-
m += t, p.push(m);
|
|
220
|
-
}
|
|
221
|
-
for (let t = 0; t < p.length - 1; t++) a = s(o.slice(p[t], p[t + 1])).buffer, e.attributes.type === "Float32" ? (a = new Float32Array(a), i = l(i, a)) : (e.attributes.type === "Int32" || e.attributes.type === "Int64") && (a = new Int32Array(a), i = u(i, a));
|
|
222
|
-
delete e["#text"], e.attributes.type === "Int64" && e.attributes.format === "binary" && (i = i.filter(function(e, t) {
|
|
223
|
-
if (t % 2 != 1) return !0;
|
|
224
|
-
}));
|
|
225
|
-
} else e.attributes.format === "binary" && !t ? (a = r(e["#text"]), a = a.slice(n).buffer) : a = e["#text"] ? e["#text"].split(/\s+/).filter(function(e) {
|
|
226
|
-
if (e !== "") return e;
|
|
227
|
-
}) : new Int32Array().buffer, delete e["#text"], e.attributes.type === "Float32" ? i = new Float32Array(a) : e.attributes.type === "Int32" ? i = new Int32Array(a) : e.attributes.type === "Int64" && (i = new Int32Array(a), e.attributes.format === "binary" && (i = i.filter(function(e, t) {
|
|
228
|
-
if (t % 2 != 1) return !0;
|
|
229
|
-
})));
|
|
230
|
-
return i;
|
|
231
|
-
}
|
|
232
|
-
let o = new DOMParser().parseFromString(e, "application/xml").documentElement, c = t(o), d = [], f = [], p = [];
|
|
233
|
-
if (c.AppendedData) {
|
|
234
|
-
let e = c.AppendedData["#text"].slice(1), t = c.PolyData.Piece, n = [
|
|
235
|
-
"PointData",
|
|
236
|
-
"CellData",
|
|
237
|
-
"Points",
|
|
238
|
-
"Verts",
|
|
239
|
-
"Lines",
|
|
240
|
-
"Strips",
|
|
241
|
-
"Polys"
|
|
242
|
-
], r = 0, i = n.map((e) => {
|
|
243
|
-
let n = t[e];
|
|
244
|
-
return n && n.DataArray ? (Array.isArray(n.DataArray) ? n.DataArray : [n.DataArray]).map((e) => e.attributes.offset) : [];
|
|
245
|
-
}).flat();
|
|
246
|
-
for (let a of n) {
|
|
247
|
-
let n = t[a];
|
|
248
|
-
if (n && n.DataArray) if (Array.isArray(n.DataArray)) for (let t of n.DataArray) t["#text"] = e.slice(i[r], i[r + 1]), t.attributes.format = "binary", r++;
|
|
249
|
-
else n.DataArray["#text"] = e.slice(i[r], i[r + 1]), n.DataArray.attributes.format = "binary", r++;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (c.PolyData) {
|
|
253
|
-
let e = c.PolyData.Piece, t = c.attributes.hasOwnProperty("compressor"), r = [
|
|
254
|
-
"PointData",
|
|
255
|
-
"Points",
|
|
256
|
-
"Strips",
|
|
257
|
-
"Polys"
|
|
258
|
-
], o = 0, s = r.length;
|
|
259
|
-
for (; o < s;) {
|
|
260
|
-
let n = e[r[o]];
|
|
261
|
-
if (n && n.DataArray) {
|
|
262
|
-
let i;
|
|
263
|
-
i = Array.isArray(n.DataArray) ? n.DataArray : [n.DataArray];
|
|
264
|
-
let s = 0, c = i.length;
|
|
265
|
-
for (; s < c;) "#text" in i[s] && i[s]["#text"].length > 0 && (i[s].text = a(i[s], t)), s++;
|
|
266
|
-
switch (r[o]) {
|
|
267
|
-
case "PointData":
|
|
268
|
-
{
|
|
269
|
-
let t = parseInt(e.attributes.NumberOfPoints), r = n.attributes.Normals;
|
|
270
|
-
if (t > 0) {
|
|
271
|
-
for (let e = 0, n = i.length; e < n; e++) if (r === i[e].attributes.Name) {
|
|
272
|
-
let n = i[e].attributes.NumberOfComponents;
|
|
273
|
-
f = new Float32Array(t * n), f.set(i[e].text, 0);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
break;
|
|
278
|
-
case "Points":
|
|
279
|
-
{
|
|
280
|
-
let t = parseInt(e.attributes.NumberOfPoints);
|
|
281
|
-
if (t > 0) {
|
|
282
|
-
let e = n.DataArray.attributes.NumberOfComponents;
|
|
283
|
-
d = new Float32Array(t * e), d.set(n.DataArray.text, 0);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
break;
|
|
287
|
-
case "Strips":
|
|
288
|
-
{
|
|
289
|
-
let t = parseInt(e.attributes.NumberOfStrips);
|
|
290
|
-
if (t > 0) {
|
|
291
|
-
let e = new Int32Array(n.DataArray[0].text.length), r = new Int32Array(n.DataArray[1].text.length);
|
|
292
|
-
e.set(n.DataArray[0].text, 0), r.set(n.DataArray[1].text, 0);
|
|
293
|
-
let i = t + e.length;
|
|
294
|
-
p = new Uint32Array(3 * i - 9 * t);
|
|
295
|
-
let a = 0;
|
|
296
|
-
for (let n = 0, i = t; n < i; n++) {
|
|
297
|
-
let t = [];
|
|
298
|
-
for (let i = 0, a = r[n], o = 0; i < a - o; i++) t.push(e[i]), n > 0 && (o = r[n - 1]);
|
|
299
|
-
for (let e = 0, i = r[n], o = 0; e < i - o - 2; e++) e % 2 ? (p[a++] = t[e], p[a++] = t[e + 2], p[a++] = t[e + 1]) : (p[a++] = t[e], p[a++] = t[e + 1], p[a++] = t[e + 2]), n > 0 && (o = r[n - 1]);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
break;
|
|
304
|
-
case "Polys":
|
|
305
|
-
{
|
|
306
|
-
let t = parseInt(e.attributes.NumberOfPolys);
|
|
307
|
-
if (t > 0) {
|
|
308
|
-
let e = new Int32Array(n.DataArray[0].text.length), r = new Int32Array(n.DataArray[1].text.length);
|
|
309
|
-
e.set(n.DataArray[0].text, 0), r.set(n.DataArray[1].text, 0);
|
|
310
|
-
let i = t + e.length;
|
|
311
|
-
p = new Uint32Array(3 * i - 9 * t);
|
|
312
|
-
let a = 0, o = 0, s = 0, c = 0, l = t;
|
|
313
|
-
for (; s < l;) {
|
|
314
|
-
let t = [], n = 0, i = r[s];
|
|
315
|
-
for (; n < i - c;) t.push(e[o++]), n++;
|
|
316
|
-
let l = 1;
|
|
317
|
-
for (; l < i - c - 1;) p[a++] = t[0], p[a++] = t[l], p[a++] = t[l + 1], l++;
|
|
318
|
-
s++, c = r[s - 1];
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
break;
|
|
323
|
-
default: break;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
o++;
|
|
327
|
-
}
|
|
328
|
-
let l = new i();
|
|
329
|
-
return l.setIndex(new n(p, 1)), l.setAttribute("position", new n(d, 3)), f.length === d.length && l.setAttribute("normal", new n(f, 3)), l;
|
|
330
|
-
} else throw Error("Unsupported DATASET type");
|
|
331
|
-
}
|
|
332
|
-
let f = new TextDecoder(), p = f.decode(new Uint8Array(e, 0, 250)).split("\n");
|
|
333
|
-
return p[0].indexOf("xml") === -1 ? p[2].includes("ASCII") ? t(f.decode(e)) : c(e) : d(f.decode(e));
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
//#endregion
|
|
337
|
-
export { c as VTKLoader };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { C as e, K as t, p as n, u as r, w as i, wt as a } from "./three.module.js";
|
|
2
|
-
//#region node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/loaders/XYZLoader.js
|
|
3
|
-
var o = class extends t {
|
|
4
|
-
load(t, n, r, i) {
|
|
5
|
-
let a = this, o = new e(this.manager);
|
|
6
|
-
o.setPath(this.path), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(t, function(e) {
|
|
7
|
-
try {
|
|
8
|
-
n(a.parse(e));
|
|
9
|
-
} catch (e) {
|
|
10
|
-
i ? i(e) : console.error(e), a.manager.itemError(t);
|
|
11
|
-
}
|
|
12
|
-
}, r, i);
|
|
13
|
-
}
|
|
14
|
-
parse(e) {
|
|
15
|
-
let t = e.split("\n"), o = [], s = [], c = new n();
|
|
16
|
-
for (let e of t) {
|
|
17
|
-
if (e = e.trim(), e.charAt(0) === "#") continue;
|
|
18
|
-
let t = e.split(/\s+/);
|
|
19
|
-
if (t.length === 3 && (o.push(parseFloat(t[0])), o.push(parseFloat(t[1])), o.push(parseFloat(t[2]))), t.length === 6) {
|
|
20
|
-
o.push(parseFloat(t[0])), o.push(parseFloat(t[1])), o.push(parseFloat(t[2]));
|
|
21
|
-
let e = parseFloat(t[3]) / 255, n = parseFloat(t[4]) / 255, r = parseFloat(t[5]) / 255;
|
|
22
|
-
c.setRGB(e, n, r, a), s.push(c.r, c.g, c.b);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
let l = new r();
|
|
26
|
-
return l.setAttribute("position", new i(o, 3)), s.length > 0 && l.setAttribute("color", new i(s, 3)), l;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { o as XYZLoader };
|