본문으로 건너뛰기
cccskills
무료GitHub에 공개

inspect-runtime

Use when reading state from a running PlayCanvas app, to reach its live Application through the Engine devtools hook without changing app code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md2.1 KB
  • scripts/devtools-hook.js903 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Inspect a running app

From Engine 2.23, every app announces itself to a hook at globalThis[Symbol.for('playcanvas.inspector')]. Read live state through it instead of adding window.app or debug code to the app.

Attach

  • Resolve scripts/devtools-hook.js relative to this skill and inject it as an init script that runs before any page script. A hook defined later misses existing apps; reload instead.
  • Page code then reads globalThis.__playcanvasApps, a Map from each live app to { version, revision, protocol }. app.init() adds the entry and app.destroy() removes it.
  • The script chains a hook defined before it, such as a devtools extension's.
  • No entry means the Engine predates 2.23, the hook loaded late, or the app set devtools: false. The Engine swallows errors thrown by the hook.
  • In 2.23.0 only the debug build (playcanvas/debug, build/playcanvas.dbg.*) announces apps; the default import never calls the hook. Later 2.23 patches fix every build.

Read state

  • Read after frameend, so values reflect a rendered frame.
  • Return plain numbers and strings to the caller, not Engine objects.
  • Useful reads: app.root.findByName() and findByTag(), world positions and meshInstance.aabb, app.stats.drawCallCount and frameTime, and entity.anim.baseLayer.activeState.
  • Pause with app.timeScale = 0; update still runs with a zero dt. Step one frame by restoring the scale, then zeroing it again on the next frameend.
  • Revert anything you change to take a measurement.

Inspector panel

@playcanvas/inspector adds a panel for people: new Inspector(app) shows the hierarchy, assets, materials, shaders, textures, render targets, frame graph, and physics. It must import the app's own playcanvas package, so add it only to development builds. It draws over the canvas and applies view overrides, so destroy it before verify-pixels captures. Stepping through draws needs the debug build.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when adding visual effects to a PlayCanvas app, to choose between particle systems, shader chunks, runtime meshes, and post-processing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

playcanvas/skills282026년 10월 13일 업데이트

Use when writing PlayCanvas Engine code touching transforms, cameras, lights, materials, meshes, bounds, or imports, to apply Engine conventions and avoid legacy APIs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

playcanvas/skills282026년 10월 13일 업데이트

Use when composing PlayCanvas entity hierarchies from models, colliders, rigid bodies, and scripts, so each object has one semantic root and clear lifecycle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

playcanvas/skills282026년 10월 13일 업데이트

Use when static PlayCanvas lighting, shadows, or ambient occlusion cost too much per frame and should be baked into lightmaps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

playcanvas/skills282026년 10월 13일 업데이트

build-app

무료

Use when creating or restructuring a PlayCanvas app with the Engine API, @playcanvas/react, or @playcanvas/web-components, covering bootstrap, input, resize, physics, update loop, UI, and lifecycle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

playcanvas/skills282026년 10월 13일 업데이트

Use before repeatedly placing GLB models in PlayCanvas to record each asset's uniform scale, grounding offset, pivot compensation, and yaw once.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

playcanvas/skills282026년 10월 13일 업데이트

playcanvas의 스킬 모두 보기

이 스킬의 문제 신고