@playcanvas/inspector 0.1.0 → 0.2.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # PlayCanvas Inspector
2
2
 
3
+ [![NPM Version](https://img.shields.io/npm/v/@playcanvas/inspector)](https://www.npmjs.com/package/@playcanvas/inspector)
4
+ [![NPM Downloads](https://img.shields.io/npm/dw/@playcanvas/inspector)](https://npmtrends.com/@playcanvas/inspector)
5
+ [![License](https://img.shields.io/npm/l/@playcanvas/inspector)](https://github.com/playcanvas/inspector/blob/main/LICENSE)
6
+ [![Discord](https://img.shields.io/badge/Discord-5865F2?style=flat&logo=discord&logoColor=white&color=black)](https://discord.gg/RSaMRzg)
7
+ [![Reddit](https://img.shields.io/badge/Reddit-FF4500?style=flat&logo=reddit&logoColor=white&color=black)](https://www.reddit.com/r/PlayCanvas)
8
+ [![X](https://img.shields.io/badge/X-000000?style=flat&logo=x&logoColor=white&color=black)](https://x.com/intent/follow?screen_name=playcanvas)
9
+
10
+ | [User Manual](https://developer.playcanvas.com) | [Blog](https://blog.playcanvas.com) | [Forum](https://forum.playcanvas.com) |
11
+
3
12
  A debug panel for running [PlayCanvas](https://github.com/playcanvas/engine) apps. It shows the entity
4
13
  hierarchy and every component's properties, and tabs for the cameras, assets, frame graph, render
5
14
  targets, textures, meshes, materials, scripts, memory, shaders and physics of the app, with live
@@ -45,8 +54,9 @@ app.root.addChild(entity);
45
54
  ## Engine versions
46
55
 
47
56
  Each inspector release names the engine versions it supports in its `playcanvas` peer dependency.
48
- The inspector reads engine internals to show what it shows, so it is tied to engine releases
49
- rather than claiming a wide version range.
57
+ The inspector reads engine internals to show what it shows, so a new engine release can need a new
58
+ inspector release. The range takes later 2.x releases but not prereleases of them, such as
59
+ `2.24.0-beta.1`, as npm does not match prereleases of other versions than the range names.
50
60
 
51
61
  ## The devtools hook
52
62
 
@@ -73,6 +83,7 @@ npm run lint
73
83
  npm test
74
84
  npm run build:types # writes the TypeScript declarations to types/
75
85
  npm run test:types # compiles a TypeScript usage of the package against them
86
+ npm run publint # checks the package is publishable
76
87
  ```
77
88
 
78
89
  The tests run against the `playcanvas` version in `devDependencies`, on the engine's null graphics
@@ -82,29 +93,6 @@ A few engine helpers the inspector draws with are copied into `src/renderers`, `
82
93
  `src/input`, so the inspector does not depend on them being in the app's engine build. See
83
94
  [COPIED_FROM.md](COPIED_FROM.md).
84
95
 
85
- ## Releasing
86
-
87
- Releases are published to npm from GitHub Actions when a version tag is pushed. Only repository
88
- admins and maintainers can push tags.
89
-
90
- 1. Update your `main` to the commit to release, with CI green.
91
- 2. Bump the version and tag it:
92
-
93
- ```sh
94
- npm version minor # or major, or patch
95
- ```
96
-
97
- 3. Push the commit and the tag:
98
-
99
- ```sh
100
- git push --follow-tags
101
- ```
102
-
103
- The **Publish** workflow runs the lint and tests, publishes to npm with provenance, and creates a
104
- GitHub release with generated notes.
105
-
106
- A tag that does not match the `package.json` version fails the run without publishing.
107
-
108
96
  ## License
109
97
 
110
98
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/inspector",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A debug panel for PlayCanvas apps: the entity hierarchy, assets, frame graph, render targets, textures, meshes, materials, scripts, cameras, memory, shaders and physics of a running app",
5
5
  "author": "PlayCanvas <support@playcanvas.com>",
6
6
  "homepage": "https://github.com/playcanvas/inspector#readme",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/playcanvas/inspector.git"
12
+ "url": "git+https://github.com/playcanvas/inspector.git"
13
13
  },
14
14
  "license": "MIT",
15
15
  "keywords": [
@@ -36,18 +36,23 @@
36
36
  "LICENSE"
37
37
  ],
38
38
  "sideEffects": false,
39
- "engines": {
40
- "node": ">=22.19.0"
39
+ "devEngines": {
40
+ "runtime": {
41
+ "name": "node",
42
+ "version": ">=22.19.0",
43
+ "onFail": "error"
44
+ }
41
45
  },
42
46
  "scripts": {
43
47
  "lint": "eslint src test",
44
48
  "lint:fix": "eslint --fix src test",
49
+ "publint": "publint",
45
50
  "test": "mocha --recursive test --timeout 5000",
46
51
  "build:types": "tsc",
47
52
  "test:types": "tsc -p test/types"
48
53
  },
49
54
  "peerDependencies": {
50
- "playcanvas": "^2.23.0-beta.24"
55
+ "playcanvas": "^2.23.0"
51
56
  },
52
57
  "devDependencies": {
53
58
  "@playcanvas/eslint-config": "3.0.0-beta.8",
@@ -56,7 +61,8 @@
56
61
  "globals": "17.12.0",
57
62
  "jsdom": "30.1.0",
58
63
  "mocha": "12.0.2",
59
- "playcanvas": "2.23.0-beta.24",
64
+ "playcanvas": "2.23.0",
65
+ "publint": "0.3.24",
60
66
  "typescript": "5.9.3"
61
67
  }
62
68
  }
package/src/describe.js CHANGED
@@ -253,10 +253,39 @@ function describeValue(value, depth = 0) {
253
253
  };
254
254
  }
255
255
 
256
+ // a call of the engine's deprecation and removal notices, which a debug build keeps in the source
257
+ const DEPRECATION_CALL = /\bDebug\.(?:deprecated|removed)\(/;
258
+
259
+ /**
260
+ * Whether a getter of each accessor is a deprecated or removed API, keyed by the getter.
261
+ *
262
+ * @type {WeakMap<Function, boolean>}
263
+ */
264
+ const deprecatedGetters = new WeakMap();
265
+
266
+ /**
267
+ * Whether a getter is a deprecated or removed engine API, which warns when read. Told from its
268
+ * source, so the getter is never called: reading it would print the notice, which is meant for the
269
+ * app's developer. Release builds strip the notices, and with them the warnings, so there such a
270
+ * getter is listed like any other.
271
+ *
272
+ * @param {Function} getter - The getter.
273
+ * @returns {boolean} Whether it is deprecated or removed.
274
+ */
275
+ function isDeprecatedGetter(getter) {
276
+ let deprecated = deprecatedGetters.get(getter);
277
+ if (deprecated === undefined) {
278
+ deprecated = DEPRECATION_CALL.test(Function.prototype.toString.call(getter));
279
+ deprecatedGetters.set(getter, deprecated);
280
+ }
281
+ return deprecated;
282
+ }
283
+
256
284
  /**
257
285
  * Lists the public properties of an object: accessors with a getter found on its prototype chain
258
286
  * (most derived class first, in declaration order), followed by its own enumerable data fields.
259
- * Names starting with an underscore, methods and anything in `skip` are left out.
287
+ * Names starting with an underscore, methods, getters of deprecated or removed engine APIs and
288
+ * anything in `skip` are left out.
260
289
  *
261
290
  * @param {object} obj - The object to reflect on.
262
291
  * @param {object[]} stopPrototypes - Prototypes at which to stop walking the chain. These and
@@ -275,6 +304,7 @@ function collectProperties(obj, stopPrototypes, skip = []) {
275
304
  const descriptor = Object.getOwnPropertyDescriptor(proto, name);
276
305
  if (!descriptor?.get) continue;
277
306
  seen.add(name);
307
+ if (isDeprecatedGetter(descriptor.get)) continue;
278
308
  names.push(name);
279
309
  }
280
310
  }
@@ -20,4 +20,6 @@ export function pushResourceUsage(section: PropertySection, asset: Asset, app: A
20
20
  */
21
21
  export function resourceUsers(app: AppBase, asset: Asset): Described[];
22
22
  import type { PropertySection } from './model.js';
23
+ import type { Asset } from 'playcanvas';
24
+ import type { AppBase } from 'playcanvas';
23
25
  import type { Described } from './describe.js';
@@ -9,7 +9,7 @@ export const ASSET_SORTS: string[][];
9
9
  * @param {string} sort - The order to list them in.
10
10
  * @returns {ListRow[]} The rows.
11
11
  */
12
- export function assetRows(registry: Asset | null, sort: string): ListRow[];
12
+ export function assetRows(registry: AssetRegistry | null, sort: string): ListRow[];
13
13
  /**
14
14
  * The components referencing an asset, found by walking the scene: neither the asset nor the
15
15
  * registry tracks who uses it.
@@ -18,8 +18,8 @@ export function assetRows(registry: Asset | null, sort: string): ListRow[];
18
18
  * @param {Asset} asset - The asset.
19
19
  * @returns {{ entity: Entity, name: string, property: string }[]} One entry per referencing property.
20
20
  */
21
- export function assetUsers(app: Asset, asset: Asset): {
22
- entity: Asset;
21
+ export function assetUsers(app: AppBase, asset: Asset): {
22
+ entity: Entity;
23
23
  name: string;
24
24
  property: string;
25
25
  }[];
@@ -32,7 +32,7 @@ export function assetUsers(app: Asset, asset: Asset): {
32
32
  * @returns {PropertySection[]} The sections.
33
33
  */
34
34
  export function buildAssetModel(asset: Asset, ctx: {
35
- app: Asset;
35
+ app: AppBase;
36
36
  }): PropertySection[];
37
37
  /**
38
38
  * Every asset in the registry, in the requested order. Assets with no file sort last by size, and
@@ -42,7 +42,7 @@ export function buildAssetModel(asset: Asset, ctx: {
42
42
  * @param {string} [sort] - One of {@link ASSET_SORTS}.
43
43
  * @returns {Asset[]} The assets.
44
44
  */
45
- export function collectAssets(registry: Asset | null, sort?: string): Asset[];
45
+ export function collectAssets(registry: AssetRegistry | null, sort?: string): Asset[];
46
46
  /**
47
47
  * The sub-assets of the loaded containers in a registry. A container asset adds the render,
48
48
  * material, animation and gsplat assets it creates to the registry and keeps them on its resource,
@@ -54,7 +54,7 @@ export function collectAssets(registry: Asset | null, sort?: string): Asset[];
54
54
  * @returns {{ parentOf: Map<Asset, Asset>, parts: Map<Asset, [string, Asset[]][]> }} The container of
55
55
  * each sub-asset, and the sub-assets of each container by kind.
56
56
  */
57
- export function containerParts(registry: Asset | null): {
57
+ export function containerParts(registry: AssetRegistry | null): {
58
58
  parentOf: Map<Asset, Asset>;
59
59
  parts: Map<Asset, [string, Asset[]][]>;
60
60
  };
@@ -66,7 +66,7 @@ export function containerParts(registry: Asset | null): {
66
66
  * @param {AssetRegistry|null} registry - The registry to resolve ids in.
67
67
  * @returns {Described} The described value.
68
68
  */
69
- export function describeAssetValue(value: any, registry: Asset | null): Described;
69
+ export function describeAssetValue(value: any, registry: AssetRegistry | null): Described;
70
70
  /**
71
71
  * Appends one row per asset-referencing property of a component, with ids resolved to the assets
72
72
  * they name.
@@ -75,7 +75,7 @@ export function describeAssetValue(value: any, registry: Asset | null): Describe
75
75
  * @param {Component} component - The component.
76
76
  * @returns {string[]} The property names handled, to leave out of the reflected rows.
77
77
  */
78
- export function pushAssetRows(section: PropertySection, component: Asset): string[];
78
+ export function pushAssetRows(section: PropertySection, component: Component): string[];
79
79
  /**
80
80
  * The asset each loaded resource came from, so a panel showing a resource can name its source.
81
81
  * An asset can produce several resources, such as the faces of a cubemap.
@@ -83,12 +83,17 @@ export function pushAssetRows(section: PropertySection, component: Asset): strin
83
83
  * @param {AssetRegistry|null} registry - The registry.
84
84
  * @returns {Map<object, Asset>} The asset by resource.
85
85
  */
86
- export function resourceAssets(registry: Asset | null): Map<object, Asset>;
86
+ export function resourceAssets(registry: AssetRegistry | null): Map<object, Asset>;
87
87
  /**
88
88
  * @param {Asset} asset - An asset.
89
89
  * @returns {string} Its load state.
90
90
  */
91
91
  export function stateName(asset: Asset): string;
92
+ import type { AssetRegistry } from 'playcanvas';
92
93
  import type { ListRow } from './list-view.js';
94
+ import type { AppBase } from 'playcanvas';
95
+ import { Asset } from 'playcanvas';
96
+ import type { Entity } from 'playcanvas';
93
97
  import type { PropertySection } from './model.js';
94
98
  import type { Described } from './describe.js';
99
+ import type { Component } from 'playcanvas';
@@ -5,11 +5,11 @@ export type CameraActions = {
5
5
  /**
6
6
  * - Flies the camera.
7
7
  */
8
- fly: (camera: PROJECTION_ORTHOGRAPHIC) => void;
8
+ fly: (camera: CameraComponent) => void;
9
9
  /**
10
10
  * - The camera being flown, if any.
11
11
  */
12
- flying: PROJECTION_ORTHOGRAPHIC | null;
12
+ flying: CameraComponent | null;
13
13
  };
14
14
  /**
15
15
  * Everything the property view shows for a camera: where and how it draws, the layers it renders,
@@ -19,8 +19,8 @@ export type CameraActions = {
19
19
  * @param {{ app: AppBase, cameraActions: CameraActions }} ctx - The app, and what the tab offers.
20
20
  * @returns {PropertySection[]} The sections.
21
21
  */
22
- export function buildCameraModel(camera: PROJECTION_ORTHOGRAPHIC, ctx: {
23
- app: PROJECTION_ORTHOGRAPHIC;
22
+ export function buildCameraModel(camera: CameraComponent, ctx: {
23
+ app: AppBase;
24
24
  cameraActions: CameraActions;
25
25
  }): PropertySection[];
26
26
  /**
@@ -30,7 +30,7 @@ export function buildCameraModel(camera: PROJECTION_ORTHOGRAPHIC, ctx: {
30
30
  * @param {CameraComponent|null} flying - The camera being flown, if any.
31
31
  * @returns {ListRow[]} The rows.
32
32
  */
33
- export function cameraRows(app: PROJECTION_ORTHOGRAPHIC, flying: PROJECTION_ORTHOGRAPHIC | null): ListRow[];
33
+ export function cameraRows(app: AppBase, flying: CameraComponent | null): ListRow[];
34
34
  /**
35
35
  * Every camera component of the hierarchy, disabled ones included, in the order they render: by
36
36
  * priority, then in hierarchy order.
@@ -38,8 +38,10 @@ export function cameraRows(app: PROJECTION_ORTHOGRAPHIC, flying: PROJECTION_ORTH
38
38
  * @param {AppBase} app - The app.
39
39
  * @returns {CameraComponent[]} The cameras.
40
40
  */
41
- export function collectCameras(app: PROJECTION_ORTHOGRAPHIC): PROJECTION_ORTHOGRAPHIC[];
41
+ export function collectCameras(app: AppBase): CameraComponent[];
42
42
  import { isScreenCamera } from './viewport-tools.js';
43
+ import type { CameraComponent } from 'playcanvas';
44
+ import type { AppBase } from 'playcanvas';
43
45
  import type { PropertySection } from './model.js';
44
46
  import type { ListRow } from './list-view.js';
45
47
  export { isScreenCamera };
@@ -5,7 +5,8 @@ export type Described = object;
5
5
  /**
6
6
  * Lists the public properties of an object: accessors with a getter found on its prototype chain
7
7
  * (most derived class first, in declaration order), followed by its own enumerable data fields.
8
- * Names starting with an underscore, methods and anything in `skip` are left out.
8
+ * Names starting with an underscore, methods, getters of deprecated or removed engine APIs and
9
+ * anything in `skip` are left out.
9
10
  *
10
11
  * @param {object} obj - The object to reflect on.
11
12
  * @param {object[]} stopPrototypes - Prototypes at which to stop walking the chain. These and
@@ -18,8 +18,7 @@
18
18
  * cannot switch itself off. Everything else is the {@link Inspector} API, reachable through
19
19
  * {@link EntityInspector#inspector}.
20
20
  */
21
- export class EntityInspector {
22
- static scriptName: string;
21
+ export class EntityInspector extends Script {
23
22
  /**
24
23
  * Whether the panel is shown. Toggled by {@link toggleKey}.
25
24
  *
@@ -84,4 +83,5 @@ export class EntityInspector {
84
83
  get inspector(): Inspector | null;
85
84
  initialize(): void;
86
85
  }
86
+ import { Script } from 'playcanvas';
87
87
  import { Inspector } from './inspector.js';
@@ -140,7 +140,7 @@ export function buildStepModel(selection: LayerStepSelection, ctx: PassModelCont
140
140
  * @param {AppBase} app - The app.
141
141
  * @returns {FrameSnapshot} The snapshot.
142
142
  */
143
- export function captureFrameGraph(app: FramePass): FrameSnapshot;
143
+ export function captureFrameGraph(app: AppBase): FrameSnapshot;
144
144
  /**
145
145
  * Turns a snapshot into list rows: one per pass, plus one per layer step of a forward pass and one
146
146
  * naming the light of a shadow pass. Render target cells link to the target, camera and light
@@ -150,6 +150,10 @@ export function captureFrameGraph(app: FramePass): FrameSnapshot;
150
150
  * @param {GraphicsDevice} device - The device.
151
151
  * @returns {ListRow[]} The rows.
152
152
  */
153
- export function passRows(frame: FrameSnapshot, device: FramePass): ListRow[];
153
+ export function passRows(frame: FrameSnapshot, device: GraphicsDevice): ListRow[];
154
+ import { RenderPassForward } from 'playcanvas';
155
+ import { FramePass } from 'playcanvas';
154
156
  import type { PropertySection } from './model.js';
157
+ import type { AppBase } from 'playcanvas';
158
+ import type { GraphicsDevice } from 'playcanvas';
155
159
  import type { ListRow } from './list-view.js';
@@ -16,7 +16,7 @@ export class HierarchyView {
16
16
  * @param {HTMLElement} container - The element to render into.
17
17
  * @param {(node: GraphNode|null) => void} onSelect - The selection callback.
18
18
  */
19
- constructor(container: HTMLElement, onSelect: (node: Entity | null) => void);
19
+ constructor(container: HTMLElement, onSelect: (node: GraphNode | null) => void);
20
20
  /**
21
21
  * The element the tree is rendered into.
22
22
  *
@@ -28,31 +28,31 @@ export class HierarchyView {
28
28
  *
29
29
  * @type {(node: GraphNode|null) => void}
30
30
  */
31
- onSelect: (node: Entity | null) => void;
31
+ onSelect: (node: GraphNode | null) => void;
32
32
  /**
33
33
  * Called after a node's enabled flag was flipped from its checkbox.
34
34
  *
35
35
  * @type {((node: GraphNode) => void)|undefined}
36
36
  */
37
- onToggle: ((node: Entity) => void) | undefined;
37
+ onToggle: ((node: GraphNode) => void) | undefined;
38
38
  /**
39
39
  * Decides which nodes get no enabled checkbox. Defaults to none.
40
40
  *
41
41
  * @type {(node: GraphNode) => boolean}
42
42
  */
43
- isLocked: (node: Entity) => boolean;
43
+ isLocked: (node: GraphNode) => boolean;
44
44
  /**
45
45
  * The root of the rendered hierarchy.
46
46
  *
47
47
  * @type {GraphNode|null}
48
48
  */
49
- root: Entity | null;
49
+ root: GraphNode | null;
50
50
  /**
51
51
  * The selected node.
52
52
  *
53
53
  * @type {GraphNode|null}
54
54
  */
55
- selected: Entity | null;
55
+ selected: GraphNode | null;
56
56
  /**
57
57
  * Case-insensitive filter text. Nodes that match, and their ancestors, stay visible.
58
58
  *
@@ -104,7 +104,7 @@ export class HierarchyView {
104
104
  *
105
105
  * @param {GraphNode|null} root - The new root.
106
106
  */
107
- setRoot(root: Entity | null): void;
107
+ setRoot(root: GraphNode | null): void;
108
108
  /**
109
109
  * Counts the nodes of a subtree, recording for each node how many are below it, and totals
110
110
  * the nodes and entities of the hierarchy on the way.
@@ -123,14 +123,14 @@ export class HierarchyView {
123
123
  *
124
124
  * @param {GraphNode|null} node - The node, or null to clear the selection.
125
125
  */
126
- select(node: Entity | null): void;
126
+ select(node: GraphNode | null): void;
127
127
  /**
128
128
  * Toggles the expansion of a node.
129
129
  *
130
130
  * @param {GraphNode} node - The node.
131
131
  * @param {boolean} [recursive] - Apply the new state to the whole subtree.
132
132
  */
133
- toggle(node: Entity, recursive?: boolean): void;
133
+ toggle(node: GraphNode, recursive?: boolean): void;
134
134
  /**
135
135
  * Renders a node and, when expanded or filtering, its subtree.
136
136
  *
@@ -162,11 +162,12 @@ export class HierarchyView {
162
162
  * @param {FilterBy} by - What to collect: 'component' or 'script'.
163
163
  * @returns {string[]} The values, empty when filtering by name.
164
164
  */
165
- export function filterSuggestions(root: Entity | null, by: FilterBy): string[];
165
+ export function filterSuggestions(root: GraphNode | null, by: FilterBy): string[];
166
166
  /**
167
167
  * @param {GraphNode} node - A node.
168
168
  * @param {string} text - The lower-cased filter text.
169
169
  * @param {FilterBy} by - What the text matches.
170
170
  * @returns {boolean} Whether the node matches.
171
171
  */
172
- export function matchesFilter(node: Entity, text: string, by: FilterBy): boolean;
172
+ export function matchesFilter(node: GraphNode, text: string, by: FilterBy): boolean;
173
+ import type { GraphNode } from 'playcanvas';
@@ -23,10 +23,10 @@ export class FlyController extends InputController {
23
23
  * full damping. Default is 0.98.
24
24
  */
25
25
  moveDamping: number;
26
- set pitchRange(value: any);
27
- get pitchRange(): any;
28
- set yawRange(value: any);
29
- get yawRange(): any;
26
+ set pitchRange(value: import("playcanvas").Vec2);
27
+ get pitchRange(): import("playcanvas").Vec2;
28
+ set yawRange(value: import("playcanvas").Vec2);
29
+ get yawRange(): import("playcanvas").Vec2;
30
30
  /**
31
31
  * @param {InputFrame<{ move: number[], rotate: number[] }>} frame - The input frame.
32
32
  * @param {number} dt - The delta time.
@@ -113,14 +113,14 @@ export class InputSource<T extends Record<string, number[]>> extends InputFrame<
113
113
  * @param {HandleEventCallback} callback - The callback function to execute when the event is
114
114
  * triggered.
115
115
  */
116
- on(event: string, callback: EventHandler): void;
116
+ on(event: string, callback: HandleEventCallback): void;
117
117
  /**
118
118
  * Removes an event listener for the specified event.
119
119
  *
120
120
  * @param {string} event - The event name to stop listening for.
121
121
  * @param {HandleEventCallback} callback - The callback function to remove.
122
122
  */
123
- off(event: string, callback: EventHandler): void;
123
+ off(event: string, callback: HandleEventCallback): void;
124
124
  /**
125
125
  * Fires an event with the given name and arguments.
126
126
  *
@@ -42,12 +42,12 @@ export class OrbitController extends InputController {
42
42
  * The zoom damping. A higher value means more damping. A value of 0 means no damping.
43
43
  */
44
44
  zoomDamping: number;
45
- set pitchRange(range: any);
46
- get pitchRange(): any;
47
- set yawRange(range: any);
48
- get yawRange(): any;
49
- set zoomRange(range: any);
50
- get zoomRange(): any;
45
+ set pitchRange(range: import("playcanvas").Vec2);
46
+ get pitchRange(): import("playcanvas").Vec2;
47
+ set yawRange(range: import("playcanvas").Vec2);
48
+ get yawRange(): import("playcanvas").Vec2;
49
+ set zoomRange(range: import("playcanvas").Vec2);
50
+ get zoomRange(): import("playcanvas").Vec2;
51
51
  /**
52
52
  * @param {InputFrame<{ move: number[], rotate: number[] }>} frame - The input frame.
53
53
  * @param {number} dt - The delta time.
@@ -19,11 +19,11 @@ export class Pose {
19
19
  /**
20
20
  * The position of the pose.
21
21
  */
22
- position: any;
22
+ position: Vec3;
23
23
  /**
24
24
  * The angles of the pose in degrees calculated from the forward vector.
25
25
  */
26
- angles: any;
26
+ angles: Vec3;
27
27
  /**
28
28
  * The focus distance from the position to the pose.
29
29
  */
@@ -32,27 +32,27 @@ export class Pose {
32
32
  * The allowed range of pitch angles in degrees, stored as (min, max). Applied when the pose
33
33
  * is rotated via {@link rotate}.
34
34
  */
35
- pitchRange: any;
35
+ pitchRange: Vec2;
36
36
  /**
37
37
  * The allowed range of yaw angles in degrees, stored as (min, max). Applied when the pose is
38
38
  * rotated via {@link rotate}.
39
39
  */
40
- yawRange: any;
40
+ yawRange: Vec2;
41
41
  /**
42
42
  * The allowed range of positions along the x axis, stored as (min, max). Applied when the
43
43
  * pose is translated via {@link move}.
44
44
  */
45
- xRange: any;
45
+ xRange: Vec2;
46
46
  /**
47
47
  * The allowed range of positions along the y axis, stored as (min, max). Applied when the
48
48
  * pose is translated via {@link move}.
49
49
  */
50
- yRange: any;
50
+ yRange: Vec2;
51
51
  /**
52
52
  * The allowed range of positions along the z axis, stored as (min, max). Applied when the
53
53
  * pose is translated via {@link move}.
54
54
  */
55
- zRange: any;
55
+ zRange: Vec2;
56
56
  /**
57
57
  * Copies the position and rotation from another pose.
58
58
  *
@@ -124,3 +124,5 @@ export class Pose {
124
124
  */
125
125
  getFocus(out?: Vec3): Vec3;
126
126
  }
127
+ import { Vec3 } from 'playcanvas';
128
+ import { Vec2 } from 'playcanvas';
@@ -192,7 +192,7 @@ export class Inspector {
192
192
  * @example
193
193
  * const inspector = new Inspector(app, { dock: 'left', width: 480 });
194
194
  */
195
- constructor(app: Asset, options?: InspectorOptions);
195
+ constructor(app: AppBase, options?: InspectorOptions);
196
196
  /**
197
197
  * Called with the new visibility whenever the panel is shown or hidden, whether through
198
198
  * {@link visible}, the toggle key or the panel's own close button. Set from the
@@ -1302,3 +1302,5 @@ export class Inspector {
1302
1302
  */
1303
1303
  private _highlightSize;
1304
1304
  }
1305
+ import { GraphNode } from 'playcanvas';
1306
+ import type { AppBase } from 'playcanvas';
@@ -32,4 +32,6 @@ export type FoundInstance = {
32
32
  * @param {AppBase} app - The app.
33
33
  * @returns {FoundInstance[]} The mesh instances, in the order found.
34
34
  */
35
- export function collectMeshInstances(app: MeshInstance): FoundInstance[];
35
+ export function collectMeshInstances(app: AppBase): FoundInstance[];
36
+ import { MeshInstance } from 'playcanvas';
37
+ import type { AppBase } from 'playcanvas';
@@ -5,7 +5,7 @@ export type MaterialSources = {
5
5
  /**
6
6
  * - The material assets holding it.
7
7
  */
8
- assets: Material[];
8
+ assets: Asset[];
9
9
  /**
10
10
  * - The layers whose debug lines draw with it.
11
11
  */
@@ -20,7 +20,7 @@ export type MaterialSources = {
20
20
  * @returns {PropertySection[]} The sections.
21
21
  */
22
22
  export function buildMaterialModel(material: Material, ctx: {
23
- app: Material;
23
+ app: AppBase;
24
24
  }): PropertySection[];
25
25
  /**
26
26
  * One row per material found, the most used first, dimmed when no mesh instance uses it.
@@ -34,13 +34,13 @@ export function materialListRows(survey: Map<Material, MaterialSources>): ListRo
34
34
  * @param {Shader} shader - A shader.
35
35
  * @returns {Material[]} The materials found that compiled it as one of their variants.
36
36
  */
37
- export function materialsUsingShader(app: Material, shader: Material): Material[];
37
+ export function materialsUsingShader(app: AppBase, shader: Shader): Material[];
38
38
  /**
39
39
  * @param {AppBase} app - The app.
40
40
  * @param {Texture} texture - A texture.
41
41
  * @returns {Material[]} The materials found that sample it.
42
42
  */
43
- export function materialsUsingTexture(app: Material, texture: Material): Material[];
43
+ export function materialsUsingTexture(app: AppBase, texture: Texture): Material[];
44
44
  /**
45
45
  * Finds the materials of the app. Nothing keeps a list of them, so they are found through what
46
46
  * uses them: the mesh instances of the components and layers, see {@link collectMeshInstances},
@@ -53,11 +53,16 @@ export function materialsUsingTexture(app: Material, texture: Material): Materia
53
53
  * @returns {Map<Material, MaterialSources>} The materials, in the order found, with the assets and
54
54
  * debug lines using each.
55
55
  */
56
- export function surveyMaterials(app: Material): Map<Material, MaterialSources>;
56
+ export function surveyMaterials(app: AppBase): Map<Material, MaterialSources>;
57
57
  /**
58
58
  * @param {Material[]} materials - The materials using something.
59
59
  * @returns {PropertySection} A section listing them, each linking to the Materials tab.
60
60
  */
61
61
  export function usedByMaterialsSection(materials: Material[]): PropertySection;
62
+ import type { Asset } from 'playcanvas';
63
+ import { Material } from 'playcanvas';
64
+ import type { AppBase } from 'playcanvas';
62
65
  import type { PropertySection } from './model.js';
63
66
  import type { ListRow } from './list-view.js';
67
+ import type { Shader } from 'playcanvas';
68
+ import type { Texture } from 'playcanvas';