pixifact-cli 0.5.0 → 0.6.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/README.md +27 -2
- package/editor/assets/browserAll-DCAvtrKG.js +1 -0
- package/editor/assets/index-D8cbY_GQ.js +1130 -0
- package/editor/assets/{index-CVrKIfXK.css → index-gCKoe0w8.css} +1 -1
- package/editor/assets/init-ClFt_GA_.js +1 -0
- package/editor/assets/webworkerAll-Do_n5w1y.js +1 -0
- package/editor/index.html +2 -2
- package/package.json +2 -2
- package/src/automation.ts +2 -3
- package/src/editorSession.ts +211 -4
- package/src/pixifact-cli.ts +143 -1
- package/src/runtimeSession.ts +133 -0
- package/editor/assets/browserAll-CdyZj0BN.js +0 -1
- package/editor/assets/index-CAe9Mkmr.js +0 -1130
- package/editor/assets/init-C32NAhsC.js +0 -1
- package/editor/assets/webworkerAll-BEmxAAYf.js +0 -1
package/README.md
CHANGED
|
@@ -29,7 +29,25 @@ pixifact scene validate --all
|
|
|
29
29
|
|
|
30
30
|
默认使用当前工作目录作为项目根目录;不在项目根目录运行时再加 `--project-root <path>`。
|
|
31
31
|
|
|
32
|
-
其他命令是辅助入口:`scene create` 用于新建 Scene
|
|
32
|
+
其他命令是辅助入口:`scene create` 用于新建 Scene;`node inspect` 用于查看 `scene inspect` 返回的已知 locator;`editor context` 用于读取当前 Scene 和 selection;`editor screenshot --output <png-path>` 用于截取当前 Authoring Scene。不要使用 `scene get`,file mode 只保留 `scene inspect`。旧 `live ...` 命令已经删除。
|
|
33
|
+
|
|
34
|
+
## Agent Runtime
|
|
35
|
+
|
|
36
|
+
启用了 `pixifactRuntimePlugin` 且游戏页面已调用 `registerPixiRuntime` 时,外部 Agent 可以直接查询运行中的 Vite Web 游戏:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pixifact runtime list
|
|
40
|
+
pixifact runtime tree --output .pixifact/runtime/tree.json
|
|
41
|
+
pixifact runtime node <pixi-uid>
|
|
42
|
+
pixifact runtime state
|
|
43
|
+
pixifact runtime logs --after <seq>
|
|
44
|
+
pixifact runtime input click --x <x> --y <y>
|
|
45
|
+
pixifact runtime input key Space
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
一个项目只有一个游戏页面时自动选择;打开多个页面时先用 `runtime list` 获取 ID,再对其他命令添加 `--runtime <runtime-id>`。Runtime 只支持开发期只读观测和标准输入事件,不提供 eval、节点修改或业务状态修改。完整接入方式见 [Agent Runtime](https://github.com/hxg2050/pixifact/blob/main/docs/zh/runtime-agent.md)。
|
|
49
|
+
|
|
50
|
+
`runtime tree` 默认将节点树输出到终端;传入 `--output <json-path>` 时,改为保存运行时快照 JSON,终端只返回路径和采集元数据。快照包含 `schemaVersion`、`capturedAt`、当前 `runtimeId` 和 `root` 节点树,适合 Agent 使用文本搜索或 JSON 工具分析。快照中的 `runtimeId` 和 PixiJS `uid` 只对本次运行有效,不应写回项目源文件。
|
|
33
51
|
|
|
34
52
|
## 浏览器 Editor
|
|
35
53
|
|
|
@@ -41,7 +59,14 @@ pixifact editor
|
|
|
41
59
|
|
|
42
60
|
CLI 会启动只绑定 `127.0.0.1` 的本地 Bun 服务并打开系统浏览器。Editor 从项目内现有 `.scene` 建立层级、Pixi 预览和 Inspector;属性输入实时更新预览,失焦或 Enter 后自动保存,Undo / Redo 也会写回文件。Scene 写入携带当前文件版本,版本不一致时返回冲突而不是覆盖外部 Agent 的修改。
|
|
43
61
|
|
|
44
|
-
同一项目重复运行 `pixifact editor` 会复用现有 Host
|
|
62
|
+
同一项目重复运行 `pixifact editor` 会复用现有 Host;多个浏览器标签页中同时只有一个活动 Editor。Scene 已同步且预览 ready 时可以使用:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pixifact editor context
|
|
66
|
+
pixifact editor screenshot --output /tmp/scene.png
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
截图使用 Scene 设计尺寸,只包含 Authoring Preview,不包含选择框或 Editor UI,也不受当前画布 zoom / pan 影响。
|
|
45
70
|
|
|
46
71
|
图片必须由用户或外部 Agent 放入项目;Editor 只索引现有图片,不提供导入、移动、重命名或删除源资源。
|
|
47
72
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,i as n,l as r,o as i,s as a,u as o}from"./index-D8cbY_GQ.js";import"./init-ClFt_GA_.js";o.add(t),o.mixin(r,a),o.add(i),o.add(e),o.mixin(r,n);
|