@mateuszjs/magic-render 0.1.0-next.7 → 0.1.0-next.70
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 +29 -0
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/types/WebGPU/TimingHelper.d.ts +14 -0
- package/lib/types/WebGPU/TimingHelper.d.ts.map +1 -0
- package/lib/types/WebGPU/canvasSizeObserver.d.ts.map +1 -0
- package/lib/types/WebGPU/device.d.ts +5 -0
- package/lib/types/WebGPU/device.d.ts.map +1 -0
- package/lib/types/WebGPU/generatePreview.d.ts +2 -0
- package/lib/types/WebGPU/generatePreview.d.ts.map +1 -0
- package/lib/types/WebGPU/getTexture/createCheckedImageData.d.ts.map +1 -0
- package/lib/types/WebGPU/getTexture/generateMimapsArray.d.ts.map +1 -0
- package/lib/types/WebGPU/getTexture/index.d.ts +14 -0
- package/lib/types/WebGPU/getTexture/index.d.ts.map +1 -0
- package/lib/types/WebGPU/m3.d.ts.map +1 -0
- package/lib/types/{src/WebGPU → WebGPU}/pick.d.ts +1 -2
- package/lib/types/WebGPU/pick.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/blur/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/blur/getProgram.d.ts.map +1 -0
- 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/computeShape/workers-deprecated/createWorker.d.ts +4 -0
- package/lib/types/WebGPU/programs/computeShape/workers-deprecated/createWorker.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/computeShape/workers-deprecated/worker.d.ts +2 -0
- package/lib/types/WebGPU/programs/computeShape/workers-deprecated/worker.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 +2 -0
- package/lib/types/WebGPU/programs/drawTexture/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/drawTriangle/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/drawTriangle/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/initPrograms.d.ts +32 -0
- package/lib/types/WebGPU/programs/initPrograms.d.ts.map +1 -0
- 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 +2 -0
- package/lib/types/WebGPU/programs/pickTexture/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/programs/pickTriangle/getProgram.d.ts +2 -0
- package/lib/types/WebGPU/programs/pickTriangle/getProgram.d.ts.map +1 -0
- package/lib/types/WebGPU/textureCache.d.ts +4 -0
- package/lib/types/WebGPU/textureCache.d.ts.map +1 -0
- package/lib/types/consts.d.ts +2 -0
- package/lib/types/consts.d.ts.map +1 -0
- package/lib/types/customPrograms.d.ts +16 -0
- package/lib/types/customPrograms.d.ts.map +1 -0
- package/lib/types/fonts.d.ts +6 -0
- package/lib/types/fonts.d.ts.map +1 -0
- package/lib/types/getCanvasMatrix.d.ts +2 -0
- package/lib/types/getCanvasMatrix.d.ts.map +1 -0
- package/lib/types/{src/getCanvasRenderDescriptor.d.ts → getCanvasRenderDescriptor.d.ts} +1 -0
- package/lib/types/getCanvasRenderDescriptor.d.ts.map +1 -0
- package/lib/types/{src/getDepthTexture.d.ts → getDepthTexture.d.ts} +1 -0
- package/lib/types/getDepthTexture.d.ts.map +1 -0
- 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 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/loadingTexture.d.ts +3 -0
- package/lib/types/loadingTexture.d.ts.map +1 -0
- package/lib/types/pointer.d.ts +17 -0
- package/lib/types/pointer.d.ts.map +1 -0
- package/lib/types/run.d.ts +6 -0
- package/lib/types/run.d.ts.map +1 -0
- package/lib/types/snapshots/convert.d.ts +8 -0
- package/lib/types/snapshots/convert.d.ts.map +1 -0
- package/lib/types/snapshots/fill.d.ts +4 -0
- package/lib/types/snapshots/fill.d.ts.map +1 -0
- package/lib/types/snapshots/snapshots.d.ts +6 -0
- package/lib/types/snapshots/snapshots.d.ts.map +1 -0
- package/lib/types/snapshots/toZigAsset.d.ts +3 -0
- package/lib/types/snapshots/toZigAsset.d.ts.map +1 -0
- package/lib/types/svgToShapes/addUiElement.d.ts +3 -0
- package/lib/types/svgToShapes/addUiElement.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 +12 -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/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/getShapesAssets.d.ts +5 -0
- package/lib/types/svgToShapes/getShapesAssets.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 +29 -0
- package/lib/types/textures.d.ts.map +1 -0
- package/lib/types/types.d.ts +181 -0
- package/lib/types/types.d.ts.map +1 -0
- package/lib/types/typing.d.ts +7 -0
- package/lib/types/typing.d.ts.map +1 -0
- package/lib/types/utils/assertUnreachable.d.ts +2 -0
- package/lib/types/utils/assertUnreachable.d.ts.map +1 -0
- package/lib/types/utils/atNormIndex.d.ts.map +1 -0
- package/lib/types/utils/captureCanvasStream.d.ts.map +1 -0
- package/lib/types/utils/captureCanvasStreamWasm.d.ts.map +1 -0
- package/lib/types/utils/clamp.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/decompressWoff2.d.mts +3 -0
- package/lib/types/utils/decompressWoff2.d.mts.map +1 -0
- package/lib/types/{src/utils → utils}/distancePointToLine.d.ts +1 -0
- package/lib/types/utils/distancePointToLine.d.ts.map +1 -0
- package/lib/types/utils/downloadCanvas.d.ts +2 -0
- package/lib/types/utils/downloadCanvas.d.ts.map +1 -0
- package/lib/types/utils/fitCurve.d.ts.map +1 -0
- package/lib/types/utils/getAngle.d.ts +3 -0
- package/lib/types/utils/getAngle.d.ts.map +1 -0
- package/lib/types/utils/getAngleDiff.d.ts.map +1 -0
- package/lib/types/{src/utils → utils}/getBezierPos.d.ts +1 -0
- package/lib/types/utils/getBezierPos.d.ts.map +1 -0
- package/lib/types/{src/utils → utils}/getBezierTan.d.ts +1 -0
- package/lib/types/utils/getBezierTan.d.ts.map +1 -0
- package/lib/types/{src/utils → utils}/getCurveLength.d.ts +1 -0
- package/lib/types/utils/getCurveLength.d.ts.map +1 -0
- package/lib/types/utils/getDefaultPoints.d.ts +3 -0
- package/lib/types/utils/getDefaultPoints.d.ts.map +1 -0
- package/lib/types/utils/getDistance.d.ts +3 -0
- package/lib/types/utils/getDistance.d.ts.map +1 -0
- package/lib/types/utils/mat4.d.ts.map +1 -0
- package/lib/types/utils/normalizeVec2.d.ts +3 -0
- package/lib/types/utils/normalizeVec2.d.ts.map +1 -0
- package/lib/types/utils/resizeArray.d.ts.map +1 -0
- package/lib/types/utils/setCamera.d.ts +2 -0
- package/lib/types/utils/setCamera.d.ts.map +1 -0
- package/lib/types/utils/throttle.d.ts +2 -0
- package/lib/types/utils/throttle.d.ts.map +1 -0
- package/lib/types/utils/vec3.d.ts.map +1 -0
- package/lib/types.mjs +2 -0
- package/lib/types.mjs.map +1 -0
- package/package.json +34 -15
- package/lib/e9072ac5eb734c67.png +0 -0
- package/lib/types/src/WebGPU/canvasSizeObserver.d.ts.map +0 -1
- package/lib/types/src/WebGPU/getDevice.d.ts +0 -2
- package/lib/types/src/WebGPU/getDevice.d.ts.map +0 -1
- package/lib/types/src/WebGPU/getTexture/createCheckedImageData.d.ts.map +0 -1
- package/lib/types/src/WebGPU/getTexture/generateMimapsArray.d.ts.map +0 -1
- package/lib/types/src/WebGPU/getTexture/index.d.ts +0 -17
- package/lib/types/src/WebGPU/getTexture/index.d.ts.map +0 -1
- package/lib/types/src/WebGPU/m3.d.ts.map +0 -1
- package/lib/types/src/WebGPU/pick.d.ts.map +0 -1
- package/lib/types/src/WebGPU/pointer.d.ts +0 -10
- package/lib/types/src/WebGPU/pointer.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/blur/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/blur/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/draw/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/draw/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/draw3dModel/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/draw3dModel/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/draw3dModelLight/getProgram.d.ts +0 -9
- package/lib/types/src/WebGPU/programs/draw3dModelLight/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/draw3dModelTexture/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/draw3dModelTexture/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/drawBezier/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/drawBezier/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/initPrograms.d.ts +0 -22
- package/lib/types/src/WebGPU/programs/initPrograms.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/pickTexture/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/pickTexture/getProgram.d.ts.map +0 -1
- package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts +0 -2
- package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts.map +0 -1
- package/lib/types/src/__test__/index.test.d.ts +0 -1
- package/lib/types/src/__test__/index.test.d.ts.map +0 -1
- package/lib/types/src/consts.d.ts +0 -16
- package/lib/types/src/consts.d.ts.map +0 -1
- package/lib/types/src/getCanvasMatrix.d.ts +0 -2
- package/lib/types/src/getCanvasMatrix.d.ts.map +0 -1
- package/lib/types/src/getCanvasRenderDescriptor.d.ts.map +0 -1
- package/lib/types/src/getDepthTexture.d.ts.map +0 -1
- package/lib/types/src/getMultisampleTexture.d.ts +0 -2
- package/lib/types/src/getMultisampleTexture.d.ts.map +0 -1
- package/lib/types/src/getRenderDescriptor.d.ts.map +0 -1
- package/lib/types/src/index.d.ts +0 -14
- package/lib/types/src/index.d.ts.map +0 -1
- package/lib/types/src/models/Video/MiniatureVideo.d.ts +0 -30
- package/lib/types/src/models/Video/MiniatureVideo.d.ts.map +0 -1
- package/lib/types/src/run.d.ts +0 -5
- package/lib/types/src/run.d.ts.map +0 -1
- package/lib/types/src/types.d.ts +0 -4
- package/lib/types/src/types.d.ts.map +0 -1
- package/lib/types/src/utils/atNormIndex.d.ts.map +0 -1
- package/lib/types/src/utils/captureCanvasStream.d.ts.map +0 -1
- package/lib/types/src/utils/captureCanvasStreamWasm.d.ts.map +0 -1
- package/lib/types/src/utils/clamp.d.ts.map +0 -1
- package/lib/types/src/utils/distancePointToLine.d.ts.map +0 -1
- package/lib/types/src/utils/fitCurve.d.ts.map +0 -1
- package/lib/types/src/utils/getAngle.d.ts +0 -2
- package/lib/types/src/utils/getAngle.d.ts.map +0 -1
- package/lib/types/src/utils/getAngleDiff.d.ts.map +0 -1
- package/lib/types/src/utils/getBezierPos.d.ts.map +0 -1
- package/lib/types/src/utils/getBezierTan.d.ts.map +0 -1
- package/lib/types/src/utils/getCurveLength.d.ts.map +0 -1
- package/lib/types/src/utils/getDefaultPoints.d.ts +0 -2
- package/lib/types/src/utils/getDefaultPoints.d.ts.map +0 -1
- package/lib/types/src/utils/getDistance.d.ts +0 -2
- package/lib/types/src/utils/getDistance.d.ts.map +0 -1
- package/lib/types/src/utils/getSvgSource.d.ts +0 -2
- package/lib/types/src/utils/getSvgSource.d.ts.map +0 -1
- package/lib/types/src/utils/mat4.d.ts.map +0 -1
- package/lib/types/src/utils/normalizeVec2.d.ts +0 -2
- package/lib/types/src/utils/normalizeVec2.d.ts.map +0 -1
- package/lib/types/src/utils/resizeArray.d.ts.map +0 -1
- package/lib/types/src/utils/vec3.d.ts.map +0 -1
- /package/lib/types/{src/WebGPU → WebGPU}/canvasSizeObserver.d.ts +0 -0
- /package/lib/types/{src/WebGPU → WebGPU}/getTexture/createCheckedImageData.d.ts +0 -0
- /package/lib/types/{src/WebGPU → WebGPU}/getTexture/generateMimapsArray.d.ts +0 -0
- /package/lib/types/{src/WebGPU → WebGPU}/m3.d.ts +0 -0
- /package/lib/types/{src/getRenderDescriptor.d.ts → getRenderDescriptor.d.ts} +0 -0
- /package/lib/types/{src/utils → utils}/atNormIndex.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/captureCanvasStream.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/captureCanvasStreamWasm.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/clamp.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/fitCurve.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/getAngleDiff.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/mat4.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/resizeArray.d.ts +0 -0
- /package/lib/types/{src/utils → utils}/vec3.d.ts +0 -0
package/README.md
CHANGED
|
@@ -17,3 +17,32 @@ Each Pull Request has to be merged with squash, the following naming convention
|
|
|
17
17
|
| `fix(pencil): stop graphite breaking when too much pressure applied` | patch/fix |
|
|
18
18
|
| `feat(pencil): add 'graphiteWidth' option` | minor/feature |
|
|
19
19
|
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | major/breaking release <br /> (Note that the `BREAKING CHANGE: ` token must be in the footer of the commit) |
|
|
20
|
+
|
|
21
|
+
## Testing locally:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm link
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Creates link in global registry on your machine.
|
|
28
|
+
|
|
29
|
+
Then call
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm link @mateuszjs/magic-render
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
In the repo where you want to put local version of the package.
|
|
36
|
+
Remember to build package to see an update!
|
|
37
|
+
|
|
38
|
+
# Glossary
|
|
39
|
+
|
|
40
|
+
## Units:
|
|
41
|
+
|
|
42
|
+
viewport - value expressed in pixels which will be rendered on the screen. This is exavtly how many pixels will be rendered, already includes retina. It's device physical pixel, not CSS pixel.
|
|
43
|
+
|
|
44
|
+
world - values expressed in abstract units used in project. This unit is absolute, never changes, does not depend on anything. This is how all sizes of all assets and assets' properties are kept expressed.
|
|
45
|
+
|
|
46
|
+
texel - value expressed in texels, ususally in SDF texture texels. It corresponds to how many texels will be used in the SDF texture.
|
|
47
|
+
|
|
48
|
+
Often when no unit is used, value is expressed in world coordinates OR the unit is obvious from the function context.
|