@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.
@@ -1,4 +1,4 @@
1
- export type Buffer = VertexBuffer | IndexBuffer | BUFFER_DYNAMIC | StorageBuffer;
1
+ export type Buffer = VertexBuffer | IndexBuffer | UniformBuffer | StorageBuffer;
2
2
  /**
3
3
  * Something a buffer was found to belong to.
4
4
  */
@@ -15,7 +15,7 @@ export type BufferOwner = {
15
15
  * - What to link to, or null when there is nothing to
16
16
  * show.
17
17
  */
18
- target: BUFFER_DYNAMIC | BUFFER_DYNAMIC | BUFFER_DYNAMIC | null;
18
+ target: GraphNode | Asset | Material | null;
19
19
  };
20
20
  /** What the list can be narrowed to, as selector options. */
21
21
  export const BUFFER_KINDS: string[][];
@@ -41,7 +41,7 @@ export function bufferKind(buffer: any): "vertex" | "index" | "uniform" | "stora
41
41
  * @param {AppBase} app - The app.
42
42
  * @returns {Map<Buffer, BufferOwner[]>} The owners of each attributed buffer.
43
43
  */
44
- export function bufferOwners(app: BUFFER_DYNAMIC): Map<Buffer, BufferOwner[]>;
44
+ export function bufferOwners(app: AppBase): Map<Buffer, BufferOwner[]>;
45
45
  /**
46
46
  * One row per buffer, largest first, named after what uses it and dimmed when nothing was found.
47
47
  *
@@ -50,7 +50,7 @@ export function bufferOwners(app: BUFFER_DYNAMIC): Map<Buffer, BufferOwner[]>;
50
50
  * @param {string} kind - The kind to list, or 'all'.
51
51
  * @returns {ListRow[]} The rows.
52
52
  */
53
- export function bufferRows(device: BUFFER_DYNAMIC, owners: Map<Buffer, BufferOwner[]>, kind: string): ListRow[];
53
+ export function bufferRows(device: GraphicsDevice, owners: Map<Buffer, BufferOwner[]>, kind: string): ListRow[];
54
54
  /**
55
55
  * Everything the property view shows for a buffer: its size and layout, what it was found to
56
56
  * belong to (linked), and every other public property.
@@ -60,7 +60,7 @@ export function bufferRows(device: BUFFER_DYNAMIC, owners: Map<Buffer, BufferOwn
60
60
  * @returns {PropertySection[]} The sections.
61
61
  */
62
62
  export function buildBufferModel(buffer: Buffer, ctx: {
63
- app: BUFFER_DYNAMIC;
63
+ app: AppBase;
64
64
  }): PropertySection[];
65
65
  /**
66
66
  * Every buffer the device tracks, largest first. Uniform buffers appear only when persistent, as
@@ -70,7 +70,7 @@ export function buildBufferModel(buffer: Buffer, ctx: {
70
70
  * @param {string} [kind] - One of {@link BUFFER_KINDS}.
71
71
  * @returns {Buffer[]} The buffers.
72
72
  */
73
- export function collectBuffers(device: BUFFER_DYNAMIC, kind?: string): Buffer[];
73
+ export function collectBuffers(device: GraphicsDevice, kind?: string): Buffer[];
74
74
  /**
75
75
  * @param {Buffer} buffer - A buffer.
76
76
  * @returns {number} An id that stays the same for the lifetime of the buffer, since buffers carry
@@ -84,12 +84,20 @@ export function idOf(buffer: Buffer): number;
84
84
  * @param {GraphicsDevice} device - The device.
85
85
  * @returns {string} The totals, one line per group.
86
86
  */
87
- export function memorySummary(device: BUFFER_DYNAMIC): string;
87
+ export function memorySummary(device: GraphicsDevice): string;
88
88
  /**
89
89
  * @param {GraphNode|null} node - The node a mesh instance draws at.
90
90
  * @returns {string} Its name, after its parent's when it has one below the root: imported models
91
91
  * often give every mesh node the same name, and the parent tells them apart.
92
92
  */
93
- export function nodeLabel(node: BUFFER_DYNAMIC | null): string;
93
+ export function nodeLabel(node: GraphNode | null): string;
94
+ import { VertexBuffer } from 'playcanvas';
95
+ import { IndexBuffer } from 'playcanvas';
96
+ import { StorageBuffer } from 'playcanvas';
97
+ import type { GraphNode } from 'playcanvas';
98
+ import type { Asset } from 'playcanvas';
99
+ import type { Material } from 'playcanvas';
100
+ import type { AppBase } from 'playcanvas';
101
+ import type { GraphicsDevice } from 'playcanvas';
94
102
  import type { ListRow } from './list-view.js';
95
103
  import type { PropertySection } from './model.js';
@@ -13,11 +13,11 @@ export type MeshUser = {
13
13
  /**
14
14
  * - What to link to, or null when there is nothing to show.
15
15
  */
16
- target: Mesh | Mesh | null;
16
+ target: GraphNode | Asset | null;
17
17
  /**
18
18
  * - The mesh instance drawing the mesh, when there is one.
19
19
  */
20
- instance: Mesh | null;
20
+ instance: MeshInstance | null;
21
21
  };
22
22
  /**
23
23
  * The meshes found, with what uses each, and how complete the search was.
@@ -51,7 +51,7 @@ export type MeshSurvey = {
51
51
  * @returns {PropertySection[]} The sections.
52
52
  */
53
53
  export function buildMeshModel(mesh: Mesh, ctx: {
54
- app: Mesh;
54
+ app: AppBase;
55
55
  }): PropertySection[];
56
56
  /**
57
57
  * @param {Mesh} mesh - A mesh.
@@ -84,6 +84,11 @@ export function meshNote(survey: MeshSurvey): string;
84
84
  * @param {AppBase} app - The app.
85
85
  * @returns {MeshSurvey} The meshes and what uses them.
86
86
  */
87
- export function surveyMeshes(app: Mesh): MeshSurvey;
87
+ export function surveyMeshes(app: AppBase): MeshSurvey;
88
+ import type { GraphNode } from 'playcanvas';
89
+ import type { Asset } from 'playcanvas';
90
+ import type { MeshInstance } from 'playcanvas';
91
+ import { Mesh } from 'playcanvas';
92
+ import type { AppBase } from 'playcanvas';
88
93
  import type { PropertySection } from './model.js';
89
94
  import type { ListRow } from './list-view.js';
package/types/model.d.ts CHANGED
@@ -5,7 +5,7 @@ export type PropertySection = object;
5
5
  * @param {GraphicsDevice} device - The device, to recognize the backbuffer.
6
6
  * @returns {string} The attachments in the trace's notation, e.g. `[C×2][D][S]`.
7
7
  */
8
- export function attachmentsText(rt: pixelFormatInfo, device: pixelFormatInfo): string;
8
+ export function attachmentsText(rt: RenderTarget, device: GraphicsDevice): string;
9
9
  /**
10
10
  * @param {number} bytes - A byte count.
11
11
  * @returns {string} The count in the largest unit that keeps it above one, with two decimals.
@@ -52,7 +52,7 @@ export function makeSection(key: string, title: string, collapsed?: boolean): Pr
52
52
  * @param {FramePass} pass - The pass.
53
53
  * @returns {string} The name without a leading 'RenderPass' or 'FramePass'.
54
54
  */
55
- export function passDisplayName(pass: pixelFormatInfo): string;
55
+ export function passDisplayName(pass: FramePass): string;
56
56
  /**
57
57
  * Appends a row to a section, followed by one indented row per expanded collection entry.
58
58
  *
@@ -100,5 +100,8 @@ export function reflectRows(section: PropertySection, obj: object, stopPrototype
100
100
  * @param {GraphicsDevice} device - The device, to recognize the backbuffer.
101
101
  * @returns {string} A one-line summary: name, size, attachments, samples and mip level.
102
102
  */
103
- export function renderTargetSummary(rt: pixelFormatInfo | null, device: pixelFormatInfo): string;
103
+ export function renderTargetSummary(rt: RenderTarget | null, device: GraphicsDevice): string;
104
+ import type { RenderTarget } from 'playcanvas';
105
+ import type { GraphicsDevice } from 'playcanvas';
106
+ import type { FramePass } from 'playcanvas';
104
107
  import type { Described } from './describe.js';
@@ -6,7 +6,7 @@
6
6
  * @param {GraphNode} node - The node.
7
7
  * @returns {PropertySection[]} The sections.
8
8
  */
9
- export function buildNodeModel(node: Component): PropertySection[];
9
+ export function buildNodeModel(node: GraphNode): PropertySection[];
10
10
  /**
11
11
  * The layers a component renders in. Components hold them as ids, which say nothing on their own,
12
12
  * so each is named from the scene's layer composition.
@@ -15,12 +15,12 @@ export function buildNodeModel(node: Component): PropertySection[];
15
15
  * @param {LayerComposition|null} composition - The scene's composition.
16
16
  * @returns {Described} The layers, named.
17
17
  */
18
- export function layersValue(ids: number[], composition: Component | null): Described;
18
+ export function layersValue(ids: number[], composition: LayerComposition | null): Described;
19
19
  /**
20
20
  * @param {Material} material - A material.
21
21
  * @returns {PropertyRow[]} Its rows, textures and compiled variants linking to their tabs.
22
22
  */
23
- export function materialRows(material: Component): PropertyRow[];
23
+ export function materialRows(material: Material): PropertyRow[];
24
24
  /**
25
25
  * The textures a material samples: those set on its properties, such as the maps of a
26
26
  * StandardMaterial, and those set as parameters, which is how a ShaderMaterial carries them.
@@ -28,7 +28,7 @@ export function materialRows(material: Component): PropertyRow[];
28
28
  * @param {Material} material - A material.
29
29
  * @returns {Set<Texture>} The textures.
30
30
  */
31
- export function materialTextures(material: Component): Set<Texture>;
31
+ export function materialTextures(material: Material): Set<Texture>;
32
32
  /**
33
33
  * @param {MeshInstance} instance - A mesh instance.
34
34
  * @returns {PropertyRow[]} Its rows, with the mesh and the material linking to their tabs.
@@ -38,7 +38,7 @@ export function meshInstanceRows(instance: MeshInstance): PropertyRow[];
38
38
  * @param {Mesh} mesh - A mesh.
39
39
  * @returns {PropertyRow[]} Its rows, with the vertex format opening into its elements.
40
40
  */
41
- export function meshRows(mesh: Component): PropertyRow[];
41
+ export function meshRows(mesh: Mesh): PropertyRow[];
42
42
  /**
43
43
  * @param {ScriptType|Script} script - A script instance.
44
44
  * @returns {PropertyRow[]} Its rows: whether it is enabled, then its attributes.
@@ -48,7 +48,15 @@ export function scriptInstanceRows(script: ScriptType | Script): PropertyRow[];
48
48
  * @param {import('playcanvas').VertexFormat} format - A vertex format.
49
49
  * @returns {Described} The format, expanding into one row per element.
50
50
  */
51
- export function vertexFormatValue(format: any): Described;
51
+ export function vertexFormatValue(format: import("playcanvas").VertexFormat): Described;
52
+ import type { GraphNode } from 'playcanvas';
52
53
  import type { PropertySection } from './model.js';
54
+ import type { LayerComposition } from 'playcanvas';
53
55
  import type { Described } from './describe.js';
56
+ import type { Material } from 'playcanvas';
54
57
  import type { PropertyRow } from './model.js';
58
+ import { Texture } from 'playcanvas';
59
+ import { MeshInstance } from 'playcanvas';
60
+ import type { Mesh } from 'playcanvas';
61
+ import { ScriptType } from 'playcanvas';
62
+ import { Script } from 'playcanvas';
@@ -28,18 +28,18 @@ export class AmmoDebugDraw {
28
28
  * @param {AppBase} app - The app.
29
29
  * @returns {boolean} True when {@link attach} would succeed.
30
30
  */
31
- static isAvailable(app: Vec3): boolean;
31
+ static isAvailable(app: AppBase): boolean;
32
32
  /**
33
33
  * @param {AppBase} app - The app.
34
34
  * @param {WireRenderer} [wire] - The renderer to draw through. Defaults to a new one.
35
35
  */
36
- constructor(app: Vec3, wire?: WireRenderer);
36
+ constructor(app: AppBase, wire?: WireRenderer);
37
37
  /**
38
38
  * The app whose rigid body system is drawn.
39
39
  *
40
40
  * @type {AppBase}
41
41
  */
42
- app: Vec3;
42
+ app: AppBase;
43
43
  /**
44
44
  * The renderer the lines go through. Its layer and depth test are applied on every flush from
45
45
  * {@link depthTest} and {@link layer}.
@@ -72,7 +72,7 @@ export class AmmoDebugDraw {
72
72
  *
73
73
  * @type {Layer|null}
74
74
  */
75
- layer: Vec3 | null;
75
+ layer: Layer | null;
76
76
  /**
77
77
  * Only lines within this distance of {@link center} are drawn, in meters. Zero draws everything.
78
78
  *
@@ -96,7 +96,7 @@ export class AmmoDebugDraw {
96
96
  *
97
97
  * @type {Color|null}
98
98
  */
99
- color: Vec3 | null;
99
+ color: Color | null;
100
100
  /**
101
101
  * The number of line segments drawn by the last {@link update}.
102
102
  *
@@ -251,4 +251,8 @@ export const DEBUG_DRAW: {
251
251
  NORMALS: number;
252
252
  FRAMES: number;
253
253
  };
254
+ import type { AppBase } from 'playcanvas';
254
255
  import { WireRenderer } from './renderers/wire-renderer.js';
256
+ import type { Layer } from 'playcanvas';
257
+ import { Vec3 } from 'playcanvas';
258
+ import type { Color } from 'playcanvas';
@@ -38,8 +38,8 @@ export type PhysicsStats = {
38
38
  * @param {boolean} drawing - Whether the world is drawn at all; the checkboxes are disabled otherwise.
39
39
  * @returns {ListRow[]} The rows.
40
40
  */
41
- export function bodyRows(app: BODYTYPE_DYNAMIC, hidden: {
42
- has: (entity: BODYTYPE_DYNAMIC) => boolean;
41
+ export function bodyRows(app: AppBase, hidden: {
42
+ has: (entity: Entity) => boolean;
43
43
  }, drawing: boolean): ListRow[];
44
44
  /**
45
45
  * Outlines an entity's primitive collision shape where the physics engine has it: at the entity's
@@ -50,7 +50,7 @@ export function bodyRows(app: BODYTYPE_DYNAMIC, hidden: {
50
50
  * @param {Entity} entity - The entity.
51
51
  * @returns {boolean} False when the entity has no primitive collision shape to outline.
52
52
  */
53
- export function drawCollisionShape(wire: WireRenderer, entity: BODYTYPE_DYNAMIC): boolean;
53
+ export function drawCollisionShape(wire: WireRenderer, entity: Entity): boolean;
54
54
  /**
55
55
  * Outlines a joint. The joint entity's own frame is drawn as axes, and for each connected body the
56
56
  * joint frame the constraint was created with is drawn where that body currently carries it: axes
@@ -63,7 +63,7 @@ export function drawCollisionShape(wire: WireRenderer, entity: BODYTYPE_DYNAMIC)
63
63
  * @param {number} size - The axis length.
64
64
  * @returns {boolean} False when the entity has no joint component.
65
65
  */
66
- export function drawJoint(wire: WireRenderer, entity: BODYTYPE_DYNAMIC, size: number): boolean;
66
+ export function drawJoint(wire: WireRenderer, entity: Entity, size: number): boolean;
67
67
  /**
68
68
  * One row per joint: name linking to the entity, the joint type, the two bodies it connects as
69
69
  * links, and whether it has broken. Joints without a second body are attached to the world.
@@ -71,11 +71,13 @@ export function drawJoint(wire: WireRenderer, entity: BODYTYPE_DYNAMIC, size: nu
71
71
  * @param {AppBase} app - The app.
72
72
  * @returns {ListRow[]} The rows.
73
73
  */
74
- export function jointRows(app: BODYTYPE_DYNAMIC): ListRow[];
74
+ export function jointRows(app: AppBase): ListRow[];
75
75
  /**
76
76
  * @param {AppBase} app - The app.
77
77
  * @returns {PhysicsStats} Counts for the status bar.
78
78
  */
79
- export function physicsStats(app: BODYTYPE_DYNAMIC): PhysicsStats;
79
+ export function physicsStats(app: AppBase): PhysicsStats;
80
+ import type { AppBase } from 'playcanvas';
81
+ import type { Entity } from 'playcanvas';
80
82
  import type { ListRow } from './list-view.js';
81
83
  import type { WireRenderer } from './renderers/wire-renderer.js';
@@ -53,7 +53,7 @@ export class Picker {
53
53
  * @param {boolean} [depth] - Whether to enable depth picking. When enabled, depth
54
54
  * information is captured alongside mesh IDs using MRT. Defaults to false.
55
55
  */
56
- constructor(app: Color, width: number, height: number, depth?: boolean);
56
+ constructor(app: AppBase, width: number, height: number, depth?: boolean);
57
57
  /**
58
58
  * @type {import('playcanvas').GraphicsDevice}
59
59
  * @private
@@ -139,7 +139,7 @@ export class Picker {
139
139
  * // Get all models in rectangle with corners at (10,20) and (20,40)
140
140
  * const selection = picker.getSelection(10, 20, 10, 20);
141
141
  */
142
- getSelection(x: number, y: number, width?: number, height?: number): (Color | Color)[];
142
+ getSelection(x: number, y: number, width?: number, height?: number): (MeshInstance | GSplatComponent)[];
143
143
  /**
144
144
  * Return the list of mesh instances selected by the specified rectangle in the previously
145
145
  * prepared pick buffer. The rectangle uses top-left coordinate system.
@@ -158,7 +158,7 @@ export class Picker {
158
158
  * console.log(meshInstances);
159
159
  * });
160
160
  */
161
- getSelectionAsync(x: number, y: number, width?: number, height?: number): Promise<(Color | Color)[]>;
161
+ getSelectionAsync(x: number, y: number, width?: number, height?: number): Promise<(MeshInstance | GSplatComponent)[]>;
162
162
  /**
163
163
  * Helper method to read pixels from a texture asynchronously.
164
164
  *
@@ -224,9 +224,9 @@ export class Picker {
224
224
  * @private
225
225
  */
226
226
  private _sanitizeFlippedRect;
227
- sanitizeRect(x: any, y: any, width: any, height: any): any;
227
+ sanitizeRect(x: any, y: any, width: any, height: any): Vec4;
228
228
  decodePixels(pixels: any, mapping: any): any[];
229
- createTexture(name: any): any;
229
+ createTexture(name: any): Texture;
230
230
  allocateRenderTarget(): void;
231
231
  releaseRenderTarget(): void;
232
232
  /**
@@ -240,7 +240,7 @@ export class Picker {
240
240
  * @param {Layer[]} [layers] - Layers from which objects will be picked. If not supplied, all
241
241
  * layers of the specified camera will be used.
242
242
  */
243
- prepare(camera: Color, scene: Color, layers?: Layer[]): void;
243
+ prepare(camera: CameraComponent, scene: Scene, layers?: Layer[]): void;
244
244
  /**
245
245
  * Sets the resolution of the pick buffer. The pick buffer resolution does not need to match
246
246
  * the resolution of the corresponding frame buffer use for general rendering of the 3D scene.
@@ -253,3 +253,12 @@ export class Picker {
253
253
  */
254
254
  resize(width: number, height: number): void;
255
255
  }
256
+ import type { MeshInstance } from 'playcanvas';
257
+ import type { GSplatComponent } from 'playcanvas';
258
+ import { Vec3 } from 'playcanvas';
259
+ import { Vec4 } from 'playcanvas';
260
+ import { Texture } from 'playcanvas';
261
+ import type { CameraComponent } from 'playcanvas';
262
+ import type { Scene } from 'playcanvas';
263
+ import { Layer } from 'playcanvas';
264
+ import type { AppBase } from 'playcanvas';
@@ -3,24 +3,24 @@
3
3
  *
4
4
  * @ignore
5
5
  */
6
- export class RenderPassPicker {
6
+ export class RenderPassPicker extends RenderPass {
7
7
  constructor(device: any, renderer: any);
8
8
  /** @type {BlendState} */
9
9
  blendState: BlendState;
10
10
  /** @type {CameraComponent} */
11
- camera: BlendState;
11
+ camera: CameraComponent;
12
12
  /** @type {Scene} */
13
- scene: BlendState;
13
+ scene: Scene;
14
14
  /** @type {Layer[]} */
15
- layers: BlendState[];
15
+ layers: Layer[];
16
16
  /** @type {Map<number, MeshInstance | GSplatComponent>} */
17
- mapping: Map<number, BlendState | BlendState>;
17
+ mapping: Map<number, MeshInstance | GSplatComponent>;
18
18
  /** @type {boolean} */
19
19
  depth: boolean;
20
20
  /** @type {number[]} */
21
21
  _qualifiedLayerIndices: number[];
22
22
  /** @type {Map<number, MeshInstance|null>} */
23
- _pickMeshInstances: Map<number, BlendState | null>;
23
+ _pickMeshInstances: Map<number, MeshInstance | null>;
24
24
  /**
25
25
  * Minimal view uniform format used by the picker. The pick shaders only need the view
26
26
  * projection (and the view matrix for depth picking); any other view uniform a shader happens
@@ -32,7 +32,7 @@ export class RenderPassPicker {
32
32
  */
33
33
  _viewUniformFormat: UniformBufferFormat | null;
34
34
  renderer: any;
35
- getViewUniformFormat(): any;
35
+ getViewUniformFormat(): UniformBufferFormat;
36
36
  /**
37
37
  * @param {CameraComponent} camera - The camera component used for picking.
38
38
  * @param {Scene} scene - The scene to pick from.
@@ -40,8 +40,14 @@ export class RenderPassPicker {
40
40
  * @param {Map<number, MeshInstance | GSplatComponent>} mapping - Map to store ID to object mappings.
41
41
  * @param {boolean} depth - Whether to render depth information.
42
42
  */
43
- update(camera: BlendState, scene: BlendState, layers: BlendState[], mapping: Map<number, BlendState | BlendState>, depth: boolean): void;
43
+ update(camera: CameraComponent, scene: Scene, layers: Layer[], mapping: Map<number, MeshInstance | GSplatComponent>, depth: boolean): void;
44
44
  emptyWorldClusters: any;
45
- before(): void;
46
- execute(): void;
47
45
  }
46
+ import { RenderPass } from 'playcanvas';
47
+ import { BlendState } from 'playcanvas';
48
+ import type { CameraComponent } from 'playcanvas';
49
+ import type { Scene } from 'playcanvas';
50
+ import type { Layer } from 'playcanvas';
51
+ import type { MeshInstance } from 'playcanvas';
52
+ import type { GSplatComponent } from 'playcanvas';
53
+ import { UniformBufferFormat } from 'playcanvas';
@@ -13,7 +13,7 @@ export type PreviewAttachment = {
13
13
  /**
14
14
  * - The texture to sample.
15
15
  */
16
- texture: FILTER_NEAREST;
16
+ texture: Texture;
17
17
  };
18
18
  /**
19
19
  * Everything the property view shows for a render target: its setup, the passes that rendered
@@ -23,8 +23,8 @@ export type PreviewAttachment = {
23
23
  * @param {{ device: GraphicsDevice, frame: FrameSnapshot|null }} ctx - The device and the captured frame.
24
24
  * @returns {PropertySection[]} The sections.
25
25
  */
26
- export function buildRenderTargetModel(rt: FILTER_NEAREST, ctx: {
27
- device: FILTER_NEAREST;
26
+ export function buildRenderTargetModel(rt: RenderTarget, ctx: {
27
+ device: GraphicsDevice;
28
28
  frame: FrameSnapshot | null;
29
29
  }): PropertySection[];
30
30
  /**
@@ -60,7 +60,7 @@ export function isDepthFormat(format: number): boolean;
60
60
  * @param {GraphicsDevice} device - The device.
61
61
  * @returns {PreviewAttachment[]} The attachments, in selector order.
62
62
  */
63
- export function previewAttachments(rt: FILTER_NEAREST, device: FILTER_NEAREST): PreviewAttachment[];
63
+ export function previewAttachments(rt: RenderTarget, device: GraphicsDevice): PreviewAttachment[];
64
64
  /**
65
65
  * Mirrors the checks TextureRenderer applies before drawing, so the panel can say why a texture
66
66
  * cannot be shown instead of letting the renderer warn once and draw nothing.
@@ -69,7 +69,7 @@ export function previewAttachments(rt: FILTER_NEAREST, device: FILTER_NEAREST):
69
69
  * @param {GraphicsDevice} device - The device.
70
70
  * @returns {{ ok: boolean, reason: string }} Whether it can be previewed, and if not, why.
71
71
  */
72
- export function previewSupport(texture: FILTER_NEAREST | null, device: FILTER_NEAREST): {
72
+ export function previewSupport(texture: Texture | null, device: GraphicsDevice): {
73
73
  ok: boolean;
74
74
  reason: string;
75
75
  };
@@ -80,7 +80,7 @@ export function previewSupport(texture: FILTER_NEAREST | null, device: FILTER_NE
80
80
  * @param {FrameSnapshot|null} frame - The captured frame, for usage counts.
81
81
  * @returns {ListRow[]} The rows.
82
82
  */
83
- export function renderTargetRows(device: FILTER_NEAREST, frame: FrameSnapshot | null): ListRow[];
83
+ export function renderTargetRows(device: GraphicsDevice, frame: FrameSnapshot | null): ListRow[];
84
84
  /**
85
85
  * Whether a texture holds its rows bottom-up, as a render target with the bottom origin stores
86
86
  * them, or with the native origin on WebGL2. The texture renderer shows row 0 at the top, so such
@@ -92,7 +92,10 @@ export function renderTargetRows(device: FILTER_NEAREST, frame: FrameSnapshot |
92
92
  * when not given.
93
93
  * @returns {boolean} Whether it is stored bottom-up.
94
94
  */
95
- export function storedBottomUp(texture: FILTER_NEAREST, device: FILTER_NEAREST, rt?: FILTER_NEAREST | null): boolean;
95
+ export function storedBottomUp(texture: Texture, device: GraphicsDevice, rt?: RenderTarget | null): boolean;
96
+ import type { Texture } from 'playcanvas';
97
+ import type { RenderTarget } from 'playcanvas';
98
+ import type { GraphicsDevice } from 'playcanvas';
96
99
  import type { FrameSnapshot } from './frame-graph-view.js';
97
100
  import type { PropertySection } from './model.js';
98
101
  import type { ListRow } from './list-view.js';
@@ -6,4 +6,4 @@
6
6
  * @returns {ShaderDesc} Shader description.
7
7
  * @ignore
8
8
  */
9
- export function createTextureShaderDesc(mode: string, encoding: string): ChunkUtils;
9
+ export function createTextureShaderDesc(mode: string, encoding: string): ShaderDesc;
@@ -22,7 +22,7 @@ export type TextureSlot = {
22
22
  /**
23
23
  * - The texture shown this frame, or null.
24
24
  */
25
- texture: BLEND_NORMAL | null;
25
+ texture: Texture | null;
26
26
  };
27
27
  export type TexturePool = {
28
28
  /**
@@ -98,21 +98,21 @@ export class TextureRenderer {
98
98
  *
99
99
  * @param {AppBase} app - The application to render into and bind resource lifetime to.
100
100
  */
101
- constructor(app: BLEND_NORMAL);
101
+ constructor(app: AppBase);
102
102
  /**
103
103
  * The layer used by subsequent draw calls, or null to use the application's default debug
104
104
  * drawing layer (normally Immediate). Defaults to null.
105
105
  *
106
106
  * @type {Layer|null}
107
107
  */
108
- layer: BLEND_NORMAL | null;
108
+ layer: Layer | null;
109
109
  /**
110
110
  * The only camera that draws the previews, or null to let every camera rendering the
111
111
  * destination layer draw them. Defaults to null.
112
112
  *
113
113
  * @type {CameraComponent|null}
114
114
  */
115
- camera: BLEND_NORMAL | null;
115
+ camera: CameraComponent | null;
116
116
  /** @private */
117
117
  private _channels;
118
118
  /** @private */
@@ -169,7 +169,7 @@ export class TextureRenderer {
169
169
  * @param {number} width - Width as a fraction of the camera viewport width.
170
170
  * @param {number} height - Height as a fraction of the camera viewport height.
171
171
  */
172
- draw(texture: BLEND_NORMAL, x: number, y: number, width: number, height: number): void;
172
+ draw(texture: Texture, x: number, y: number, width: number, height: number): void;
173
173
  /**
174
174
  * Displays the rendering camera's scene depth for this frame, linearized and normalized by
175
175
  * its far clip distance. The camera must already supply a scene depth map, for example using
@@ -229,3 +229,9 @@ export class TextureRenderer {
229
229
  */
230
230
  destroy(): void;
231
231
  }
232
+ import { MeshInstance } from 'playcanvas';
233
+ import { ShaderMaterial } from 'playcanvas';
234
+ import type { Texture } from 'playcanvas';
235
+ import type { Layer } from 'playcanvas';
236
+ import type { CameraComponent } from 'playcanvas';
237
+ import type { AppBase } from 'playcanvas';
@@ -42,7 +42,7 @@ export class WireRenderer {
42
42
  * @example
43
43
  * const wire = new WireRenderer(app);
44
44
  */
45
- constructor(app: Color);
45
+ constructor(app: AppBase);
46
46
  /**
47
47
  * The color used by shapes, specified in sRGB color space. The alpha component is respected.
48
48
  * Defaults to white.
@@ -56,7 +56,7 @@ export class WireRenderer {
56
56
  *
57
57
  * @type {Layer|null}
58
58
  */
59
- layer: Color | null;
59
+ layer: Layer | null;
60
60
  /**
61
61
  * Whether shapes are depth tested against the depth buffer. Defaults to true.
62
62
  *
@@ -216,7 +216,7 @@ export class WireRenderer {
216
216
  * @example
217
217
  * wire.box(meshInstance.aabb);
218
218
  */
219
- box(box: Color | Color): void;
219
+ box(box: BoundingBox | OrientedBox): void;
220
220
  /**
221
221
  * Renders a sphere as three great circles, one in each of the primary planes.
222
222
  *
@@ -330,7 +330,7 @@ export class WireRenderer {
330
330
  * @example
331
331
  * wire.frustum(otherCamera.camera);
332
332
  */
333
- frustum(source: Color | Mat4): void;
333
+ frustum(source: CameraComponent | Mat4): void;
334
334
  /**
335
335
  * Renders the shape and extent of a light, using the light's own color. An omni light is drawn
336
336
  * as a sphere of its range, a spot light as its cone, and a directional light as an arrow
@@ -343,5 +343,14 @@ export class WireRenderer {
343
343
  * @example
344
344
  * wire.light(entity.light);
345
345
  */
346
- light(light: Color, size?: number): void;
346
+ light(light: LightComponent, size?: number): void;
347
347
  }
348
+ import { Color } from 'playcanvas';
349
+ import type { Layer } from 'playcanvas';
350
+ import { Mat4 } from 'playcanvas';
351
+ import type { AppBase } from 'playcanvas';
352
+ import { Vec3 } from 'playcanvas';
353
+ import type { BoundingBox } from 'playcanvas';
354
+ import type { OrientedBox } from 'playcanvas';
355
+ import type { CameraComponent } from 'playcanvas';
356
+ import type { LightComponent } from 'playcanvas';
@@ -16,7 +16,7 @@ export type ScriptEntry = {
16
16
  */
17
17
  instances: {
18
18
  script: Script | ScriptType;
19
- entity: Script;
19
+ entity: Entity;
20
20
  }[];
21
21
  };
22
22
  /**
@@ -28,7 +28,7 @@ export type ScriptEntry = {
28
28
  * @returns {PropertySection[]} The sections.
29
29
  */
30
30
  export function buildScriptModel(cls: Function, ctx: {
31
- app: Script;
31
+ app: AppBase;
32
32
  }): PropertySection[];
33
33
  /**
34
34
  * @param {Function} cls - A class.
@@ -51,6 +51,10 @@ export function scriptListRows(survey: Map<Function, ScriptEntry>): ListRow[];
51
51
  * @param {AppBase} app - The app.
52
52
  * @returns {Map<Function, ScriptEntry>} The script classes, the registered ones first.
53
53
  */
54
- export function surveyScripts(app: Script): Map<Function, ScriptEntry>;
54
+ export function surveyScripts(app: AppBase): Map<Function, ScriptEntry>;
55
+ import { Script } from 'playcanvas';
56
+ import { ScriptType } from 'playcanvas';
57
+ import type { Entity } from 'playcanvas';
58
+ import type { AppBase } from 'playcanvas';
55
59
  import type { PropertySection } from './model.js';
56
60
  import type { ListRow } from './list-view.js';
@@ -6,7 +6,7 @@
6
6
  * @param {Shader} shader - The shader.
7
7
  * @returns {PropertySection[]} The sections.
8
8
  */
9
- export function buildShaderModel(shader: bindGroupNames): PropertySection[];
9
+ export function buildShaderModel(shader: Shader): PropertySection[];
10
10
  /**
11
11
  * Every shader alive on the device, in creation order. A shader whose definition had no source
12
12
  * never reached the device and is not listed; one that failed to compile is.
@@ -14,7 +14,7 @@ export function buildShaderModel(shader: bindGroupNames): PropertySection[];
14
14
  * @param {GraphicsDevice} device - The device.
15
15
  * @returns {Shader[]} The shaders.
16
16
  */
17
- export function collectShaders(device: bindGroupNames): bindGroupNames[];
17
+ export function collectShaders(device: GraphicsDevice): Shader[];
18
18
  /**
19
19
  * Lays out a bind group format as text: its uniform buffers, textures and storage resources with
20
20
  * their slots and the stages that can see them.
@@ -22,25 +22,29 @@ export function collectShaders(device: bindGroupNames): bindGroupNames[];
22
22
  * @param {BindGroupFormat} format - The format.
23
23
  * @returns {string} The layout.
24
24
  */
25
- export function formatBindGroup(format: bindGroupNames): string;
25
+ export function formatBindGroup(format: BindGroupFormat): string;
26
26
  /**
27
27
  * Lays out a uniform buffer format as text: the std140 offsets, sizes and types of its uniforms.
28
28
  *
29
29
  * @param {UniformBufferFormat} format - The format.
30
30
  * @returns {string} The layout.
31
31
  */
32
- export function formatUniformBuffer(format: bindGroupNames): string;
32
+ export function formatUniformBuffer(format: UniformBufferFormat): string;
33
33
  /**
34
34
  * One row per shader on the device, tagged with its language, compute shaders and failures.
35
35
  *
36
36
  * @param {GraphicsDevice} device - The device.
37
37
  * @returns {ListRow[]} The rows.
38
38
  */
39
- export function shaderRows(device: bindGroupNames): ListRow[];
39
+ export function shaderRows(device: GraphicsDevice): ListRow[];
40
40
  /**
41
41
  * @param {Shader} shader - A shader.
42
42
  * @returns {string} The compilation state: 'failed', 'ready' or 'compiling'.
43
43
  */
44
- export function stateName(shader: bindGroupNames): string;
44
+ export function stateName(shader: Shader): string;
45
+ import type { Shader } from 'playcanvas';
45
46
  import type { PropertySection } from './model.js';
47
+ import type { GraphicsDevice } from 'playcanvas';
48
+ import type { BindGroupFormat } from 'playcanvas';
49
+ import type { UniformBufferFormat } from 'playcanvas';
46
50
  import type { ListRow } from './list-view.js';