@neta-art/cohub-cli 10.18.0 → 10.20.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,11 +1,12 @@
1
1
  import type { BoardDocument } from "@neta-art/cohub";
2
- import type { BoardScriptParameter, BoardShader } from "@neta-art/cohub/board";
2
+ import type { BoardScriptParameter, BoardScriptSnapshot, BoardShader } from "@neta-art/cohub/board";
3
3
  import type { BoardExportRegion, BoardThemeId } from "@neta-art/cohub/board";
4
4
  import type { BoardExportWarning } from "@neta-art/cohub/board/export";
5
5
  export type BoardGpuInit = {
6
6
  document: BoardDocument;
7
7
  animation: string | null;
8
8
  theme: BoardThemeId;
9
+ snapshots?: Record<string, BoardScriptSnapshot>;
9
10
  };
10
11
  export type BoardGpuFrame = {
11
12
  time: number | null;
@@ -21,6 +22,7 @@ export type BoardGpuFrame = {
21
22
  quality?: number;
22
23
  withImages: boolean;
23
24
  imageMemory: number;
25
+ assetKeys?: Record<string, string>;
24
26
  };
25
27
  export type BoardGpuResult = {
26
28
  data: string;
@@ -35,3 +37,27 @@ export type BoardGpuShader = {
35
37
  shader: BoardShader;
36
38
  parameters?: Record<string, BoardScriptParameter>;
37
39
  };
40
+ export type BoardGpuProfileInput = Pick<BoardGpuFrame, "time" | "region" | "camera" | "scale" | "withImages" | "imageMemory"> & {
41
+ frames: number;
42
+ };
43
+ export type BoardGpuProfile = {
44
+ renderer: string;
45
+ width: number;
46
+ height: number;
47
+ frame: {
48
+ p50: number;
49
+ p95: number;
50
+ };
51
+ owners: Array<{
52
+ id: string;
53
+ ms: number;
54
+ filter: "none" | "always" | "switchable";
55
+ sprites: number;
56
+ state: {
57
+ width: number;
58
+ height: number;
59
+ } | null;
60
+ }>;
61
+ effects: number;
62
+ items: number;
63
+ };
@@ -1,4 +1,4 @@
1
- export { BOARD_SCRIPT_DRAWING_EXAMPLE, BOARD_SCRIPT_RAIN_EXAMPLE, hasBoardScripts, boardAssetKey, boardAssetKeySource, boardDocumentAt, boardScriptAttachments, boardShaderParameters, boardFrameRegions, boardRegionStep, createBoardAnimationSampler, boardSequence, boardSequencePatch, boardPathTrack, boardTextureEdge, boardTexturePixels, buildBoardScene, parseBoardDocument, planBoardExport, selectBoardExportAssets, } from "@neta-art/cohub/board";
1
+ export { BOARD_SCRIPT_DRAWING_EXAMPLE, BOARD_SCRIPT_RAIN_EXAMPLE, hasBoardScripts, boardAnimatesScriptParams, boardAssetKey, boardAssetKeySource, boardMediaRate, boardMediaSpans, boardTimedMedia, boardScriptAttachments, boardShaderParameters, boardFrameRegions, boardRegionStep, createBoardAnimationSampler, boardSequence, boardSequencePatch, boardPathTrack, boardPlacePatch, boardTextureEdge, boardTexturePixels, buildBoardScene, itemBounds, parseBoardDocument, planBoardExport, rectsIntersect, selectBoardExportAssets, } from "@neta-art/cohub/board";
2
2
  export { describeBoardExportWarning, prepareBoardExport } from "@neta-art/cohub/board/export";
3
3
  export { boardRenderTheme, checkBoardShader, createBoardRenderSampler, inspectBoardScene, inspectBoardItems, measureBoardText } from "@neta-art/cohub/board/render";
4
4
  export { createNodeBoardRenderer, createNodeBoardScriptHost, exportBoardImageBytes } from "@neta-art/cohub/board/export/node";