pptx-angular-viewer 4.7.0 → 4.8.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 +65 -0
- package/fesm2022/pptx-angular-viewer-chart-3d-view-scene-CM71j9A9.mjs +1703 -0
- package/fesm2022/pptx-angular-viewer-chart-3d-view-scene-CM71j9A9.mjs.map +1 -0
- package/fesm2022/{pptx-angular-viewer-chat-history-idb-D_SZnX0q.mjs → pptx-angular-viewer-chat-history-idb-7dyn_ZbD.mjs} +2 -2
- package/fesm2022/{pptx-angular-viewer-chat-history-idb-D_SZnX0q.mjs.map → pptx-angular-viewer-chat-history-idb-7dyn_ZbD.mjs.map} +1 -1
- package/fesm2022/{pptx-angular-viewer-pptx-angular-viewer-D3TADvW3.mjs → pptx-angular-viewer-pptx-angular-viewer-Cf08ueRA.mjs} +3769 -1247
- package/fesm2022/{pptx-angular-viewer-pptx-angular-viewer-D3TADvW3.mjs.map → pptx-angular-viewer-pptx-angular-viewer-Cf08ueRA.mjs.map} +1 -1
- package/fesm2022/pptx-angular-viewer-view-scene-Bn9SJZk9.mjs +862 -0
- package/fesm2022/pptx-angular-viewer-view-scene-Bn9SJZk9.mjs.map +1 -0
- package/fesm2022/pptx-angular-viewer.mjs +1 -1
- package/i18n/de.cjs +64 -96
- package/i18n/de.mjs +64 -96
- package/i18n/es.cjs +64 -96
- package/i18n/es.mjs +64 -96
- package/i18n/fr.cjs +64 -96
- package/i18n/fr.mjs +64 -96
- package/i18n/zh-CN.cjs +63 -95
- package/i18n/zh-CN.mjs +63 -95
- package/package.json +2 -2
- package/types/pptx-angular-viewer.d.ts +508 -77
- package/types/pptx-angular-viewer.d.ts.map +1 -1
- package/fesm2022/pptx-angular-viewer-chart-3d-view-scene-CFWKnfML.mjs +0 -470
- package/fesm2022/pptx-angular-viewer-chart-3d-view-scene-CFWKnfML.mjs.map +0 -1
- package/fesm2022/pptx-angular-viewer-view-scene-C5oUG9yl.mjs +0 -235
- package/fesm2022/pptx-angular-viewer-view-scene-C5oUG9yl.mjs.map +0 -1
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
/** Supersampling factor for crisp text at any zoom. */
|
|
2
|
-
const SUPERSAMPLE = 3;
|
|
3
|
-
/** Build a canvas texture rendering `block`'s pre-wrapped lines, or `null` off-DOM. */
|
|
4
|
-
function buildTextBlockTexture(three, block) {
|
|
5
|
-
if (typeof document === 'undefined' || block.lines.every((l) => l.text.length === 0)) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
const worldWidth = Math.max(1, block.maxWidth);
|
|
9
|
-
const worldHeight = Math.max(1, block.maxHeight);
|
|
10
|
-
const canvas = document.createElement('canvas');
|
|
11
|
-
canvas.width = Math.max(8, Math.round(worldWidth * SUPERSAMPLE));
|
|
12
|
-
canvas.height = Math.max(8, Math.round(worldHeight * SUPERSAMPLE));
|
|
13
|
-
const ctx2d = canvas.getContext('2d');
|
|
14
|
-
if (!ctx2d) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const weight = block.fontWeight ?? 400;
|
|
18
|
-
const italic = block.fontStyle === 'italic' ? 'italic ' : '';
|
|
19
|
-
const family = block.fontFamily
|
|
20
|
-
? `${block.fontFamily}, system-ui, sans-serif`
|
|
21
|
-
: 'system-ui, -apple-system, Segoe UI, Roboto, sans-serif';
|
|
22
|
-
const px = Math.max(6, block.fontSize) * SUPERSAMPLE;
|
|
23
|
-
ctx2d.clearRect(0, 0, canvas.width, canvas.height);
|
|
24
|
-
ctx2d.fillStyle = block.color;
|
|
25
|
-
ctx2d.textAlign = 'center';
|
|
26
|
-
ctx2d.textBaseline = 'alphabetic';
|
|
27
|
-
ctx2d.font = `${italic}${weight} ${px}px ${family}`;
|
|
28
|
-
const centerX = canvas.width / 2;
|
|
29
|
-
const centerY = canvas.height / 2;
|
|
30
|
-
for (const line of block.lines) {
|
|
31
|
-
if (!line.text) {
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
// `dy` is a y-up offset from the block centre; canvas y grows downward.
|
|
35
|
-
ctx2d.fillText(line.text, centerX, centerY - line.dy * SUPERSAMPLE);
|
|
36
|
-
}
|
|
37
|
-
const texture = new three.CanvasTexture(canvas);
|
|
38
|
-
texture.colorSpace = three.SRGBColorSpace;
|
|
39
|
-
texture.minFilter = three.LinearFilter;
|
|
40
|
-
texture.magFilter = three.LinearFilter;
|
|
41
|
-
// See `smartart-3d/text-texture.ts` for why flipY must stay false with a
|
|
42
|
-
// compensating UV flip: WebGL2 forbids UNPACK_FLIP_Y_WEBGL for some texture
|
|
43
|
-
// targets, and leaving it enabled pollutes global pixel-store state.
|
|
44
|
-
texture.flipY = false;
|
|
45
|
-
texture.premultiplyAlpha = false;
|
|
46
|
-
texture.wrapT = three.RepeatWrapping;
|
|
47
|
-
texture.repeat.set(1, -1);
|
|
48
|
-
texture.offset.set(0, 1);
|
|
49
|
-
texture.needsUpdate = true;
|
|
50
|
-
return { texture, worldWidth, worldHeight };
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** z-lift of the stroke outline above its fill, so the two don't z-fight. */
|
|
54
|
-
const STROKE_Z_LIFT = 0.05;
|
|
55
|
-
function buildShape(three, mesh) {
|
|
56
|
-
const shape = new three.Shape(mesh.outline.map((p) => new three.Vector2(p.x, p.y)));
|
|
57
|
-
for (const hole of mesh.holes ?? []) {
|
|
58
|
-
shape.holes.push(new three.Path(hole.map((p) => new three.Vector2(p.x, p.y))));
|
|
59
|
-
}
|
|
60
|
-
return shape;
|
|
61
|
-
}
|
|
62
|
-
/** Build the fill mesh for a flat (zero-depth) `SmartArt3DMesh`. */
|
|
63
|
-
function buildFlatFill(three, mesh, shape, disposables) {
|
|
64
|
-
if (mesh.fillNone) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const geometry = new three.ShapeGeometry(shape);
|
|
68
|
-
const material = new three.MeshBasicMaterial({
|
|
69
|
-
color: mesh.fill,
|
|
70
|
-
side: three.DoubleSide,
|
|
71
|
-
transparent: mesh.opacity < 1,
|
|
72
|
-
opacity: mesh.opacity,
|
|
73
|
-
});
|
|
74
|
-
disposables.push(geometry, material);
|
|
75
|
-
return new three.Mesh(geometry, material);
|
|
76
|
-
}
|
|
77
|
-
/** Build the stroke outline (and hole outlines) as line loops. */
|
|
78
|
-
function buildStrokeLines(three, mesh, disposables) {
|
|
79
|
-
if (mesh.strokeWidth <= 0 || mesh.stroke === 'transparent') {
|
|
80
|
-
return [];
|
|
81
|
-
}
|
|
82
|
-
const material = new three.LineBasicMaterial({ color: mesh.stroke });
|
|
83
|
-
disposables.push(material);
|
|
84
|
-
const loops = [mesh.outline, ...(mesh.holes ?? [])];
|
|
85
|
-
return loops.map((loop) => {
|
|
86
|
-
const geometry = new three.BufferGeometry().setFromPoints(loop.map((p) => new three.Vector3(p.x, p.y, STROKE_Z_LIFT)));
|
|
87
|
-
disposables.push(geometry);
|
|
88
|
-
return new three.LineLoop(geometry, material);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/** Build the text label plane, or `null` when the mesh has no text. */
|
|
92
|
-
function buildTextPlane(three, mesh, group, disposables) {
|
|
93
|
-
if (!mesh.textBlock) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const built = buildTextBlockTexture(three, mesh.textBlock);
|
|
97
|
-
if (!built) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
disposables.push(built.texture);
|
|
101
|
-
const geometry = new three.PlaneGeometry(built.worldWidth, built.worldHeight);
|
|
102
|
-
const material = new three.MeshBasicMaterial({
|
|
103
|
-
map: built.texture,
|
|
104
|
-
transparent: true,
|
|
105
|
-
depthWrite: false,
|
|
106
|
-
});
|
|
107
|
-
disposables.push(geometry, material);
|
|
108
|
-
const plane = new three.Mesh(geometry, material);
|
|
109
|
-
// `textBlock` carries its own world position (already includes the
|
|
110
|
-
// shape's rotation applied to its centre); the group itself is placed at
|
|
111
|
-
// the shape's own centre, so offset back to absolute world space here.
|
|
112
|
-
plane.position.set(mesh.textBlock.x - mesh.position.x, mesh.textBlock.y - mesh.position.y, mesh.textBlock.z - mesh.position.z);
|
|
113
|
-
group.add(plane);
|
|
114
|
-
}
|
|
115
|
-
/** Build the complete `Object3D` for one flat mesh. */
|
|
116
|
-
function buildFlatMeshObject(three, mesh) {
|
|
117
|
-
const disposables = [];
|
|
118
|
-
const group = new three.Group();
|
|
119
|
-
group.position.set(mesh.position.x, mesh.position.y, mesh.position.z);
|
|
120
|
-
const shape = buildShape(three, mesh);
|
|
121
|
-
const fill = buildFlatFill(three, mesh, shape, disposables);
|
|
122
|
-
if (fill) {
|
|
123
|
-
group.add(fill);
|
|
124
|
-
}
|
|
125
|
-
for (const line of buildStrokeLines(three, mesh, disposables)) {
|
|
126
|
-
group.add(line);
|
|
127
|
-
}
|
|
128
|
-
buildTextPlane(three, mesh, group, disposables);
|
|
129
|
-
return { group, disposables };
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** Camera distance from the origin along +z (orthographic, so magnitude only matters for near/far). */
|
|
133
|
-
const CAMERA_DISTANCE = 1000;
|
|
134
|
-
/** Fractional margin added around the diagram's own bounds when framing it. */
|
|
135
|
-
const FRAME_MARGIN = 1.06;
|
|
136
|
-
function buildOrthographicCamera(bounds, three) {
|
|
137
|
-
const w = Math.max(1, bounds.width) * FRAME_MARGIN;
|
|
138
|
-
const h = Math.max(1, bounds.height) * FRAME_MARGIN;
|
|
139
|
-
const camera = new three.OrthographicCamera(-w / 2, w / 2, h / 2, -h / 2, -CAMERA_DISTANCE * 2, CAMERA_DISTANCE * 2);
|
|
140
|
-
camera.position.set(0, 0, CAMERA_DISTANCE);
|
|
141
|
-
camera.lookAt(0, 0, 0);
|
|
142
|
-
return camera;
|
|
143
|
-
}
|
|
144
|
-
/** Fit the camera's frustum to `bounds`, letterboxing to the view's own aspect ratio. */
|
|
145
|
-
function fitCamera(camera, bounds, size) {
|
|
146
|
-
const w = Math.max(1, bounds.width) * FRAME_MARGIN;
|
|
147
|
-
const h = Math.max(1, bounds.height) * FRAME_MARGIN;
|
|
148
|
-
const aspect = Math.max(1, size.pixelWidth) / Math.max(1, size.pixelHeight);
|
|
149
|
-
const halfW = w / 2;
|
|
150
|
-
const halfH = h / 2;
|
|
151
|
-
const fitHalfH = Math.max(halfH, halfW / aspect);
|
|
152
|
-
const fitHalfW = fitHalfH * aspect;
|
|
153
|
-
camera.left = -fitHalfW;
|
|
154
|
-
camera.right = fitHalfW;
|
|
155
|
-
camera.top = fitHalfH;
|
|
156
|
-
camera.bottom = -fitHalfH;
|
|
157
|
-
camera.updateProjectionMatrix();
|
|
158
|
-
}
|
|
159
|
-
async function mountSmartArt3DView(model, ctx) {
|
|
160
|
-
const { three } = ctx;
|
|
161
|
-
const scene = new three.Scene();
|
|
162
|
-
if (model.background) {
|
|
163
|
-
scene.background = new three.Color(model.background);
|
|
164
|
-
}
|
|
165
|
-
const disposables = [];
|
|
166
|
-
for (const mesh of model.meshes) {
|
|
167
|
-
const built = buildFlatMeshObject(three, mesh);
|
|
168
|
-
scene.add(built.group);
|
|
169
|
-
disposables.push(...built.disposables);
|
|
170
|
-
}
|
|
171
|
-
const camera = buildOrthographicCamera(model.bounds, three);
|
|
172
|
-
const authoredPosition = camera.position.clone();
|
|
173
|
-
fitCamera(camera, model.bounds, ctx.size);
|
|
174
|
-
let controls = null;
|
|
175
|
-
let dampingActive = false;
|
|
176
|
-
if (ctx.OrbitControls) {
|
|
177
|
-
controls = new ctx.OrbitControls(camera, ctx.eventTarget);
|
|
178
|
-
controls.enableDamping = true;
|
|
179
|
-
controls.enablePan = false;
|
|
180
|
-
controls.enabled = ctx.interactive;
|
|
181
|
-
controls.enableRotate = ctx.interactive;
|
|
182
|
-
controls.enableZoom = ctx.interactive;
|
|
183
|
-
const onChange = () => {
|
|
184
|
-
dampingActive = true;
|
|
185
|
-
ctx.requestRender();
|
|
186
|
-
};
|
|
187
|
-
controls.addEventListener('change', onChange);
|
|
188
|
-
}
|
|
189
|
-
const resetView = () => {
|
|
190
|
-
camera.position.copy(authoredPosition);
|
|
191
|
-
camera.lookAt(0, 0, 0);
|
|
192
|
-
if (controls) {
|
|
193
|
-
controls.target.set(0, 0, 0);
|
|
194
|
-
controls.update();
|
|
195
|
-
}
|
|
196
|
-
ctx.requestRender();
|
|
197
|
-
};
|
|
198
|
-
const onDoubleClick = () => resetView();
|
|
199
|
-
ctx.eventTarget.addEventListener('dblclick', onDoubleClick);
|
|
200
|
-
return {
|
|
201
|
-
render(renderer) {
|
|
202
|
-
if (controls) {
|
|
203
|
-
dampingActive = controls.update();
|
|
204
|
-
}
|
|
205
|
-
renderer.render(scene, camera);
|
|
206
|
-
},
|
|
207
|
-
resize(size) {
|
|
208
|
-
fitCamera(camera, model.bounds, size);
|
|
209
|
-
},
|
|
210
|
-
isAnimating() {
|
|
211
|
-
return dampingActive;
|
|
212
|
-
},
|
|
213
|
-
setInteractive(on) {
|
|
214
|
-
if (!controls) {
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
controls.enabled = on;
|
|
218
|
-
controls.enableRotate = on;
|
|
219
|
-
controls.enableZoom = on;
|
|
220
|
-
if (!on) {
|
|
221
|
-
resetView();
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
dispose() {
|
|
225
|
-
ctx.eventTarget.removeEventListener('dblclick', onDoubleClick);
|
|
226
|
-
controls?.dispose();
|
|
227
|
-
for (const d of disposables) {
|
|
228
|
-
d.dispose();
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export { mountSmartArt3DView };
|
|
235
|
-
//# sourceMappingURL=pptx-angular-viewer-view-scene-C5oUG9yl.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pptx-angular-viewer-view-scene-C5oUG9yl.mjs","sources":["../../src/internal/shared-src/smartart-3d/text-block-texture.ts","../../src/internal/shared-src/smartart-3d/flat-mesh-object.ts","../../src/internal/shared-src/smartart-3d/view-scene.ts"],"sourcesContent":["/**\n * Canvas texture for a `SmartArt3DTextBlock`, for the `<pptx-three-view>`\n * SmartArt scene (`view-scene.ts`).\n *\n * Unlike the legacy `smartart-3d/text-texture.ts` (which imports `three`\n * statically and re-wraps text itself), this draws the ALREADY wrapped/\n * positioned lines a `SmartArt3DTextBlock` carries (built from the same 2D\n * projection the SVG renderer uses), and takes the runtime `three` module as\n * a parameter so it stays out of the tsup-bundled `dist/index.mjs` (see the\n * \"no runtime `three` import\" rule in `three-view/types.ts`).\n *\n * @module smartart-3d/text-block-texture\n */\nimport type * as THREE from 'three';\n\nimport type { SmartArt3DTextBlock } from '../render/smartart-3d-types';\nimport type { ThreeModule } from '../three-view/types';\n\n/** Supersampling factor for crisp text at any zoom. */\nconst SUPERSAMPLE = 3;\n\n/** A built label texture plus the world-space plane size it should fill. */\nexport interface TextBlockTexture {\n\ttexture: THREE.CanvasTexture;\n\tworldWidth: number;\n\tworldHeight: number;\n}\n\n/** Build a canvas texture rendering `block`'s pre-wrapped lines, or `null` off-DOM. */\nexport function buildTextBlockTexture(\n\tthree: ThreeModule,\n\tblock: SmartArt3DTextBlock,\n): TextBlockTexture | null {\n\tif (typeof document === 'undefined' || block.lines.every((l) => l.text.length === 0)) {\n\t\treturn null;\n\t}\n\tconst worldWidth = Math.max(1, block.maxWidth);\n\tconst worldHeight = Math.max(1, block.maxHeight);\n\tconst canvas = document.createElement('canvas');\n\tcanvas.width = Math.max(8, Math.round(worldWidth * SUPERSAMPLE));\n\tcanvas.height = Math.max(8, Math.round(worldHeight * SUPERSAMPLE));\n\tconst ctx2d = canvas.getContext('2d');\n\tif (!ctx2d) {\n\t\treturn null;\n\t}\n\n\tconst weight = block.fontWeight ?? 400;\n\tconst italic = block.fontStyle === 'italic' ? 'italic ' : '';\n\tconst family = block.fontFamily\n\t\t? `${block.fontFamily}, system-ui, sans-serif`\n\t\t: 'system-ui, -apple-system, Segoe UI, Roboto, sans-serif';\n\tconst px = Math.max(6, block.fontSize) * SUPERSAMPLE;\n\n\tctx2d.clearRect(0, 0, canvas.width, canvas.height);\n\tctx2d.fillStyle = block.color;\n\tctx2d.textAlign = 'center';\n\tctx2d.textBaseline = 'alphabetic';\n\tctx2d.font = `${italic}${weight} ${px}px ${family}`;\n\tconst centerX = canvas.width / 2;\n\tconst centerY = canvas.height / 2;\n\tfor (const line of block.lines) {\n\t\tif (!line.text) {\n\t\t\tcontinue;\n\t\t}\n\t\t// `dy` is a y-up offset from the block centre; canvas y grows downward.\n\t\tctx2d.fillText(line.text, centerX, centerY - line.dy * SUPERSAMPLE);\n\t}\n\n\tconst texture = new three.CanvasTexture(canvas);\n\ttexture.colorSpace = three.SRGBColorSpace;\n\ttexture.minFilter = three.LinearFilter;\n\ttexture.magFilter = three.LinearFilter;\n\t// See `smartart-3d/text-texture.ts` for why flipY must stay false with a\n\t// compensating UV flip: WebGL2 forbids UNPACK_FLIP_Y_WEBGL for some texture\n\t// targets, and leaving it enabled pollutes global pixel-store state.\n\ttexture.flipY = false;\n\ttexture.premultiplyAlpha = false;\n\ttexture.wrapT = three.RepeatWrapping;\n\ttexture.repeat.set(1, -1);\n\ttexture.offset.set(0, 1);\n\ttexture.needsUpdate = true;\n\n\treturn { texture, worldWidth, worldHeight };\n}\n","/**\n * Build the three.js `Object3D` for one flat `SmartArt3DMesh` (fill + stroke\n * outline + text label), for `view-scene.ts`.\n *\n * @module smartart-3d/flat-mesh-object\n */\nimport type * as THREE from 'three';\n\nimport type { SmartArt3DMesh } from '../render/smartart-3d-types';\nimport type { ThreeModule } from '../three-view/types';\nimport { buildTextBlockTexture } from './text-block-texture';\n\n/** Anything the scene must call `.dispose()` on when unmounted. */\nexport interface Disposable {\n\tdispose: () => void;\n}\n\n/** The built pieces for one mesh: the group to add to the scene, plus disposables. */\nexport interface MeshObject {\n\tgroup: THREE.Group;\n\tdisposables: Disposable[];\n}\n\n/** z-lift of the stroke outline above its fill, so the two don't z-fight. */\nconst STROKE_Z_LIFT = 0.05;\n\nfunction buildShape(three: ThreeModule, mesh: SmartArt3DMesh): THREE.Shape {\n\tconst shape = new three.Shape(mesh.outline.map((p) => new three.Vector2(p.x, p.y)));\n\tfor (const hole of mesh.holes ?? []) {\n\t\tshape.holes.push(new three.Path(hole.map((p) => new three.Vector2(p.x, p.y))));\n\t}\n\treturn shape;\n}\n\n/** Build the fill mesh for a flat (zero-depth) `SmartArt3DMesh`. */\nfunction buildFlatFill(\n\tthree: ThreeModule,\n\tmesh: SmartArt3DMesh,\n\tshape: THREE.Shape,\n\tdisposables: Disposable[],\n): THREE.Mesh | null {\n\tif (mesh.fillNone) {\n\t\treturn null;\n\t}\n\tconst geometry = new three.ShapeGeometry(shape);\n\tconst material = new three.MeshBasicMaterial({\n\t\tcolor: mesh.fill,\n\t\tside: three.DoubleSide,\n\t\ttransparent: mesh.opacity < 1,\n\t\topacity: mesh.opacity,\n\t});\n\tdisposables.push(geometry, material);\n\treturn new three.Mesh(geometry, material);\n}\n\n/** Build the stroke outline (and hole outlines) as line loops. */\nfunction buildStrokeLines(\n\tthree: ThreeModule,\n\tmesh: SmartArt3DMesh,\n\tdisposables: Disposable[],\n): THREE.LineLoop[] {\n\tif (mesh.strokeWidth <= 0 || mesh.stroke === 'transparent') {\n\t\treturn [];\n\t}\n\tconst material = new three.LineBasicMaterial({ color: mesh.stroke });\n\tdisposables.push(material);\n\tconst loops = [mesh.outline, ...(mesh.holes ?? [])];\n\treturn loops.map((loop) => {\n\t\tconst geometry = new three.BufferGeometry().setFromPoints(\n\t\t\tloop.map((p) => new three.Vector3(p.x, p.y, STROKE_Z_LIFT)),\n\t\t);\n\t\tdisposables.push(geometry);\n\t\treturn new three.LineLoop(geometry, material);\n\t});\n}\n\n/** Build the text label plane, or `null` when the mesh has no text. */\nfunction buildTextPlane(\n\tthree: ThreeModule,\n\tmesh: SmartArt3DMesh,\n\tgroup: THREE.Group,\n\tdisposables: Disposable[],\n): void {\n\tif (!mesh.textBlock) {\n\t\treturn;\n\t}\n\tconst built = buildTextBlockTexture(three, mesh.textBlock);\n\tif (!built) {\n\t\treturn;\n\t}\n\tdisposables.push(built.texture);\n\tconst geometry = new three.PlaneGeometry(built.worldWidth, built.worldHeight);\n\tconst material = new three.MeshBasicMaterial({\n\t\tmap: built.texture,\n\t\ttransparent: true,\n\t\tdepthWrite: false,\n\t});\n\tdisposables.push(geometry, material);\n\tconst plane = new three.Mesh(geometry, material);\n\t// `textBlock` carries its own world position (already includes the\n\t// shape's rotation applied to its centre); the group itself is placed at\n\t// the shape's own centre, so offset back to absolute world space here.\n\tplane.position.set(\n\t\tmesh.textBlock.x - mesh.position.x,\n\t\tmesh.textBlock.y - mesh.position.y,\n\t\tmesh.textBlock.z - mesh.position.z,\n\t);\n\tgroup.add(plane);\n}\n\n/** Build the complete `Object3D` for one flat mesh. */\nexport function buildFlatMeshObject(three: ThreeModule, mesh: SmartArt3DMesh): MeshObject {\n\tconst disposables: Disposable[] = [];\n\tconst group = new three.Group();\n\tgroup.position.set(mesh.position.x, mesh.position.y, mesh.position.z);\n\n\tconst shape = buildShape(three, mesh);\n\tconst fill = buildFlatFill(three, mesh, shape, disposables);\n\tif (fill) {\n\t\tgroup.add(fill);\n\t}\n\tfor (const line of buildStrokeLines(three, mesh, disposables)) {\n\t\tgroup.add(line);\n\t}\n\tbuildTextPlane(three, mesh, group, disposables);\n\n\treturn { group, disposables };\n}\n","/**\n * `<pptx-three-view>` scene module for 3D SmartArt.\n *\n * Flat quick styles (Simple Fill, White Outline, Subtle, Moderate, Intense):\n * every mesh is a zero-depth `ShapeGeometry` face, unlit (`MeshBasicMaterial`),\n * under a fixed orthographic camera framing the diagram's own viewBox\n * (`model.bounds`) - the same geometry/fills/text the 2D SVG renderer draws,\n * built by `render/smartart-3d-drawing-model.ts`. Bevel/scene quick styles are\n * not implemented yet: `model.styleCategory` is `'bevel'`/`'scene'` for those\n * (currently unreachable, since `buildSmartArt3DSpecForElement` only emits\n * `'flat'`/legacy-layout models) and this module renders them with the same\n * flat pipeline as a stopgap rather than refusing to mount.\n *\n * Must not import `three` at runtime (use `ctx.three`): this module is\n * reachable from the main barrel through the scene registry.\n *\n * @module smartart-3d/view-scene\n */\nimport type * as THREE from 'three';\n\nimport type { SmartArt3DModel } from '../render/smartart-3d-types';\nimport type {\n\tThreeOrbitControls,\n\tThreeViewContext,\n\tThreeViewScene,\n\tThreeViewSize,\n} from '../three-view/types';\nimport type { Disposable } from './flat-mesh-object';\nimport { buildFlatMeshObject } from './flat-mesh-object';\n\n/** Camera distance from the origin along +z (orthographic, so magnitude only matters for near/far). */\nconst CAMERA_DISTANCE = 1000;\n/** Fractional margin added around the diagram's own bounds when framing it. */\nconst FRAME_MARGIN = 1.06;\n\nfunction buildOrthographicCamera(\n\tbounds: { width: number; height: number },\n\tthree: typeof THREE,\n): THREE.OrthographicCamera {\n\tconst w = Math.max(1, bounds.width) * FRAME_MARGIN;\n\tconst h = Math.max(1, bounds.height) * FRAME_MARGIN;\n\tconst camera = new three.OrthographicCamera(\n\t\t-w / 2,\n\t\tw / 2,\n\t\th / 2,\n\t\t-h / 2,\n\t\t-CAMERA_DISTANCE * 2,\n\t\tCAMERA_DISTANCE * 2,\n\t);\n\tcamera.position.set(0, 0, CAMERA_DISTANCE);\n\tcamera.lookAt(0, 0, 0);\n\treturn camera;\n}\n\n/** Fit the camera's frustum to `bounds`, letterboxing to the view's own aspect ratio. */\nfunction fitCamera(\n\tcamera: THREE.OrthographicCamera,\n\tbounds: { width: number; height: number },\n\tsize: ThreeViewSize,\n): void {\n\tconst w = Math.max(1, bounds.width) * FRAME_MARGIN;\n\tconst h = Math.max(1, bounds.height) * FRAME_MARGIN;\n\tconst aspect = Math.max(1, size.pixelWidth) / Math.max(1, size.pixelHeight);\n\tconst halfW = w / 2;\n\tconst halfH = h / 2;\n\tconst fitHalfH = Math.max(halfH, halfW / aspect);\n\tconst fitHalfW = fitHalfH * aspect;\n\tcamera.left = -fitHalfW;\n\tcamera.right = fitHalfW;\n\tcamera.top = fitHalfH;\n\tcamera.bottom = -fitHalfH;\n\tcamera.updateProjectionMatrix();\n}\n\nexport async function mountSmartArt3DView(\n\tmodel: SmartArt3DModel,\n\tctx: ThreeViewContext,\n): Promise<ThreeViewScene> {\n\tconst { three } = ctx;\n\tconst scene = new three.Scene();\n\tif (model.background) {\n\t\tscene.background = new three.Color(model.background);\n\t}\n\n\tconst disposables: Disposable[] = [];\n\tfor (const mesh of model.meshes) {\n\t\tconst built = buildFlatMeshObject(three, mesh);\n\t\tscene.add(built.group);\n\t\tdisposables.push(...built.disposables);\n\t}\n\n\tconst camera = buildOrthographicCamera(model.bounds, three);\n\tconst authoredPosition = camera.position.clone();\n\tfitCamera(camera, model.bounds, ctx.size);\n\n\tlet controls: ThreeOrbitControls | null = null;\n\tlet dampingActive = false;\n\tif (ctx.OrbitControls) {\n\t\tcontrols = new ctx.OrbitControls(camera, ctx.eventTarget);\n\t\tcontrols.enableDamping = true;\n\t\tcontrols.enablePan = false;\n\t\tcontrols.enabled = ctx.interactive;\n\t\tcontrols.enableRotate = ctx.interactive;\n\t\tcontrols.enableZoom = ctx.interactive;\n\t\tconst onChange = (): void => {\n\t\t\tdampingActive = true;\n\t\t\tctx.requestRender();\n\t\t};\n\t\tcontrols.addEventListener('change', onChange);\n\t}\n\n\tconst resetView = (): void => {\n\t\tcamera.position.copy(authoredPosition);\n\t\tcamera.lookAt(0, 0, 0);\n\t\tif (controls) {\n\t\t\tcontrols.target.set(0, 0, 0);\n\t\t\tcontrols.update();\n\t\t}\n\t\tctx.requestRender();\n\t};\n\tconst onDoubleClick = (): void => resetView();\n\tctx.eventTarget.addEventListener('dblclick', onDoubleClick);\n\n\treturn {\n\t\trender(renderer) {\n\t\t\tif (controls) {\n\t\t\t\tdampingActive = controls.update();\n\t\t\t}\n\t\t\trenderer.render(scene, camera);\n\t\t},\n\t\tresize(size) {\n\t\t\tfitCamera(camera, model.bounds, size);\n\t\t},\n\t\tisAnimating() {\n\t\t\treturn dampingActive;\n\t\t},\n\t\tsetInteractive(on) {\n\t\t\tif (!controls) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcontrols.enabled = on;\n\t\t\tcontrols.enableRotate = on;\n\t\t\tcontrols.enableZoom = on;\n\t\t\tif (!on) {\n\t\t\t\tresetView();\n\t\t\t}\n\t\t},\n\t\tdispose() {\n\t\t\tctx.eventTarget.removeEventListener('dblclick', onDoubleClick);\n\t\t\tcontrols?.dispose();\n\t\t\tfor (const d of disposables) {\n\t\t\t\td.dispose();\n\t\t\t}\n\t\t},\n\t};\n}\n"],"names":[],"mappings":"AAkBA;AACA,MAAM,WAAW,GAAG,CAAC;AASrB;AACM,SAAU,qBAAqB,CACpC,KAAkB,EAClB,KAA0B,EAAA;IAE1B,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;AACrF,QAAA,OAAO,IAAI;IACZ;AACA,IAAA,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;AAC9C,IAAA,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,IAAA,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,WAAW,CAAC,CAAC;AAChE,IAAA,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;IACrC,IAAI,CAAC,KAA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