@pix3/cli 1.6.3 → 2.0.0-alpha.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/LICENSE +201 -201
- package/README.md +722 -788
- package/dist/index.js +557 -421
- package/dist/runtime-types.json +1 -1
- package/dist/smoke/prebuilt/{build-7MIXIMSZ.mjs → build-7REMSA2S.mjs} +52 -52
- package/dist/smoke/prebuilt/chunk-4DGG2BKR.mjs +2 -0
- package/dist/smoke/prebuilt/chunk-YLBMUJ2H.mjs +238 -0
- package/dist/smoke/prebuilt/runtime.mjs +1 -1
- package/dist/smoke/prebuilt/smoke-worker.mjs +211 -2
- package/dist/smoke/prebuilt/tree-defaults.mjs +1 -1
- package/dist/validate/prebuilt/{build-AUGKXER3.js → build-ADF5EEE2.js} +52 -52
- package/dist/validate/prebuilt/bundle-main.js +223 -18
- package/dist/validate/prebuilt/chunk-VIHIF4G2.js +238 -0
- package/dist/validate/prebuilt/runtime.js +1 -1
- package/kit/files/.claude/skills/pix3-editor/SKILL.md +200 -0
- package/kit/files/.claude/skills/pix3-nodes/SKILL.md +13 -15
- package/kit/files/.claude/skills/pix3-nodes/reference.md +77 -71
- package/kit/files/.claude/skills/pix3-scene-format/SKILL.md +38 -41
- package/kit/files/.claude/skills/pix3-scene-format/pix3anim.md +185 -0
- package/kit/files/.claude/skills/pix3-scene-format/project-files.md +244 -0
- package/kit/files/.claude/skills/pix3-scene-format/reference.md +28 -16
- package/kit/files/.claude/skills/pix3-scripts/SKILL.md +34 -24
- package/kit/files/.claude/skills/pix3-scripts/reference.md +68 -141
- package/kit/files/.claude/skills/pix3-verify/SKILL.md +65 -326
- package/kit/files/.claude/skills/pix3-verify/reference.md +2 -14
- package/kit/files/AGENTS.md +76 -84
- package/kit/files/design/tests/bots/pix3-test-bot.d.ts +89 -0
- package/kit/kit.json +8 -5
- package/package.json +62 -54
- package/templates/2d/files/scenes/main.pix3scene +31 -0
- package/templates/2d/template.yaml +11 -0
- package/templates/3d/files/scenes/main.pix3scene +50 -0
- package/templates/3d/template.yaml +11 -0
- package/templates/base/files/README.md +39 -0
- package/templates/base/files/gitignore +11 -0
- package/templates/base/files/index.html +23 -0
- package/templates/base/files/package.json +28 -0
- package/templates/base/files/src/main.ts +3 -0
- package/templates/base/files/tsconfig.json +17 -0
- package/templates/base/files/vite.config.ts +10 -0
- package/dist/smoke/prebuilt/chunk-CBFYKDS7.mjs +0 -2
- package/dist/smoke/prebuilt/chunk-VJHJ5BCO.mjs +0 -239
- package/dist/validate/prebuilt/chunk-CFQFEI52.js +0 -239
- package/templates/empty-2d/files/README.md +0 -20
- package/templates/empty-2d/files/scenes/main.pix3scene +0 -68
- package/templates/empty-2d/files/sprites/pix3-logo.png +0 -0
- package/templates/empty-2d/template.yaml +0 -7
- package/templates/empty-3d/files/README.md +0 -20
- package/templates/empty-3d/files/scenes/main.pix3scene +0 -108
- package/templates/empty-3d/files/sprites/pix3-logo.png +0 -0
- package/templates/empty-3d/template.yaml +0 -7
- package/templates/idea-blank/files/README.md +0 -22
- package/templates/idea-blank/files/scenes/main.pix3scene +0 -37
- package/templates/idea-blank/template.yaml +0 -10
- package/templates/minigame-2d/files/README.md +0 -44
- package/templates/minigame-2d/files/design/tests/reachability.json +0 -1
- package/templates/minigame-2d/files/design/tests/routines/mute-music.json +0 -44
- package/templates/minigame-2d/files/scenes/main.pix3scene +0 -84
- package/templates/minigame-2d/files/scenes/menu.pix3scene +0 -118
- package/templates/minigame-2d/files/scenes/ui/settings-window.pix3scene +0 -138
- package/templates/minigame-2d/files/scripts/GameFlow.ts +0 -133
- package/templates/minigame-2d/files/scripts/MenuFlow.ts +0 -217
- package/templates/minigame-2d/files/scripts/SettingsWindow.ts +0 -198
- package/templates/minigame-2d/template.yaml +0 -10
- package/templates/playable-2d/files/README.md +0 -30
- package/templates/playable-2d/files/design/recipe.md +0 -83
- package/templates/playable-2d/files/design/tests/reachability.json +0 -4
- package/templates/playable-2d/files/design/tests/routines/intro-to-cta.json +0 -32
- package/templates/playable-2d/files/scenes/main.pix3scene +0 -111
- package/templates/playable-2d/files/scenes/ui/end-screen.pix3scene +0 -91
- package/templates/playable-2d/files/scenes/ui/intro.pix3scene +0 -65
- package/templates/playable-2d/files/scripts/CtaButton.ts +0 -55
- package/templates/playable-2d/files/scripts/GameFlow.ts +0 -256
- package/templates/playable-2d/files/sprites/pix3-logo.png +0 -0
- package/templates/playable-2d/template.yaml +0 -9
- package/templates/playable-3d/files/README.md +0 -32
- package/templates/playable-3d/files/design/recipe.md +0 -127
- package/templates/playable-3d/files/design/tests/reachability.json +0 -4
- package/templates/playable-3d/files/design/tests/routines/intro-to-cta.json +0 -32
- package/templates/playable-3d/files/scenes/main.pix3scene +0 -230
- package/templates/playable-3d/files/scenes/ui/end-screen.pix3scene +0 -91
- package/templates/playable-3d/files/scenes/ui/intro.pix3scene +0 -65
- package/templates/playable-3d/files/scripts/CtaButton.ts +0 -55
- package/templates/playable-3d/files/scripts/GameFlow.ts +0 -309
- package/templates/playable-3d/files/scripts/GameRules.ts +0 -290
- package/templates/playable-3d/files/scripts/ScoreHud.ts +0 -113
- package/templates/playable-3d/template.yaml +0 -9
- package/templates/recipe-arena-2d/files/README.md +0 -48
- package/templates/recipe-arena-2d/files/design/recipe.md +0 -127
- package/templates/recipe-arena-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-arena-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-arena-2d/files/scenes/main.pix3scene +0 -292
- package/templates/recipe-arena-2d/files/scenes/menu.pix3scene +0 -100
- package/templates/recipe-arena-2d/files/scenes/prefabs/hazard.pix3scene +0 -42
- package/templates/recipe-arena-2d/files/scenes/prefabs/pickup.pix3scene +0 -45
- package/templates/recipe-arena-2d/files/scenes/ui/result.pix3scene +0 -85
- package/templates/recipe-arena-2d/files/scripts/GameRules.ts +0 -368
- package/templates/recipe-arena-2d/files/scripts/MenuFlow.ts +0 -106
- package/templates/recipe-arena-2d/files/scripts/PlayerController.ts +0 -151
- package/templates/recipe-arena-2d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-arena-2d/files/scripts/Spawner.ts +0 -214
- package/templates/recipe-arena-2d/files/scripts/TouchRules.ts +0 -174
- package/templates/recipe-arena-2d/files/sprites/ph-avatar.png +0 -0
- package/templates/recipe-arena-2d/files/sprites/ph-hazard.png +0 -0
- package/templates/recipe-arena-2d/files/sprites/ph-pickup.png +0 -0
- package/templates/recipe-arena-2d/template.yaml +0 -10
- package/templates/recipe-blank-2d/files/README.md +0 -61
- package/templates/recipe-blank-2d/files/design/recipe.md +0 -148
- package/templates/recipe-blank-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-blank-2d/files/design/tests/routines/restart.json +0 -27
- package/templates/recipe-blank-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-blank-2d/files/scenes/main.pix3scene +0 -224
- package/templates/recipe-blank-2d/files/scenes/ui/result.pix3scene +0 -85
- package/templates/recipe-blank-2d/files/scripts/GameRules.ts +0 -350
- package/templates/recipe-blank-2d/files/scripts/ScoreHud.ts +0 -110
- package/templates/recipe-blank-2d/files/sprites/ph-bg.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-capsule.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-circle.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-orb.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-ring.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-star.png +0 -0
- package/templates/recipe-blank-2d/template.yaml +0 -10
- package/templates/recipe-bouncer-2d/files/README.md +0 -81
- package/templates/recipe-bouncer-2d/files/design/recipe.md +0 -146
- package/templates/recipe-bouncer-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-bouncer-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-bouncer-2d/files/scenes/main.pix3scene +0 -615
- package/templates/recipe-bouncer-2d/files/scenes/menu.pix3scene +0 -191
- package/templates/recipe-bouncer-2d/files/scenes/ui/result.pix3scene +0 -87
- package/templates/recipe-bouncer-2d/files/scripts/BallBody.ts +0 -298
- package/templates/recipe-bouncer-2d/files/scripts/GameRules.ts +0 -377
- package/templates/recipe-bouncer-2d/files/scripts/MenuFlow.ts +0 -109
- package/templates/recipe-bouncer-2d/files/scripts/PaddleController.ts +0 -112
- package/templates/recipe-bouncer-2d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-bouncer-2d/files/scripts/TouchRules.ts +0 -263
- package/templates/recipe-bouncer-2d/files/scripts/ball-collision.ts +0 -307
- package/templates/recipe-bouncer-2d/files/sprites/ph-ball.png +0 -0
- package/templates/recipe-bouncer-2d/files/sprites/ph-bg.png +0 -0
- package/templates/recipe-bouncer-2d/files/sprites/ph-bumper.png +0 -0
- package/templates/recipe-bouncer-2d/files/sprites/ph-paddle.png +0 -0
- package/templates/recipe-bouncer-2d/template.yaml +0 -10
- package/templates/recipe-grid-3d/files/README.md +0 -22
- package/templates/recipe-grid-3d/files/design/recipe.md +0 -110
- package/templates/recipe-grid-3d/files/scenes/main.pix3scene +0 -169
- package/templates/recipe-grid-3d/files/scenes/menu.pix3scene +0 -100
- package/templates/recipe-grid-3d/files/scenes/ui/result.pix3scene +0 -105
- package/templates/recipe-grid-3d/files/scripts/GridBoard.ts +0 -319
- package/templates/recipe-grid-3d/files/scripts/GridRules.ts +0 -278
- package/templates/recipe-grid-3d/files/scripts/MenuFlow.ts +0 -106
- package/templates/recipe-grid-3d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-grid-3d/template.yaml +0 -10
- package/templates/recipe-tapper-2d/files/README.md +0 -39
- package/templates/recipe-tapper-2d/files/design/recipe.md +0 -132
- package/templates/recipe-tapper-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-tapper-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-tapper-2d/files/scenes/main.pix3scene +0 -269
- package/templates/recipe-tapper-2d/files/scenes/menu.pix3scene +0 -100
- package/templates/recipe-tapper-2d/files/scenes/prefabs/hazard.pix3scene +0 -42
- package/templates/recipe-tapper-2d/files/scenes/prefabs/target.pix3scene +0 -45
- package/templates/recipe-tapper-2d/files/scenes/ui/result.pix3scene +0 -85
- package/templates/recipe-tapper-2d/files/scripts/GameRules.ts +0 -368
- package/templates/recipe-tapper-2d/files/scripts/MenuFlow.ts +0 -106
- package/templates/recipe-tapper-2d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-tapper-2d/files/scripts/Spawner.ts +0 -214
- package/templates/recipe-tapper-2d/files/scripts/TouchRules.ts +0 -192
- package/templates/recipe-tapper-2d/files/sprites/ph-hazard.png +0 -0
- package/templates/recipe-tapper-2d/files/sprites/ph-target.png +0 -0
- package/templates/recipe-tapper-2d/template.yaml +0 -10
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __pix3CreateRequire } from 'node:module'; const require = __pix3CreateRequire(import.meta.url);
|
|
2
|
+
import{a as p,oa as w}from"./chunk-YLBMUJ2H.mjs";import{pd as x}from"./chunk-P2CBRXPJ.mjs";var y=()=>{let r={addColorStop:()=>{}};return new Proxy({},{get(e,t){return t==="measureText"?n=>({width:n.length*10,actualBoundingBoxAscent:10,actualBoundingBoxDescent:3,actualBoundingBoxLeft:0,actualBoundingBoxRight:n.length*10}):t==="getImageData"?()=>({data:new Uint8ClampedArray(4),width:1,height:1}):typeof t=="string"&&t.startsWith("create")?()=>r:()=>{}},set:()=>!0})},T=()=>({style:{},src:"",crossOrigin:null,complete:!1,width:0,height:0,addEventListener:()=>{},removeEventListener:()=>{}}),S=()=>({createElement(r){if(r!=="canvas")throw new Error(`canvas-only document shim: createElement('${r}') is not provided`);return{width:1,height:1,style:{},getContext:e=>e==="2d"?y():null,addEventListener:()=>{},removeEventListener:()=>{}}},createElementNS(r,e){if(e!=="img")throw new Error(`canvas-only document shim: createElementNS('${e}') is not provided`);return T()}}),A=()=>typeof Reflect.get(globalThis,"document")<"u"?()=>{}:(Reflect.set(globalThis,"document",S()),()=>{Reflect.deleteProperty(globalThis,"document")});import{closeSync as E,existsSync as R,openSync as k,readFileSync as D,readSync as I,statSync as U}from"node:fs";import{isAbsolute as C,join as L,relative as O,resolve as b}from"node:path";function v(r){if(r.length<10)return null;let e=new DataView(r.buffer,r.byteOffset,r.byteLength),t=(n,i)=>String.fromCharCode(...r.subarray(n,n+i));if(r.length>=24&&e.getUint32(0)===2303741511&&t(12,4)==="IHDR")return o(e.getUint32(16),e.getUint32(20));if(t(0,4)==="GIF8")return o(e.getUint16(6,!0),e.getUint16(8,!0));if(r[0]===255&&r[1]===216){let n=2;for(;n+9<r.length;){if(r[n]!==255)return null;let i=r[n+1];if(i===255){n+=1;continue}if(i===216||i===1||i>=208&&i<=215){n+=2;continue}let s=e.getUint16(n+2);if(i>=192&&i<=207&&![196,200,204].includes(i))return o(e.getUint16(n+7),e.getUint16(n+5));n+=2+s}return null}if(r.length>=30&&t(0,4)==="RIFF"&&t(8,4)==="WEBP"){let n=t(12,4);if(n==="VP8 ")return o(e.getUint16(26,!0)&16383,e.getUint16(28,!0)&16383);if(n==="VP8L"){let i=e.getUint32(21,!0);return o((i&16383)+1,(i>>>14&16383)+1)}if(n==="VP8X"){let i=s=>r[s]|r[s+1]<<8|r[s+2]<<16;return o(i(24)+1,i(27)+1)}return null}return P(r)}function o(r,e){return r>0&&e>0?{width:r,height:e}:null}function P(r){let e=new TextDecoder("utf-8").decode(r.subarray(0,4096)),t=/<svg\b[^>]*>/i.exec(e)?.[0];if(!t)return null;let n=d=>new RegExp(`\\s${d}\\s*=\\s*["']([^"']*)["']`,"i").exec(t)?.[1]??null,i=d=>{let h=d?/^\s*([0-9]*\.?[0-9]+)\s*(px)?\s*$/i.exec(d):null;return h?Number(h[1]):null},s=i(n("width")),c=i(n("height")),a=n("viewBox")?.trim().split(/[\s,]+/).map(Number),g=a&&a.length===4&&a.every(Number.isFinite)&&a[2]>0&&a[3]>0?a[2]/a[3]:null;return s!==null&&c!==null?o(s,c):s!==null?o(s,g?s/g:150):c!==null?o(g?c*g:300,c):o(300,150)}var f=class extends p{projectDir;transformText;constructor(e,t={}){super("/"),this.projectDir=b(e),this.transformText=t.transformText}pathOf(e){let t=this.normalize(e).replace(/^\/+/,"");return this.containedPath(t)}isProjectResource(e){let t=this.getScheme(e);return t===""||t==="res"}exists(e){let t=this.pathOf(e);if(!t||!R(t))return!1;try{return U(t).isFile()}catch{return!1}}async fetchText(e){let t=this.requirePath(e),n=D(t,"utf8");return this.transformText?this.transformText(n,t):n}async fetchBlob(e){return new Blob([new Uint8Array(D(this.requirePath(e)))])}containedPath(e){let t=decodeURIComponent(e.replace(/^\/+/,"")),n=b(L(this.projectDir,t)),i=O(this.projectDir,n);return i.startsWith("..")||C(i)?null:n}requirePath(e){let t=`res://${e.replace(/^\/+/,"")}`,n=this.containedPath(e);if(!n)throw new u(t,"resolves outside the project folder");if(!R(n))throw new u(t);return n}},u=class extends Error{resource;constructor(e,t="file not found"){super(`Missing resource ${e} (${t})`),this.name="MissingResourceError",this.resource=e}},l=class extends Error{resource;constructor(e){super(`Resource ${e} exists but is not decoded outside the browser`),this.name="ResourceNotDecodedError",this.resource=e}},m=class extends w{missingSet=new Set;disk;constructor(e){super(e),this.disk=e}get missing(){return[...this.missingSet]}async loadTexture(e,t){this.require(e);let n=new x,i=this.disk.isProjectResource(e)?this.disk.pathOf(e):null,s=i?H(i):null;return s&&(n.image={width:s.width,height:s.height}),n}async loadAsset(e){throw this.require(e),new l(e)}async loadSpineAsset(e){throw this.require(e.skeletonPath),this.require(e.atlasPath),e.texturePath&&this.require(e.texturePath),new l(e.skeletonPath)}require(e){if(this.disk.isProjectResource(e)&&!this.disk.exists(e))throw this.missingSet.add(e),new u(e)}};function H(r){let e=null;try{e=k(r,"r");let t=new Uint8Array(64*1024),n=I(e,t,0,t.length,0);return v(t.subarray(0,n))}catch{return null}finally{e!==null&&E(e)}}export{y as a,A as b,f as c,u as d,l as e,m as f};
|