pptx-angular-viewer 4.0.0 → 4.1.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/fesm2022/{pptx-angular-viewer-chat-history-idb-hykKkAfr.mjs → pptx-angular-viewer-chat-history-idb-OhxbpmW3.mjs} +2 -2
- package/fesm2022/{pptx-angular-viewer-chat-history-idb-hykKkAfr.mjs.map → pptx-angular-viewer-chat-history-idb-OhxbpmW3.mjs.map} +1 -1
- package/fesm2022/{pptx-angular-viewer-index-PoHn1XJd.mjs → pptx-angular-viewer-index-7b9uo9P2.mjs} +257 -28
- package/fesm2022/pptx-angular-viewer-index-7b9uo9P2.mjs.map +1 -0
- package/fesm2022/{pptx-angular-viewer-pptx-angular-viewer-Btf_cx1D.mjs → pptx-angular-viewer-pptx-angular-viewer-CWKJaKd3.mjs} +2926 -691
- package/fesm2022/{pptx-angular-viewer-pptx-angular-viewer-Btf_cx1D.mjs.map → pptx-angular-viewer-pptx-angular-viewer-CWKJaKd3.mjs.map} +1 -1
- package/fesm2022/pptx-angular-viewer.mjs +1 -1
- package/i18n/de.cjs +2 -0
- package/i18n/de.mjs +2 -0
- package/i18n/es.cjs +2 -0
- package/i18n/es.mjs +2 -0
- package/i18n/fr.cjs +2 -0
- package/i18n/fr.mjs +2 -0
- package/i18n/zh-CN.cjs +2 -0
- package/i18n/zh-CN.mjs +2 -0
- package/package.json +3 -3
- package/types/pptx-angular-viewer.d.ts +317 -71
- package/types/pptx-angular-viewer.d.ts.map +1 -1
- package/fesm2022/pptx-angular-viewer-index-PoHn1XJd.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pptx-angular-viewer-index-PoHn1XJd.mjs","sources":["../../src/internal/shared-src/smartart-3d/text-texture.ts","../../src/internal/shared-src/smartart-3d/meshes.ts","../../src/internal/shared-src/smartart-3d/scene.ts","../../src/internal/shared-src/smartart-3d/index.ts"],"sourcesContent":["/**\n * Three.js SmartArt renderer - front-face text textures.\n *\n * Renders a node label onto an offscreen 2D canvas and wraps it as a\n * `THREE.CanvasTexture`, sized to sit on the extruded block's front face. Text\n * is word-wrapped and auto-shrunk to fit the node footprint. Returns `null` in\n * non-DOM environments (SSR / unit tests).\n */\n\nimport { CanvasTexture, LinearFilter, RepeatWrapping, SRGBColorSpace } from 'three';\n\nimport type { TextStyleAnimationDescriptor } from '../render/animation-text-style-resolve';\n\n/** A built label texture plus the world-space plane size it should fill. */\nexport interface SmartArtTextTexture {\n\ttexture: CanvasTexture;\n\t/** Plane width in world (layout-pixel) units. */\n\tworldWidth: number;\n\t/** Plane height in world units. */\n\tworldHeight: number;\n}\n\n/** Supersampling factor for crisp text at oblique camera angles. */\nconst SUPERSAMPLE = 4;\n/** Fraction of the footprint the text plane occupies (inset padding). */\nconst FILL = 0.86;\n\n/** Greedily word-wrap `text` to lines that fit `maxWidth` at the given font. */\nfunction wrapLines(ctx: CanvasRenderingContext2D, text: string, maxWidth: number): string[] {\n\tconst words = text.split(/\\s+/u).filter(Boolean);\n\tif (words.length === 0) {\n\t\treturn [];\n\t}\n\tconst lines: string[] = [];\n\tlet line = words[0];\n\tfor (let i = 1; i < words.length; i++) {\n\t\tconst candidate = `${line} ${words[i]}`;\n\t\tif (ctx.measureText(candidate).width <= maxWidth) {\n\t\t\tline = candidate;\n\t\t} else {\n\t\t\tlines.push(line);\n\t\t\tline = words[i];\n\t\t}\n\t}\n\tlines.push(line);\n\treturn lines;\n}\n\n/** Resolve the canvas `font` string weight/style + effective colour for an optional emphasis override. */\nfunction resolveEmphasisFont(\n\tcolor: string,\n\temphasis: TextStyleAnimationDescriptor | undefined,\n): { weight: string; italic: string; color: string; scale: number } {\n\tconst weight = emphasis?.bold === undefined ? '600' : emphasis.bold ? '700' : '400';\n\tconst italic = emphasis?.italic ? 'italic ' : '';\n\tconst scale =\n\t\ttypeof emphasis?.fontScale === 'number' &&\n\t\tNumber.isFinite(emphasis.fontScale) &&\n\t\temphasis.fontScale > 0\n\t\t\t? emphasis.fontScale\n\t\t\t: 1;\n\treturn { weight, italic, color: emphasis?.color ?? color, scale };\n}\n\n/**\n * Build a label texture for a node's front face.\n *\n * @param text Label text.\n * @param color CSS colour for the text.\n * @param fontSize Requested font size in layout pixels.\n * @param footW Node footprint width (layout pixels).\n * @param footH Node footprint height (layout pixels).\n * @param emphasis Active font-style emphasis override (bold/italic/underline/size/colour), if any.\n * @returns The texture + plane size, or `null` when no DOM / empty text.\n */\nexport function makeTextTexture(\n\ttext: string,\n\tcolor: string,\n\tfontSize: number,\n\tfootW: number,\n\tfootH: number,\n\temphasis?: TextStyleAnimationDescriptor,\n): SmartArtTextTexture | null {\n\tif (typeof document === 'undefined' || !text.trim() || footW <= 0 || footH <= 0) {\n\t\treturn null;\n\t}\n\n\tconst { weight, italic, color: effectiveColor, scale } = resolveEmphasisFont(color, emphasis);\n\tconst worldWidth = footW * FILL;\n\tconst worldHeight = footH * FILL;\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 ctx = canvas.getContext('2d');\n\tif (!ctx) {\n\t\treturn null;\n\t}\n\n\tconst family = 'system-ui, -apple-system, Segoe UI, Roboto, sans-serif';\n\tconst maxTextWidth = canvas.width * 0.94;\n\tconst fontString = (px: number): string => `${italic}${weight} ${px}px ${family}`;\n\n\t// Shrink the font until the wrapped block fits the canvas height.\n\tlet px = Math.max(6, fontSize) * scale * SUPERSAMPLE;\n\tlet lines: string[] = [];\n\tfor (let attempt = 0; attempt < 12; attempt++) {\n\t\tctx.font = fontString(px);\n\t\tlines = wrapLines(ctx, text, maxTextWidth);\n\t\tconst lineHeight = px * 1.2;\n\t\tif (lines.length * lineHeight <= canvas.height * 0.96 || px <= 6 * SUPERSAMPLE) {\n\t\t\tbreak;\n\t\t}\n\t\tpx *= 0.88;\n\t}\n\n\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\tctx.fillStyle = effectiveColor;\n\tctx.textAlign = 'center';\n\tctx.textBaseline = 'middle';\n\tctx.font = fontString(px);\n\tconst lineHeight = px * 1.2;\n\tconst blockHeight = lines.length * lineHeight;\n\tconst startY = canvas.height / 2 - blockHeight / 2 + lineHeight / 2;\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tconst y = startY + i * lineHeight;\n\t\tctx.fillText(lines[i], canvas.width / 2, y);\n\t\tif (emphasis?.underline) {\n\t\t\tconst w = ctx.measureText(lines[i]).width;\n\t\t\tctx.strokeStyle = effectiveColor;\n\t\t\tctx.lineWidth = Math.max(1, px * 0.06);\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(canvas.width / 2 - w / 2, y + px * 0.32);\n\t\t\tctx.lineTo(canvas.width / 2 + w / 2, y + px * 0.32);\n\t\t\tctx.stroke();\n\t\t}\n\t}\n\n\tconst texture = new CanvasTexture(canvas);\n\ttexture.colorSpace = SRGBColorSpace;\n\ttexture.minFilter = LinearFilter;\n\ttexture.magFilter = LinearFilter;\n\t// Disable GPU-side flip: WebGL2 does not allow UNPACK_FLIP_Y_WEBGL for\n\t// texImage3D targets (depth buffers, LUTs, shadow maps). Leaving flipY=true\n\t// (the Three.js default) pollutes the global pixel-store state and causes\n\t// \"INVALID_OPERATION: texImage3D: FLIP_Y or PREMULTIPLY_ALPHA isn't allowed\"\n\t// errors. Compensate in UV space instead.\n\ttexture.flipY = false;\n\ttexture.premultiplyAlpha = false;\n\ttexture.wrapT = 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 * Three.js SmartArt renderer - mesh-group construction.\n *\n * Turns a pure {@link SmartArt3DModel} into a `THREE.Group` of extruded blocks\n * (with bevels, edge outlines, and front-face text planes) plus connector\n * lines. All allocated GPU resources are tracked so the caller can dispose them\n * deterministically.\n */\n\nimport {\n\tBufferGeometry,\n\tColor,\n\tEdgesGeometry,\n\tEuler,\n\tExtrudeGeometry,\n\tGroup,\n\tLine,\n\tLineBasicMaterial,\n\tLineSegments,\n\tMesh,\n\tMeshBasicMaterial,\n\tMeshStandardMaterial,\n\tPlaneGeometry,\n\tShape,\n\tVector3,\n} from 'three';\n\nimport type { TextStyleAnimationDescriptor } from '../render/animation-text-style-resolve';\nimport type { SmartArt3DMesh, SmartArt3DModel } from '../render/smartart-3d-types';\nimport { makeTextTexture } from './text-texture';\n\n/** A disposable GPU resource (geometry, material, or texture). */\ninterface Disposable {\n\tdispose: () => void;\n}\n\n/** A built mesh group plus its teardown hook. */\nexport interface BuiltMeshGroup {\n\tgroup: Group;\n\t/**\n\t * Rebuild every node's label plane with a new font-style emphasis override\n\t * (or `undefined` to clear it) - the LABEL textures are baked into a canvas\n\t * (see `text-texture.ts`), so applying an emphasis change means disposing\n\t * and repainting them, unlike a CSS override on DOM text. Leaves the block\n\t * extrusions and connectors untouched.\n\t */\n\tsetTextStyle: (style: TextStyleAnimationDescriptor | undefined) => void;\n\tdispose: () => void;\n}\n\n/** Build the extruded geometry for one node. */\nfunction extrudeGeometry(m: SmartArt3DMesh): ExtrudeGeometry {\n\tconst shape = new Shape();\n\tm.outline.forEach((p, i) => {\n\t\tif (i === 0) {\n\t\t\tshape.moveTo(p.x, p.y);\n\t\t} else {\n\t\t\tshape.lineTo(p.x, p.y);\n\t\t}\n\t});\n\tshape.closePath();\n\n\tconst bevelEnabled = m.bevel > 0;\n\treturn new ExtrudeGeometry(shape, {\n\t\tdepth: m.depth,\n\t\tbevelEnabled,\n\t\tbevelThickness: m.bevel,\n\t\tbevelSize: m.bevel,\n\t\tbevelSegments: 2,\n\t\tcurveSegments: m.rounded ? 24 : 1,\n\t\tsteps: 1,\n\t});\n}\n\n/** Add the extruded block + edge outline for one node to the group. */\nfunction addBlock(group: Group, disposables: Disposable[], m: SmartArt3DMesh): ExtrudeGeometry {\n\tconst geo = extrudeGeometry(m);\n\tconst material = new MeshStandardMaterial({\n\t\tcolor: new Color(m.fill),\n\t\tmetalness: 0.12,\n\t\troughness: 0.52,\n\t\ttransparent: m.opacity < 1,\n\t\topacity: m.opacity,\n\t});\n\tconst mesh = new Mesh(geo, material);\n\tmesh.position.set(m.position.x, m.position.y, m.position.z);\n\tmesh.rotation.set(m.rotation.x, m.rotation.y, m.rotation.z);\n\tgroup.add(mesh);\n\tdisposables.push(geo, material);\n\n\tif (m.strokeWidth > 0) {\n\t\tconst edges = new EdgesGeometry(geo, 30);\n\t\tconst lineMaterial = new LineBasicMaterial({ color: new Color(m.stroke) });\n\t\tconst line = new LineSegments(edges, lineMaterial);\n\t\tline.position.copy(mesh.position);\n\t\tline.rotation.copy(mesh.rotation);\n\t\tgroup.add(line);\n\t\tdisposables.push(edges, lineMaterial);\n\t}\n\treturn geo;\n}\n\n/** One node's currently-mounted label plane (or none), tracked for `setTextStyle` rebuilds. */\ninterface LabelEntry {\n\tnode: SmartArt3DMesh;\n\tplane: Mesh | null;\n\tdisposables: Disposable[];\n}\n\n/** Build a front-face text plane for one node, or `null` when it has no label / no DOM. */\nfunction buildLabelPlane(\n\tm: SmartArt3DMesh,\n\ttextStyle: TextStyleAnimationDescriptor | undefined,\n): { plane: Mesh; disposables: Disposable[] } | null {\n\tif (!m.text) {\n\t\treturn null;\n\t}\n\tconst tex = makeTextTexture(\n\t\tm.text,\n\t\tm.textColor,\n\t\tm.fontSize,\n\t\tm.halfWidth * 2,\n\t\tm.halfHeight * 2,\n\t\ttextStyle,\n\t);\n\tif (!tex) {\n\t\treturn null;\n\t}\n\tconst planeGeo = new PlaneGeometry(tex.worldWidth, tex.worldHeight);\n\tconst planeMaterial = new MeshBasicMaterial({\n\t\tmap: tex.texture,\n\t\ttransparent: true,\n\t\tdepthWrite: false,\n\t});\n\tconst plane = new Mesh(planeGeo, planeMaterial);\n\t// Float just past the front (+z) face, clearing any bevel, following the\n\t// mesh's rotation so the label sits flat on the (possibly rotated) face.\n\tconst euler = new Euler(m.rotation.x, m.rotation.y, m.rotation.z);\n\tconst offset = new Vector3(0, 0, m.depth + m.bevel + 0.4).applyEuler(euler);\n\tplane.position.set(m.position.x + offset.x, m.position.y + offset.y, m.position.z + offset.z);\n\tplane.rotation.copy(euler);\n\treturn { plane, disposables: [planeGeo, planeMaterial, tex.texture] };\n}\n\n/** Add a connector poly-line on the base plane. */\nfunction addConnectors(group: Group, disposables: Disposable[], model: SmartArt3DModel): void {\n\tfor (const c of model.connectors) {\n\t\tif (c.points.length < 2) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst geo = new BufferGeometry().setFromPoints(c.points.map((p) => new Vector3(p.x, p.y, p.z)));\n\t\tconst material = new LineBasicMaterial({\n\t\t\tcolor: new Color(c.color),\n\t\t\ttransparent: true,\n\t\t\topacity: 0.7,\n\t\t});\n\t\tgroup.add(new Line(geo, material));\n\t\tdisposables.push(geo, material);\n\t}\n}\n\n/** Remove and dispose one label entry's current plane, if any. */\nfunction clearLabel(group: Group, entry: LabelEntry): void {\n\tif (entry.plane) {\n\t\tgroup.remove(entry.plane);\n\t}\n\tfor (const d of entry.disposables) {\n\t\td.dispose();\n\t}\n\tentry.plane = null;\n\tentry.disposables = [];\n}\n\n/**\n * Build a `THREE.Group` for a SmartArt 3D model. The group is centred on the\n * origin (the model positions already are); callers add it to the scene.\n * `textStyle` is a font-style emphasis override applied to every node's\n * label (see {@link BuiltMeshGroup.setTextStyle}); emphasis is authored per\n * shape/animation-target, not per SmartArt node, so it applies uniformly.\n */\nexport function buildMeshGroup(\n\tmodel: SmartArt3DModel,\n\ttextStyle?: TextStyleAnimationDescriptor,\n): BuiltMeshGroup {\n\tconst group = new Group();\n\tconst blockDisposables: Disposable[] = [];\n\tconst labelEntries: LabelEntry[] = model.meshes.map((m) => {\n\t\taddBlock(group, blockDisposables, m);\n\t\tconst built = buildLabelPlane(m, textStyle);\n\t\tif (built) {\n\t\t\tgroup.add(built.plane);\n\t\t}\n\t\treturn { node: m, plane: built?.plane ?? null, disposables: built?.disposables ?? [] };\n\t});\n\taddConnectors(group, blockDisposables, model);\n\n\treturn {\n\t\tgroup,\n\t\tsetTextStyle(style) {\n\t\t\tfor (const entry of labelEntries) {\n\t\t\t\tclearLabel(group, entry);\n\t\t\t\tconst built = buildLabelPlane(entry.node, style);\n\t\t\t\tif (built) {\n\t\t\t\t\tgroup.add(built.plane);\n\t\t\t\t\tentry.plane = built.plane;\n\t\t\t\t\tentry.disposables = built.disposables;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdispose() {\n\t\t\tfor (const d of blockDisposables) {\n\t\t\t\td.dispose();\n\t\t\t}\n\t\t\tfor (const entry of labelEntries) {\n\t\t\t\tclearLabel(group, entry);\n\t\t\t}\n\t\t},\n\t};\n}\n","/**\n * Three.js SmartArt renderer - vanilla scene runtime.\n *\n * Frames a {@link SmartArt3DModel} in a WebGL scene (lights, perspective\n * camera, optional OrbitControls, render loop) on a caller-provided canvas.\n * Pure vanilla three.js - no framework code - so the React, Vue, and Angular\n * bindings all mount it through a thin canvas wrapper. `three` is imported here\n * only; this module lives behind the `pptx-viewer-shared/smartart-3d` subpath so\n * it is lazily loaded and `three` stays an optional dependency.\n */\n\nimport {\n\tAmbientLight,\n\tColor,\n\tDirectionalLight,\n\tPerspectiveCamera,\n\tScene,\n\tWebGLRenderer,\n} from 'three';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\n\nimport type { TextStyleAnimationDescriptor } from '../render/animation-text-style-resolve';\nimport type { SmartArt3DModel } from '../render/smartart-3d-types';\nimport { buildMeshGroup } from './meshes';\n\n/** Tunables for the mounted 3D view. */\nexport interface SmartArt3DViewOptions {\n\t/** Enable OrbitControls (rotate/zoom). Default `false`. */\n\tinteractive?: boolean;\n\t/** Slowly auto-rotate the model. Default `false`. */\n\tautoRotate?: boolean;\n\t/** Solid background colour `#rrggbb`; omit for transparent. */\n\tbackground?: string;\n\t/** Device pixel-ratio cap. Default `2`. */\n\tmaxPixelRatio?: number;\n\t/** Active font-style emphasis override (bold/italic/underline/size/colour) for every node's caption. */\n\ttextStyle?: TextStyleAnimationDescriptor;\n}\n\n/** Imperative handle to a mounted SmartArt 3D view. */\nexport interface SmartArt3DHandle {\n\t/** Resize the renderer + camera to new pixel dimensions. */\n\tresize: (width: number, height: number) => void;\n\t/** Toggle interactive orbit controls at runtime. */\n\tsetInteractive: (on: boolean) => void;\n\t/** Apply (or clear) a font-style emphasis override on every node's caption. */\n\tsetTextStyle: (style: TextStyleAnimationDescriptor | undefined) => void;\n\t/** Tear down the renderer, controls, and all GPU resources. */\n\tdispose: () => void;\n}\n\nconst FOV = 42;\n\n/** A bounding sphere of the 3D content (centre + radius). */\ninterface ContentSphere {\n\tcx: number;\n\tcy: number;\n\tcz: number;\n\tradius: number;\n}\n\n/** Bounding sphere of all meshes (expanded by footprint/depth) + connectors. */\nfunction contentSphere(model: SmartArt3DModel): ContentSphere {\n\tlet minX = Infinity;\n\tlet minY = Infinity;\n\tlet minZ = Infinity;\n\tlet maxX = -Infinity;\n\tlet maxY = -Infinity;\n\tlet maxZ = -Infinity;\n\tconst expand = (x: number, y: number, z: number, r: number): void => {\n\t\tminX = Math.min(minX, x - r);\n\t\tminY = Math.min(minY, y - r);\n\t\tminZ = Math.min(minZ, z - r);\n\t\tmaxX = Math.max(maxX, x + r);\n\t\tmaxY = Math.max(maxY, y + r);\n\t\tmaxZ = Math.max(maxZ, z + r);\n\t};\n\tfor (const m of model.meshes) {\n\t\tconst r = Math.max(m.halfWidth, m.halfHeight) + m.depth + m.bevel;\n\t\texpand(m.position.x, m.position.y, m.position.z, r);\n\t}\n\tfor (const c of model.connectors) {\n\t\tfor (const p of c.points) {\n\t\t\texpand(p.x, p.y, p.z, 1);\n\t\t}\n\t}\n\tif (!Number.isFinite(minX)) {\n\t\tconst fallback = Math.max(model.bounds.width, model.bounds.height) / 2 || 1;\n\t\treturn { cx: 0, cy: 0, cz: 0, radius: fallback };\n\t}\n\treturn {\n\t\tcx: (minX + maxX) / 2,\n\t\tcy: (minY + maxY) / 2,\n\t\tcz: (minZ + maxZ) / 2,\n\t\tradius: 0.5 * Math.hypot(maxX - minX, maxY - minY, maxZ - minZ) || 1,\n\t};\n}\n\n/** Camera distance that frames a bounding sphere of `radius` at the given FOV. */\nfunction frameDistance(radius: number, aspect: number): number {\n\tconst vFov = (FOV * Math.PI) / 180;\n\tconst hFov = 2 * Math.atan(Math.tan(vFov / 2) * aspect);\n\tconst minFov = Math.min(vFov, hFov);\n\treturn (radius / Math.sin(minFov / 2)) * 1.1;\n}\n\n/**\n * Mount a SmartArt 3D model onto a canvas and start rendering.\n *\n * @returns a handle for resizing, toggling interactivity, and disposal.\n */\nexport function mountSmartArt3D(\n\tcanvas: HTMLCanvasElement,\n\tmodel: SmartArt3DModel,\n\twidth: number,\n\theight: number,\n\toptions: SmartArt3DViewOptions = {},\n): SmartArt3DHandle {\n\tconst renderer = new WebGLRenderer({ canvas, antialias: true, alpha: !options.background });\n\trenderer.setPixelRatio(\n\t\tMath.min(\n\t\t\ttypeof window === 'undefined' ? 1 : window.devicePixelRatio || 1,\n\t\t\toptions.maxPixelRatio ?? 2,\n\t\t),\n\t);\n\trenderer.setSize(width, height, false);\n\n\tconst scene = new Scene();\n\tif (options.background) {\n\t\tscene.background = new Color(options.background);\n\t}\n\n\tconst { cx, cy, cz, radius } = contentSphere(model);\n\tconst aspect = width / Math.max(1, height);\n\tconst dist = frameDistance(radius, aspect);\n\n\tconst camera = new PerspectiveCamera(FOV, aspect, 0.1, dist * 8 + radius * 4);\n\t// A slight elevation + offset gives the extrusion/spatial depth a readable\n\t// three-quarter presence, framing the content's own centroid.\n\tcamera.position.set(cx + radius * 0.25, cy + radius * 0.3, cz + dist);\n\tcamera.lookAt(cx, cy, cz);\n\n\tscene.add(new AmbientLight(0xffffff, 0.62));\n\tconst key = new DirectionalLight(0xffffff, 0.95);\n\tkey.position.set(cx + radius, cy + radius * 1.4, cz + dist);\n\tscene.add(key);\n\tconst fill = new DirectionalLight(0xffffff, 0.3);\n\tfill.position.set(cx - radius, cy - radius * 0.6, cz + dist * 0.6);\n\tscene.add(fill);\n\n\tconst built = buildMeshGroup(model, options.textStyle);\n\tscene.add(built.group);\n\n\tlet controls: OrbitControls | null = null;\n\tconst enableControls = (on: boolean): void => {\n\t\tif (on && !controls) {\n\t\t\tcontrols = new OrbitControls(camera, canvas);\n\t\t\tcontrols.enablePan = false;\n\t\t\tcontrols.target.set(cx, cy, cz);\n\t\t\tcontrols.minDistance = dist * 0.4;\n\t\t\tcontrols.maxDistance = dist * 3;\n\t\t\tcontrols.update();\n\t\t} else if (!on && controls) {\n\t\t\tcontrols.dispose();\n\t\t\tcontrols = null;\n\t\t}\n\t\tif (controls) {\n\t\t\tcontrols.autoRotate = Boolean(options.autoRotate);\n\t\t\tcontrols.autoRotateSpeed = 1.2;\n\t\t}\n\t};\n\tenableControls(Boolean(options.interactive));\n\n\tlet frame = 0;\n\tlet disposed = false;\n\tconst renderLoop = (): void => {\n\t\tif (disposed) {\n\t\t\treturn;\n\t\t}\n\t\tframe = requestAnimationFrame(renderLoop);\n\t\tcontrols?.update();\n\t\trenderer.render(scene, camera);\n\t};\n\tframe = requestAnimationFrame(renderLoop);\n\n\treturn {\n\t\tresize(w: number, h: number) {\n\t\t\tcamera.aspect = w / Math.max(1, h);\n\t\t\tcamera.updateProjectionMatrix();\n\t\t\trenderer.setSize(w, h, false);\n\t\t},\n\t\tsetInteractive(on: boolean) {\n\t\t\tenableControls(on);\n\t\t},\n\t\tsetTextStyle(style: TextStyleAnimationDescriptor | undefined) {\n\t\t\tbuilt.setTextStyle(style);\n\t\t},\n\t\tdispose() {\n\t\t\tdisposed = true;\n\t\t\tcancelAnimationFrame(frame);\n\t\t\tcontrols?.dispose();\n\t\t\tbuilt.dispose();\n\t\t\trenderer.dispose();\n\t\t},\n\t};\n}\n","/**\n * `pptx-viewer-shared/smartart-3d` - vanilla three.js SmartArt scene runtime.\n *\n * Lazily imported by each binding's SmartArt 3D wrapper so `three` stays an\n * optional dependency: when it is not installed the dynamic import rejects and\n * the binding falls back to the SVG `SmartArtRenderer`. The pure model builder\n * (`buildSmartArt3DModel`) and its types live in the main barrel\n * (`pptx-viewer-shared`) and should be imported from there directly.\n */\n\nexport { mountSmartArt3D } from './scene';\nexport type { SmartArt3DHandle, SmartArt3DViewOptions } from './scene';\nexport type {\n\tSmartArt3DModel,\n\tSmartArt3DModelOptions,\n\tSmartArt3DMesh,\n\tSmartArt3DConnector,\n} from '../render/smartart-3d-types';\n"],"names":[],"mappings":";;;AAAA;;;;;;;AAOG;AAeH;AACA,MAAM,WAAW,GAAG,CAAC;AACrB;AACA,MAAM,IAAI,GAAG,IAAI;AAEjB;AACA,SAAS,SAAS,CAAC,GAA6B,EAAE,IAAY,EAAE,QAAgB,EAAA;AAC/E,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AAChD,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACvB,QAAA,OAAO,EAAE;IACV;IACA,MAAM,KAAK,GAAa,EAAE;AAC1B,IAAA,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC;AACnB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,SAAS,GAAG,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE;QACvC,IAAI,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,QAAQ,EAAE;YACjD,IAAI,GAAG,SAAS;QACjB;aAAO;AACN,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAChB,YAAA,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC;QAChB;IACD;AACA,IAAA,KAAK,CAAC,IAAI,CAA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