@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 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GLTFLoader-
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GLTFLoader-1Zd9N406.js","./three.module-CnI50X0U.js","./BufferGeometryUtils-CAlXAboW.js","./SkeletonUtils-CG5akqME.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Ln as e,U as t,c as n,d as r,ht as i,mt as a}from"./three.module-CnI50X0U.js";import{v as o}from"./camera-7sEn13L-.js";import{o as s}from"./runtime-DY_KqD1x.js";import{h as c}from"./index-3LL5NEIH.js";var l=new Map;function u(e){let t=new Uint8Array(e),n;if(t.byteLength>=20&&new DataView(e).getUint32(0,!0)===1179937895){let r=new DataView(e).getUint32(12,!0);n=new TextDecoder().decode(t.subarray(20,20+r))}else n=new TextDecoder().decode(t);try{let e=JSON.parse(n);return Array.isArray(e.extensionsUsed)?e.extensionsUsed.filter(e=>typeof e==`string`):[]}catch{return[]}}async function d(e){let t=l.get(e);return t||(t=(async()=>{let[{GLTFLoader:t},n]=await Promise.all([c(()=>import(`./GLTFLoader-1Zd9N406.js`),__vite__mapDeps([0,1,2,3]),import.meta.url),fetch(e)]);if(!n.ok)throw Error(`HTTP ${n.status} for ${e}`);let r=await n.arrayBuffer(),i=u(r);if(i.includes(`KHR_draco_mesh_compression`))throw Error(`${e} uses Draco compression (KHR_draco_mesh_compression), which the Agent3D runtime does not decode. Re-export it without Draco (Blender: uncheck "Compression"), or convert it to meshopt with gltfpack (\`gltfpack -i in.glb -o out.glb -cc\`), then run \`agent3d assets optimize\`.`);let a=new t;if(i.includes(`EXT_meshopt_compression`)){let{MeshoptDecoder:e}=await c(async()=>{let{MeshoptDecoder:e}=await import(`./meshopt_decoder.module-DXTYc6wn.js`);return{MeshoptDecoder:e}},[],import.meta.url);await e.ready,a.setMeshoptDecoder(e)}let o=e.slice(0,e.lastIndexOf(`/`)+1);return a.parseAsync(r,/^data:/.test(e)?``:o)})(),t.catch(()=>l.delete(e)),l.set(e,t)),t}function f(e,t){e.traverse(e=>{let n=e;if(n.isMesh&&n.morphTargetDictionary&&n.morphTargetInfluences)for(let[e,r]of Object.entries(t)){let t=n.morphTargetDictionary[e];t!==void 0&&typeof r==`number`&&(n.morphTargetInfluences[t]=r)}})}async function p(l,u){let p=await d(u.resolveAsset(l.src)),{clone:m}=await c(async()=>{let{clone:e}=await import(`./SkeletonUtils-CG5akqME.js`);return{clone:e}},[],import.meta.url),h=m(p.scene),g=new t;g.add(h),h.updateMatrixWorld(!0);let _=new r().setFromObject(h);if(!_.isEmpty()){let t=_.getSize(new e),n=Math.max(t.x,t.y,t.z),r=l.fit&&n>0?l.fit/n:1;if(h.scale.multiplyScalar(r),l.center!==!1){let t=_.getCenter(new e);h.position.set(-t.x*r,-_.min.y*r,-t.z*r)}}h.traverse(e=>{let t=e;t.isMesh&&(t.castShadow=l.castShadow??!0,t.receiveShadow=l.receiveShadow??!1)}),l.material&&await s(h,l.material,u),l.morph&&f(h,l.morph);let v;if(p.animations.length){let e=new n(h),t=null,r=e=>typeof e==`number`||/^\d+$/.test(String(e))?p.animations[Number(e)]:p.animations.find(t=>t.name===e)??p.animations.find(t=>t.name.toLowerCase().includes(String(e).toLowerCase())),s=new Set,c=e=>{let t=r(e);return!t&&!s.has(String(e))&&(s.add(String(e)),u.issue(`asset-load`,`Model ${l.id} has no animation clip "${e}" (clips: ${p.animations.map(e=>e.name).join(`, `)})`,`objects#${l.id}.animation.clip`)),t},d=(n,r={})=>{let s=c(n);if(!s)return;let l=e.clipAction(s);l.setLoop(r.loop===!1?a:i,1/0),l.clampWhenFinished=r.loop===!1,l.timeScale=o(r.speed,1),l.enabled=!0,t&&t!==l?(l.reset().setEffectiveWeight(1).play(),t.crossFadeTo(l,o(r.crossfade,.3),!1)):l.setEffectiveWeight(1).play(),t=l},f=t=>{let n=c(t);if(!n)return null;let r=e.clipAction(n);return r.isRunning()||(r.enabled=!0,r.setLoop(i,1/0),r.play()),r},m={weight(e,t){f(e)?.setEffectiveWeight(Math.max(0,t))},speed(e,t){let n=f(e);n&&(n.timeScale=t)},time(e,t){let n=f(e);n&&(n.paused=!0,n.time=Math.max(0,t))}},g=l.animation??{},_=()=>{e.stopAllAction(),t=null,d(g.clip??0,g),g.offset&&t&&(t.time=Math.max(0,g.offset));for(let[e,t]of Object.entries(g.blend??{}))m.weight(e,t);e.update(0)};v={mixer:e,clips:p.animations,play:d,control:m,reset:_},_()}return{object:g,animator:v}}export{p as buildModel};
|