@mateuszjs/magic-render 0.1.0-next.1 → 0.1.0-next.11
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 +4 -0
- package/lib/e9072ac5eb734c67.png +0 -0
- package/lib/index.mjs +2 -1
- package/lib/index.mjs.map +1 -0
- package/lib/types/src/WebGPU/canvasSizeObserver.d.ts.map +1 -1
- package/lib/types/src/WebGPU/pick.d.ts +13 -7
- package/lib/types/src/WebGPU/pick.d.ts.map +1 -1
- package/lib/types/src/WebGPU/pointer.d.ts +5 -1
- package/lib/types/src/WebGPU/pointer.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/draw/getProgram.d.ts +2 -0
- package/lib/types/src/WebGPU/programs/draw/getProgram.d.ts.map +1 -0
- package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts +2 -0
- package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts.map +1 -0
- package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/initPrograms.d.ts +12 -8
- package/lib/types/src/WebGPU/programs/initPrograms.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/pickTexture/getProgram.d.ts +1 -1
- package/lib/types/src/WebGPU/programs/pickTexture/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts +2 -0
- package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts.map +1 -0
- package/lib/types/src/getCanvasRenderDescriptor.d.ts.map +1 -1
- package/lib/types/src/getDepthTexture.d.ts.map +1 -1
- package/lib/types/src/getMultisampleTexture.d.ts +2 -0
- package/lib/types/src/getMultisampleTexture.d.ts.map +1 -0
- package/lib/types/src/index.d.ts +13 -4
- package/lib/types/src/index.d.ts.map +1 -1
- package/lib/types/src/run.d.ts +2 -2
- package/lib/types/src/run.d.ts.map +1 -1
- package/lib/types/src/types.d.ts +0 -5
- package/lib/types/src/types.d.ts.map +1 -1
- package/lib/types/src/utils/distancePointToLine.d.ts +0 -1
- package/lib/types/src/utils/distancePointToLine.d.ts.map +1 -1
- package/lib/types/src/utils/getAngle.d.ts +0 -1
- package/lib/types/src/utils/getAngle.d.ts.map +1 -1
- package/lib/types/src/utils/getBezierPos.d.ts +0 -1
- package/lib/types/src/utils/getBezierPos.d.ts.map +1 -1
- package/lib/types/src/utils/getBezierTan.d.ts +0 -1
- package/lib/types/src/utils/getBezierTan.d.ts.map +1 -1
- package/lib/types/src/utils/getCurveLength.d.ts +0 -1
- package/lib/types/src/utils/getCurveLength.d.ts.map +1 -1
- package/lib/types/src/utils/getDefaultPoints.d.ts +2 -0
- package/lib/types/src/utils/getDefaultPoints.d.ts.map +1 -0
- package/lib/types/src/utils/getDistance.d.ts +0 -1
- package/lib/types/src/utils/getDistance.d.ts.map +1 -1
- package/lib/types/src/utils/getSvgSource.d.ts +2 -0
- package/lib/types/src/utils/getSvgSource.d.ts.map +1 -0
- package/lib/types/src/utils/normalizeVec2.d.ts +0 -1
- package/lib/types/src/utils/normalizeVec2.d.ts.map +1 -1
- package/package.json +12 -8
- package/lib/types/crate/glue_code.d.ts +0 -2
- package/lib/types/crate/glue_code.d.ts.map +0 -1
- package/lib/types/crate/pkg/index_bg.d.ts +0 -59
- package/lib/types/crate/pkg/index_bg.d.ts.map +0 -1
- package/lib/types/src/components/Preview/index.d.ts +0 -1
- package/lib/types/src/components/Preview/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvasSizeObserver.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/canvasSizeObserver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"canvasSizeObserver.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/canvasSizeObserver.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,YAAY,QAgBvB"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import type { State } from "../../crate/glue_code";
|
|
2
1
|
export default class PickManager {
|
|
3
|
-
private device;
|
|
4
|
-
private canvas;
|
|
5
2
|
private pickBuffer;
|
|
6
3
|
private pickTexture;
|
|
7
4
|
private pickDepthTexture;
|
|
8
|
-
private
|
|
9
|
-
constructor(device: GPUDevice
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
private isPreviousPickDone;
|
|
6
|
+
constructor(device: GPUDevice);
|
|
7
|
+
/**
|
|
8
|
+
* Starts a picking render pass.
|
|
9
|
+
* @param encoder The GPUCommandEncoder to use for the render pass.
|
|
10
|
+
* @returns An object which contains render pass and a callback to end picking.
|
|
11
|
+
*/
|
|
12
|
+
startPicking(encoder: GPUCommandEncoder): {
|
|
13
|
+
pass: GPURenderPassEncoder;
|
|
14
|
+
end: VoidFunction;
|
|
15
|
+
};
|
|
16
|
+
createMatrix(canvas: HTMLCanvasElement, canvasMatrix: Float32Array): Float32Array<ArrayBufferLike>;
|
|
17
|
+
asyncPick(): Promise<void>;
|
|
12
18
|
}
|
|
13
19
|
//# sourceMappingURL=pick.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/pick.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/pick.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,WAAW,CAAY;IAC/B,OAAO,CAAC,gBAAgB,CAAY;IACpC,OAAO,CAAC,kBAAkB,CAAO;gBAErB,MAAM,EAAE,SAAS;IAmB7B;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,iBAAiB,GAAG;QAAE,IAAI,EAAE,oBAAoB,CAAC;QAAC,GAAG,EAAE,YAAY,CAAA;KAAE;IAkD3F,YAAY,CAAC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY;IAkB5D,SAAS;CAwBhB"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const pointer: {
|
|
2
2
|
x: number;
|
|
3
3
|
y: number;
|
|
4
|
+
afterPickEventsQueue: Array<{
|
|
5
|
+
requireNewPick: boolean;
|
|
6
|
+
cb: VoidFunction;
|
|
7
|
+
}>;
|
|
4
8
|
};
|
|
5
|
-
export default function initMouseController(canvas: HTMLCanvasElement): void;
|
|
9
|
+
export default function initMouseController(canvas: HTMLCanvasElement, onStartProcessing: VoidFunction): void;
|
|
6
10
|
//# sourceMappingURL=pointer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/pointer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/pointer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;0BAGU,KAAK,CAAC;QAAE,cAAc,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,YAAY,CAAA;KAAE,CAAC;CAMjF,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,MAAM,EAAE,iBAAiB,EACzB,iBAAiB,EAAE,YAAY,QAwDhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/draw/getProgram.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IA6CtF,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,UA0B3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawMSDF/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IA0EtF,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,EACxB,SAAS,UAAU,UA+BtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawTexture/getProgram.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawTexture/getProgram.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IAoEtF,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,CAAC,eAAe,CAAC,EACzC,SAAS,UAAU,UA8BtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawTriangle/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawTriangle/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IA8DtF,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,CAAC,eAAe,CAAC,UA2B5C"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import getDrawTriangle from
|
|
2
|
-
import getDrawBezier from
|
|
3
|
-
import getDraw3dModelTexture from
|
|
4
|
-
import getDraw3dModel from
|
|
5
|
-
import getDraw3dModelLight from
|
|
6
|
-
import getBlur from
|
|
7
|
-
import getDrawtexture from
|
|
8
|
-
import getPickTexture from
|
|
1
|
+
import getDrawTriangle from './drawTriangle/getProgram';
|
|
2
|
+
import getDrawBezier from './drawBezier/getProgram';
|
|
3
|
+
import getDraw3dModelTexture from './draw3dModelTexture/getProgram';
|
|
4
|
+
import getDraw3dModel from './draw3dModel/getProgram';
|
|
5
|
+
import getDraw3dModelLight from './draw3dModelLight/getProgram';
|
|
6
|
+
import getBlur from './blur/getProgram';
|
|
7
|
+
import getDrawtexture from './drawTexture/getProgram';
|
|
8
|
+
import getPickTexture from './pickTexture/getProgram';
|
|
9
|
+
import getPickTriangle from './pickTriangle/getProgram';
|
|
10
|
+
import getDrawMSDF from './drawMSDF/getProgram';
|
|
9
11
|
export declare let drawTriangle: ReturnType<typeof getDrawTriangle>;
|
|
10
12
|
export declare let drawBezier: ReturnType<typeof getDrawBezier>;
|
|
11
13
|
export declare let draw3dModel: ReturnType<typeof getDraw3dModel>;
|
|
@@ -14,5 +16,7 @@ export declare let draw3dModelLight: ReturnType<typeof getDraw3dModelLight>;
|
|
|
14
16
|
export declare let drawBlur: ReturnType<typeof getBlur>;
|
|
15
17
|
export declare let drawTexture: ReturnType<typeof getDrawtexture>;
|
|
16
18
|
export declare let pickTexture: ReturnType<typeof getPickTexture>;
|
|
19
|
+
export declare let pickTriangle: ReturnType<typeof getPickTriangle>;
|
|
20
|
+
export declare let drawMSDF: ReturnType<typeof getDrawMSDF>;
|
|
17
21
|
export default function initPrograms(device: GPUDevice, presentationFormat: GPUTextureFormat): void;
|
|
18
22
|
//# sourceMappingURL=initPrograms.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initPrograms.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/initPrograms.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,qBAAqB,MAAM,iCAAiC,CAAA;AACnE,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,mBAAmB,MAAM,+BAA+B,CAAA;AAC/D,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,cAAc,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"initPrograms.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/initPrograms.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,qBAAqB,MAAM,iCAAiC,CAAA;AACnE,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,mBAAmB,MAAM,+BAA+B,CAAA;AAC/D,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAE/C,eAAO,IAAI,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAC3D,eAAO,IAAI,UAAU,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;AACvD,eAAO,IAAI,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AACzD,eAAO,IAAI,kBAAkB,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACvE,eAAO,IAAI,gBAAgB,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACnE,eAAO,IAAI,QAAQ,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAC/C,eAAO,IAAI,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AACzD,eAAO,IAAI,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AACzD,eAAO,IAAI,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAC3D,eAAO,IAAI,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAEnD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,QAW3F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice
|
|
1
|
+
export default function getProgram(device: GPUDevice): (pass: GPURenderPassEncoder, worldProjectionMatrix: Float32Array, vertexData: Float32Array<ArrayBufferLike>, texture: GPUTexture) => void;
|
|
2
2
|
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/pickTexture/getProgram.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/pickTexture/getProgram.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,IA6DhD,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,CAAC,eAAe,CAAC,EACzC,SAAS,UAAU,UAgCtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/pickTriangle/getProgram.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,IA4DhD,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,CAAC,eAAe,CAAC,UA0B5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCanvasRenderDescriptor.d.ts","sourceRoot":"","sources":["../../../src/getCanvasRenderDescriptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCanvasRenderDescriptor.d.ts","sourceRoot":"","sources":["../../../src/getCanvasRenderDescriptor.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,2BAgC7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDepthTexture.d.ts","sourceRoot":"","sources":["../../../src/getDepthTexture.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getDepthTexture.d.ts","sourceRoot":"","sources":["../../../src/getDepthTexture.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAWvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMultisampleTexture.d.ts","sourceRoot":"","sources":["../../../src/getMultisampleTexture.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,gBAAgB,cAsBzB"}
|
package/lib/types/src/index.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
export type SerializedAsset = Omit<AssetZig, 'texture_id'> & {
|
|
2
|
+
id: number;
|
|
3
|
+
url: string;
|
|
4
|
+
textureId: number;
|
|
5
|
+
};
|
|
2
6
|
export interface CreatorAPI {
|
|
3
|
-
addImage: (
|
|
4
|
-
|
|
7
|
+
addImage: (img: HTMLImageElement, points?: PointUV[], id?: number) => void;
|
|
8
|
+
resetAssets: (assets: SerializedAsset[]) => void;
|
|
9
|
+
removeAsset: VoidFunction;
|
|
5
10
|
destroy: VoidFunction;
|
|
6
11
|
}
|
|
7
|
-
export
|
|
12
|
+
export interface TextureSource {
|
|
13
|
+
url: string;
|
|
14
|
+
texture: GPUTexture;
|
|
15
|
+
}
|
|
16
|
+
export default function initCreator(canvas: HTMLCanvasElement, assets: Omit<SerializedAsset, 'id' | 'textureId'>[], onAssetsUpdate: (assets: SerializedAsset[]) => void, onAssetSelect: (assetId: number) => void, onProcessingUpdate: (inProgress: boolean) => void): Promise<CreatorAPI>;
|
|
8
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAoBA,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IAC3D,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1E,WAAW,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAA;IAChD,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,YAAY,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,wBAA8B,WAAW,CACvC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,WAAW,CAAC,EAAE,EACnD,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,EACnD,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACxC,kBAAkB,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,GAChD,OAAO,CAAC,UAAU,CAAC,CAoHrB"}
|
package/lib/types/src/run.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextureSource } from '.';
|
|
2
2
|
export declare const transformMatrix: Float32Array<ArrayBuffer>;
|
|
3
3
|
export declare const MAP_BACKGROUND_SCALE = 1000;
|
|
4
|
-
export default function runCreator(
|
|
4
|
+
export default function runCreator(canvas: HTMLCanvasElement, context: GPUCanvasContext, device: GPUDevice, presentationFormat: GPUTextureFormat, textures: TextureSource[], onEmptyEvents: VoidFunction): VoidFunction;
|
|
5
5
|
//# sourceMappingURL=run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/run.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;AAGjC,eAAO,MAAM,eAAe,2BAAqB,CAAA;AACjD,eAAO,MAAM,oBAAoB,OAAO,CAAA;AAExC,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,QAAQ,EAAE,aAAa,EAAE,EACzB,aAAa,EAAE,YAAY,GAC1B,YAAY,CAiEd"}
|
package/lib/types/src/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAe,SAAQ,KAAK;IAC3C,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAA;CACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distancePointToLine.d.ts","sourceRoot":"","sources":["../../../../src/utils/distancePointToLine.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"distancePointToLine.d.ts","sourceRoot":"","sources":["../../../../src/utils/distancePointToLine.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,UAKzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAngle.d.ts","sourceRoot":"","sources":["../../../../src/utils/getAngle.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"getAngle.d.ts","sourceRoot":"","sources":["../../../../src/utils/getAngle.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,UAEtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBezierPos.d.ts","sourceRoot":"","sources":["../../../../src/utils/getBezierPos.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"getBezierPos.d.ts","sourceRoot":"","sources":["../../../../src/utils/getBezierPos.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAkBjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBezierTan.d.ts","sourceRoot":"","sources":["../../../../src/utils/getBezierTan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBezierTan.d.ts","sourceRoot":"","sources":["../../../../src/utils/getBezierTan.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CASjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCurveLength.d.ts","sourceRoot":"","sources":["../../../../src/utils/getCurveLength.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCurveLength.d.ts","sourceRoot":"","sources":["../../../../src/utils/getCurveLength.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAYV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefaultPoints.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDefaultPoints.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,iBAAiB,GACxB,OAAO,EAAE,CAaX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDistance.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDistance.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"getDistance.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDistance.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,UAEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSvgSource.d.ts","sourceRoot":"","sources":["../../../../src/utils/getSvgSource.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,MAAM,8BAwBlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeVec2.d.ts","sourceRoot":"","sources":["../../../../src/utils/normalizeVec2.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"normalizeVec2.d.ts","sourceRoot":"","sources":["../../../../src/utils/normalizeVec2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAMvD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mateuszjs/magic-render",
|
|
3
3
|
"description": "Initial version of visual editor",
|
|
4
|
-
"version": "0.1.0-next.
|
|
4
|
+
"version": "0.1.0-next.11",
|
|
5
5
|
"author": "Mateusz Walendzik",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.8.1"
|
|
@@ -20,36 +20,40 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"start": "export NODE_ENV=development && webpack serve --
|
|
24
|
-
"build": "rm -rf lib lib-test && export
|
|
23
|
+
"start": "export NODE_ENV=development && webpack serve --mode development",
|
|
24
|
+
"build": "npm run generate-msdf && rm -rf lib lib-test && export NODE_ENV=production && webpack && tsc --project tsconfig.build.json --emitDeclarationOnly ",
|
|
25
25
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
26
26
|
"test-e2e": "npx playwright test",
|
|
27
|
-
"format": "eslint --fix \"src/**/*.{ts,js}\" \"integration-tests/**/*.{ts,js}\""
|
|
27
|
+
"format": "eslint --fix \"src/**/*.{ts,js}\" \"integration-tests/**/*.{ts,js}\"",
|
|
28
|
+
"generate-msdf": "node msdf/generate-msdf.js"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
31
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
30
32
|
"@eslint/js": "^9.21.0",
|
|
31
33
|
"@playwright/test": "^1.50.1",
|
|
32
34
|
"@stylistic/eslint-plugin-js": "^4.2.0",
|
|
33
35
|
"@tsconfig/recommended": "^1.0.8",
|
|
34
36
|
"@types/jest": "^29.5.14",
|
|
35
37
|
"@types/node": "^22.13.9",
|
|
36
|
-
"@wasm-tool/wasm-pack-plugin": "^1.7.0",
|
|
37
38
|
"@webgpu/types": "^0.1.54",
|
|
38
|
-
"eslint": "^9.
|
|
39
|
+
"eslint": "^9.28.0",
|
|
39
40
|
"html-webpack-plugin": "^5.6.3",
|
|
40
41
|
"jest": "^29.7.0",
|
|
41
42
|
"jest-environment-jsdom": "^29.7.0",
|
|
43
|
+
"msdf-bmfont-xml": "^2.7.0",
|
|
42
44
|
"semantic-release": "^24.2.3",
|
|
45
|
+
"svg2ttf": "^6.0.3",
|
|
46
|
+
"svgicons2svgfont": "^15.0.1",
|
|
43
47
|
"ts-jest": "^29.2.6",
|
|
44
48
|
"ts-loader": "^9.5.2",
|
|
45
49
|
"ts-node": "^10.9.2",
|
|
46
50
|
"typescript": "^5.8.2",
|
|
47
51
|
"typescript-eslint": "^8.26.0",
|
|
48
|
-
"wasm-pack": "^0.13.1",
|
|
49
52
|
"webpack": "^5.97.1",
|
|
50
53
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
51
54
|
"webpack-cli": "^6.0.1",
|
|
52
|
-
"webpack-dev-server": "^5.2.0"
|
|
55
|
+
"webpack-dev-server": "^5.2.0",
|
|
56
|
+
"zigar-loader": "^0.14.0"
|
|
53
57
|
},
|
|
54
58
|
"types": "./lib/types/src/index.d.ts",
|
|
55
59
|
"main": "./lib/index.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glue_code.d.ts","sourceRoot":"","sources":["../../../crate/glue_code.js"],"names":[],"mappings":""}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export function __wbg_set_wasm(val: any): void;
|
|
2
|
-
export function __wbindgen_is_undefined(arg0: any): boolean;
|
|
3
|
-
export function __wbg_stringify_eead5648c09faaf8(...args: any[]): any;
|
|
4
|
-
export function __wbindgen_string_new(arg0: any, arg1: any): any;
|
|
5
|
-
export function __wbg_new_e69b5f66fda8f13c(): Object;
|
|
6
|
-
export function __wbindgen_number_new(arg0: any): any;
|
|
7
|
-
export function __wbg_set_20cbc34131e76824(arg0: any, arg1: any, arg2: any): void;
|
|
8
|
-
export function __wbindgen_debug_string(arg0: any, arg1: any): void;
|
|
9
|
-
export function __wbg_new_034f913e7636e987(): any[];
|
|
10
|
-
export function __wbg_set_425e70f7c64ac962(arg0: any, arg1: any, arg2: any): void;
|
|
11
|
-
export function __wbindgen_string_get(arg0: any, arg1: any): void;
|
|
12
|
-
export function __wbindgen_throw(arg0: any, arg1: any): void;
|
|
13
|
-
export function __wbindgen_init_externref_table(): void;
|
|
14
|
-
export class State {
|
|
15
|
-
static __wrap(ptr: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @param {number} width
|
|
18
|
-
* @param {number} height
|
|
19
|
-
* @returns {State}
|
|
20
|
-
*/
|
|
21
|
-
static "new"(width: number, height: number): State;
|
|
22
|
-
__destroy_into_raw(): number | undefined;
|
|
23
|
-
__wbg_ptr: number | undefined;
|
|
24
|
-
free(): void;
|
|
25
|
-
/**
|
|
26
|
-
* @param {number} id
|
|
27
|
-
* @param {any} raw_points
|
|
28
|
-
* @param {number} texture_id
|
|
29
|
-
*/
|
|
30
|
-
add_texture(id: number, raw_points: any, texture_id: number): void;
|
|
31
|
-
/**
|
|
32
|
-
* @param {number} id
|
|
33
|
-
* @returns {any}
|
|
34
|
-
*/
|
|
35
|
-
get_shader_input(id: number): any;
|
|
36
|
-
/**
|
|
37
|
-
* @param {number} id
|
|
38
|
-
* @returns {any}
|
|
39
|
-
*/
|
|
40
|
-
get_shader_pick_input(id: number): any;
|
|
41
|
-
/**
|
|
42
|
-
* @param {number} id
|
|
43
|
-
* @param {any} raw_points
|
|
44
|
-
*/
|
|
45
|
-
update_points(id: number, raw_points: any): void;
|
|
46
|
-
/**
|
|
47
|
-
* @param {number} id
|
|
48
|
-
*/
|
|
49
|
-
update_hover(id: number): void;
|
|
50
|
-
/**
|
|
51
|
-
* @returns {Float32Array}
|
|
52
|
-
*/
|
|
53
|
-
get_border(): Float32Array;
|
|
54
|
-
}
|
|
55
|
-
export const __wbg_error_53abcd6a461f73d8: {
|
|
56
|
-
(...data: any[]): void;
|
|
57
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=index_bg.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index_bg.d.ts","sourceRoot":"","sources":["../../../../crate/pkg/index_bg.js"],"names":[],"mappings":"AACA,+CAEC;AAgRD,4DAGC;AAED,sEAGe;AAEf,iEAGC;AAED,qDAGC;AAED,sDAGC;AAED,kFAEC;AAED,oEAMC;AAED,oDAGC;AAED,kFAEC;AAED,kEAOC;AAED,6DAEC;AAID,wDASC;AApJD;IAEI,6BAMC;IAaD;;;;OAIG;IACH,oBAJW,MAAM,UACN,MAAM,GACJ,KAAK,CAKjB;IAnBD,yCAKC;IAHG,8BAAkB;IAKtB,aAGC;IAUD;;;;OAIG;IACH,gBAJW,MAAM,cACN,GAAG,cACH,MAAM,QAIhB;IACD;;;OAGG;IACH,qBAHW,MAAM,GACJ,GAAG,CAKf;IACD;;;OAGG;IACH,0BAHW,MAAM,GACJ,GAAG,CAKf;IACD;;;OAGG;IACH,kBAHW,MAAM,cACN,GAAG,QAIb;IACD;;OAEG;IACH,iBAFW,MAAM,QAIhB;IACD;;OAEG;IACH,cAFa,YAAY,CAOxB;CACJ;AA6DD;;;EAA6H"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Preview/index.ts"],"names":[],"mappings":""}
|