@mateuszjs/magic-render 0.1.0-next.3 → 0.1.0-next.30
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/40dc20eab8f7c9f3.ttf +0 -0
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/types/WebGPU/canvasSizeObserver.d.ts.map +1 -1
- package/lib/types/WebGPU/generatePreview.d.ts +3 -0
- package/lib/types/WebGPU/generatePreview.d.ts.map +1 -0
- package/lib/types/WebGPU/getDevice.d.ts +5 -1
- package/lib/types/WebGPU/getDevice.d.ts.map +1 -1
- package/lib/types/WebGPU/getTexture/createCheckedImageData.d.ts.map +1 -1
- package/lib/types/WebGPU/getTexture/index.d.ts +3 -3
- package/lib/types/WebGPU/getTexture/index.d.ts.map +1 -1
- package/lib/types/WebGPU/pick.d.ts +1 -2
- package/lib/types/WebGPU/pick.d.ts.map +1 -1
- package/lib/types/WebGPU/programs/blur/getProgram.d.ts +1 -1
- package/lib/types/WebGPU/programs/blur/getProgram.d.ts.map +1 -1
- package/lib/types/WebGPU/programs/clearComputeDepth/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/clearComputeDepth/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/clearSdf/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/clearSdf/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/combineSdf/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/combineSdf/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/computeShape/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/computeShape/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/drawShape/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/drawShape/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/drawTexture/getProgram.d.ts +1 -1
- package/lib/types/WebGPU/programs/drawTexture/getProgram.d.ts.map +1 -1
- package/lib/types/WebGPU/programs/drawTriangle/getProgram.d.ts +1 -1
- package/lib/types/WebGPU/programs/drawTriangle/getProgram.d.ts.map +1 -1
- package/lib/types/WebGPU/programs/initPrograms.d.ts +20 -8
- package/lib/types/WebGPU/programs/initPrograms.d.ts.map +1 -1
- package/lib/types/WebGPU/programs/pickShape/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/pickShape/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/pickTexture/getProgram.d.ts +1 -1
- package/lib/types/WebGPU/programs/pickTexture/getProgram.d.ts.map +1 -1
- package/lib/types/WebGPU/programs/pickTriangle/getProgram.d.ts +1 -1
- package/lib/types/WebGPU/programs/pickTriangle/getProgram.d.ts.map +1 -1
- package/lib/types/WebGPU/textureCache.d.ts +4 -0
- package/lib/types/WebGPU/textureCache.d.ts.map +1 -0
- package/lib/types/fonts.d.ts +5 -0
- package/lib/types/fonts.d.ts.map +1 -0
- package/lib/types/getCanvasMatrix.d.ts.map +1 -1
- package/lib/types/getCanvasRenderDescriptor.d.ts +1 -0
- package/lib/types/getCanvasRenderDescriptor.d.ts.map +1 -1
- package/lib/types/getDepthTexture.d.ts +1 -0
- package/lib/types/getDepthTexture.d.ts.map +1 -1
- package/lib/types/getMultisampleTexture.d.ts +2 -0
- package/lib/types/getMultisampleTexture.d.ts.map +1 -0
- package/lib/types/getRenderDescriptor.d.ts.map +1 -1
- package/lib/types/index.d.ts +10 -9
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/loadingTexture.d.ts +2 -0
- package/lib/types/loadingTexture.d.ts.map +1 -0
- package/lib/types/pointer.d.ts +15 -0
- package/lib/types/pointer.d.ts.map +1 -0
- package/lib/types/run.d.ts +5 -4
- package/lib/types/run.d.ts.map +1 -1
- package/lib/types/sanitizeFill.d.ts +3 -0
- package/lib/types/sanitizeFill.d.ts.map +1 -0
- package/lib/types/svgToShapes/arcToBezier.d.ts +11 -0
- package/lib/types/svgToShapes/arcToBezier.d.ts.map +1 -0
- package/lib/types/svgToShapes/boundingBox.d.ts +18 -0
- package/lib/types/svgToShapes/boundingBox.d.ts.map +1 -0
- package/lib/types/svgToShapes/collectShapesData.d.ts +11 -0
- package/lib/types/svgToShapes/collectShapesData.d.ts.map +1 -0
- package/lib/types/svgToShapes/const.d.ts +5 -0
- package/lib/types/svgToShapes/const.d.ts.map +1 -0
- package/lib/types/svgToShapes/createShapes.d.ts +3 -0
- package/lib/types/svgToShapes/createShapes.d.ts.map +1 -0
- package/lib/types/svgToShapes/definitions.d.ts +44 -0
- package/lib/types/svgToShapes/definitions.d.ts.map +1 -0
- package/lib/types/svgToShapes/getProps.d.ts +4 -0
- package/lib/types/svgToShapes/getProps.d.ts.map +1 -0
- package/lib/types/svgToShapes/parseEllipse.d.ts +3 -0
- package/lib/types/svgToShapes/parseEllipse.d.ts.map +1 -0
- package/lib/types/svgToShapes/parsePathData.d.ts +3 -0
- package/lib/types/svgToShapes/parsePathData.d.ts.map +1 -0
- package/lib/types/svgToShapes/parseRect.d.ts +3 -0
- package/lib/types/svgToShapes/parseRect.d.ts.map +1 -0
- package/lib/types/svgToShapes/radialGradient.d.ts +16 -0
- package/lib/types/svgToShapes/radialGradient.d.ts.map +1 -0
- package/lib/types/svgToShapes/utils.d.ts +10 -0
- package/lib/types/svgToShapes/utils.d.ts.map +1 -0
- package/lib/types/textures.d.ts +21 -0
- package/lib/types/textures.d.ts.map +1 -0
- package/lib/types/types.d.ts +127 -3
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/typing.d.ts +6 -0
- package/lib/types/typing.d.ts.map +1 -0
- package/lib/types/utils/debounce.d.ts +2 -0
- package/lib/types/utils/debounce.d.ts.map +1 -0
- package/lib/types/utils/distancePointToLine.d.ts +1 -1
- package/lib/types/utils/getAngle.d.ts +1 -1
- package/lib/types/utils/getBezierPos.d.ts +1 -1
- package/lib/types/utils/getBezierPos.d.ts.map +1 -1
- package/lib/types/utils/getBezierTan.d.ts +1 -1
- package/lib/types/utils/getBezierTan.d.ts.map +1 -1
- package/lib/types/utils/getCurveLength.d.ts +1 -1
- package/lib/types/utils/getDefaultPoints.d.ts +2 -1
- package/lib/types/utils/getDefaultPoints.d.ts.map +1 -1
- package/lib/types/utils/getDistance.d.ts +1 -1
- package/lib/types/utils/normalizeVec2.d.ts +1 -1
- package/lib/types/utils/throttle.d.ts +2 -0
- package/lib/types/utils/throttle.d.ts.map +1 -0
- package/package.json +12 -5
- package/lib/types/WebGPU/pointer.d.ts +0 -6
- package/lib/types/WebGPU/pointer.d.ts.map +0 -1
- package/lib/types/WebGPU/programs/draw3dModel/getProgram.d.ts +0 -2
- package/lib/types/WebGPU/programs/draw3dModel/getProgram.d.ts.map +0 -1
- package/lib/types/WebGPU/programs/draw3dModelLight/getProgram.d.ts +0 -9
- package/lib/types/WebGPU/programs/draw3dModelLight/getProgram.d.ts.map +0 -1
- package/lib/types/WebGPU/programs/draw3dModelTexture/getProgram.d.ts +0 -2
- package/lib/types/WebGPU/programs/draw3dModelTexture/getProgram.d.ts.map +0 -1
- package/lib/types/WebGPU/programs/drawBezier/getProgram.d.ts +0 -2
- package/lib/types/WebGPU/programs/drawBezier/getProgram.d.ts.map +0 -1
- package/lib/types/__test__/index.test.d.ts +0 -1
- package/lib/types/__test__/index.test.d.ts.map +0 -1
- package/lib/types/models/Video/MiniatureVideo.d.ts +0 -30
- package/lib/types/models/Video/MiniatureVideo.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,QA4BvB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export default function generatePreview(device: GPUDevice, presentationFormat: GPUTextureFormat, creatorCanvas: HTMLCanvasElement, projectWidth: number, projectHeight: number, scaleFactor: number, // we cannot calcualted it from previewCanvas because it's not added to DOM,
|
|
2
|
+
capturePreview: (canvas: HTMLCanvasElement, context: GPUCanvasContext) => Promise<void>, onPreviewUpdate: (canvas: HTMLCanvasElement) => void): Promise<void>;
|
|
3
|
+
//# sourceMappingURL=generatePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatePreview.d.ts","sourceRoot":"","sources":["../../../src/WebGPU/generatePreview.ts"],"names":[],"mappings":"AAGA,wBAA8B,eAAe,CAC3C,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EAAE,4EAA4E;AAEjG,cAAc,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,EACvF,eAAe,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,iBA+BrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDevice.d.ts","sourceRoot":"","sources":["../../../src/WebGPU/getDevice.ts"],"names":[],"mappings":"AAAA,wBAA8B,SAAS
|
|
1
|
+
{"version":3,"file":"getDevice.d.ts","sourceRoot":"","sources":["../../../src/WebGPU/getDevice.ts"],"names":[],"mappings":"AAAA,wBAA8B,SAAS;;;;GA+BtC"}
|
|
@@ -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"}
|
|
@@ -8,10 +8,10 @@ export interface TextureSlice {
|
|
|
8
8
|
source: GPUCopyExternalImageSource;
|
|
9
9
|
fakeMipmaps: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare function createTextureArray(device: GPUDevice, width: number, height: number, slices: number): GPUTexture;
|
|
11
|
+
export declare function createTextureArray(device: GPUDevice, presentationFormat: GPUTextureFormat, width: number, height: number, slices: number): GPUTexture;
|
|
12
12
|
export declare function attachSlice(device: GPUDevice, textue2dArray: GPUTexture, width: number, height: number, source: GPUCopyExternalImageSource, sliceIndex: number, options?: Options): void;
|
|
13
|
-
export declare function createTextureFromSource(device: GPUDevice, source: TextureSource, options?: Options): GPUTexture;
|
|
13
|
+
export declare function createTextureFromSource(device: GPUDevice, presentationFormat: GPUTextureFormat, source: TextureSource, options?: Options): GPUTexture;
|
|
14
14
|
export declare function loadImageBitmap(url: string): Promise<ImageBitmap>;
|
|
15
|
-
export declare function createTextureFromImage(device: GPUDevice, url: string, options: Options): Promise<GPUTexture>;
|
|
15
|
+
export declare function createTextureFromImage(device: GPUDevice, presentationFormat: GPUTextureFormat, url: string, options: Options): Promise<GPUTexture>;
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,kBAAkB,EAAE,gBAAgB,EACpC,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,kBAAkB,EAAE,gBAAgB,EACpC,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,OAAY,cActB;AAsBD,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,wBAOhD;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,uBAIjB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export default class PickManager {
|
|
2
2
|
private pickBuffer;
|
|
3
3
|
private pickTexture;
|
|
4
|
-
private pickDepthTexture;
|
|
5
4
|
private isPreviousPickDone;
|
|
6
5
|
constructor(device: GPUDevice);
|
|
7
6
|
/**
|
|
@@ -13,7 +12,7 @@ export default class PickManager {
|
|
|
13
12
|
pass: GPURenderPassEncoder;
|
|
14
13
|
end: VoidFunction;
|
|
15
14
|
};
|
|
16
|
-
createMatrix(canvas: HTMLCanvasElement, canvasMatrix: Float32Array): Float32Array<
|
|
15
|
+
createMatrix(canvas: HTMLCanvasElement, canvasMatrix: Float32Array<ArrayBuffer>): Float32Array<ArrayBuffer>;
|
|
17
16
|
asyncPick(): Promise<void>;
|
|
18
17
|
}
|
|
19
18
|
//# 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":"AAOA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,WAAW,CAAY;IAE/B,OAAO,CAAC,kBAAkB,CAAO;gBAErB,MAAM,EAAE,SAAS;IAsB7B;;;;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,CAAC,WAAW,CAAC;IAgBzE,SAAS;CAkChB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice): (texture: GPUTexture,
|
|
1
|
+
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (encoder: GPUCommandEncoder, texture: GPUTexture, iterations: number, filterSizePerPassX: number, filterSizePerPassY: number, sigmaPerPassX: number, sigmaPerPassY: number) => void;
|
|
2
2
|
//# sourceMappingURL=getProgram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/blur/getProgram.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/blur/getProgram.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IAoBtF,SAAS,iBAAiB,EAC1B,SAAS,UAAU,EACnB,YAAY,MAAM,EAClB,oBAAoB,MAAM,EAC1B,oBAAoB,MAAM,EAC1B,eAAe,MAAM,EACrB,eAAe,MAAM,UAuFxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/clearComputeDepth/getProgram.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAM,EAAE,SAAS,IAa1B,aAAa,qBAAqB,EAAE,SAAS,UAAU,UAkB1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/clearSdf/getProgram.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAM,EAAE,SAAS,IAa1B,aAAa,qBAAqB,EAAE,SAAS,UAAU,UAkBjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/combineSdf/getProgram.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,MAAM,EAAE,SAAS,IAenD,aAAa,qBAAqB,EAClC,gBAAgB,UAAU,EAC1B,WAAW,UAAU,EACrB,iBAAiB,UAAU,EAC3B,eAAe,QAAQ,CAAC,WAAW,CAAC,UA4BvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/computeShape/getProgram.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,SAAS,IAerD,aAAa,qBAAqB,EAClC,gBAAgB,QAAQ,CAAC,WAAW,CAAC,EACrC,SAAS,UAAU,UAuBtB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default function getDrawShape(device: GPUDevice, presentationFormat: GPUTextureFormat, fragmentShader: string, uniformSize: number): (passEncoder: GPURenderPassEncoder, sdfTexture: GPUTexture, boundingBoxDataView: DataView<ArrayBuffer>, uniformDataView: DataView<ArrayBuffer>) => 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":"AAGA,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,IAqDjB,aAAa,oBAAoB,EACjC,YAAY,UAAU,EACtB,qBAAqB,QAAQ,CAAC,WAAW,CAAC,EAC1C,iBAAiB,QAAQ,CAAC,WAAW,CAAC,UAkCzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder,
|
|
1
|
+
export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder, vertexData: DataView<ArrayBuffer>, 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":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IAsDtF,MAAM,oBAAoB,EAC1B,YAAY,QAAQ,CAAC,WAAW,CAAC,EACjC,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): (pass: GPURenderPassEncoder, vertexData: DataView<ArrayBuffer>) => 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":"
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/drawTriangle/getProgram.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IAwD3D,MAAM,oBAAoB,EAAE,YAAY,QAAQ,CAAC,WAAW,CAAC,UAgB3F"}
|
|
@@ -1,20 +1,32 @@
|
|
|
1
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
2
|
import getBlur from './blur/getProgram';
|
|
7
3
|
import getDrawtexture from './drawTexture/getProgram';
|
|
8
4
|
import getPickTexture from './pickTexture/getProgram';
|
|
9
5
|
import getPickTriangle from './pickTriangle/getProgram';
|
|
6
|
+
import getDrawShape from './drawShape/getProgram';
|
|
7
|
+
import getPickShape from './pickShape/getProgram';
|
|
8
|
+
import getComputeShape from './computeShape/getProgram';
|
|
9
|
+
import getCombineSdf from './combineSdf/getProgram';
|
|
10
|
+
import getClearComputeDepth from './clearComputeDepth/getProgram';
|
|
11
|
+
import getClearSdf from './clearSdf/getProgram';
|
|
10
12
|
export declare let drawTriangle: ReturnType<typeof getDrawTriangle>;
|
|
11
|
-
export declare let drawBezier: ReturnType<typeof getDrawBezier>;
|
|
12
|
-
export declare let draw3dModel: ReturnType<typeof getDraw3dModel>;
|
|
13
|
-
export declare let draw3dModelTexture: ReturnType<typeof getDraw3dModelTexture>;
|
|
14
|
-
export declare let draw3dModelLight: ReturnType<typeof getDraw3dModelLight>;
|
|
15
13
|
export declare let drawBlur: ReturnType<typeof getBlur>;
|
|
16
14
|
export declare let drawTexture: ReturnType<typeof getDrawtexture>;
|
|
17
15
|
export declare let pickTexture: ReturnType<typeof getPickTexture>;
|
|
18
16
|
export declare let pickTriangle: ReturnType<typeof getPickTriangle>;
|
|
17
|
+
export declare let drawSolidShape: ReturnType<typeof getDrawShape>;
|
|
18
|
+
export declare let drawLinearGradientShape: ReturnType<typeof getDrawShape>;
|
|
19
|
+
export declare let drawRadialGradientShape: ReturnType<typeof getDrawShape>;
|
|
20
|
+
export declare let pickShape: ReturnType<typeof getPickShape>;
|
|
21
|
+
export declare let computeShape: ReturnType<typeof getComputeShape>;
|
|
22
|
+
export declare let combineSdf: ReturnType<typeof getCombineSdf>;
|
|
23
|
+
export declare let clearComputeDepth: ReturnType<typeof getClearComputeDepth>;
|
|
24
|
+
export declare let clearSdf: ReturnType<typeof getClearSdf>;
|
|
25
|
+
export declare const canvasMatrix: {
|
|
26
|
+
buffer: GPUBuffer;
|
|
27
|
+
};
|
|
28
|
+
export declare let pickCanvasMatrixBuffer: GPUBuffer;
|
|
29
|
+
export declare function delayedDestroy(gpuObject: GPUBuffer | GPUTexture): void;
|
|
30
|
+
export declare function destroyGpuObjects(): void;
|
|
19
31
|
export default function initPrograms(device: GPUDevice, presentationFormat: GPUTextureFormat): void;
|
|
20
32
|
//# 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,
|
|
1
|
+
{"version":3,"file":"initPrograms.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/programs/initPrograms.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,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,YAAY,MAAM,wBAAwB,CAAA;AAIjD,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,oBAAoB,MAAM,gCAAgC,CAAA;AACjE,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAE/C,eAAO,IAAI,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAC3D,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,cAAc,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAC1D,eAAO,IAAI,uBAAuB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AACnE,eAAO,IAAI,uBAAuB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AACnE,eAAO,IAAI,SAAS,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AACrD,eAAO,IAAI,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAC3D,eAAO,IAAI,UAAU,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;AACvD,eAAO,IAAI,iBAAiB,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACrE,eAAO,IAAI,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAEnD,eAAO,MAAM,YAAY,EAAE;IACzB,MAAM,EAAE,SAAS,CAAA;CACyB,CAAA;AAC5C,eAAO,IAAI,sBAAsB,EAAE,SAAS,CAAA;AAI5C,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,QAE/D;AAED,wBAAgB,iBAAiB,SAGhC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,QAqD3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/programs/pickShape/getProgram.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,IAoC3E,MAAM,oBAAoB,EAC1B,YAAY,QAAQ,CAAC,WAAW,CAAC,EACjC,aAAa,QAAQ,CAAC,WAAW,CAAC,EAClC,YAAY,UAAU,UAmCzB"}
|
|
@@ -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<ArrayBuffer>, 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,CAAC,WAAW,CAAC,EACjC,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<ArrayBuffer>) => 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,CAAC,WAAW,CAAC,UAuB3F"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BoundingBox } from 'types';
|
|
2
|
+
export declare function endCache(): void;
|
|
3
|
+
export declare function startCache(device: GPUDevice, encoder: GPUCommandEncoder, textureId: number, boundingBox: BoundingBox, outputWidth: number, outputHeight: number): void;
|
|
4
|
+
//# sourceMappingURL=textureCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textureCache.d.ts","sourceRoot":"","sources":["../../../src/WebGPU/textureCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAMnC,wBAAgB,QAAQ,SAEvB;AAED,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,IAAI,CAoDN"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Logic from 'logic/index.zig';
|
|
2
|
+
export declare function loadFont(): Promise<void>;
|
|
3
|
+
export declare function getKerning(charA: number, charB: number): number;
|
|
4
|
+
export declare function getCharData(font_id: number, char_code: number): Logic.SerializedCharDetails;
|
|
5
|
+
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/fonts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA;AAQxC,wBAAsB,QAAQ,kBAO7B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/D;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAsC3F"}
|
|
@@ -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":"getCanvasRenderDescriptor.d.ts","sourceRoot":"","sources":["../../src/getCanvasRenderDescriptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCanvasRenderDescriptor.d.ts","sourceRoot":"","sources":["../../src/getCanvasRenderDescriptor.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,SAGpC;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,2BAiC7F"}
|
|
@@ -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,wBAAgB,OAAO,SAGtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAYvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMultisampleTexture.d.ts","sourceRoot":"","sources":["../../src/getMultisampleTexture.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,UAAU,cAcrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRenderDescriptor.d.ts","sourceRoot":"","sources":["../../src/getRenderDescriptor.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,SAAS,GAChB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"getRenderDescriptor.d.ts","sourceRoot":"","sources":["../../src/getRenderDescriptor.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,SAAS,GAChB,uBAAuB,CAmCzB"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import { CreatorTool, Id, PointUV, SerializedInputAsset, SerializedOutputAsset, ShapeProps } from './types';
|
|
2
|
+
export * from './types';
|
|
4
3
|
export interface CreatorAPI {
|
|
5
|
-
addImage: (
|
|
4
|
+
addImage: (url: string) => void;
|
|
5
|
+
resetAssets: (assets: SerializedInputAsset[], withSnapshot?: boolean) => void;
|
|
6
|
+
removeAsset: VoidFunction;
|
|
6
7
|
destroy: VoidFunction;
|
|
8
|
+
setTool: (tool: CreatorTool) => void;
|
|
9
|
+
toggleSharedTextEffects: VoidFunction;
|
|
10
|
+
updateAssetProps: (props: Partial<ShapeProps>) => void;
|
|
11
|
+
updateAssetBounds: (bounds: PointUV[]) => void;
|
|
7
12
|
}
|
|
8
|
-
export
|
|
9
|
-
url: string;
|
|
10
|
-
texture: GPUTexture;
|
|
11
|
-
}
|
|
12
|
-
export default function initCreator(canvas: HTMLCanvasElement, assets: SerializedAsset[], onAssetsUpdate: (assets: SerializedAsset[]) => void): Promise<CreatorAPI>;
|
|
13
|
+
export default function initCreator(canvas: HTMLCanvasElement, uploadTexture: (url: string, onNewUrl: (newUrl: string) => void) => void, onAssetsUpdate: (assets: SerializedOutputAsset[]) => void, onAssetSelect: (assetId: Id) => void, onProcessingUpdate: (inProgress: boolean) => void, onPreviewUpdate: (canvas: HTMLCanvasElement) => void, onUpdateTool: (tool: CreatorTool) => void, onUpdateProps: (bounds: PointUV[] | null, props: Partial<ShapeProps> | null) => void): Promise<CreatorAPI>;
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -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":"AAaA,OAAO,EACL,WAAW,EACX,EAAE,EACF,OAAO,EACP,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EAEX,MAAM,SAAS,CAAA;AAChB,cAAc,SAAS,CAAA;AAGvB,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;IACpC,uBAAuB,EAAE,YAAY,CAAA;IAErC,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IACtD,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;CAC/C;AAID,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,EAAE,KAAK,IAAI,EACpC,kBAAkB,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,EACjD,eAAe,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,EACpD,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,EACzC,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,KAAK,IAAI,GAInF,OAAO,CAAC,UAAU,CAAC,CAkQrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadingTexture.d.ts","sourceRoot":"","sources":["../../src/loadingTexture.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,MAAM,EAAE,SAAS,EACjB,kBAAkB,EAAE,gBAAgB,GACnC,UAAU,CA+BZ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const camera: {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
zoom: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const pointer: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
afterPickEventsQueue: Array<{
|
|
10
|
+
requireNewPick: boolean;
|
|
11
|
+
cb: VoidFunction;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export default function initMouseController(canvas: HTMLCanvasElement, onZoom: VoidFunction, onStartProcessing: VoidFunction): void;
|
|
15
|
+
//# sourceMappingURL=pointer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../src/pointer.ts"],"names":[],"mappings":"AAgBA,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,QA4ShC"}
|
package/lib/types/run.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare function updateRenderPass(newRenderPass: GPURenderPassEncoder): void;
|
|
2
|
+
export default function runCreator(creatorCanvas: HTMLCanvasElement, context: GPUCanvasContext, device: GPUDevice, onEmptyEvents: VoidFunction): {
|
|
3
|
+
stopRAF: () => void;
|
|
4
|
+
capturePreview: (canvas: HTMLCanvasElement, ctx: GPUCanvasContext) => Promise<void>;
|
|
5
|
+
};
|
|
5
6
|
//# sourceMappingURL=run.d.ts.map
|
package/lib/types/run.d.ts.map
CHANGED
|
@@ -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":"AA4BA,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,oBAAoB,QAEnE;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,aAAa,EAAE,iBAAiB,EAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,YAAY;;6BA+LK,iBAAiB,OAAO,gBAAgB;EAWzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizeFill.d.ts","sourceRoot":"","sources":["../../src/sanitizeFill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CA0C/E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface BezierCurve {
|
|
2
|
+
cp1x: number;
|
|
3
|
+
cp1y: number;
|
|
4
|
+
cp2x: number;
|
|
5
|
+
cp2y: number;
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}
|
|
9
|
+
export default function arcToBezier(x1: number, y1: number, rx: number, ry: number, angle: number, largeArcFlag: number, sweepFlag: number, x2: number, y2: number): BezierCurve[];
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=arcToBezier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arcToBezier.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/arcToBezier.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAGD,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,WAAW,EAAE,CAgIf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Point } from 'types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a 2D bounding box with minimum and maximum coordinates.
|
|
4
|
+
*/
|
|
5
|
+
export declare class BoundingBox {
|
|
6
|
+
min_x: number;
|
|
7
|
+
min_y: number;
|
|
8
|
+
max_x: number;
|
|
9
|
+
max_y: number;
|
|
10
|
+
constructor(points?: Point[]);
|
|
11
|
+
addPoint(p: Point): void;
|
|
12
|
+
addBox(box: BoundingBox): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets the bounding box for all paths.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getBoundingBox(paths: Point[][]): BoundingBox;
|
|
18
|
+
//# sourceMappingURL=boundingBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundingBox.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/boundingBox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAG7B;;GAEG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,MAAM,CAAW;IACxB,KAAK,EAAE,MAAM,CAAW;IACxB,KAAK,EAAE,MAAM,CAAY;IACzB,KAAK,EAAE,MAAM,CAAY;gBAEb,MAAM,CAAC,EAAE,KAAK,EAAE;IAM5B,QAAQ,CAAC,CAAC,EAAE,KAAK;IAOjB,MAAM,CAAC,GAAG,EAAE,WAAW;CAMxB;AA2FD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,WAAW,CAS5D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Node } from 'svg-parser';
|
|
2
|
+
import { BoundingBox } from './boundingBox';
|
|
3
|
+
import { Defs } from './definitions';
|
|
4
|
+
import { Point, ShapeProps } from 'types';
|
|
5
|
+
export interface ShapeData {
|
|
6
|
+
paths: Point[][];
|
|
7
|
+
props: ShapeProps;
|
|
8
|
+
boundingBox: BoundingBox;
|
|
9
|
+
}
|
|
10
|
+
export default function collectShapesData(node: Node | string, defs: Defs, parentTransform?: number[], uiElementType?: UiElementType): ShapeData[];
|
|
11
|
+
//# sourceMappingURL=collectShapesData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectShapesData.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/collectShapesData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAA;AAU3D,OAAO,EAAO,IAAI,EAAW,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,KAAK,EAAa,UAAU,EAAE,MAAM,OAAO,CAAA;AAEpD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,KAAK,EAAE,EAAE,CAAA;IAChB,KAAK,EAAE,UAAU,CAAA;IACjB,WAAW,EAAE,WAAW,CAAA;CACzB;AAgGD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,IAAI,EAAE,IAAI,EACV,eAAe,GAAE,MAAM,EAAoB,EAC3C,aAAa,CAAC,EAAE,aAAa,GAC5B,SAAS,EAAE,CAuJb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;CAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createShapes.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/createShapes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,UAAU,EAAE,SAAS,EAAE,EACvB,IAAI,CAAC,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,aAAa,GAC5B,IAAI,CAoBN"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Node } from 'svg-parser';
|
|
2
|
+
import { Color, Point } from 'types';
|
|
3
|
+
export type DefStop = {
|
|
4
|
+
offset: number;
|
|
5
|
+
color: Color;
|
|
6
|
+
};
|
|
7
|
+
export type AttrValue = string | number | undefined;
|
|
8
|
+
export type Def = {
|
|
9
|
+
paths?: Point[][];
|
|
10
|
+
stops?: DefStop[];
|
|
11
|
+
href?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
type?: 'linear-gradient' | 'radial-gradient' | 'gaussian-blur';
|
|
14
|
+
gradientTransform?: number[];
|
|
15
|
+
stdDeviation?: [number, number];
|
|
16
|
+
x1?: AttrValue;
|
|
17
|
+
y1?: AttrValue;
|
|
18
|
+
x2?: AttrValue;
|
|
19
|
+
y2?: AttrValue;
|
|
20
|
+
'stop-color'?: AttrValue;
|
|
21
|
+
'stop-opacity'?: AttrValue;
|
|
22
|
+
offset?: AttrValue;
|
|
23
|
+
transform?: AttrValue;
|
|
24
|
+
fill?: AttrValue;
|
|
25
|
+
stroke?: AttrValue;
|
|
26
|
+
filter?: AttrValue;
|
|
27
|
+
opacity?: AttrValue;
|
|
28
|
+
'fill-opacity'?: AttrValue;
|
|
29
|
+
'stroke-width'?: AttrValue;
|
|
30
|
+
d?: never;
|
|
31
|
+
cx?: never;
|
|
32
|
+
cy?: never;
|
|
33
|
+
r?: never;
|
|
34
|
+
rx?: never;
|
|
35
|
+
ry?: never;
|
|
36
|
+
x?: never;
|
|
37
|
+
y?: never;
|
|
38
|
+
width?: never;
|
|
39
|
+
height?: never;
|
|
40
|
+
};
|
|
41
|
+
export type Defs = Record<string, Def>;
|
|
42
|
+
export declare function resolveAll(defs: Defs): void;
|
|
43
|
+
export declare function collect(node: Node | string, defs: Defs, insideDefs?: boolean): void;
|
|
44
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAGjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAEpC,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAKD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AAEnD,MAAM,MAAM,GAAG,GAAG;IAChB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,eAAe,CAAA;IAC9D,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,EAAE,CAAC,EAAE,SAAS,CAAA;IACd,EAAE,CAAC,EAAE,SAAS,CAAA;IACd,EAAE,CAAC,EAAE,SAAS,CAAA;IACd,EAAE,CAAC,EAAE,SAAS,CAAA;IACd,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,CAAC,CAAC,EAAE,KAAK,CAAA;IACT,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,CAAC,CAAC,EAAE,KAAK,CAAA;IACT,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,EAAE,CAAC,EAAE,KAAK,CAAA;IACV,CAAC,CAAC,EAAE,KAAK,CAAA;IACT,CAAC,CAAC,EAAE,KAAK,CAAA;IACT,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,MAAM,CAAC,EAAE,KAAK,CAAA;CACf,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEtC,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAQ3C;AAyBD,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,UAAQ,GAAG,IAAI,CA2CjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProps.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/getProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,WAAW,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAOnC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,GAAG,CAwFvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseEllipse.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/parseEllipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,KAAK,EAAE,CAyC5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePathData.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/parsePathData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AA+S7B,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE,CAKnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseRect.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/parseRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAG7B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,CAwB9F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Point } from 'types';
|
|
2
|
+
/**
|
|
3
|
+
* Get the distance and ratio between two points for radial gradient
|
|
4
|
+
* When shape's boundary has aspect ratio different than 1:1,
|
|
5
|
+
* then scale affect radial gradient angle calculations.
|
|
6
|
+
* Thats why this function exists to eliminate that effect.
|
|
7
|
+
* @param center center of the radius gradient
|
|
8
|
+
* @param vx horizontal radius - distance between center of the gradient and further point on horizontal line(after transforming by angle of radial gradient)
|
|
9
|
+
* @param vy vertical radius - distance between center of the gradient and further point on vertical line(after transforming by angle of radial gradient)
|
|
10
|
+
* @returns The horizontal destination point and the ratio to calculate vertical destination point
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCorrectDestinationRatio(center: Point, vx: Point, vy: Point): {
|
|
13
|
+
destination: Point;
|
|
14
|
+
ratio: number;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=radialGradient.d.ts.map
|