@fleox/agent3d 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +350 -126
- package/changelog.json +12 -0
- package/dist/agent/agent3d.mjs +16 -16
- package/dist/agent/chunks/{cdp-CaKRRzMX.mjs → cdp-Bdtm4fBN.mjs} +3 -2
- package/dist/agent/chunks/{imageCodec-BpDU9Lsq.mjs → imageCodec-Dz9PFxi9.mjs} +1 -1
- package/dist/agent/chunks/{package-Ck7_Nszg.mjs → package-BOIyp_2B.mjs} +1 -1
- package/dist/agent/chunks/{render-Cbuhz5uW.mjs → render-CN4mgGLQ.mjs} +2 -2
- package/dist/runtime/agent3d-runtime.js +23 -23
- package/dist/runtime/agent3d-runtime.single.js +2 -2
- package/dist/runtime/chunks/{BufferGeometryUtils-Re3wQkXp.js → BufferGeometryUtils-XmME4f7Z.js} +1 -1
- package/dist/runtime/chunks/{EXRLoader-Bzm84si5.js → EXRLoader-CBdIpBMT.js} +1 -1
- package/dist/runtime/chunks/{FontLoader-BocwqK8V.js → FontLoader-dVu9WH2X.js} +1 -1
- package/dist/runtime/chunks/GLTFLoader-Z9Inv-Xm.js +1 -0
- package/dist/runtime/chunks/{GroundedSkybox-esvlRCO0.js → GroundedSkybox-g1ASZWNu.js} +1 -1
- package/dist/runtime/chunks/{HDRLoader-DHrHp8fs.js → HDRLoader-DBOMWa7O.js} +2 -2
- package/dist/{studio/assets/OrbitControls-fcOgB96a.js → runtime/chunks/OrbitControls-BIpWXK4x.js} +1 -1
- package/dist/runtime/chunks/{RectAreaLightUniformsLib-_mZ62yWn.js → RectAreaLightUniformsLib-4ZzgX9vp.js} +1 -1
- package/dist/runtime/chunks/{RoomEnvironment-CL4UR6ZW.js → RoomEnvironment-CXgfLJdO.js} +1 -1
- package/dist/runtime/chunks/{RoundedBoxGeometry-x-ot8ZSh.js → RoundedBoxGeometry-BViRogcJ.js} +1 -1
- package/dist/runtime/chunks/{SVGLoader-hRF0EwD-.js → SVGLoader-CV0U1EIF.js} +1 -1
- package/dist/runtime/chunks/{Sky-BrLN9Fk5.js → Sky-DGJXlPb_.js} +1 -1
- package/dist/runtime/chunks/{extrude-m04mghOS.js → extrude-D6WnITQq.js} +1 -1
- package/dist/runtime/chunks/{game-BoG2S6g4.js → game-BoEiyZrL.js} +3 -3
- package/dist/runtime/chunks/generators-D5JUo0jp.js +331 -0
- package/dist/runtime/chunks/{materials-C2uffFEd.js → materials-Dn-bYrZd.js} +5 -5
- package/dist/runtime/chunks/{model-D-4xZz21.js → model-BCVF3QzB.js} +1 -1
- package/dist/runtime/chunks/{params-DdApDOBw.js → params-C2uoUDJ0.js} +1 -1
- package/dist/runtime/chunks/{physicsHost-DPaVdM0R.js → physicsHost-ChPgysMQ.js} +1 -1
- package/dist/runtime/chunks/{postfx-BpBXjLX3.js → postfx-UgKCbmZs.js} +29 -29
- package/dist/{studio/assets/shaders-BEznGIct.js → runtime/chunks/shaders-Dw6zHdu_.js} +3 -3
- package/dist/runtime/chunks/svg-CmlFY_8O.js +1 -0
- package/dist/runtime/chunks/{text-CmkU-b0C.js → text-D1EQpdSU.js} +2 -2
- package/dist/runtime/chunks/{three.module-W4hp4qHb.js → three.module-DnaBiDAJ.js} +31 -31
- package/dist/runtime/chunks/{toon-B5Jhf37V.js → toon-BsvVk_nK.js} +1 -1
- package/dist/runtime/chunks/{util-THUewKBk.js → util-CyaW1fcW.js} +1 -1
- package/dist/studio/assets/{BufferGeometryUtils-wW9vV1l2.js → BufferGeometryUtils-CAlXAboW.js} +1 -1
- package/dist/studio/assets/{EXRLoader-f8U8jnlr.js → EXRLoader-BKkzlNd8.js} +1 -1
- package/dist/studio/assets/{FontLoader-9sHudKzD.js → FontLoader-Bzjx8mXt.js} +2 -2
- package/dist/studio/assets/GLTFLoader-1Zd9N406.js +1 -0
- package/dist/studio/assets/GroundedSkybox-BEMqNCBD.js +1 -0
- package/dist/studio/assets/{HDRLoader-CkQyrTWY.js → HDRLoader-DxB0kxPH.js} +2 -2
- package/dist/{runtime/chunks/OrbitControls-sjN2MF0e.js → studio/assets/OrbitControls-MlE9XiCg.js} +1 -1
- package/dist/studio/assets/{RectAreaLightUniformsLib-CZHWO9xf.js → RectAreaLightUniformsLib-ClHrtYY6.js} +1 -1
- package/dist/studio/assets/{RoomEnvironment-BsISzuCp.js → RoomEnvironment-MJ-jIEC8.js} +1 -1
- package/dist/studio/assets/{SVGLoader-BIkQDT66.js → SVGLoader-CIYl0nEy.js} +1 -1
- package/dist/studio/assets/{Sky-C282PFL1.js → Sky-DNMfpp92.js} +1 -1
- package/dist/studio/assets/{camera-BhKdE9ej.js → camera-7sEn13L-.js} +2 -2
- package/dist/studio/assets/editor-CnbvVkhU.js +53 -0
- package/dist/studio/assets/{extrude-CnayHczh.js → extrude-9bG8hr2C.js} +1 -1
- package/dist/studio/assets/{game-Dv5s4eMN.js → game-B04KGAK0.js} +3 -3
- package/dist/studio/assets/generators-LSni1Yfc.js +331 -0
- package/dist/studio/assets/{index-Dh-2Y34U.js → index-3LL5NEIH.js} +8 -8
- package/dist/studio/assets/{model-XZSP52pV.js → model-CNddhwmA.js} +2 -2
- package/dist/studio/assets/{physicsHost-C84FddIe.js → physicsHost-hMU_SDiX.js} +1 -1
- package/dist/studio/assets/{postfx-BWWXb8i8.js → postfx-BcCZS0Bq.js} +27 -27
- package/dist/studio/assets/runtime-DY_KqD1x.js +572 -0
- package/dist/{runtime/chunks/shaders-CmeJRio1.js → studio/assets/shaders-BhMCstyv.js} +3 -3
- package/dist/studio/assets/svg-CNKK-h7H.js +2 -0
- package/dist/studio/assets/{text-5DsJJHcj.js → text-BSPI7dk1.js} +3 -3
- package/dist/studio/assets/{three.module-ByMn_ZTv.js → three.module-CnI50X0U.js} +31 -31
- package/dist/studio/index.html +3 -3
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/skills/agent3d-assets/SKILL.md +24 -24
- package/plugin/skills/agent3d-create/SKILL.md +20 -20
- package/plugin/skills/agent3d-create/references/art-direction.md +3 -3
- package/plugin/skills/agent3d-create/references/recipes.md +6 -6
- package/plugin/skills/agent3d-edit/SKILL.md +22 -22
- package/plugin/skills/agent3d-edit/references/patch-ops.md +2 -2
- package/plugin/skills/agent3d-game/SKILL.md +7 -7
- package/plugin/skills/agent3d-publish/SKILL.md +21 -21
- package/plugin/skills/agent3d-publish/references/integrations.md +1 -1
- package/dist/runtime/chunks/GLTFLoader-DHp1wv6J.js +0 -1
- package/dist/runtime/chunks/generators-OHhFCc2E.js +0 -331
- package/dist/runtime/chunks/svg-B3nZaQFD.js +0 -1
- package/dist/studio/assets/GLTFLoader-C3C_3K62.js +0 -1
- package/dist/studio/assets/GroundedSkybox-BTqmv4fv.js +0 -1
- package/dist/studio/assets/editor-BgY_RoRd.js +0 -1
- package/dist/studio/assets/generators-DVX3bAxe.js +0 -331
- package/dist/studio/assets/runtime-k_MFerbJ.js +0 -572
- package/dist/studio/assets/svg-DT8kx37i.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SVGLoader-BIkQDT66.js","./three.module-ByMn_ZTv.js","./BufferGeometryUtils-wW9vV1l2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{F as e,L as t,Ln as n,S as r,St as i,W as a,d as o,g as s,h as c,in as l,un as u}from"./three.module-ByMn_ZTv.js";import{a as d,f,s as p}from"./runtime-k_MFerbJ.js";import{v as m}from"./camera-BhKdE9ej.js";import{i as h,n as g,r as _,t as v}from"./extrude-CnayHczh.js";import{h as y}from"./index-Dh-2Y34U.js";var b=e=>!!e&&e!==`none`&&e!==`transparent`;function x(e,t,n){if(e===`currentColor`)return n;let i=/^url\(\s*['"]?#([^'")]+)['"]?\s*\)/.exec(e);if(i){let e=t.userData?.gradients?.[i[1]]?.stops??[];if(!e.length)return n;let a=new r(e[0].color),o=new r(e[e.length-1].color);return`#${a.lerp(o,.5).getHexString()}`}try{let t=new r;return t.setStyle(e,l),`#${t.getHexString(l)}`}catch{return n}}function S(e,t){let n=new o;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(m(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=m(e.opacity,1);if(b(e.fill)){let t=s.toShapes().map(e=>_(e,a));t.length&&r.push({kind:`fill`,color:x(e.fill,s,o),opacity:m(e.fillOpacity,1)*c,shapes:t})}if(n.strokes!==!1&&b(e.stroke)&&m(e.strokeWidth,1)>0){let n=t.getStrokeStyle(m(e.strokeWidth,1),`#000`,e.strokeLineJoin??`miter`,e.strokeLineCap??`butt`,m(e.strokeMiterLimit,4)),l=[];for(let e of s.subPaths){let r=g(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:m(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 i=new s;return i.setAttribute(`position`,new c(n,3)),i}function T(e,t=12){let r=new o;for(let i of e){if(i.shapes)for(let e of i.shapes)for(let n of e.getPoints(t))r.expandByPoint(n);if(i.stroke){let e=i.stroke.getAttribute(`position`);for(let t=0;t<e.count;t++)r.expandByPoint(new n(e.getX(t),e.getY(t)))}}return r}function E(t,n,r,i,a){if(t.kind===`stroke`)return t.stroke?v(t.stroke,n):null;if(!t.shapes?.length)return null;if(n<=0)return new u(t.shapes,i);let o=Math.min(r,n*.45),s=new e(t.shapes,{depth:Math.max(n-o*2,n*.05),curveSegments:i,bevelEnabled:o>0,bevelThickness:o,bevelSize:o*.6,bevelOffset:0,bevelSegments:3});return s.translate(0,0,o),s.clearGroups(),h(s,50*Math.PI/180,a)}async function D(e,n){let[{SVGLoader:r},o]=await Promise.all([y(()=>import(`./SVGLoader-BIkQDT66.js`),__vite__mapDeps([0,1]),import.meta.url),y(()=>import(`./BufferGeometryUtils-wW9vV1l2.js`).then(e=>e.t),__vite__mapDeps([2,1]),import.meta.url)]),s=e.src.trim().startsWith(`<`)?e.src:await f(n.resolveAsset(e.src)),c=new r().parse(s),l=e.material?p(e.material):void 0,u=typeof l?.color==`string`?l.color:void 0,h=Math.max(1,Math.round(m(e.curveSegments,12))),g=C(c,r,{strokes:e.strokes,curveSegments:h,currentColor:u}),_=new a,v=T(g,h);if(!g.length||v.isEmpty())return _;let b=m(e.size,2),x=Math.max(v.max.x-v.min.x,1e-6),S=Math.max(v.max.y-v.min.y,1e-6),w=e.fit??`width`,D=b/(w===`height`?S:w===`max`?Math.max(x,S):x),O=Math.max(0,m(e.depth,.2)),k=O/D,A=m(e.bevel,0)/D,j=m(e.layerGap,O>0?O*.02:b*.002),M=e.keepColors??!e.material,N=new Map,P=async(t,r)=>{let i=M?`${t}|${r}`:`|${r}`,a=N.get(i);if(!a){let o=M?{roughness:.4,metalness:.1,...e.material??{},color:t,...r<1?{opacity:r}:{}}:e.material?{...e.material,...r<1?{opacity:r}:{}}:{color:`#dddddd`,roughness:.4,metalness:.1};a=await d(o,n,{defaultColor:t}),r<1&&(a.transparent=!0),O<=0&&(a.side=2),N.set(i,a)}return a},F=[];for(let e of g){let t=E(e,k,A,h,o);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 a;for(let[e,n]of F.entries()){for(let e of n.geos){for(let t of Object.keys(e.attributes))[`position`,`normal`,`uv`].includes(t)||e.deleteAttribute(t);e.getAttribute(`uv`)||e.setAttribute(`uv`,new t(new Float32Array(e.getAttribute(`position`).count*2),2))}let r=n.geos.length===1?n.geos[0]:o.mergeGeometries(n.geos.map(e=>e.index?e.toNonIndexed():e),!1)??n.geos[0],a=new i(r,await P(n.color,n.opacity));a.position.z=e*j/D,I.add(a)}let L=(v.min.x+v.max.x)/2,R=(v.min.y+v.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),_.add(I),_}export{D as buildSvg};
|