pptx-react-viewer 3.17.1 → 3.18.0
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 +6 -0
- package/README.md +33 -31
- package/dist/{AiChatPanel-SINEEZBW.mjs → AiChatPanel-DDZC6IRK.mjs} +4 -4
- package/dist/AiChatPanel-DDZC6IRK.mjs.br +0 -0
- package/dist/AiChatPanel-DDZC6IRK.mjs.gz +0 -0
- package/dist/{AiChatPanel-GYH43XWW.js → AiChatPanel-T2QSCUQR.js} +25 -25
- package/dist/AiChatPanel-T2QSCUQR.js.br +0 -0
- package/dist/AiChatPanel-T2QSCUQR.js.gz +0 -0
- package/dist/{Area3DChartScene-D7GSJGPQ.js → Area3DChartScene-WEU2MP3B.js} +2 -2
- package/dist/Area3DChartScene-WEU2MP3B.js.br +0 -0
- package/dist/Area3DChartScene-WEU2MP3B.js.gz +0 -0
- package/dist/{Area3DChartScene-X5SM67PZ.mjs → Area3DChartScene-WTKQDHC7.mjs} +1 -1
- package/dist/Area3DChartScene-WTKQDHC7.mjs.br +0 -0
- package/dist/Area3DChartScene-WTKQDHC7.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-M72WQW5Y.js → Bar3DChartScene-25G6TG53.js} +2 -2
- package/dist/Bar3DChartScene-25G6TG53.js.br +0 -0
- package/dist/Bar3DChartScene-25G6TG53.js.gz +0 -0
- package/dist/{Bar3DChartScene-HWIFFGI3.mjs → Bar3DChartScene-A5ICLHXS.mjs} +1 -1
- package/dist/{Bar3DChartScene-HWIFFGI3.mjs.br → Bar3DChartScene-A5ICLHXS.mjs.br} +0 -0
- package/dist/Bar3DChartScene-A5ICLHXS.mjs.gz +0 -0
- package/dist/{GLTFLoader-374ZNTXW.mjs → GLTFLoader-IWJFC4XI.mjs} +54 -16
- package/dist/GLTFLoader-IWJFC4XI.mjs.br +0 -0
- package/dist/GLTFLoader-IWJFC4XI.mjs.gz +0 -0
- package/dist/{GLTFLoader-Q7BHCGAW.js → GLTFLoader-KY7AYPMX.js} +178 -140
- package/dist/GLTFLoader-KY7AYPMX.js.br +0 -0
- package/dist/GLTFLoader-KY7AYPMX.js.gz +0 -0
- package/dist/{Line3DChartScene-7MPZWVF3.mjs → Line3DChartScene-ARCDLHXQ.mjs} +1 -1
- package/dist/Line3DChartScene-ARCDLHXQ.mjs.br +0 -0
- package/dist/Line3DChartScene-ARCDLHXQ.mjs.gz +0 -0
- package/dist/{Line3DChartScene-YOZEEQZ3.js → Line3DChartScene-WRZ52Z2Z.js} +2 -2
- package/dist/Line3DChartScene-WRZ52Z2Z.js.br +0 -0
- package/dist/Line3DChartScene-WRZ52Z2Z.js.gz +0 -0
- package/dist/{Model3DScene-5IJSNGDZ.js → Model3DScene-JGUG5NPX.js} +2 -2
- package/dist/Model3DScene-JGUG5NPX.js.br +0 -0
- package/dist/Model3DScene-JGUG5NPX.js.gz +0 -0
- package/dist/{Model3DScene-57LVY5QW.mjs → Model3DScene-PBKBL2YU.mjs} +1 -1
- package/dist/Model3DScene-PBKBL2YU.mjs.br +0 -0
- package/dist/Model3DScene-PBKBL2YU.mjs.gz +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs +3 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.br +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.gz +0 -0
- package/dist/OrbitControls-CGYUF3BY.js +12 -0
- package/dist/OrbitControls-CGYUF3BY.js.br +0 -0
- package/dist/OrbitControls-CGYUF3BY.js.gz +0 -0
- package/dist/{PieChart3DScene-UBI6X66Q.js → PieChart3DScene-S25DNSRS.js} +2 -2
- package/dist/PieChart3DScene-S25DNSRS.js.br +0 -0
- package/dist/PieChart3DScene-S25DNSRS.js.gz +0 -0
- package/dist/{PieChart3DScene-WD5B6NP3.mjs → PieChart3DScene-ZNKXS62H.mjs} +1 -1
- package/dist/{PieChart3DScene-WD5B6NP3.mjs.br → PieChart3DScene-ZNKXS62H.mjs.br} +0 -0
- package/dist/PieChart3DScene-ZNKXS62H.mjs.gz +0 -0
- package/dist/{SmartArt3DScene-ODKCGJBO.mjs → SmartArt3DScene-QZGIABOK.mjs} +2 -2
- package/dist/SmartArt3DScene-QZGIABOK.mjs.br +0 -0
- package/dist/SmartArt3DScene-QZGIABOK.mjs.gz +0 -0
- package/dist/{SmartArt3DScene-BK7QN3WT.js → SmartArt3DScene-T236GYUT.js} +33 -33
- package/dist/SmartArt3DScene-T236GYUT.js.br +0 -0
- package/dist/SmartArt3DScene-T236GYUT.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-JZGU6BBD.mjs → SurfaceChart3DScene-EBT7RPCX.mjs} +1 -1
- package/dist/SurfaceChart3DScene-EBT7RPCX.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-EBT7RPCX.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-JGNPYQ32.js → SurfaceChart3DScene-LXBC3HMV.js} +2 -2
- package/dist/SurfaceChart3DScene-LXBC3HMV.js.br +0 -0
- package/dist/SurfaceChart3DScene-LXBC3HMV.js.gz +0 -0
- package/dist/{chunk-KVXB22D3.js → chunk-2LTTSFLD.js} +5 -5
- package/dist/chunk-2LTTSFLD.js.br +0 -0
- package/dist/chunk-2LTTSFLD.js.gz +0 -0
- package/dist/{chunk-VYSMTC5C.mjs → chunk-2OCTGK4L.mjs} +6 -110
- package/dist/chunk-2OCTGK4L.mjs.br +0 -0
- package/dist/chunk-2OCTGK4L.mjs.gz +0 -0
- package/dist/{chunk-IXKAIIA2.mjs → chunk-3KKPRPVE.mjs} +114 -126
- package/dist/chunk-3KKPRPVE.mjs.br +0 -0
- package/dist/chunk-3KKPRPVE.mjs.gz +0 -0
- package/dist/{chunk-B4QYQLZU.js → chunk-3N6AC4HA.js} +1122 -693
- package/dist/chunk-3N6AC4HA.js.br +0 -0
- package/dist/chunk-3N6AC4HA.js.gz +0 -0
- package/dist/{chunk-OAKDJYYT.mjs → chunk-5S3A6HL3.mjs} +121 -42
- package/dist/chunk-5S3A6HL3.mjs.br +0 -0
- package/dist/chunk-5S3A6HL3.mjs.gz +0 -0
- package/dist/{chunk-IRG7SIUX.js → chunk-6R2EUDJQ.js} +1399 -1411
- package/dist/chunk-6R2EUDJQ.js.br +0 -0
- package/dist/chunk-6R2EUDJQ.js.gz +0 -0
- package/dist/{chunk-XBMKFZVP.mjs → chunk-7TAWW5QQ.mjs} +1120 -694
- package/dist/chunk-7TAWW5QQ.mjs.br +0 -0
- package/dist/chunk-7TAWW5QQ.mjs.gz +0 -0
- package/dist/{chunk-64FUV37N.js → chunk-BRJN3ZMG.js} +2 -1
- package/dist/chunk-BRJN3ZMG.js.br +0 -0
- package/dist/{chunk-64FUV37N.js.gz → chunk-BRJN3ZMG.js.gz} +0 -0
- package/dist/{chunk-QTGCOL5H.mjs → chunk-GNRVDNCV.mjs} +1707 -435
- package/dist/chunk-GNRVDNCV.mjs.br +0 -0
- package/dist/chunk-GNRVDNCV.mjs.gz +0 -0
- package/dist/{chunk-6C2WYLZY.js → chunk-IXS7DALE.js} +45 -39
- package/dist/chunk-IXS7DALE.js.br +0 -0
- package/dist/chunk-IXS7DALE.js.gz +0 -0
- package/dist/{chunk-7FBKS7OS.js → chunk-LJ46KXUV.js} +179 -283
- package/dist/chunk-LJ46KXUV.js.br +0 -0
- package/dist/chunk-LJ46KXUV.js.gz +0 -0
- package/dist/{chunk-LAU34UMB.mjs → chunk-MQUTXOET.mjs} +2 -1
- package/dist/chunk-MQUTXOET.mjs.br +0 -0
- package/dist/{chunk-LAU34UMB.mjs.gz → chunk-MQUTXOET.mjs.gz} +0 -0
- package/dist/{chunk-3CBDTD46.mjs → chunk-MV2GCDBR.mjs} +8 -2
- package/dist/chunk-MV2GCDBR.mjs.br +0 -0
- package/dist/chunk-MV2GCDBR.mjs.gz +0 -0
- package/dist/{chunk-4SPZ5IZN.js → chunk-V32F4I45.js} +1713 -439
- package/dist/chunk-V32F4I45.js.br +0 -0
- package/dist/chunk-V32F4I45.js.gz +0 -0
- package/dist/{chunk-E55VEC37.js → chunk-WGBXO4LM.js} +576 -497
- package/dist/chunk-WGBXO4LM.js.br +0 -0
- package/dist/chunk-WGBXO4LM.js.gz +0 -0
- package/dist/{chunk-7YJBRPCT.mjs → chunk-WRO37U2O.mjs} +1 -1
- package/dist/chunk-WRO37U2O.mjs.br +0 -0
- package/dist/chunk-WRO37U2O.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +18 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/three.module-LGUV2LI6.mjs +2 -0
- package/dist/three.module-LGUV2LI6.mjs.br +0 -0
- package/dist/three.module-LGUV2LI6.mjs.gz +0 -0
- package/dist/{three.module-GNNNRIMK.js → three.module-YZ4M24WM.js} +454 -442
- package/dist/three.module-YZ4M24WM.js.br +0 -0
- package/dist/three.module-YZ4M24WM.js.gz +0 -0
- package/dist/{useViewerBuildingBlocks-DkUGmlkP.d.ts → useViewerBuildingBlocks-4Tj6P8Fm.d.ts} +3 -1
- package/dist/useViewerBuildingBlocks-4Tj6P8Fm.d.ts.map +1 -0
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-GYH43XWW.js.br +0 -0
- package/dist/AiChatPanel-GYH43XWW.js.gz +0 -0
- package/dist/AiChatPanel-SINEEZBW.mjs.br +0 -0
- package/dist/AiChatPanel-SINEEZBW.mjs.gz +0 -0
- package/dist/Area3DChartScene-D7GSJGPQ.js.br +0 -0
- package/dist/Area3DChartScene-D7GSJGPQ.js.gz +0 -0
- package/dist/Area3DChartScene-X5SM67PZ.mjs.br +0 -0
- package/dist/Area3DChartScene-X5SM67PZ.mjs.gz +0 -0
- package/dist/Bar3DChartScene-HWIFFGI3.mjs.gz +0 -0
- package/dist/Bar3DChartScene-M72WQW5Y.js.br +0 -0
- package/dist/Bar3DChartScene-M72WQW5Y.js.gz +0 -0
- package/dist/GLTFLoader-374ZNTXW.mjs.br +0 -0
- package/dist/GLTFLoader-374ZNTXW.mjs.gz +0 -0
- package/dist/GLTFLoader-Q7BHCGAW.js.br +0 -0
- package/dist/GLTFLoader-Q7BHCGAW.js.gz +0 -0
- package/dist/Line3DChartScene-7MPZWVF3.mjs.br +0 -0
- package/dist/Line3DChartScene-7MPZWVF3.mjs.gz +0 -0
- package/dist/Line3DChartScene-YOZEEQZ3.js.br +0 -0
- package/dist/Line3DChartScene-YOZEEQZ3.js.gz +0 -0
- package/dist/Model3DScene-57LVY5QW.mjs.br +0 -0
- package/dist/Model3DScene-57LVY5QW.mjs.gz +0 -0
- package/dist/Model3DScene-5IJSNGDZ.js.br +0 -0
- package/dist/Model3DScene-5IJSNGDZ.js.gz +0 -0
- package/dist/OrbitControls-SMYCPLXO.js +0 -12
- package/dist/OrbitControls-SMYCPLXO.js.br +0 -3
- package/dist/OrbitControls-SMYCPLXO.js.gz +0 -0
- package/dist/OrbitControls-ZTGHPI5G.mjs +0 -3
- package/dist/OrbitControls-ZTGHPI5G.mjs.br +0 -0
- package/dist/OrbitControls-ZTGHPI5G.mjs.gz +0 -0
- package/dist/PieChart3DScene-UBI6X66Q.js.br +0 -0
- package/dist/PieChart3DScene-UBI6X66Q.js.gz +0 -0
- package/dist/PieChart3DScene-WD5B6NP3.mjs.gz +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-JGNPYQ32.js.br +0 -0
- package/dist/SurfaceChart3DScene-JGNPYQ32.js.gz +0 -0
- package/dist/SurfaceChart3DScene-JZGU6BBD.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JZGU6BBD.mjs.gz +0 -0
- package/dist/chunk-3CBDTD46.mjs.br +0 -0
- package/dist/chunk-3CBDTD46.mjs.gz +0 -0
- package/dist/chunk-4SPZ5IZN.js.br +0 -0
- package/dist/chunk-4SPZ5IZN.js.gz +0 -0
- package/dist/chunk-64FUV37N.js.br +0 -0
- package/dist/chunk-6C2WYLZY.js.br +0 -0
- package/dist/chunk-6C2WYLZY.js.gz +0 -0
- package/dist/chunk-7FBKS7OS.js.br +0 -0
- package/dist/chunk-7FBKS7OS.js.gz +0 -0
- package/dist/chunk-7YJBRPCT.mjs.br +0 -0
- package/dist/chunk-7YJBRPCT.mjs.gz +0 -0
- package/dist/chunk-B4QYQLZU.js.br +0 -0
- package/dist/chunk-B4QYQLZU.js.gz +0 -0
- package/dist/chunk-E55VEC37.js.br +0 -0
- package/dist/chunk-E55VEC37.js.gz +0 -0
- package/dist/chunk-IRG7SIUX.js.br +0 -0
- package/dist/chunk-IRG7SIUX.js.gz +0 -0
- package/dist/chunk-IXKAIIA2.mjs.br +0 -0
- package/dist/chunk-IXKAIIA2.mjs.gz +0 -0
- package/dist/chunk-KVXB22D3.js.br +0 -0
- package/dist/chunk-KVXB22D3.js.gz +0 -0
- package/dist/chunk-LAU34UMB.mjs.br +0 -0
- package/dist/chunk-OAKDJYYT.mjs.br +0 -0
- package/dist/chunk-OAKDJYYT.mjs.gz +0 -0
- package/dist/chunk-QTGCOL5H.mjs.br +0 -0
- package/dist/chunk-QTGCOL5H.mjs.gz +0 -0
- package/dist/chunk-VYSMTC5C.mjs.br +0 -0
- package/dist/chunk-VYSMTC5C.mjs.gz +0 -0
- package/dist/chunk-XBMKFZVP.mjs.br +0 -0
- package/dist/chunk-XBMKFZVP.mjs.gz +0 -0
- package/dist/three.module-AC7ESV4W.mjs +0 -2
- package/dist/three.module-AC7ESV4W.mjs.br +0 -0
- package/dist/three.module-AC7ESV4W.mjs.gz +0 -0
- package/dist/three.module-GNNNRIMK.js.br +0 -0
- package/dist/three.module-GNNNRIMK.js.gz +0 -0
- package/dist/useViewerBuildingBlocks-DkUGmlkP.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
7
|
scope: scripts/release-plan.mjs re-releases a package whenever any of its files
|
|
8
8
|
change, not only on conventional ones.
|
|
9
9
|
|
|
10
|
+
## [3.17.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@3.17.1) - 2026-09-14
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **i18n:** Localize inspector and ribbon controls (by @yunfeizhu) ([a657a76](https://github.com/ChristopherVR/pptx-viewer/commit/a657a766d653106f04d50f7b13a94a6c12c77f1e))
|
|
15
|
+
|
|
10
16
|
## [3.17.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@3.17.0) - 2026-09-13
|
|
11
17
|
|
|
12
18
|
### Features
|
package/README.md
CHANGED
|
@@ -91,37 +91,39 @@ const bytes = await viewerRef.current?.getContent(); // Uint8Array of a valid .p
|
|
|
91
91
|
|
|
92
92
|
### `PowerPointViewer` props
|
|
93
93
|
|
|
94
|
-
| Prop
|
|
95
|
-
|
|
|
96
|
-
| `content`
|
|
97
|
-
| `filePath`
|
|
98
|
-
| `fileName`
|
|
99
|
-
| `className`
|
|
100
|
-
| `canEdit`
|
|
101
|
-
| `fonts`
|
|
102
|
-
| `authorName`
|
|
103
|
-
| `collaboration`
|
|
104
|
-
| `shareDefaults`
|
|
105
|
-
| `smartArt3D`
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
94
|
+
| Prop | Type | Default | Description |
|
|
95
|
+
| -------------------------------------------------------------------------- | --------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| `content` | `Uint8Array` | required | Raw .pptx file bytes |
|
|
97
|
+
| `filePath` | `string` | n/a | Optional file path (for display and autosave recovery) |
|
|
98
|
+
| `fileName` | `string` | n/a | Display name of the open document, shown in the title bar |
|
|
99
|
+
| `className` | `string` | n/a | Class applied to the root element |
|
|
100
|
+
| `canEdit` | `boolean` | `false` | Enable editing mode |
|
|
101
|
+
| `fonts` | `ViewerFontSource[]` | n/a | Licensed font sources supplied by the host application |
|
|
102
|
+
| `authorName` | `string` | n/a | Author name for comments/annotations and collaboration presence |
|
|
103
|
+
| `collaboration` | `CollaborationConfig` | n/a | Yjs real-time collaboration config (server URL, room, role) |
|
|
104
|
+
| `shareDefaults` | `{ roomId?, userName?, serverUrl? }` | n/a | Seed values for the Share dialog fields |
|
|
105
|
+
| `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` dependency; falls back to SVG without it) |
|
|
106
|
+
| `surfaceChart3D`, `barChart3D`, `lineChart3D`, `areaChart3D`, `pieChart3D` | `boolean` | `false` | Independently opt in to interactive Three.js renderers for the matching 3D chart kinds; each falls back to SVG when WebGL is unavailable. |
|
|
107
|
+
| `ai` | `PptxAiConfig` | n/a | Optional AI assistant configuration. The SDK peers load only when its panel is opened. |
|
|
108
|
+
| `onOpenFile` | `() => void` | n/a | Host override for File > Open; bypasses the built-in file picker |
|
|
109
|
+
| `onContentChange` | `(content: Uint8Array) => void` | n/a | Called with freshly serialised `.pptx` bytes when the content changes |
|
|
110
|
+
| `onDirtyChange` | `(isDirty: boolean) => void` | n/a | Called when dirty state changes |
|
|
111
|
+
| `onActiveSlideChange` | `(index: number) => void` | n/a | Called when the active slide changes |
|
|
112
|
+
| `onModeChange` | `(mode: ViewerMode) => void` | n/a | Called when the viewer mode changes |
|
|
113
|
+
| `onZoomChange` | `(zoom: number) => void` | n/a | Called when the zoom level changes |
|
|
114
|
+
| `onSelectionChange` | `(ids: string[]) => void` | n/a | Called when element selection changes |
|
|
115
|
+
| `onSlideCountChange` | `(count: number) => void` | n/a | Called when the total slide count changes |
|
|
116
|
+
| `onStartCollaboration` | `(config: CollaborationConfig) => void` | n/a | Called when the user starts a collaboration session from the Share dialog |
|
|
117
|
+
| `onStopCollaboration` | `() => void` | n/a | Called when the collaboration session stops |
|
|
118
|
+
| `theme` | `ViewerTheme` | n/a | Theme configuration for customising colours, radius, and CSS vars |
|
|
119
|
+
| `hiddenActions` | `ToolbarActionId[]` | n/a | Hide individual toolbar buttons and/or ribbon tabs (e.g. `['share', 'broadcast']`) instead of the whole toolbar; omitted hides nothing |
|
|
120
|
+
| `defaultThemeKey` | `string` | n/a | Initial File > Options > Appearance selection when no persisted preference exists |
|
|
121
|
+
| `availableThemes` | `ThemeCatalogEntry[]` | n/a | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog) |
|
|
122
|
+
| `onThemeChange` | `(key: string) => void` | n/a | Host hook for the appearance picker; when set, the host owns persisting the choice |
|
|
123
|
+
| `defaultLocale` | `string` | n/a | Initial locale code when no persisted preference exists |
|
|
124
|
+
| `availableLocales` | `LocaleCatalogEntry[]` | n/a | Locale choices offered by File > Options > Language (defaults to the registered i18next locales) |
|
|
125
|
+
| `onLocaleChange` | `(code: string) => void` | n/a | Host hook for the language picker; when set, the host owns applying/persisting the switch |
|
|
126
|
+
| `accountAuth` | `AccountAuthConfig` | n/a | Optional sign-in hook point for File > Account (disabled unless `enabled: true`) |
|
|
125
127
|
|
|
126
128
|
### `PowerPointViewerHandle` (via `ref`)
|
|
127
129
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { deckIdFromBridge, isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, mergeTablesDirective, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { deckIdFromBridge, isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, mergeTablesDirective, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-WRO37U2O.mjs';
|
|
2
|
+
import { cn } from './chunk-2OCTGK4L.mjs';
|
|
3
|
+
import './chunk-GNRVDNCV.mjs';
|
|
4
|
+
import './chunk-MQUTXOET.mjs';
|
|
5
5
|
import './chunk-XGB3TDIC.mjs';
|
|
6
6
|
import { useMemo, useRef, useState, useEffect, useReducer, useCallback } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunk2LTTSFLD_js = require('./chunk-2LTTSFLD.js');
|
|
4
|
+
var chunkLJ46KXUV_js = require('./chunk-LJ46KXUV.js');
|
|
5
|
+
require('./chunk-V32F4I45.js');
|
|
6
|
+
require('./chunk-BRJN3ZMG.js');
|
|
7
7
|
require('./chunk-4VNS5WPM.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
@@ -23,7 +23,7 @@ function useAiChat(bridge, config) {
|
|
|
23
23
|
setInitError(void 0);
|
|
24
24
|
void (async () => {
|
|
25
25
|
try {
|
|
26
|
-
const available = await
|
|
26
|
+
const available = await chunk2LTTSFLD_js.isAiAvailable();
|
|
27
27
|
if (cancelled) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
@@ -31,7 +31,7 @@ function useAiChat(bridge, config) {
|
|
|
31
31
|
setState("unavailable");
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const built = await
|
|
34
|
+
const built = await chunk2LTTSFLD_js.createAiChatSession(bridge, configRef.current);
|
|
35
35
|
if (cancelled) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
@@ -137,7 +137,7 @@ function withDeckContext(inner, bridge, strategy) {
|
|
|
137
137
|
}
|
|
138
138
|
let context = "";
|
|
139
139
|
try {
|
|
140
|
-
context = await
|
|
140
|
+
context = await chunk2LTTSFLD_js.buildDeckContext(bridge, { strategy, focus: {} });
|
|
141
141
|
} catch {
|
|
142
142
|
context = "";
|
|
143
143
|
}
|
|
@@ -200,7 +200,7 @@ function useAiConversation(useChat, session, config, bridge, options = {}) {
|
|
|
200
200
|
continue;
|
|
201
201
|
}
|
|
202
202
|
seen.add(call.toolCallId);
|
|
203
|
-
onToolTargetRef.current?.(
|
|
203
|
+
onToolTargetRef.current?.(chunk2LTTSFLD_js.toolCanvasTarget(call.toolName, call.input));
|
|
204
204
|
}
|
|
205
205
|
}, [chat.messages]);
|
|
206
206
|
const send = react.useCallback(
|
|
@@ -276,7 +276,7 @@ function deriveTitle(messages) {
|
|
|
276
276
|
}
|
|
277
277
|
function useAiHistory(input) {
|
|
278
278
|
const { deckId, messages, setMessages } = input;
|
|
279
|
-
const store = react.useMemo(() => input.store ??
|
|
279
|
+
const store = react.useMemo(() => input.store ?? chunk2LTTSFLD_js.createChatHistoryStore(), [input.store]);
|
|
280
280
|
const [activeChatId, setActiveChatId] = react.useState(newChatId);
|
|
281
281
|
const [chats, setChats] = react.useState([]);
|
|
282
282
|
const createdAtRef = react.useRef(Date.now());
|
|
@@ -419,7 +419,7 @@ function AiComposer({
|
|
|
419
419
|
disabled: value.trim().length === 0,
|
|
420
420
|
title: t("pptx.ai.send"),
|
|
421
421
|
"aria-label": t("pptx.ai.send"),
|
|
422
|
-
className:
|
|
422
|
+
className: chunkLJ46KXUV_js.cn(
|
|
423
423
|
"shrink-0 rounded-sm p-1.5 transition-colors",
|
|
424
424
|
value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
425
425
|
),
|
|
@@ -442,15 +442,15 @@ function AiFocusBar({
|
|
|
442
442
|
onClearPicks
|
|
443
443
|
}) {
|
|
444
444
|
const { t } = reactI18next.useTranslation();
|
|
445
|
-
const chips =
|
|
446
|
-
const twoTables =
|
|
445
|
+
const chips = chunk2LTTSFLD_js.focusTargetChips(targets, slides);
|
|
446
|
+
const twoTables = chunk2LTTSFLD_js.isTwoTableFocus(targets, slides);
|
|
447
447
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border bg-secondary/30", children: [
|
|
448
448
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1 px-2.5 py-1.5", children: [
|
|
449
449
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.ai.focusScope") }),
|
|
450
450
|
chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
451
451
|
"span",
|
|
452
452
|
{
|
|
453
|
-
className:
|
|
453
|
+
className: chunkLJ46KXUV_js.cn(
|
|
454
454
|
"inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
455
455
|
hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
|
|
456
456
|
),
|
|
@@ -466,7 +466,7 @@ function AiFocusBar({
|
|
|
466
466
|
{
|
|
467
467
|
type: "button",
|
|
468
468
|
onClick: () => onSendDirective(
|
|
469
|
-
|
|
469
|
+
chunk2LTTSFLD_js.mergeTablesDirective(
|
|
470
470
|
twoTables.slideIndex,
|
|
471
471
|
twoTables.elementIdA,
|
|
472
472
|
twoTables.elementIdB
|
|
@@ -487,7 +487,7 @@ function AiFocusBar({
|
|
|
487
487
|
title: t("pptx.ai.pickElement"),
|
|
488
488
|
"aria-label": t("pptx.ai.pickAria"),
|
|
489
489
|
"aria-pressed": pickMode,
|
|
490
|
-
className:
|
|
490
|
+
className: chunkLJ46KXUV_js.cn(
|
|
491
491
|
"rounded-sm p-1 max-md:min-w-[44px]! max-md:min-h-[44px]! flex items-center justify-center",
|
|
492
492
|
pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
|
|
493
493
|
),
|
|
@@ -566,7 +566,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
|
|
|
566
566
|
{
|
|
567
567
|
type: "button",
|
|
568
568
|
onClick: () => onResume(chat.id),
|
|
569
|
-
className:
|
|
569
|
+
className: chunkLJ46KXUV_js.cn(
|
|
570
570
|
"flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
|
|
571
571
|
chat.id === activeChatId && "bg-accent/60"
|
|
572
572
|
),
|
|
@@ -721,26 +721,26 @@ function AiToolCallCard({ part }) {
|
|
|
721
721
|
const failed = part.state === "output-error";
|
|
722
722
|
const done = part.state === "output-available";
|
|
723
723
|
const running = !failed && !done;
|
|
724
|
-
const activity =
|
|
724
|
+
const activity = chunk2LTTSFLD_js.describeToolActivity(part.toolName, part.input, running ? "present" : "past");
|
|
725
725
|
const Icon = ICONS[activity.icon] ?? lu.LuWrench;
|
|
726
|
-
const rawSummary =
|
|
726
|
+
const rawSummary = chunk2LTTSFLD_js.summarizeToolArgs(part.input);
|
|
727
727
|
const statusLabel = failed ? t("pptx.ai.toolFailed") : done ? t("pptx.ai.toolDone") : t("pptx.ai.toolRunning");
|
|
728
728
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[12px]", children: [
|
|
729
729
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
730
730
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
731
731
|
Icon,
|
|
732
732
|
{
|
|
733
|
-
className:
|
|
733
|
+
className: chunkLJ46KXUV_js.cn(
|
|
734
734
|
"w-3.5 h-3.5 shrink-0",
|
|
735
735
|
failed ? "text-destructive" : "text-muted-foreground"
|
|
736
736
|
)
|
|
737
737
|
}
|
|
738
738
|
),
|
|
739
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
739
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkLJ46KXUV_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
|
|
740
740
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
741
741
|
"span",
|
|
742
742
|
{
|
|
743
|
-
className:
|
|
743
|
+
className: chunkLJ46KXUV_js.cn(
|
|
744
744
|
"ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
|
|
745
745
|
failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
746
746
|
),
|
|
@@ -757,7 +757,7 @@ function AiToolCallCard({ part }) {
|
|
|
757
757
|
rawSummary && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group mt-0.5 pl-5", children: [
|
|
758
758
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground", children: t("pptx.ai.toolDetails") }),
|
|
759
759
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80", children: [
|
|
760
|
-
|
|
760
|
+
chunk2LTTSFLD_js.toolLabel(part.toolName),
|
|
761
761
|
": ",
|
|
762
762
|
rawSummary
|
|
763
763
|
] })
|
|
@@ -788,7 +788,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
788
788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
789
789
|
"div",
|
|
790
790
|
{
|
|
791
|
-
className:
|
|
791
|
+
className: chunkLJ46KXUV_js.cn(
|
|
792
792
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
|
|
793
793
|
isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
|
|
794
794
|
),
|
|
@@ -835,7 +835,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
835
835
|
}
|
|
836
836
|
function AiProposalCard({ proposal, onAccept, onReject }) {
|
|
837
837
|
const { t } = reactI18next.useTranslation();
|
|
838
|
-
const lines = proposal.summary.map(
|
|
838
|
+
const lines = proposal.summary.map(chunk2LTTSFLD_js.humanizeDiffLine);
|
|
839
839
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-primary/40 bg-primary/5 p-2.5", children: [
|
|
840
840
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary", children: t("pptx.ai.proposedChange") }),
|
|
841
841
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[12px] font-medium text-foreground", children: proposal.label }),
|
|
@@ -1043,7 +1043,7 @@ function AiChatPanel({
|
|
|
1043
1043
|
}) {
|
|
1044
1044
|
const { t } = reactI18next.useTranslation();
|
|
1045
1045
|
const { state, session, initError } = useAiChat(bridge, config);
|
|
1046
|
-
const deckId = react.useMemo(() =>
|
|
1046
|
+
const deckId = react.useMemo(() => chunk2LTTSFLD_js.deckIdFromBridge(bridge), [bridge]);
|
|
1047
1047
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1048
1048
|
"div",
|
|
1049
1049
|
{
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkV32F4I45_js = require('./chunk-V32F4I45.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -23,7 +23,7 @@ function Area3DChartScene({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
let disposed = false;
|
|
26
|
-
void
|
|
26
|
+
void chunkV32F4I45_js.mountAreaChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
27
|
if (disposed) {
|
|
28
28
|
handle.dispose();
|
|
29
29
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountAreaChart3D } from './chunk-
|
|
2
|
+
import { mountAreaChart3D } from './chunk-GNRVDNCV.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkV32F4I45_js = require('./chunk-V32F4I45.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -23,7 +23,7 @@ function Bar3DChartScene({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
let disposed = false;
|
|
26
|
-
void
|
|
26
|
+
void chunkV32F4I45_js.mountBarChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
27
|
if (disposed) {
|
|
28
28
|
handle.dispose();
|
|
29
29
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountBarChart3D } from './chunk-
|
|
2
|
+
import { mountBarChart3D } from './chunk-GNRVDNCV.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Quaternion, Matrix4, Loader, LoaderUtils, FileLoader, Color, LinearSRGBColorSpace, SpotLight, PointLight, DirectionalLight, MeshBasicMaterial, SRGBColorSpace, MeshPhysicalMaterial, Vector2, Vector3, InstancedMesh, InstancedBufferAttribute, Object3D, TextureLoader, ImageBitmapLoader, BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, LinearMipmapLinearFilter, NearestMipmapLinearFilter, LinearMipmapNearestFilter, NearestMipmapNearestFilter, LinearFilter, NearestFilter, RepeatWrapping, MirroredRepeatWrapping, ClampToEdgeWrapping, PointsMaterial, Material, LineBasicMaterial, MeshStandardMaterial, DoubleSide, PropertyBinding,
|
|
1
|
+
import { Quaternion, Matrix4, Loader, LoaderUtils, FileLoader, Color, LinearSRGBColorSpace, SpotLight, PointLight, DirectionalLight, MeshBasicMaterial, SRGBColorSpace, MeshPhysicalMaterial, Vector2, Vector3, InstancedMesh, InstancedBufferAttribute, BufferGeometry, Object3D, TextureLoader, ImageBitmapLoader, BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, LinearMipmapLinearFilter, NearestMipmapLinearFilter, LinearMipmapNearestFilter, NearestMipmapNearestFilter, LinearFilter, NearestFilter, RepeatWrapping, MirroredRepeatWrapping, ClampToEdgeWrapping, PointsMaterial, Material, LineBasicMaterial, MeshStandardMaterial, DoubleSide, PropertyBinding, SkinnedMesh, Mesh, LineSegments, Line, LineLoop, Points, Group, PerspectiveCamera, MathUtils, OrthographicCamera, Skeleton, AnimationClip, Bone, InterpolateDiscrete, InterpolateLinear, ColorManagement, Texture, VectorKeyframeTrack, NumberKeyframeTrack, QuaternionKeyframeTrack, TrianglesDrawMode, TriangleFanDrawMode, TriangleStripDrawMode, FrontSide, Interpolant, Box3, Sphere } from './chunk-7TAWW5QQ.mjs';
|
|
2
2
|
import './chunk-XGB3TDIC.mjs';
|
|
3
3
|
|
|
4
|
-
// ../../node_modules/.bun/three@0.
|
|
4
|
+
// ../../node_modules/.bun/three@0.186.0/node_modules/three/examples/jsm/utils/BufferGeometryUtils.js
|
|
5
5
|
function toTrianglesDrawMode(geometry, drawMode) {
|
|
6
6
|
if (drawMode === TrianglesDrawMode) {
|
|
7
7
|
console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.");
|
|
@@ -47,17 +47,16 @@ function toTrianglesDrawMode(geometry, drawMode) {
|
|
|
47
47
|
if (newIndices.length / 3 !== numberOfTriangles) {
|
|
48
48
|
console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return newGeometry;
|
|
50
|
+
geometry.setIndex(newIndices);
|
|
51
|
+
geometry.clearGroups();
|
|
52
|
+
return geometry;
|
|
54
53
|
} else {
|
|
55
54
|
console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", drawMode);
|
|
56
55
|
return geometry;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
// ../../node_modules/.bun/three@0.
|
|
59
|
+
// ../../node_modules/.bun/three@0.186.0/node_modules/three/examples/jsm/utils/SkeletonUtils.js
|
|
61
60
|
function clone(source) {
|
|
62
61
|
const sourceLookup = /* @__PURE__ */ new Map();
|
|
63
62
|
const cloneLookup = /* @__PURE__ */ new Map();
|
|
@@ -87,7 +86,7 @@ function parallelTraverse(a, b, callback) {
|
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
// ../../node_modules/.bun/three@0.
|
|
89
|
+
// ../../node_modules/.bun/three@0.186.0/node_modules/three/examples/jsm/loaders/GLTFLoader.js
|
|
91
90
|
var GLTFLoader = class extends Loader {
|
|
92
91
|
/**
|
|
93
92
|
* Constructs a new glTF loader.
|
|
@@ -937,12 +936,30 @@ var GLTFMeshGpuInstancing = class {
|
|
|
937
936
|
}
|
|
938
937
|
instancedMesh.setMatrixAt(i, m.compose(p, q, s));
|
|
939
938
|
}
|
|
939
|
+
let instanceGeometry = null;
|
|
940
940
|
for (const attributeName in attributes) {
|
|
941
941
|
if (attributeName === "_COLOR_0") {
|
|
942
942
|
const attr = attributes[attributeName];
|
|
943
943
|
instancedMesh.instanceColor = new InstancedBufferAttribute(attr.array, attr.itemSize, attr.normalized);
|
|
944
944
|
} else if (attributeName !== "TRANSLATION" && attributeName !== "ROTATION" && attributeName !== "SCALE") {
|
|
945
|
-
|
|
945
|
+
if (instanceGeometry === null) {
|
|
946
|
+
const source = instancedMesh.geometry;
|
|
947
|
+
instanceGeometry = new BufferGeometry();
|
|
948
|
+
instanceGeometry.name = source.name;
|
|
949
|
+
for (const name in source.attributes) instanceGeometry.setAttribute(name, source.attributes[name]);
|
|
950
|
+
for (const name in source.morphAttributes) instanceGeometry.morphAttributes[name] = source.morphAttributes[name];
|
|
951
|
+
if (source.index !== null) instanceGeometry.setIndex(source.index);
|
|
952
|
+
instanceGeometry.morphTargetsRelative = source.morphTargetsRelative;
|
|
953
|
+
for (const group of source.groups) instanceGeometry.addGroup(group.start, group.count, group.materialIndex);
|
|
954
|
+
if (source.boundingBox !== null) instanceGeometry.boundingBox = source.boundingBox.clone();
|
|
955
|
+
if (source.boundingSphere !== null) instanceGeometry.boundingSphere = source.boundingSphere.clone();
|
|
956
|
+
instanceGeometry.drawRange.start = source.drawRange.start;
|
|
957
|
+
instanceGeometry.drawRange.count = source.drawRange.count;
|
|
958
|
+
instanceGeometry.userData = Object.assign({}, source.userData);
|
|
959
|
+
instancedMesh.geometry = instanceGeometry;
|
|
960
|
+
}
|
|
961
|
+
const attr = attributes[attributeName];
|
|
962
|
+
instanceGeometry.setAttribute(attributeName, new InstancedBufferAttribute(attr.array, attr.itemSize, attr.normalized));
|
|
946
963
|
}
|
|
947
964
|
}
|
|
948
965
|
Object3D.prototype.copy.call(instancedMesh, mesh);
|
|
@@ -1066,6 +1083,22 @@ var GLTFTextureTransformExtension = class {
|
|
|
1066
1083
|
if (transform.scale !== void 0) {
|
|
1067
1084
|
texture.repeat.fromArray(transform.scale);
|
|
1068
1085
|
}
|
|
1086
|
+
if (transform.rotation !== void 0) {
|
|
1087
|
+
const c = Math.cos(texture.rotation);
|
|
1088
|
+
const s = Math.sin(texture.rotation);
|
|
1089
|
+
texture.matrix.set(
|
|
1090
|
+
texture.repeat.x * c,
|
|
1091
|
+
texture.repeat.y * s,
|
|
1092
|
+
texture.offset.x,
|
|
1093
|
+
-texture.repeat.x * s,
|
|
1094
|
+
texture.repeat.y * c,
|
|
1095
|
+
texture.offset.y,
|
|
1096
|
+
0,
|
|
1097
|
+
0,
|
|
1098
|
+
1
|
|
1099
|
+
);
|
|
1100
|
+
texture.matrixAutoUpdate = false;
|
|
1101
|
+
}
|
|
1069
1102
|
texture.needsUpdate = true;
|
|
1070
1103
|
return texture;
|
|
1071
1104
|
}
|
|
@@ -2043,6 +2076,11 @@ var GLTFParser = class {
|
|
|
2043
2076
|
} else {
|
|
2044
2077
|
geometryPromise = addPrimitiveAttributes(new BufferGeometry(), primitive, parser);
|
|
2045
2078
|
}
|
|
2079
|
+
if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP) {
|
|
2080
|
+
geometryPromise = geometryPromise.then((geometry) => toTrianglesDrawMode(geometry, TriangleStripDrawMode));
|
|
2081
|
+
} else if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN) {
|
|
2082
|
+
geometryPromise = geometryPromise.then((geometry) => toTrianglesDrawMode(geometry, TriangleFanDrawMode));
|
|
2083
|
+
}
|
|
2046
2084
|
cache[cacheKey] = { primitive, promise: geometryPromise };
|
|
2047
2085
|
pending.push(geometryPromise);
|
|
2048
2086
|
}
|
|
@@ -2068,7 +2106,7 @@ var GLTFParser = class {
|
|
|
2068
2106
|
pending.push(material);
|
|
2069
2107
|
}
|
|
2070
2108
|
pending.push(parser.loadGeometries(primitives));
|
|
2071
|
-
return Promise.all(pending).then(function(results) {
|
|
2109
|
+
return Promise.all(pending).then(async function(results) {
|
|
2072
2110
|
const materials = results.slice(0, results.length - 1);
|
|
2073
2111
|
const geometries = results[results.length - 1];
|
|
2074
2112
|
const meshes = [];
|
|
@@ -2078,15 +2116,15 @@ var GLTFParser = class {
|
|
|
2078
2116
|
let mesh;
|
|
2079
2117
|
const material = materials[i];
|
|
2080
2118
|
if (primitive.mode === WEBGL_CONSTANTS.TRIANGLES || primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP || primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN || primitive.mode === void 0) {
|
|
2081
|
-
|
|
2119
|
+
const needsSkinning = meshDef.isSkinnedMesh === true;
|
|
2120
|
+
const hasSkinningAttributes = geometry.hasAttribute("skinIndex") && geometry.hasAttribute("skinWeight");
|
|
2121
|
+
if (needsSkinning && hasSkinningAttributes === false) {
|
|
2122
|
+
console.warn("THREE.GLTFLoader: Missing skinIndex or skinWeight attributes. Skinning disabled.");
|
|
2123
|
+
}
|
|
2124
|
+
mesh = needsSkinning && hasSkinningAttributes ? new SkinnedMesh(geometry, material) : new Mesh(geometry, material);
|
|
2082
2125
|
if (mesh.isSkinnedMesh === true) {
|
|
2083
2126
|
mesh.normalizeSkinWeights();
|
|
2084
2127
|
}
|
|
2085
|
-
if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP) {
|
|
2086
|
-
mesh.geometry = toTrianglesDrawMode(mesh.geometry, TriangleStripDrawMode);
|
|
2087
|
-
} else if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN) {
|
|
2088
|
-
mesh.geometry = toTrianglesDrawMode(mesh.geometry, TriangleFanDrawMode);
|
|
2089
|
-
}
|
|
2090
2128
|
} else if (primitive.mode === WEBGL_CONSTANTS.LINES) {
|
|
2091
2129
|
mesh = new LineSegments(geometry, material);
|
|
2092
2130
|
} else if (primitive.mode === WEBGL_CONSTANTS.LINE_STRIP) {
|
|
Binary file
|
|
Binary file
|