@jiujue/weave-devtools-runtime
v3.0.4
Published
Weave DevTools runtime:在运行时收集与暴露调试信息。
Readme
@jiujue/weave-devtools-runtime
Runtime capabilities for Weave DevTools: Inject hooks onto globalThis for instance registration, enumeration, and interactions like scene viewing and hit testing within the DevTools panel.
Position in Weave (Layering)
| Layer | Package | Role |
| ---------------- | -------------------------------- | -------------------------------------- |
| Scene Data | @jiujue/weave-types | SceneNode/patch |
| End-to-End Entry | @jiujue/weave-app | Optional integration of DevTools hook |
| Debugging | @jiujue/weave-devtools-runtime | hook definition + scene mirror (patch) |
| Tooling | apps/devtools-extension | Browser DevTools panel (Plasmo) |
Installation
pnpm add @jiujue/weave-devtools-runtimeUsage
import { ensureWeaveDevtoolsHook } from '@jiujue/weave-devtools-runtime'
const hook = ensureWeaveDevtoolsHook()
hook.register({
id: 'my-app',
name: 'demo',
canvas,
hitTest: async (x, y) => ({ id: null, path: [] }),
getNodeInfo: async () => null,
})Composition (Typical Usage)
- Application side: Enable
devtools: { enabled: true }in@jiujue/weave-appto automatically register instances. - Tooling side: Install and use the browser extension
apps/devtools-extensionto view the scene tree, inspect, and highlight nodes.
AI / Skills
Related Packages
@jiujue/weave-app: Includes a built-in entry point for DevTools integration (optional).
