@fleox/agent3d 0.3.1 → 0.4.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.
Files changed (65) hide show
  1. package/README.md +11 -11
  2. package/changelog.json +10 -0
  3. package/dist/agent/agent3d.mjs +30 -12
  4. package/dist/agent/chunks/{export-bJwh2SqG.mjs → export-CEX5DFLo.mjs} +79 -3
  5. package/dist/agent/chunks/{package-fMbw9UGh.mjs → package-DjRnLzcU.mjs} +2 -2
  6. package/dist/agent/chunks/{tools-Cm4BqDkO.mjs → tools-CZyIc4zw.mjs} +13 -3
  7. package/dist/runtime/agent3d-photo.js +31 -0
  8. package/dist/runtime/agent3d-runtime.js +41 -41
  9. package/dist/runtime/agent3d-runtime.single.js +251 -246
  10. package/dist/runtime/chunks/assets-kC2Z1Xy_.js +1 -0
  11. package/dist/runtime/chunks/game-CbQaEB4q.js +20 -0
  12. package/dist/runtime/chunks/materials-jwhXlLYl.js +107 -0
  13. package/dist/runtime/chunks/model-CG5T_jcB.js +1 -0
  14. package/dist/runtime/chunks/num-CQNAlL82.js +1 -0
  15. package/dist/runtime/chunks/{photo-DNf14X7B.js → photo-w6dwHX7j.js} +25 -20
  16. package/dist/runtime/chunks/physicsHost-BU-2V-CZ.js +1 -0
  17. package/dist/runtime/chunks/{postfx-Cbf_vvOr.js → postfx-DnIeKXAh.js} +1 -1
  18. package/dist/runtime/chunks/postfx-ylpcQcVK.js +1 -0
  19. package/dist/runtime/chunks/svg-fYjsY-rV.js +1 -0
  20. package/dist/runtime/chunks/{text-rSo_2Luk.js → text-CySfj5sH.js} +1 -1
  21. package/dist/runtime/chunks/util-BEflQURG.js +1 -0
  22. package/dist/studio/assets/assets--ehPZf8R.js +1 -0
  23. package/dist/studio/assets/camera-C0sxfRxy.js +2 -0
  24. package/dist/studio/assets/{editor-NkBUKsDB.js → editor-DzyukvQl.js} +1 -1
  25. package/dist/studio/assets/game-DNpTN_Ga.js +19 -0
  26. package/dist/studio/assets/{generators-BjIs-kHx.js → generators-BuVeRXnC.js} +5 -5
  27. package/dist/studio/assets/index-C2nMYSoW.js +479 -0
  28. package/dist/studio/assets/model-DQgOrTs4.js +2 -0
  29. package/dist/studio/assets/num-CQNAlL82.js +1 -0
  30. package/dist/studio/assets/{params-DhsDKSDs.js → params-D-Ul6GSt.js} +1 -1
  31. package/dist/studio/assets/{photo-DAHd1yNF.js → photo-Dx2IBJ11.js} +25 -20
  32. package/dist/studio/assets/physicsHost-z9qn_mpg.js +1 -0
  33. package/dist/studio/assets/{postfx-BGu30OJK.js → postfx-B3jDEaEK.js} +13 -13
  34. package/dist/studio/assets/runtime-rd9RW3WH.js +572 -0
  35. package/dist/studio/assets/{shaders-Dt6FGXH_.js → shaders-bFhELLmD.js} +1 -1
  36. package/dist/studio/assets/svg-BkV9LeqP.js +2 -0
  37. package/dist/studio/assets/{text-B-HM422i.js → text-Dp8gdjSA.js} +1 -1
  38. package/dist/studio/index.html +1 -1
  39. package/package.json +2 -2
  40. package/plugin/.claude-plugin/plugin.json +1 -1
  41. package/plugin/skills/agent3d-assets/SKILL.md +26 -26
  42. package/plugin/skills/agent3d-create/SKILL.md +26 -26
  43. package/plugin/skills/agent3d-create/references/art-direction.md +3 -3
  44. package/plugin/skills/agent3d-create/references/recipes.md +6 -6
  45. package/plugin/skills/agent3d-edit/SKILL.md +22 -22
  46. package/plugin/skills/agent3d-edit/references/patch-ops.md +2 -2
  47. package/plugin/skills/agent3d-game/SKILL.md +7 -7
  48. package/plugin/skills/agent3d-publish/SKILL.md +24 -22
  49. package/plugin/skills/agent3d-publish/references/integrations.md +1 -1
  50. package/dist/runtime/chunks/assets-qnxDnVkj.js +0 -1
  51. package/dist/runtime/chunks/game-BoEiyZrL.js +0 -20
  52. package/dist/runtime/chunks/materials-dC4vDNHh.js +0 -107
  53. package/dist/runtime/chunks/model-BCAl_NRl.js +0 -1
  54. package/dist/runtime/chunks/physicsHost-ChPgysMQ.js +0 -1
  55. package/dist/runtime/chunks/postfx-CFucYRev.js +0 -1
  56. package/dist/runtime/chunks/svg-CLUxY6Zy.js +0 -1
  57. package/dist/runtime/chunks/util-CyaW1fcW.js +0 -1
  58. package/dist/studio/assets/assets-BW5lQkYR.js +0 -1
  59. package/dist/studio/assets/camera-BgzPVnn-.js +0 -2
  60. package/dist/studio/assets/game-DARpu0ah.js +0 -19
  61. package/dist/studio/assets/index-L-N-e2KM.js +0 -479
  62. package/dist/studio/assets/model-CqI8j03Z.js +0 -2
  63. package/dist/studio/assets/physicsHost-tEUto2-_.js +0 -1
  64. package/dist/studio/assets/runtime-C_qkIpAK.js +0 -572
  65. package/dist/studio/assets/svg-ZZt5MdNf.js +0 -2
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SVGLoader-CIYl0nEy.js","./three.module-CnI50X0U.js","./BufferGeometryUtils-CAlXAboW.js"])))=>i.map(i=>d[i]);
2
- import{I as e,In as t,P as n,U as r,h as i,ln as a,m as o,rn as s,u as c,x as l,xt as u}from"./three.module-CnI50X0U.js";import{r as d}from"./assets-BW5lQkYR.js";import{v as f}from"./camera-BgzPVnn-.js";import{i as p,n as m,r as h,t as g}from"./extrude-9bG8hr2C.js";import{a as _,s as v}from"./runtime-C_qkIpAK.js";import{h as y}from"./index-L-N-e2KM.js";var b=e=>!!e&&e!==`none`&&e!==`transparent`;function x(e,t,n){if(e===`currentColor`)return n;let r=/^url\(\s*['"]?#([^'")]+)['"]?\s*\)/.exec(e);if(r){let e=t.userData?.gradients?.[r[1]]?.stops??[];if(!e.length)return n;let i=new l(e[0].color),a=new l(e[e.length-1].color);return`#${i.lerp(a,.5).getHexString()}`}try{let t=new l;return t.setStyle(e,s),`#${t.getHexString(s)}`}catch{return n}}function S(e,t){let n=new c;for(let t of e.paths)for(let e of t.subPaths)for(let t of e.getPoints(4))n.expandByPoint(t);return(n.isEmpty()?100:Math.max(n.max.x-n.min.x,n.max.y-n.min.y,1e-6))/(t*10)}function C(e,t,n={}){let r=[],i=Math.max(1,Math.round(f(n.curveSegments,12))),a=S(e,i),o=n.currentColor??`#1f2330`;for(let s of e.paths){let e=s.userData?.style??{};if(e.visibility===`hidden`||e.visibility===`collapse`)continue;let c=f(e.opacity,1);if(b(e.fill)){let t=s.toShapes().map(e=>h(e,a));t.length&&r.push({kind:`fill`,color:x(e.fill,s,o),opacity:f(e.fillOpacity,1)*c,shapes:t})}if(n.strokes!==!1&&b(e.stroke)&&f(e.strokeWidth,1)>0){let n=t.getStrokeStyle(f(e.strokeWidth,1),`#000`,e.strokeLineJoin??`miter`,e.strokeLineCap??`butt`,f(e.strokeMiterLimit,4)),l=[];for(let e of s.subPaths){let r=m(e,a);if(r.length<2)continue;let o=t.pointsToStroke(r,n,i);o&&l.push(o)}if(l.length){let t=l.length===1?l[0]:w(l);r.push({kind:`stroke`,color:x(e.stroke,s,o),opacity:f(e.strokeOpacity,1)*c,stroke:t})}}}return r}function w(e){let t=0;for(let n of e)t+=n.getAttribute(`position`).count;let n=new Float32Array(t*3),r=0;for(let t of e){let e=t.getAttribute(`position`).array;n.set(e,r),r+=e.length,t.dispose()}let a=new i;return a.setAttribute(`position`,new o(n,3)),a}function T(e,n=12){let r=new c;for(let i of e){if(i.shapes)for(let e of i.shapes)for(let t of e.getPoints(n))r.expandByPoint(t);if(i.stroke){let e=i.stroke.getAttribute(`position`);for(let n=0;n<e.count;n++)r.expandByPoint(new t(e.getX(n),e.getY(n)))}}return r}function E(e,t,r,i,o){if(e.kind===`stroke`)return e.stroke?g(e.stroke,t):null;if(!e.shapes?.length)return null;if(t<=0)return new a(e.shapes,i);let s=Math.min(r,t*.45),c=new n(e.shapes,{depth:Math.max(t-s*2,t*.05),curveSegments:i,bevelEnabled:s>0,bevelThickness:s,bevelSize:s*.6,bevelOffset:0,bevelSegments:3});return c.translate(0,0,s),c.clearGroups(),p(c,50*Math.PI/180,o)}async function D(t,n){let[{SVGLoader:i},a]=await Promise.all([y(()=>import(`./SVGLoader-CIYl0nEy.js`),__vite__mapDeps([0,1]),import.meta.url),y(()=>import(`./BufferGeometryUtils-CAlXAboW.js`).then(e=>e.t),__vite__mapDeps([2,1]),import.meta.url)]),o=t.src.trim().startsWith(`<`)?t.src:await d(n.resolveAsset(t.src)),s=new i().parse(o),c=t.material?v(t.material):void 0,l=typeof c?.color==`string`?c.color:void 0,p=Math.max(1,Math.round(f(t.curveSegments,12))),m=C(s,i,{strokes:t.strokes,curveSegments:p,currentColor:l}),h=new r,g=T(m,p);if(!m.length||g.isEmpty())return h;let b=f(t.size,2),x=Math.max(g.max.x-g.min.x,1e-6),S=Math.max(g.max.y-g.min.y,1e-6),w=t.fit??`width`,D=b/(w===`height`?S:w===`max`?Math.max(x,S):x),O=Math.max(0,f(t.depth,.2)),k=O/D,A=f(t.bevel,0)/D,j=f(t.layerGap,O>0?O*.02:b*.002),M=t.keepColors??!t.material,N=new Map,P=async(e,r)=>{let i=M?`${e}|${r}`:`|${r}`,a=N.get(i);if(!a){let o=M?{roughness:.4,metalness:.1,...t.material??{},color:e,...r<1?{opacity:r}:{}}:t.material?{...t.material,...r<1?{opacity:r}:{}}:{color:`#dddddd`,roughness:.4,metalness:.1};a=await _(o,n,{defaultColor:e}),r<1&&(a.transparent=!0),O<=0&&(a.side=2),N.set(i,a)}return a},F=[];for(let e of m){let t=E(e,k,A,p,a);if(!t)continue;t.getAttribute(`normal`)||t.computeVertexNormals();let n=M?`${e.color}|${e.opacity}`:`|${e.opacity}`,r=F[F.length-1];r&&r.key===n?r.geos.push(t):F.push({key:n,color:e.color,opacity:e.opacity,geos:[t]})}let I=new r;for(let[t,n]of F.entries()){for(let t of n.geos){for(let e of Object.keys(t.attributes))[`position`,`normal`,`uv`].includes(e)||t.deleteAttribute(e);t.getAttribute(`uv`)||t.setAttribute(`uv`,new e(new Float32Array(t.getAttribute(`position`).count*2),2))}let r=n.geos.length===1?n.geos[0]:a.mergeGeometries(n.geos.map(e=>e.index?e.toNonIndexed():e),!1)??n.geos[0],i=new u(r,await P(n.color,n.opacity));i.position.z=t*j/D,I.add(i)}let L=(g.min.x+g.max.x)/2,R=(g.min.y+g.max.y)/2;return I.scale.set(D,-D,D),I.position.set(-L*D,R*D,-(O+Math.max(0,F.length-1)*j)/2),h.add(I),h}export{D as buildSvg};