pixifact-cli 0.19.0 → 0.20.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 CHANGED
@@ -84,6 +84,8 @@ pixifact editor screenshot --output /tmp/scene.png
84
84
 
85
85
  图片必须由用户或外部 Agent 放入项目;Editor 只索引现有图片,不提供导入、移动、重命名或删除源资源。
86
86
 
87
+ 资产面板中单击图片在 Editor 内预览,双击图片调用系统默认程序打开原文件;双击 `.scene` 在 Editor 中打开编辑。系统打开失败会显示错误,Scene 文档和当前选区保持不变。
88
+
87
89
  ## Agent 工作流
88
90
 
89
91
  Codex、Claude Code 和其他 coding agent 应直接编辑 `.scene` 文件,然后运行:
@@ -126,7 +128,7 @@ Web mode 只需要 `pixifact`,不安装小游戏平台包也能构建。`dev`
126
128
 
127
129
  `pixifact dev` 同时自动启用 Bun Inspector,默认监听 `0.0.0.0`,端口由系统分配;项目的 `dev` 脚本直接调用 `pixifact dev` 即可。远程调试时,将 Bun 输出的 WebSocket 或浏览器调试链接中的 `0.0.0.0` 替换为开发电脑的局域网 IP,保留端口和路径。若启动 Bun 时已指定 `--inspect`、`--inspect-brk` 或 `--inspect-wait`(包括自定义地址),CLI 使用已有调试参数。
128
130
 
129
- CLI 使用 Vite 完成 env、TypeScript、tree-shaking、watch、静态资源和产物生命周期;Pixifact 插件负责 Scene 编译、当前平台虚拟模块、Pixi manifest、资源分包、原生配置和包体检查。业务代码只使用 PixiJS `Assets`,不需要手动加载分包。
131
+ CLI 使用 Vite 完成 env、TypeScript、tree-shaking、watch、静态资源和产物生命周期;Pixifact 插件负责 Scene 编译、当前平台虚拟模块、Pixi manifest、资源与代码分包、原生配置和包体检查。资源使用 PixiJS `Assets`;代码分包在 Vite 8 配置中声明 `pixifact({ codePackages: { game: 'src/game.ts' } })`,业务使用 `import('./game')`,由构建自动补上原生分包加载。完整用法见[微信代码分包](../../docs/zh/wechat-minigame.md#代码分包)。
130
132
 
131
133
  完整配置见 [微信小游戏构建](https://github.com/hxg2050/pixifact/blob/main/docs/zh/wechat-minigame.md) 和 [抖音小游戏构建](https://github.com/hxg2050/pixifact/blob/main/docs/zh/douyin-minigame.md),可运行三端示例见 [wechat-minigame-demo](https://github.com/hxg2050/pixifact/tree/main/sample-projects/wechat-minigame-demo)。
132
134
 
@@ -0,0 +1 @@
1
+ import{_ as e,b as t,f as n,g as r,m as i,p as a,v as o}from"./captureCompilerScenePreview-D1crYVOi.js";import"./init-ChKChotc.js";t.add(e),t.mixin(o,r),t.add(i),t.add(a),t.mixin(o,n);
@@ -0,0 +1 @@
1
+ import{D as e,S as t,T as n,h as r,i,j as a,n as o,r as s,t as c}from"./captureCompilerScenePreview-D1crYVOi.js";window.capturePixifactScene=async l=>{let[u,d]=await Promise.all([n(),e(l)]),f=new o,p,m=new r,h=!1;try{return p=await s({cache:f,document:{template:a(d.source),sceneInterfaces:{}},projectTree:t(u),scenePath:l}),await m.init({width:p.width,height:p.height,backgroundAlpha:0,antialias:!0,autoStart:!1,resolution:1}),h=!0,m.stage.addChild(p.root),{scenePath:d.path,revision:d.version,width:p.width,height:p.height,dataUrl:await c(m,p)}}finally{h&&(m.stage.removeChild(p.root),m.destroy({removeView:!0},{children:!1})),i(p),await f.clear()}};