@mateuszjs/magic-render 0.1.0-next.17 → 0.1.0-next.19
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/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/types/src/WebGPU/getTexture/createCheckedImageData.d.ts.map +1 -1
- package/lib/types/src/WebGPU/getTexture/index.d.ts.map +1 -1
- package/lib/types/src/WebGPU/pick.d.ts.map +1 -1
- package/lib/types/src/WebGPU/pointer.d.ts +6 -1
- package/lib/types/src/WebGPU/pointer.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts +1 -1
- package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/drawShape/getProgram.d.ts +2 -0
- package/lib/types/src/WebGPU/programs/drawShape/getProgram.d.ts.map +1 -0
- package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts +1 -1
- package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts +1 -1
- package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/programs/initPrograms.d.ts +5 -1
- 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 +1 -1
- package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts.map +1 -1
- package/lib/types/src/WebGPU/textureCache.d.ts +3 -0
- package/lib/types/src/WebGPU/textureCache.d.ts.map +1 -0
- package/lib/types/src/getCanvasMatrix.d.ts.map +1 -1
- package/lib/types/src/getMultisampleTexture.d.ts.map +1 -1
- package/lib/types/src/index.d.ts +6 -1
- package/lib/types/src/index.d.ts.map +1 -1
- package/lib/types/src/run.d.ts +2 -3
- package/lib/types/src/run.d.ts.map +1 -1
- package/lib/types/src/shapes/const.d.ts +5 -0
- package/lib/types/src/shapes/const.d.ts.map +1 -0
- package/lib/types/src/shapes/createShape.d.ts +3 -0
- package/lib/types/src/shapes/createShape.d.ts.map +1 -0
- package/lib/types/src/shapes/parseColor.d.ts +2 -0
- package/lib/types/src/shapes/parseColor.d.ts.map +1 -0
- package/lib/types/src/shapes/parseEllipse.d.ts +3 -0
- package/lib/types/src/shapes/parseEllipse.d.ts.map +1 -0
- package/lib/types/src/shapes/parsePathData.d.ts +3 -0
- package/lib/types/src/shapes/parsePathData.d.ts.map +1 -0
- package/lib/types/src/shapes/parseRect.d.ts +3 -0
- package/lib/types/src/shapes/parseRect.d.ts.map +1 -0
- package/lib/types/src/shapes/types.d.ts +4 -0
- package/lib/types/src/shapes/types.d.ts.map +1 -0
- package/lib/types/src/textures.d.ts +5 -1
- package/lib/types/src/textures.d.ts.map +1 -1
- package/package.json +7 -3
- package/lib/types/src/utils/getSvgSource.d.ts +0 -2
- package/lib/types/src/utils/getSvgSource.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCheckedImageData.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/createCheckedImageData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createCheckedImageData.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/createCheckedImageData.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAuBrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/index.ts"],"names":[],"mappings":"AAGA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/index.ts"],"names":[],"mappings":"AAGA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,KAAK,aAAa,GACd,WAAW,GACX,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,CAAA;AAOnB,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,0BAA0B,CAAA;IAClC,WAAW,EAAE,OAAO,CAAA;CACrB;AA+BD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,cAYf;AAGD,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,UAAU,EACzB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,OAAY,QA0BtB;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,OAAY,cAatB;AAsBD,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,wBAOhD;AAED,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,uBAG5F"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IAgB5D,SAAS;CA0BhB"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export declare const camera: {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
zoom: number;
|
|
5
|
+
};
|
|
1
6
|
export declare const pointer: {
|
|
2
7
|
x: number;
|
|
3
8
|
y: number;
|
|
@@ -6,5 +11,5 @@ export declare const pointer: {
|
|
|
6
11
|
cb: VoidFunction;
|
|
7
12
|
}>;
|
|
8
13
|
};
|
|
9
|
-
export default function initMouseController(canvas: HTMLCanvasElement, onStartProcessing: VoidFunction): void;
|
|
14
|
+
export default function initMouseController(canvas: HTMLCanvasElement, onZoom: VoidFunction, onStartProcessing: VoidFunction): void;
|
|
10
15
|
//# 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":"AAcA,eAAO,MAAM,MAAM;;;;CAIlB,CAAA;AAED,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,MAAM,EAAE,YAAY,EACpB,iBAAiB,EAAE,YAAY,QAkShC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder,
|
|
1
|
+
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat, matrixBuffer: GPUBuffer): (pass: GPURenderPassEncoder, vertexData: DataView, texture: GPUTexture) => void;
|
|
2
2
|
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawMSDF/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawMSDF/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,YAAY,EAAE,SAAS,IAyDE,MAAM,oBAAoB,EAAE,YAAY,QAAQ,EAAE,SAAS,UAAU,UA6B/F"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default function getDrawShape(device: GPUDevice, presentationFormat: GPUTextureFormat, canvasMatrixBuffer: GPUBuffer, buffersToDestroy: GPUBuffer[]): (passEncoder: GPURenderPassEncoder, curvesDataView: DataView, boundingBoxDataView: DataView, uniformDataView: DataView) => void;
|
|
2
|
+
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/drawShape/getProgram.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,kBAAkB,EAAE,SAAS,EAC7B,gBAAgB,EAAE,SAAS,EAAE,IA6E3B,aAAa,oBAAoB,EACjC,gBAAgB,QAAQ,EACxB,qBAAqB,QAAQ,EAC7B,iBAAiB,QAAQ,UA0C5B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder,
|
|
1
|
+
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat, matrixBuffer: GPUBuffer): (pass: GPURenderPassEncoder, vertexData: DataView, texture: GPUTexture) => void;
|
|
2
2
|
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -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":"AAGA,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,YAAY,EAAE,SAAS,IAuDrB,MAAM,oBAAoB,EAC1B,YAAY,QAAQ,EACpB,SAAS,UAAU,UA+BtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder,
|
|
1
|
+
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat, matrixBuffer: GPUBuffer, buffersToDestroy: GPUBuffer[]): (pass: GPURenderPassEncoder, vertexData: DataView) => void;
|
|
2
2
|
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -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,CAChC,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,YAAY,EAAE,SAAS,EACvB,gBAAgB,EAAE,SAAS,EAAE,IAyDA,MAAM,oBAAoB,EAAE,YAAY,QAAQ,UAgB9E"}
|
|
@@ -8,6 +8,7 @@ import getDrawtexture from './drawTexture/getProgram';
|
|
|
8
8
|
import getPickTexture from './pickTexture/getProgram';
|
|
9
9
|
import getPickTriangle from './pickTriangle/getProgram';
|
|
10
10
|
import getDrawMSDF from './drawMSDF/getProgram';
|
|
11
|
+
import getDrawShape from './drawShape/getProgram';
|
|
11
12
|
export declare let drawTriangle: ReturnType<typeof getDrawTriangle>;
|
|
12
13
|
export declare let drawBezier: ReturnType<typeof getDrawBezier>;
|
|
13
14
|
export declare let draw3dModel: ReturnType<typeof getDraw3dModel>;
|
|
@@ -18,5 +19,8 @@ export declare let drawTexture: ReturnType<typeof getDrawtexture>;
|
|
|
18
19
|
export declare let pickTexture: ReturnType<typeof getPickTexture>;
|
|
19
20
|
export declare let pickTriangle: ReturnType<typeof getPickTriangle>;
|
|
20
21
|
export declare let drawMSDF: ReturnType<typeof getDrawMSDF>;
|
|
21
|
-
export
|
|
22
|
+
export declare let drawShape: ReturnType<typeof getDrawShape>;
|
|
23
|
+
export declare let canvasMatrixBuffer: GPUBuffer;
|
|
24
|
+
export declare let pickCanvasMatrixBuffer: GPUBuffer;
|
|
25
|
+
export default function initPrograms(device: GPUDevice, presentationFormat: GPUTextureFormat): () => void;
|
|
22
26
|
//# 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;AACrD,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,WAAW,MAAM,uBAAuB,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;AAC/C,OAAO,YAAY,MAAM,wBAAwB,CAAA;AAEjD,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;AACnD,eAAO,IAAI,SAAS,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAErD,eAAO,IAAI,kBAAkB,EAAE,SAAS,CAAA;AACxC,eAAO,IAAI,sBAAsB,EAAE,SAAS,CAAA;AAE5C,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,cA8B3F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice): (pass: GPURenderPassEncoder,
|
|
1
|
+
export default function getProgram(device: GPUDevice, matrixBuffer: GPUBuffer): (pass: GPURenderPassEncoder, vertexData: DataView, 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,CAAC,MAAM,EAAE,SAAS,
|
|
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,EAAE,YAAY,EAAE,SAAS,IA2CzE,MAAM,oBAAoB,EAC1B,YAAY,QAAQ,EACpB,SAAS,UAAU,UA8BtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice): (pass: GPURenderPassEncoder,
|
|
1
|
+
export default function getProgram(device: GPUDevice, matrixBuffer: GPUBuffer): (pass: GPURenderPassEncoder, vertexData: DataView) => void;
|
|
2
2
|
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/pickTriangle/getProgram.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/pickTriangle/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,IAwC9C,MAAM,oBAAoB,EAAE,YAAY,QAAQ,UAuB9E"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function endCache(): void;
|
|
2
|
+
export declare function startCache(device: GPUDevice, presentationFormat: GPUTextureFormat, currTextureId: number | null, boundingBox: BoundingBox, outputWidth: number, outputHeight: number): number;
|
|
3
|
+
//# sourceMappingURL=textureCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textureCache.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/textureCache.ts"],"names":[],"mappings":"AAUA,wBAAgB,QAAQ,SAEvB;AAED,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,CAmDR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCanvasMatrix.d.ts","sourceRoot":"","sources":["../../../src/getCanvasMatrix.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCanvasMatrix.d.ts","sourceRoot":"","sources":["../../../src/getCanvasMatrix.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,iBAAiB,6BAehE"}
|
|
@@ -1 +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,
|
|
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,cAiBzB"}
|
package/lib/types/src/index.d.ts
CHANGED
|
@@ -10,11 +10,16 @@ export type SerializedOutputAsset = {
|
|
|
10
10
|
url: string;
|
|
11
11
|
textureId: number;
|
|
12
12
|
};
|
|
13
|
+
export declare enum CreatorTool {
|
|
14
|
+
None = 0,
|
|
15
|
+
DrawShape = 1
|
|
16
|
+
}
|
|
13
17
|
export interface CreatorAPI {
|
|
14
18
|
addImage: (url: string) => void;
|
|
15
19
|
resetAssets: (assets: SerializedInputAsset[], withSnapshot?: boolean) => void;
|
|
16
20
|
removeAsset: VoidFunction;
|
|
17
21
|
destroy: VoidFunction;
|
|
22
|
+
setTool: (tool: CreatorTool) => void;
|
|
18
23
|
}
|
|
19
|
-
export default function initCreator(canvas: HTMLCanvasElement, onAssetsUpdate: (assets: SerializedOutputAsset[]) => void, onAssetSelect: (assetId: number) => void, onProcessingUpdate: (inProgress: boolean) => void): Promise<CreatorAPI>;
|
|
24
|
+
export default function initCreator(canvas: HTMLCanvasElement, uploadTexture: (url: string, onNewUrl: (newUrl: string) => void) => void, onAssetsUpdate: (assets: SerializedOutputAsset[]) => void, onAssetSelect: (assetId: number) => void, onProcessingUpdate: (inProgress: boolean) => void): Promise<CreatorAPI>;
|
|
20
25
|
//# 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":"AAYA,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,OAAO,EAAE,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,oBAAY,WAAW;IACrB,IAAI,IAAI;IACR,SAAS,IAAI;CACd;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,WAAW,EAAE,CAAC,MAAM,EAAE,oBAAoB,EAAE,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7E,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;CACrC;AAED,wBAA8B,WAAW,CACvC,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,EACxE,cAAc,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,KAAK,IAAI,EACzD,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACxC,kBAAkB,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,GAChD,OAAO,CAAC,UAAU,CAAC,CAqKrB"}
|
package/lib/types/src/run.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export
|
|
3
|
-
export default function runCreator(canvas: HTMLCanvasElement, context: GPUCanvasContext, device: GPUDevice, presentationFormat: GPUTextureFormat, onEmptyEvents: VoidFunction): VoidFunction;
|
|
1
|
+
export declare function updateRenderPass(newRenderPass: GPURenderPassEncoder): void;
|
|
2
|
+
export default function runCreator(canvas: HTMLCanvasElement, context: GPUCanvasContext, device: GPUDevice, cleanupPrograms: VoidFunction, presentationFormat: GPUTextureFormat, onEmptyEvents: VoidFunction): VoidFunction;
|
|
4
3
|
//# 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":"AAkBA,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,oBAAoB,QAEnE;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,YAAY,EAC7B,kBAAkB,EAAE,gBAAgB,EACpC,aAAa,EAAE,YAAY,GAC1B,YAAY,CAwGd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../src/shapes/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;CAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createShape.d.ts","sourceRoot":"","sources":["../../../../src/shapes/createShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAQjC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CA4CxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseColor.d.ts","sourceRoot":"","sources":["../../../../src/shapes/parseColor.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAoB9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseEllipse.d.ts","sourceRoot":"","sources":["../../../../src/shapes/parseEllipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOrC,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,WAAW,EAAE,CAsDf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePathData.d.ts","sourceRoot":"","sources":["../../../../src/shapes/parsePathData.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,WAAW,EAAE,MAAM,SAAS,CAAA;AA6OxD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE,EAAE,CAK5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseRect.d.ts","sourceRoot":"","sources":["../../../../src/shapes/parseRect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,CAuB1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/shapes/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAE/C,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAGtD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,WAAW,CAAA"}
|
|
@@ -2,8 +2,12 @@ export declare function init(_device: GPUDevice, _updateProcessing: (loadingText
|
|
|
2
2
|
export interface TextureSource {
|
|
3
3
|
url: string;
|
|
4
4
|
texture?: GPUTexture;
|
|
5
|
+
hash?: string;
|
|
6
|
+
data?: Uint8ClampedArray;
|
|
5
7
|
}
|
|
6
|
-
export declare function add(url: string, callback?: (width: number, height: number) => void): number;
|
|
8
|
+
export declare function add(url: string, callback?: (width: number, height: number, isNew: boolean) => void): number;
|
|
7
9
|
export declare function getTexture(textureId: number): GPUTexture;
|
|
10
|
+
export declare function setTexture(texture: GPUTexture, optionalId: number | null): number;
|
|
8
11
|
export declare function getUrl(textureId: number): string;
|
|
12
|
+
export declare function updateTextureUrl(textureId: number, url: string): void;
|
|
9
13
|
//# sourceMappingURL=textures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textures.d.ts","sourceRoot":"","sources":["../../../src/textures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"textures.d.ts","sourceRoot":"","sources":["../../../src/textures.ts"],"names":[],"mappings":"AAWA,wBAAgB,IAAI,CAClB,OAAO,EAAE,SAAS,EAClB,iBAAiB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,GACnD,IAAI,CAMN;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB;AAED,wBAAgB,GAAG,CACjB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,GACjE,MAAM,CA8CR;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAExD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,UAYxE;AAED,wBAAgB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhD;AA4CD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAE9D"}
|
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.19",
|
|
5
5
|
"author": "Mateusz Walendzik",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.8.1"
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@tsconfig/recommended": "^1.0.8",
|
|
36
36
|
"@types/jest": "^29.5.14",
|
|
37
37
|
"@types/node": "^22.13.9",
|
|
38
|
+
"@types/svg-parser": "^2.0.6",
|
|
38
39
|
"@webgpu/types": "^0.1.54",
|
|
39
40
|
"eslint": "^9.28.0",
|
|
40
41
|
"html-webpack-plugin": "^5.6.3",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
55
56
|
"webpack-cli": "^6.0.1",
|
|
56
57
|
"webpack-dev-server": "^5.2.0",
|
|
57
|
-
"zigar-loader": "^0.14.
|
|
58
|
+
"zigar-loader": "^0.14.1"
|
|
58
59
|
},
|
|
59
60
|
"types": "./lib/types/src/index.d.ts",
|
|
60
61
|
"main": "./lib/index.mjs",
|
|
@@ -70,5 +71,8 @@
|
|
|
70
71
|
"homepage": "https://github.com/mateuszJS/magic-render#readme",
|
|
71
72
|
"files": [
|
|
72
73
|
"lib/**/*"
|
|
73
|
-
]
|
|
74
|
+
],
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"svg-parser": "^2.0.4"
|
|
77
|
+
}
|
|
74
78
|
}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|