@playcanvas/inspector 0.2.0 → 0.4.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.
Files changed (49) hide show
  1. package/README.md +147 -5
  2. package/package.json +1 -1
  3. package/src/asset-view.js +24 -17
  4. package/src/camera-view.js +5 -3
  5. package/src/context-menu.js +231 -0
  6. package/src/copy-json.js +692 -0
  7. package/src/describe.js +20 -1
  8. package/src/entity-inspector-script.js +10 -0
  9. package/src/frame-graph-view.js +41 -9
  10. package/src/hierarchy-view.js +29 -3
  11. package/src/inspector.js +958 -80
  12. package/src/list-view.js +118 -12
  13. package/src/material-view.js +7 -6
  14. package/src/memory-view.js +224 -66
  15. package/src/mesh-view.js +6 -5
  16. package/src/model.js +24 -2
  17. package/src/node-model.js +81 -11
  18. package/src/perf-capture.js +2034 -0
  19. package/src/perf-chart.js +3989 -0
  20. package/src/perf-copy.js +367 -0
  21. package/src/perf-view.js +1224 -0
  22. package/src/property-view.js +162 -5
  23. package/src/render-target-view.js +3 -3
  24. package/src/script-view.js +21 -12
  25. package/src/styles.js +374 -2
  26. package/src/texture-view.js +4 -4
  27. package/src/transform-tool.js +185 -0
  28. package/types/asset-view.d.ts +3 -1
  29. package/types/camera-view.d.ts +4 -0
  30. package/types/context-menu.d.ts +90 -0
  31. package/types/copy-json.d.ts +69 -0
  32. package/types/describe.d.ts +1 -1
  33. package/types/entity-inspector-script.d.ts +8 -0
  34. package/types/frame-graph-view.d.ts +7 -0
  35. package/types/hierarchy-view.d.ts +13 -0
  36. package/types/inspector.d.ts +339 -25
  37. package/types/list-view.d.ts +44 -3
  38. package/types/material-view.d.ts +3 -1
  39. package/types/memory-view.d.ts +24 -25
  40. package/types/mesh-view.d.ts +3 -1
  41. package/types/model.d.ts +16 -1
  42. package/types/node-model.d.ts +17 -1
  43. package/types/perf-capture.d.ts +871 -0
  44. package/types/perf-chart.d.ts +1407 -0
  45. package/types/perf-copy.d.ts +61 -0
  46. package/types/perf-view.d.ts +231 -0
  47. package/types/property-view.d.ts +41 -0
  48. package/types/script-view.d.ts +3 -1
  49. package/types/transform-tool.d.ts +92 -0
@@ -47,11 +47,13 @@ export type MeshSurvey = {
47
47
  * format, and what uses it, with each mesh instance opening in place.
48
48
  *
49
49
  * @param {Mesh} mesh - The mesh.
50
- * @param {{ app: AppBase }} ctx - The app, to find the mesh's users.
50
+ * @param {{ app: AppBase, backlinks?: boolean }} ctx - The app, to find the mesh's users, and
51
+ * whether to find them at all, which a copy has no use for.
51
52
  * @returns {PropertySection[]} The sections.
52
53
  */
53
54
  export function buildMeshModel(mesh: Mesh, ctx: {
54
55
  app: AppBase;
56
+ backlinks?: boolean;
55
57
  }): PropertySection[];
56
58
  /**
57
59
  * @param {Mesh} mesh - A mesh.
package/types/model.d.ts CHANGED
@@ -6,6 +6,13 @@ export type PropertySection = object;
6
6
  * @returns {string} The attachments in the trace's notation, e.g. `[C×2][D][S]`.
7
7
  */
8
8
  export function attachmentsText(rt: RenderTarget, device: GraphicsDevice): string;
9
+ /**
10
+ * Marks a value as referring back to what holds or uses the subject, which copies leave out.
11
+ *
12
+ * @param {Described} value - The value.
13
+ * @returns {Described} The same value.
14
+ */
15
+ export function backlink(value: Described): Described;
9
16
  /**
10
17
  * @param {number} bytes - A byte count.
11
18
  * @returns {string} The count in the largest unit that keeps it above one, with two decimals.
@@ -37,6 +44,8 @@ export function formatName(format: number | undefined): string;
37
44
  * @property {string} title - The title.
38
45
  * @property {PropertyRow[]} rows - The rows.
39
46
  * @property {boolean} [collapsed] - Whether the section starts out collapsed.
47
+ * @property {boolean} [backlink] - Whether the section lists what uses the subject, which copies
48
+ * leave out, see {@link Described#backlink}.
40
49
  */
41
50
  /**
42
51
  * @param {string} key - The section key.
@@ -45,6 +54,12 @@ export function formatName(format: number | undefined): string;
45
54
  * @returns {PropertySection} An empty section.
46
55
  */
47
56
  export function makeSection(key: string, title: string, collapsed?: boolean): PropertySection;
57
+ /**
58
+ * @param {string} key - The section key.
59
+ * @param {string} title - The section title.
60
+ * @returns {PropertySection} An empty section listing what uses the subject, which copies leave out.
61
+ */
62
+ export function makeUsageSection(key: string, title: string): PropertySection;
48
63
  /**
49
64
  * Passes are named after their class unless given a name, so the class-family prefix carries no
50
65
  * information in a list of passes.
@@ -103,5 +118,5 @@ export function reflectRows(section: PropertySection, obj: object, stopPrototype
103
118
  export function renderTargetSummary(rt: RenderTarget | null, device: GraphicsDevice): string;
104
119
  import type { RenderTarget } from 'playcanvas';
105
120
  import type { GraphicsDevice } from 'playcanvas';
106
- import type { FramePass } from 'playcanvas';
107
121
  import type { Described } from './describe.js';
122
+ import type { FramePass } from 'playcanvas';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * The sections a component shows under its entity, for a component reached on its own, such as
3
+ * through a link.
4
+ *
5
+ * @param {Component} component - The component.
6
+ * @returns {PropertySection[]} Its section, followed by one per script instance of a script component.
7
+ */
8
+ export function buildComponentModel(component: Component): PropertySection[];
1
9
  /**
2
10
  * Everything the property view shows for a node: identity, transform, one section per component
3
11
  * and one per script instance. A component's mesh instances open in place, each into its own
@@ -44,13 +52,21 @@ export function meshRows(mesh: Mesh): PropertyRow[];
44
52
  * @returns {PropertyRow[]} Its rows: whether it is enabled, then its attributes.
45
53
  */
46
54
  export function scriptInstanceRows(script: ScriptType | Script): PropertyRow[];
55
+ /**
56
+ * Moves the physics body of a node to where the node now is. A dynamic or kinematic body would
57
+ * otherwise put the node back where the body is on the next step of the simulation.
58
+ *
59
+ * @param {GraphNode} node - A node whose transform was changed.
60
+ */
61
+ export function syncBody(node: GraphNode): void;
47
62
  /**
48
63
  * @param {import('playcanvas').VertexFormat} format - A vertex format.
49
64
  * @returns {Described} The format, expanding into one row per element.
50
65
  */
51
66
  export function vertexFormatValue(format: import("playcanvas").VertexFormat): Described;
52
- import type { GraphNode } from 'playcanvas';
67
+ import { Component } from 'playcanvas';
53
68
  import type { PropertySection } from './model.js';
69
+ import type { GraphNode } from 'playcanvas';
54
70
  import type { LayerComposition } from 'playcanvas';
55
71
  import type { Described } from './describe.js';
56
72
  import type { Material } from 'playcanvas';