@woven-canvas/core 1.0.5 → 1.0.9
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 +1 -1
- package/build/_tsup-dts-rollup.d.cts +79 -2
- package/build/_tsup-dts-rollup.d.ts +79 -2
- package/build/index.cjs +779 -525
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +8 -0
- package/build/index.d.ts +8 -0
- package/build/index.js +635 -388
- package/build/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -169,7 +169,9 @@ declare const BlockDef: z.ZodObject<{
|
|
|
169
169
|
}>>;
|
|
170
170
|
canRotate: z.ZodDefault<z.ZodBoolean>;
|
|
171
171
|
canScale: z.ZodDefault<z.ZodBoolean>;
|
|
172
|
+
snappable: z.ZodDefault<z.ZodBoolean>;
|
|
172
173
|
interactable: z.ZodDefault<z.ZodBoolean>;
|
|
174
|
+
excludeFromRankBounds: z.ZodDefault<z.ZodBoolean>;
|
|
173
175
|
connectors: z.ZodDefault<z.ZodObject<{
|
|
174
176
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
175
177
|
terminals: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
@@ -214,6 +216,7 @@ declare const BlockSchema: {
|
|
|
214
216
|
rank: StringFieldBuilder;
|
|
215
217
|
resizeMode: EnumFieldBuilder<"default" | "scale" | "text" | "free" | "groupOnly">;
|
|
216
218
|
parentId: RefFieldBuilder;
|
|
219
|
+
layerId: RefFieldBuilder;
|
|
217
220
|
};
|
|
218
221
|
|
|
219
222
|
declare const blockSystem: EditorSystem;
|
|
@@ -270,6 +273,8 @@ declare function canBlockScale(ctx: Context, tag: string): boolean;
|
|
|
270
273
|
export { canBlockScale }
|
|
271
274
|
export { canBlockScale as canBlockScale_alias_1 }
|
|
272
275
|
|
|
276
|
+
export declare function canBlockSnap(ctx: Context, tag: string): boolean;
|
|
277
|
+
|
|
273
278
|
declare const canSeeBlocksSystem: EditorSystem;
|
|
274
279
|
export { canSeeBlocksSystem }
|
|
275
280
|
export { canSeeBlocksSystem as canSeeBlocksSystem_alias_1 }
|
|
@@ -382,7 +387,6 @@ export { Connector as Connector_alias_1 }
|
|
|
382
387
|
export { Connector as Connector_alias_2 }
|
|
383
388
|
|
|
384
389
|
export { Context }
|
|
385
|
-
export { Context as Context_alias_1 }
|
|
386
390
|
|
|
387
391
|
declare const Controls: ControlsDef;
|
|
388
392
|
export { Controls }
|
|
@@ -447,6 +451,26 @@ declare const CorePluginOptionsSchema: z.ZodObject<{
|
|
|
447
451
|
export { CorePluginOptionsSchema }
|
|
448
452
|
export { CorePluginOptionsSchema as CorePluginOptionsSchema_alias_1 }
|
|
449
453
|
|
|
454
|
+
declare function createBlock(ctx: Context, block: CreateBlockInput): EntityId;
|
|
455
|
+
export { createBlock }
|
|
456
|
+
export { createBlock as createBlock_alias_1 }
|
|
457
|
+
export { createBlock as createBlock_alias_2 }
|
|
458
|
+
|
|
459
|
+
declare interface CreateBlockInput {
|
|
460
|
+
tag: string;
|
|
461
|
+
position: Vec2;
|
|
462
|
+
size?: Vec2;
|
|
463
|
+
rotateZ?: number;
|
|
464
|
+
flip?: [boolean, boolean];
|
|
465
|
+
resizeMode?: ResizeMode;
|
|
466
|
+
parentId?: EntityId | null;
|
|
467
|
+
layerId?: EntityId | null;
|
|
468
|
+
rank?: string;
|
|
469
|
+
}
|
|
470
|
+
export { CreateBlockInput }
|
|
471
|
+
export { CreateBlockInput as CreateBlockInput_alias_1 }
|
|
472
|
+
export { CreateBlockInput as CreateBlockInput_alias_2 }
|
|
473
|
+
|
|
450
474
|
declare function createCorePlugin(options?: CorePluginOptionsInput): EditorPlugin<CorePluginOptions>;
|
|
451
475
|
export { createCorePlugin }
|
|
452
476
|
export { createCorePlugin as createCorePlugin_alias_1 }
|
|
@@ -632,9 +656,12 @@ declare class Editor {
|
|
|
632
656
|
constructor(domElement: HTMLElement | null, optionsInput?: EditorOptionsInput);
|
|
633
657
|
private get ctx();
|
|
634
658
|
initialize(): Promise<void>;
|
|
659
|
+
loadFont(name: string): Promise<void>;
|
|
660
|
+
isFontLoaded(name: string): boolean;
|
|
635
661
|
tick(): Promise<void>;
|
|
636
662
|
nextTick(callback: (ctx: Context) => void): () => void;
|
|
637
663
|
command<T>(def: CommandDef<T>, ...args: T extends void ? [] : [T]): void;
|
|
664
|
+
get readonly(): boolean;
|
|
638
665
|
subscribe(query: QueryDef, callback: QueryCallback): () => void;
|
|
639
666
|
_getContext(): Context;
|
|
640
667
|
attachDom(domElement: HTMLElement): void;
|
|
@@ -707,7 +734,9 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
707
734
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
708
735
|
canRotate?: boolean | undefined;
|
|
709
736
|
canScale?: boolean | undefined;
|
|
737
|
+
snappable?: boolean | undefined;
|
|
710
738
|
interactable?: boolean | undefined;
|
|
739
|
+
excludeFromRankBounds?: boolean | undefined;
|
|
711
740
|
connectors?: {
|
|
712
741
|
enabled?: boolean | undefined;
|
|
713
742
|
terminals?: [number, number][] | undefined;
|
|
@@ -723,7 +752,9 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
723
752
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
724
753
|
canRotate?: boolean | undefined;
|
|
725
754
|
canScale?: boolean | undefined;
|
|
755
|
+
snappable?: boolean | undefined;
|
|
726
756
|
interactable?: boolean | undefined;
|
|
757
|
+
excludeFromRankBounds?: boolean | undefined;
|
|
727
758
|
connectors?: {
|
|
728
759
|
enabled?: boolean | undefined;
|
|
729
760
|
terminals?: [number, number][] | undefined;
|
|
@@ -785,6 +816,7 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
785
816
|
wheelTool?: string | undefined;
|
|
786
817
|
modWheelTool?: string | undefined;
|
|
787
818
|
}>>;
|
|
819
|
+
readonly: z.ZodDefault<z.ZodBoolean>;
|
|
788
820
|
}, z.core.$strip>;
|
|
789
821
|
|
|
790
822
|
declare interface EditorPlugin<TResources = unknown> {
|
|
@@ -822,6 +854,7 @@ declare interface EditorResources {
|
|
|
822
854
|
singletonsByName: Map<string, AnyCanvasSingletonDef>;
|
|
823
855
|
componentsById: Map<number, AnyCanvasComponentDef>;
|
|
824
856
|
singletonsById: Map<number, AnyCanvasSingletonDef>;
|
|
857
|
+
readonly: boolean;
|
|
825
858
|
}
|
|
826
859
|
export { EditorResources }
|
|
827
860
|
export { EditorResources as EditorResources_alias_1 }
|
|
@@ -922,8 +955,10 @@ export { FontFamilyInput }
|
|
|
922
955
|
export { FontFamilyInput as FontFamilyInput_alias_1 }
|
|
923
956
|
|
|
924
957
|
declare class FontLoader {
|
|
925
|
-
private
|
|
958
|
+
private loaded;
|
|
959
|
+
private inFlight;
|
|
926
960
|
loadFonts(families: FontFamily[]): Promise<void>;
|
|
961
|
+
loadFont(family: FontFamily): Promise<void>;
|
|
927
962
|
private buildGoogleFontsUrl;
|
|
928
963
|
private loadSingleFont;
|
|
929
964
|
private getFontLoadPromises;
|
|
@@ -1127,6 +1162,7 @@ declare class HitGeometryDef extends CanvasComponentDef<typeof HitGeometrySchema
|
|
|
1127
1162
|
getArcAt(ctx: Context, entityId: EntityId, index: number): Arc;
|
|
1128
1163
|
setArcAt(ctx: Context, entityId: EntityId, index: number, arc: Arc): void;
|
|
1129
1164
|
containsPointWorld(ctx: Context, entityId: EntityId, point: Vec2): boolean;
|
|
1165
|
+
private fillWorldPolygon;
|
|
1130
1166
|
intersectsAabbWorld(ctx: Context, entityId: EntityId, aabb: Aabb_2): boolean;
|
|
1131
1167
|
getExtremaWorld(ctx: Context, entityId: EntityId): Vec2[];
|
|
1132
1168
|
addCapsule(ctx: Context, entityId: EntityId, capsule: Capsule): void;
|
|
@@ -1135,6 +1171,7 @@ declare class HitGeometryDef extends CanvasComponentDef<typeof HitGeometrySchema
|
|
|
1135
1171
|
addArc(ctx: Context, entityId: EntityId, arc: Arc): void;
|
|
1136
1172
|
addArcUv(ctx: Context, entityId: EntityId, uvA: Vec2, uvB: Vec2, uvC: Vec2, worldThickness: number): void;
|
|
1137
1173
|
addArcWorld(ctx: Context, entityId: EntityId, worldA: Vec2, worldB: Vec2, worldC: Vec2, worldThickness: number): void;
|
|
1174
|
+
setPolygonUv(ctx: Context, entityId: EntityId, uvPoints: Vec2[]): void;
|
|
1138
1175
|
clear(ctx: Context, entityId: EntityId): void;
|
|
1139
1176
|
}
|
|
1140
1177
|
|
|
@@ -1143,6 +1180,8 @@ declare const HitGeometrySchema: {
|
|
|
1143
1180
|
capsuleCount: NumberFieldBuilder<"uint16">;
|
|
1144
1181
|
hitArcs: BufferFieldBuilder<"float32">;
|
|
1145
1182
|
arcCount: NumberFieldBuilder<"uint16">;
|
|
1183
|
+
hitPolygon: BufferFieldBuilder<"float32">;
|
|
1184
|
+
polygonPointCount: NumberFieldBuilder<"uint16">;
|
|
1146
1185
|
};
|
|
1147
1186
|
|
|
1148
1187
|
declare const hoverCursorSystem: EditorSystem;
|
|
@@ -1223,6 +1262,15 @@ export { isHeldByRemote }
|
|
|
1223
1262
|
export { isHeldByRemote as isHeldByRemote_alias_1 }
|
|
1224
1263
|
export { isHeldByRemote as isHeldByRemote_alias_2 }
|
|
1225
1264
|
|
|
1265
|
+
declare function isLayerInteractive(ctx: Context, layerId: EntityId | null): boolean;
|
|
1266
|
+
export { isLayerInteractive }
|
|
1267
|
+
export { isLayerInteractive as isLayerInteractive_alias_1 }
|
|
1268
|
+
export { isLayerInteractive as isLayerInteractive_alias_2 }
|
|
1269
|
+
|
|
1270
|
+
declare function isReadonly(ctx: Context): boolean;
|
|
1271
|
+
export { isReadonly }
|
|
1272
|
+
export { isReadonly as isReadonly_alias_1 }
|
|
1273
|
+
|
|
1226
1274
|
declare const Key: {
|
|
1227
1275
|
readonly A: number;
|
|
1228
1276
|
readonly B: number;
|
|
@@ -1388,6 +1436,17 @@ declare const keyboardSystem: EditorSystem;
|
|
|
1388
1436
|
export { keyboardSystem }
|
|
1389
1437
|
export { keyboardSystem as keyboardSystem_alias_1 }
|
|
1390
1438
|
|
|
1439
|
+
declare const Layer: CanvasComponentDef< {
|
|
1440
|
+
parentId: RefFieldBuilder;
|
|
1441
|
+
rank: StringFieldBuilder;
|
|
1442
|
+
label: StringFieldBuilder;
|
|
1443
|
+
locked: BooleanFieldBuilder;
|
|
1444
|
+
hidden: BooleanFieldBuilder;
|
|
1445
|
+
}, "layer">;
|
|
1446
|
+
export { Layer }
|
|
1447
|
+
export { Layer as Layer_alias_1 }
|
|
1448
|
+
export { Layer as Layer_alias_2 }
|
|
1449
|
+
|
|
1391
1450
|
declare interface MachineResult<TState, TContext> {
|
|
1392
1451
|
value: TState;
|
|
1393
1452
|
context: TContext;
|
|
@@ -1407,6 +1466,11 @@ export { MAX_HIT_CAPSULES }
|
|
|
1407
1466
|
export { MAX_HIT_CAPSULES as MAX_HIT_CAPSULES_alias_1 }
|
|
1408
1467
|
export { MAX_HIT_CAPSULES as MAX_HIT_CAPSULES_alias_2 }
|
|
1409
1468
|
|
|
1469
|
+
declare const MAX_HIT_POLYGON_POINTS = 128;
|
|
1470
|
+
export { MAX_HIT_POLYGON_POINTS }
|
|
1471
|
+
export { MAX_HIT_POLYGON_POINTS as MAX_HIT_POLYGON_POINTS_alias_1 }
|
|
1472
|
+
export { MAX_HIT_POLYGON_POINTS as MAX_HIT_POLYGON_POINTS_alias_2 }
|
|
1473
|
+
|
|
1410
1474
|
declare const Mouse: MouseDef;
|
|
1411
1475
|
export { Mouse }
|
|
1412
1476
|
export { Mouse as Mouse_alias_1 }
|
|
@@ -1470,6 +1534,13 @@ declare function parsePlugin(input: EditorPluginInput): EditorPlugin;
|
|
|
1470
1534
|
export { parsePlugin }
|
|
1471
1535
|
export { parsePlugin as parsePlugin_alias_1 }
|
|
1472
1536
|
|
|
1537
|
+
declare const PlaceBlockEvent: CommandDef< {
|
|
1538
|
+
entityId: EntityId;
|
|
1539
|
+
}>;
|
|
1540
|
+
export { PlaceBlockEvent }
|
|
1541
|
+
export { PlaceBlockEvent as PlaceBlockEvent_alias_1 }
|
|
1542
|
+
export { PlaceBlockEvent as PlaceBlockEvent_alias_2 }
|
|
1543
|
+
|
|
1473
1544
|
declare const Pointer: PointerDef;
|
|
1474
1545
|
export { Pointer }
|
|
1475
1546
|
export { Pointer as Pointer_alias_1 }
|
|
@@ -1666,6 +1737,11 @@ export { resolveEmbedUrl }
|
|
|
1666
1737
|
export { resolveEmbedUrl as resolveEmbedUrl_alias_1 }
|
|
1667
1738
|
export { resolveEmbedUrl as resolveEmbedUrl_alias_2 }
|
|
1668
1739
|
|
|
1740
|
+
declare function resolveLayerRank(ctx: Context, entityId: EntityId): string;
|
|
1741
|
+
export { resolveLayerRank }
|
|
1742
|
+
export { resolveLayerRank as resolveLayerRank_alias_1 }
|
|
1743
|
+
export { resolveLayerRank as resolveLayerRank_alias_2 }
|
|
1744
|
+
|
|
1669
1745
|
declare function resolveRefFields(ctx: Context, entityId: EntityId, componentDef: {
|
|
1670
1746
|
schema: ComponentSchema_2;
|
|
1671
1747
|
write: (ctx: Context, entityId: EntityId) => Record<string, unknown>;
|
|
@@ -1868,6 +1944,7 @@ declare interface SortableBlock {
|
|
|
1868
1944
|
rank: string;
|
|
1869
1945
|
stratum: Stratum;
|
|
1870
1946
|
parentId: unknown;
|
|
1947
|
+
layerRank?: string;
|
|
1871
1948
|
}
|
|
1872
1949
|
export { SortableBlock }
|
|
1873
1950
|
export { SortableBlock as SortableBlock_alias_1 }
|
|
@@ -169,7 +169,9 @@ declare const BlockDef: z.ZodObject<{
|
|
|
169
169
|
}>>;
|
|
170
170
|
canRotate: z.ZodDefault<z.ZodBoolean>;
|
|
171
171
|
canScale: z.ZodDefault<z.ZodBoolean>;
|
|
172
|
+
snappable: z.ZodDefault<z.ZodBoolean>;
|
|
172
173
|
interactable: z.ZodDefault<z.ZodBoolean>;
|
|
174
|
+
excludeFromRankBounds: z.ZodDefault<z.ZodBoolean>;
|
|
173
175
|
connectors: z.ZodDefault<z.ZodObject<{
|
|
174
176
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
175
177
|
terminals: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
@@ -214,6 +216,7 @@ declare const BlockSchema: {
|
|
|
214
216
|
rank: StringFieldBuilder;
|
|
215
217
|
resizeMode: EnumFieldBuilder<"default" | "scale" | "text" | "free" | "groupOnly">;
|
|
216
218
|
parentId: RefFieldBuilder;
|
|
219
|
+
layerId: RefFieldBuilder;
|
|
217
220
|
};
|
|
218
221
|
|
|
219
222
|
declare const blockSystem: EditorSystem;
|
|
@@ -270,6 +273,8 @@ declare function canBlockScale(ctx: Context, tag: string): boolean;
|
|
|
270
273
|
export { canBlockScale }
|
|
271
274
|
export { canBlockScale as canBlockScale_alias_1 }
|
|
272
275
|
|
|
276
|
+
export declare function canBlockSnap(ctx: Context, tag: string): boolean;
|
|
277
|
+
|
|
273
278
|
declare const canSeeBlocksSystem: EditorSystem;
|
|
274
279
|
export { canSeeBlocksSystem }
|
|
275
280
|
export { canSeeBlocksSystem as canSeeBlocksSystem_alias_1 }
|
|
@@ -382,7 +387,6 @@ export { Connector as Connector_alias_1 }
|
|
|
382
387
|
export { Connector as Connector_alias_2 }
|
|
383
388
|
|
|
384
389
|
export { Context }
|
|
385
|
-
export { Context as Context_alias_1 }
|
|
386
390
|
|
|
387
391
|
declare const Controls: ControlsDef;
|
|
388
392
|
export { Controls }
|
|
@@ -447,6 +451,26 @@ declare const CorePluginOptionsSchema: z.ZodObject<{
|
|
|
447
451
|
export { CorePluginOptionsSchema }
|
|
448
452
|
export { CorePluginOptionsSchema as CorePluginOptionsSchema_alias_1 }
|
|
449
453
|
|
|
454
|
+
declare function createBlock(ctx: Context, block: CreateBlockInput): EntityId;
|
|
455
|
+
export { createBlock }
|
|
456
|
+
export { createBlock as createBlock_alias_1 }
|
|
457
|
+
export { createBlock as createBlock_alias_2 }
|
|
458
|
+
|
|
459
|
+
declare interface CreateBlockInput {
|
|
460
|
+
tag: string;
|
|
461
|
+
position: Vec2;
|
|
462
|
+
size?: Vec2;
|
|
463
|
+
rotateZ?: number;
|
|
464
|
+
flip?: [boolean, boolean];
|
|
465
|
+
resizeMode?: ResizeMode;
|
|
466
|
+
parentId?: EntityId | null;
|
|
467
|
+
layerId?: EntityId | null;
|
|
468
|
+
rank?: string;
|
|
469
|
+
}
|
|
470
|
+
export { CreateBlockInput }
|
|
471
|
+
export { CreateBlockInput as CreateBlockInput_alias_1 }
|
|
472
|
+
export { CreateBlockInput as CreateBlockInput_alias_2 }
|
|
473
|
+
|
|
450
474
|
declare function createCorePlugin(options?: CorePluginOptionsInput): EditorPlugin<CorePluginOptions>;
|
|
451
475
|
export { createCorePlugin }
|
|
452
476
|
export { createCorePlugin as createCorePlugin_alias_1 }
|
|
@@ -632,9 +656,12 @@ declare class Editor {
|
|
|
632
656
|
constructor(domElement: HTMLElement | null, optionsInput?: EditorOptionsInput);
|
|
633
657
|
private get ctx();
|
|
634
658
|
initialize(): Promise<void>;
|
|
659
|
+
loadFont(name: string): Promise<void>;
|
|
660
|
+
isFontLoaded(name: string): boolean;
|
|
635
661
|
tick(): Promise<void>;
|
|
636
662
|
nextTick(callback: (ctx: Context) => void): () => void;
|
|
637
663
|
command<T>(def: CommandDef<T>, ...args: T extends void ? [] : [T]): void;
|
|
664
|
+
get readonly(): boolean;
|
|
638
665
|
subscribe(query: QueryDef, callback: QueryCallback): () => void;
|
|
639
666
|
_getContext(): Context;
|
|
640
667
|
attachDom(domElement: HTMLElement): void;
|
|
@@ -707,7 +734,9 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
707
734
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
708
735
|
canRotate?: boolean | undefined;
|
|
709
736
|
canScale?: boolean | undefined;
|
|
737
|
+
snappable?: boolean | undefined;
|
|
710
738
|
interactable?: boolean | undefined;
|
|
739
|
+
excludeFromRankBounds?: boolean | undefined;
|
|
711
740
|
connectors?: {
|
|
712
741
|
enabled?: boolean | undefined;
|
|
713
742
|
terminals?: [number, number][] | undefined;
|
|
@@ -723,7 +752,9 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
723
752
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
724
753
|
canRotate?: boolean | undefined;
|
|
725
754
|
canScale?: boolean | undefined;
|
|
755
|
+
snappable?: boolean | undefined;
|
|
726
756
|
interactable?: boolean | undefined;
|
|
757
|
+
excludeFromRankBounds?: boolean | undefined;
|
|
727
758
|
connectors?: {
|
|
728
759
|
enabled?: boolean | undefined;
|
|
729
760
|
terminals?: [number, number][] | undefined;
|
|
@@ -785,6 +816,7 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
785
816
|
wheelTool?: string | undefined;
|
|
786
817
|
modWheelTool?: string | undefined;
|
|
787
818
|
}>>;
|
|
819
|
+
readonly: z.ZodDefault<z.ZodBoolean>;
|
|
788
820
|
}, z.core.$strip>;
|
|
789
821
|
|
|
790
822
|
declare interface EditorPlugin<TResources = unknown> {
|
|
@@ -822,6 +854,7 @@ declare interface EditorResources {
|
|
|
822
854
|
singletonsByName: Map<string, AnyCanvasSingletonDef>;
|
|
823
855
|
componentsById: Map<number, AnyCanvasComponentDef>;
|
|
824
856
|
singletonsById: Map<number, AnyCanvasSingletonDef>;
|
|
857
|
+
readonly: boolean;
|
|
825
858
|
}
|
|
826
859
|
export { EditorResources }
|
|
827
860
|
export { EditorResources as EditorResources_alias_1 }
|
|
@@ -922,8 +955,10 @@ export { FontFamilyInput }
|
|
|
922
955
|
export { FontFamilyInput as FontFamilyInput_alias_1 }
|
|
923
956
|
|
|
924
957
|
declare class FontLoader {
|
|
925
|
-
private
|
|
958
|
+
private loaded;
|
|
959
|
+
private inFlight;
|
|
926
960
|
loadFonts(families: FontFamily[]): Promise<void>;
|
|
961
|
+
loadFont(family: FontFamily): Promise<void>;
|
|
927
962
|
private buildGoogleFontsUrl;
|
|
928
963
|
private loadSingleFont;
|
|
929
964
|
private getFontLoadPromises;
|
|
@@ -1127,6 +1162,7 @@ declare class HitGeometryDef extends CanvasComponentDef<typeof HitGeometrySchema
|
|
|
1127
1162
|
getArcAt(ctx: Context, entityId: EntityId, index: number): Arc;
|
|
1128
1163
|
setArcAt(ctx: Context, entityId: EntityId, index: number, arc: Arc): void;
|
|
1129
1164
|
containsPointWorld(ctx: Context, entityId: EntityId, point: Vec2): boolean;
|
|
1165
|
+
private fillWorldPolygon;
|
|
1130
1166
|
intersectsAabbWorld(ctx: Context, entityId: EntityId, aabb: Aabb_2): boolean;
|
|
1131
1167
|
getExtremaWorld(ctx: Context, entityId: EntityId): Vec2[];
|
|
1132
1168
|
addCapsule(ctx: Context, entityId: EntityId, capsule: Capsule): void;
|
|
@@ -1135,6 +1171,7 @@ declare class HitGeometryDef extends CanvasComponentDef<typeof HitGeometrySchema
|
|
|
1135
1171
|
addArc(ctx: Context, entityId: EntityId, arc: Arc): void;
|
|
1136
1172
|
addArcUv(ctx: Context, entityId: EntityId, uvA: Vec2, uvB: Vec2, uvC: Vec2, worldThickness: number): void;
|
|
1137
1173
|
addArcWorld(ctx: Context, entityId: EntityId, worldA: Vec2, worldB: Vec2, worldC: Vec2, worldThickness: number): void;
|
|
1174
|
+
setPolygonUv(ctx: Context, entityId: EntityId, uvPoints: Vec2[]): void;
|
|
1138
1175
|
clear(ctx: Context, entityId: EntityId): void;
|
|
1139
1176
|
}
|
|
1140
1177
|
|
|
@@ -1143,6 +1180,8 @@ declare const HitGeometrySchema: {
|
|
|
1143
1180
|
capsuleCount: NumberFieldBuilder<"uint16">;
|
|
1144
1181
|
hitArcs: BufferFieldBuilder<"float32">;
|
|
1145
1182
|
arcCount: NumberFieldBuilder<"uint16">;
|
|
1183
|
+
hitPolygon: BufferFieldBuilder<"float32">;
|
|
1184
|
+
polygonPointCount: NumberFieldBuilder<"uint16">;
|
|
1146
1185
|
};
|
|
1147
1186
|
|
|
1148
1187
|
declare const hoverCursorSystem: EditorSystem;
|
|
@@ -1223,6 +1262,15 @@ export { isHeldByRemote }
|
|
|
1223
1262
|
export { isHeldByRemote as isHeldByRemote_alias_1 }
|
|
1224
1263
|
export { isHeldByRemote as isHeldByRemote_alias_2 }
|
|
1225
1264
|
|
|
1265
|
+
declare function isLayerInteractive(ctx: Context, layerId: EntityId | null): boolean;
|
|
1266
|
+
export { isLayerInteractive }
|
|
1267
|
+
export { isLayerInteractive as isLayerInteractive_alias_1 }
|
|
1268
|
+
export { isLayerInteractive as isLayerInteractive_alias_2 }
|
|
1269
|
+
|
|
1270
|
+
declare function isReadonly(ctx: Context): boolean;
|
|
1271
|
+
export { isReadonly }
|
|
1272
|
+
export { isReadonly as isReadonly_alias_1 }
|
|
1273
|
+
|
|
1226
1274
|
declare const Key: {
|
|
1227
1275
|
readonly A: number;
|
|
1228
1276
|
readonly B: number;
|
|
@@ -1388,6 +1436,17 @@ declare const keyboardSystem: EditorSystem;
|
|
|
1388
1436
|
export { keyboardSystem }
|
|
1389
1437
|
export { keyboardSystem as keyboardSystem_alias_1 }
|
|
1390
1438
|
|
|
1439
|
+
declare const Layer: CanvasComponentDef< {
|
|
1440
|
+
parentId: RefFieldBuilder;
|
|
1441
|
+
rank: StringFieldBuilder;
|
|
1442
|
+
label: StringFieldBuilder;
|
|
1443
|
+
locked: BooleanFieldBuilder;
|
|
1444
|
+
hidden: BooleanFieldBuilder;
|
|
1445
|
+
}, "layer">;
|
|
1446
|
+
export { Layer }
|
|
1447
|
+
export { Layer as Layer_alias_1 }
|
|
1448
|
+
export { Layer as Layer_alias_2 }
|
|
1449
|
+
|
|
1391
1450
|
declare interface MachineResult<TState, TContext> {
|
|
1392
1451
|
value: TState;
|
|
1393
1452
|
context: TContext;
|
|
@@ -1407,6 +1466,11 @@ export { MAX_HIT_CAPSULES }
|
|
|
1407
1466
|
export { MAX_HIT_CAPSULES as MAX_HIT_CAPSULES_alias_1 }
|
|
1408
1467
|
export { MAX_HIT_CAPSULES as MAX_HIT_CAPSULES_alias_2 }
|
|
1409
1468
|
|
|
1469
|
+
declare const MAX_HIT_POLYGON_POINTS = 128;
|
|
1470
|
+
export { MAX_HIT_POLYGON_POINTS }
|
|
1471
|
+
export { MAX_HIT_POLYGON_POINTS as MAX_HIT_POLYGON_POINTS_alias_1 }
|
|
1472
|
+
export { MAX_HIT_POLYGON_POINTS as MAX_HIT_POLYGON_POINTS_alias_2 }
|
|
1473
|
+
|
|
1410
1474
|
declare const Mouse: MouseDef;
|
|
1411
1475
|
export { Mouse }
|
|
1412
1476
|
export { Mouse as Mouse_alias_1 }
|
|
@@ -1470,6 +1534,13 @@ declare function parsePlugin(input: EditorPluginInput): EditorPlugin;
|
|
|
1470
1534
|
export { parsePlugin }
|
|
1471
1535
|
export { parsePlugin as parsePlugin_alias_1 }
|
|
1472
1536
|
|
|
1537
|
+
declare const PlaceBlockEvent: CommandDef< {
|
|
1538
|
+
entityId: EntityId;
|
|
1539
|
+
}>;
|
|
1540
|
+
export { PlaceBlockEvent }
|
|
1541
|
+
export { PlaceBlockEvent as PlaceBlockEvent_alias_1 }
|
|
1542
|
+
export { PlaceBlockEvent as PlaceBlockEvent_alias_2 }
|
|
1543
|
+
|
|
1473
1544
|
declare const Pointer: PointerDef;
|
|
1474
1545
|
export { Pointer }
|
|
1475
1546
|
export { Pointer as Pointer_alias_1 }
|
|
@@ -1666,6 +1737,11 @@ export { resolveEmbedUrl }
|
|
|
1666
1737
|
export { resolveEmbedUrl as resolveEmbedUrl_alias_1 }
|
|
1667
1738
|
export { resolveEmbedUrl as resolveEmbedUrl_alias_2 }
|
|
1668
1739
|
|
|
1740
|
+
declare function resolveLayerRank(ctx: Context, entityId: EntityId): string;
|
|
1741
|
+
export { resolveLayerRank }
|
|
1742
|
+
export { resolveLayerRank as resolveLayerRank_alias_1 }
|
|
1743
|
+
export { resolveLayerRank as resolveLayerRank_alias_2 }
|
|
1744
|
+
|
|
1669
1745
|
declare function resolveRefFields(ctx: Context, entityId: EntityId, componentDef: {
|
|
1670
1746
|
schema: ComponentSchema_2;
|
|
1671
1747
|
write: (ctx: Context, entityId: EntityId) => Record<string, unknown>;
|
|
@@ -1868,6 +1944,7 @@ declare interface SortableBlock {
|
|
|
1868
1944
|
rank: string;
|
|
1869
1945
|
stratum: Stratum;
|
|
1870
1946
|
parentId: unknown;
|
|
1947
|
+
layerRank?: string;
|
|
1871
1948
|
}
|
|
1872
1949
|
export { SortableBlock }
|
|
1873
1950
|
export { SortableBlock as SortableBlock_alias_1 }
|