distark-render 1.2.1 → 1.2.3
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/assets/ElonRigValidated.json +396 -0
- package/assets/lizard.json +2472 -0
- package/assets/pig.json +1 -0
- package/dist/cli/fix.d.ts.map +1 -1
- package/dist/cli/fix.js +40 -10
- package/dist/cli/fix.js.map +1 -1
- package/dist/cli/validate.d.ts.map +1 -1
- package/dist/cli/validate.js +40 -1
- package/dist/cli/validate.js.map +1 -1
- package/dist/modules/characterValidator.d.ts +9 -2
- package/dist/modules/characterValidator.d.ts.map +1 -1
- package/dist/modules/characterValidator.js +118 -8
- package/dist/modules/characterValidator.js.map +1 -1
- package/dist/modules/imageLoad.d.ts.map +1 -1
- package/dist/modules/imageLoad.js +22 -4
- package/dist/modules/imageLoad.js.map +1 -1
- package/dist/modules/rigAssetFix.d.ts +2 -2
- package/dist/modules/rigAssetFix.d.ts.map +1 -1
- package/dist/modules/rigAssetFix.js +34 -5
- package/dist/modules/rigAssetFix.js.map +1 -1
- package/dist/modules/svgAssetAnalysis.d.ts +26 -1
- package/dist/modules/svgAssetAnalysis.d.ts.map +1 -1
- package/dist/modules/svgAssetAnalysis.js +126 -5
- package/dist/modules/svgAssetAnalysis.js.map +1 -1
- package/dist/modules/svgAssetFix.d.ts +7 -3
- package/dist/modules/svgAssetFix.d.ts.map +1 -1
- package/dist/modules/svgAssetFix.js +127 -18
- package/dist/modules/svgAssetFix.js.map +1 -1
- package/dist/modules/svgViewBox.d.ts +34 -5
- package/dist/modules/svgViewBox.d.ts.map +1 -1
- package/dist/modules/svgViewBox.js +133 -29
- package/dist/modules/svgViewBox.js.map +1 -1
- package/dist/tests/test-character-validator.js +6 -4
- package/dist/tests/test-character-validator.js.map +1 -1
- package/dist/tests/test-fix-visual-parity.d.ts +15 -0
- package/dist/tests/test-fix-visual-parity.d.ts.map +1 -0
- package/dist/tests/test-fix-visual-parity.js +398 -0
- package/dist/tests/test-fix-visual-parity.js.map +1 -0
- package/dist/tests/test-rig-standardization.js +18 -18
- package/dist/tests/test-svg-asset-fix.js +21 -21
- package/dist/tests/test-svg-asset-fix.js.map +1 -1
- package/package.json +126 -126
|
@@ -4,35 +4,35 @@
|
|
|
4
4
|
import { analyzeSvgAsset, extractSvgPaths, getContentBounds, getViewBoxContentCoverage, getVisiblePaths, parseViewBox, } from '../modules/svgAssetAnalysis.js';
|
|
5
5
|
import { fixSvgAsset } from '../modules/svgAssetFix.js';
|
|
6
6
|
import { assert, printSummary } from './helpers.js';
|
|
7
|
-
const GOOD_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="
|
|
8
|
-
<path d="M0 0 L100 0 L100 100 L0 100 Z" fill="#f00" stroke="#000" stroke-width="2"/>
|
|
7
|
+
const GOOD_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 102 102" width="102" height="102" preserveAspectRatio="none">
|
|
8
|
+
<path d="M0 0 L100 0 L100 100 L0 100 Z" fill="#f00" stroke="#000" stroke-width="2"/>
|
|
9
9
|
</svg>`;
|
|
10
|
-
const BROKEN_ARM_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="43.2mm" height="35.2mm" viewBox="0 0 43.2 35.2">
|
|
11
|
-
<path d="M0 0 L10 0 L10 10 Z" fill="#849835" display="none"/>
|
|
12
|
-
<path d="M5 148 L30 148 L25 179 L10 179 Z" fill="#888888" stroke="#000" stroke-width="1"/>
|
|
13
|
-
<image width="100" height="100" display="none" href="data:image/png;base64,iVBORw0KGgo="/>
|
|
10
|
+
const BROKEN_ARM_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="43.2mm" height="35.2mm" viewBox="0 0 43.2 35.2">
|
|
11
|
+
<path d="M0 0 L10 0 L10 10 Z" fill="#849835" display="none"/>
|
|
12
|
+
<path d="M5 148 L30 148 L25 179 L10 179 Z" fill="#888888" stroke="#000" stroke-width="1"/>
|
|
13
|
+
<image width="100" height="100" display="none" href="data:image/png;base64,iVBORw0KGgo="/>
|
|
14
14
|
</svg>`;
|
|
15
|
-
const SPLIT_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
|
16
|
-
<path d="M0 0 L100 0 L100 100 L0 100 Z" fill="#f00" stroke="none"/>
|
|
17
|
-
<path d="M0 0 L100 0 L100 100 L0 100 Z" fill="none" stroke="#000" stroke-width="2"/>
|
|
15
|
+
const SPLIT_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
|
16
|
+
<path d="M0 0 L100 0 L100 100 L0 100 Z" fill="#f00" stroke="none"/>
|
|
17
|
+
<path d="M0 0 L100 0 L100 100 L0 100 Z" fill="none" stroke="#000" stroke-width="2"/>
|
|
18
18
|
</svg>`;
|
|
19
|
-
const RECT_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
|
20
|
-
<rect x="0" y="0" width="100" height="100" fill="#f00" stroke="#000" stroke-width="2"/>
|
|
19
|
+
const RECT_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
|
20
|
+
<rect x="0" y="0" width="100" height="100" fill="#f00" stroke="#000" stroke-width="2"/>
|
|
21
21
|
</svg>`;
|
|
22
22
|
/** Inkscape artboard: path d in document space, translate() maps into 0 0 W H viewBox. */
|
|
23
|
-
const INKSCAPE_ARTBOARD_ARM_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="75.681358mm" height="85.18766mm" viewBox="0 0 75.68136 85.187662">
|
|
24
|
-
<path style="display:inline;fill:#305581;stroke:#000;stroke-width:0.6"
|
|
25
|
-
d="m 14.139507,91.906795 c -2.08,-0.13 -2.26,0.3 -3.3,4.27 -1.04,3.97 -2.95,11.47 -3.95,18.95 -1,7.48 -1.08,14.94 -1.17,20.62 -0.09,5.68 -0.17,9.59 -0.02,12.19 0.15,2.6 0.54,3.9 2.39,5.12 1.84,1.21 5.14,2.34 8.48,2.58 3.34,0.24 6.72,-0.41 8.91,-2.52 2.19,-2.1 3.19,-5.66 3.69,-8.18 0.5,-2.52 0.5,-3.99 0.33,-4.92 -0.17,-0.93 -0.52,-1.32 -0.87,-1.71 0.13,-2.78 0.26,-5.55 0.46,-8.76 0.2,-3.21 0.46,-6.85 0.74,-9.91 0.28,-3.06 0.59,-5.53 -0.35,-9.8 -0.93,-4.27 -3.1,-10.34 -6.18,-13.73 -3.08,-3.38 -7.07,-4.08 -9.15,-4.21 z"
|
|
26
|
-
transform="translate(-5.320321,-91.586796)" />
|
|
27
|
-
<image width="133.35001" height="239.18333" style="display:none" href="data:image/png;base64,iVBORw0KGgo=" />
|
|
23
|
+
const INKSCAPE_ARTBOARD_ARM_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="75.681358mm" height="85.18766mm" viewBox="0 0 75.68136 85.187662">
|
|
24
|
+
<path style="display:inline;fill:#305581;stroke:#000;stroke-width:0.6"
|
|
25
|
+
d="m 14.139507,91.906795 c -2.08,-0.13 -2.26,0.3 -3.3,4.27 -1.04,3.97 -2.95,11.47 -3.95,18.95 -1,7.48 -1.08,14.94 -1.17,20.62 -0.09,5.68 -0.17,9.59 -0.02,12.19 0.15,2.6 0.54,3.9 2.39,5.12 1.84,1.21 5.14,2.34 8.48,2.58 3.34,0.24 6.72,-0.41 8.91,-2.52 2.19,-2.1 3.19,-5.66 3.69,-8.18 0.5,-2.52 0.5,-3.99 0.33,-4.92 -0.17,-0.93 -0.52,-1.32 -0.87,-1.71 0.13,-2.78 0.26,-5.55 0.46,-8.76 0.2,-3.21 0.46,-6.85 0.74,-9.91 0.28,-3.06 0.59,-5.53 -0.35,-9.8 -0.93,-4.27 -3.1,-10.34 -6.18,-13.73 -3.08,-3.38 -7.07,-4.08 -9.15,-4.21 z"
|
|
26
|
+
transform="translate(-5.320321,-91.586796)" />
|
|
27
|
+
<image width="133.35001" height="239.18333" style="display:none" href="data:image/png;base64,iVBORw0KGgo=" />
|
|
28
28
|
</svg>`;
|
|
29
29
|
/** TankNew-style shared document canvas: small path on a large 425×723 artboard. */
|
|
30
|
-
const SHARED_CANVAS_ARM_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="425px" height="723px" viewBox="0 0 425 723" preserveAspectRatio="none">
|
|
31
|
-
<path fill="#7A8180" d="M 110 312 L 140 312 L 140 528 L 80 528 Z"/>
|
|
30
|
+
const SHARED_CANVAS_ARM_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="425px" height="723px" viewBox="0 0 425 723" preserveAspectRatio="none">
|
|
31
|
+
<path fill="#7A8180" d="M 110 312 L 140 312 L 140 528 L 80 528 Z"/>
|
|
32
32
|
</svg>`;
|
|
33
33
|
/** TankNew-style torso slice on a shared 425×723 document canvas. */
|
|
34
|
-
const SHARED_CANVAS_TORSO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="425px" height="723px" viewBox="0 0 425 723" preserveAspectRatio="none">
|
|
35
|
-
<path fill="#ccc" d="M -1 243 L 424 243 L 424 720 L 0 720 Z"/>
|
|
34
|
+
const SHARED_CANVAS_TORSO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="425px" height="723px" viewBox="0 0 425 723" preserveAspectRatio="none">
|
|
35
|
+
<path fill="#ccc" d="M -1 243 L 424 243 L 424 720 L 0 720 Z"/>
|
|
36
36
|
</svg>`;
|
|
37
37
|
async function main() {
|
|
38
38
|
console.log('SVG asset fix tests\n');
|
|
@@ -90,7 +90,7 @@ async function main() {
|
|
|
90
90
|
assert(sharedArmFixed.fixes.some(f => f.includes('viewBox')), 'shared canvas arm: viewBox trimmed');
|
|
91
91
|
const sharedTorsoFixed = fixSvgAsset(SHARED_CANVAS_TORSO_SVG);
|
|
92
92
|
assert(sharedTorsoFixed.fixes.some(f => f.includes('viewBox')), 'shared canvas torso: fit viewBox');
|
|
93
|
-
assert(sharedTorsoFixed.svg.includes('viewBox="-1 243 425 477"'), 'shared canvas torso: tight viewBox');
|
|
93
|
+
assert(sharedTorsoFixed.svg.includes('viewBox="-1 243 425 477"'), 'shared canvas torso: tight viewBox to visible content');
|
|
94
94
|
const sharedTorsoAfter = analyzeSvgAsset(sharedTorsoFixed.svg);
|
|
95
95
|
assert(sharedTorsoAfter.centeredTightViewBox, 'shared canvas torso: tight after fix');
|
|
96
96
|
printSummary();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-svg-asset-fix.js","sourceRoot":"","sources":["../../tests/test-svg-asset-fix.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACH,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,QAAQ,GAAG;;OAEV,CAAC;AAER,MAAM,cAAc,GAAG;;;;OAIhB,CAAC;AAER,MAAM,SAAS,GAAG;;;OAGX,CAAC;AAER,MAAM,QAAQ,GAAG;;OAEV,CAAC;AAER,0FAA0F;AAC1F,MAAM,yBAAyB,GAAG;;;;;OAK3B,CAAC;AAER,oFAAoF;AACpF,MAAM,qBAAqB,GAAG;;OAEvB,CAAC;AAER,qEAAqE;AACrE,MAAM,uBAAuB,GAAG;;OAEzB,CAAC;AAER,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAErC,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;IACrD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAExD,MAAM,YAAY,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC;IACrD,MAAM,CAAC,CAAC,YAAY,CAAC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ED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "distark-render",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Rendering-agnostic character rig system with TypeScript",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/modules/renderRig.js",
|
|
7
|
-
"types": "./dist/modules/renderRig.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/modules/renderRig.d.ts",
|
|
11
|
-
"import": "./dist/modules/renderRig.js"
|
|
12
|
-
},
|
|
13
|
-
"./imageLoad": {
|
|
14
|
-
"types": "./dist/modules/imageLoad.d.ts",
|
|
15
|
-
"import": "./dist/modules/imageLoad.js"
|
|
16
|
-
},
|
|
17
|
-
"./eyeSystem": {
|
|
18
|
-
"types": "./dist/modules/eyeSystem.d.ts",
|
|
19
|
-
"import": "./dist/modules/eyeSystem.js"
|
|
20
|
-
},
|
|
21
|
-
"./mouthSystem": {
|
|
22
|
-
"types": "./dist/modules/mouthSystem.d.ts",
|
|
23
|
-
"import": "./dist/modules/mouthSystem.js"
|
|
24
|
-
},
|
|
25
|
-
"./types": {
|
|
26
|
-
"types": "./dist/types.d.ts",
|
|
27
|
-
"import": "./dist/types.js"
|
|
28
|
-
},
|
|
29
|
-
"./p5": {
|
|
30
|
-
"types": "./dist/modules/adapters/p5Renderer.d.ts",
|
|
31
|
-
"import": "./dist/modules/adapters/p5Renderer.js"
|
|
32
|
-
},
|
|
33
|
-
"./skia": {
|
|
34
|
-
"types": "./dist/modules/adapters/skiaRenderer.d.ts",
|
|
35
|
-
"import": "./dist/modules/adapters/skiaRenderer.js"
|
|
36
|
-
},
|
|
37
|
-
"./characterValidator": {
|
|
38
|
-
"types": "./dist/modules/characterValidator.d.ts",
|
|
39
|
-
"import": "./dist/modules/characterValidator.js"
|
|
40
|
-
},
|
|
41
|
-
"./animationDiff": {
|
|
42
|
-
"types": "./dist/modules/animationDiff.d.ts",
|
|
43
|
-
"import": "./dist/modules/animationDiff.js"
|
|
44
|
-
},
|
|
45
|
-
"./browserSceneRenderer": {
|
|
46
|
-
"types": "./dist/modules/browserSceneRenderer.d.ts",
|
|
47
|
-
"import": "./dist/modules/browserSceneRenderer.js"
|
|
48
|
-
},
|
|
49
|
-
"./sceneRenderer": {
|
|
50
|
-
"types": "./dist/modules/sceneRenderer.d.ts",
|
|
51
|
-
"import": "./dist/modules/sceneRenderer.js"
|
|
52
|
-
},
|
|
53
|
-
"./worldOrder": {
|
|
54
|
-
"types": "./dist/modules/worldOrder.d.ts",
|
|
55
|
-
"import": "./dist/modules/worldOrder.js"
|
|
56
|
-
},
|
|
57
|
-
"./rasterDraw": {
|
|
58
|
-
"types": "./dist/modules/rasterDraw.d.ts",
|
|
59
|
-
"import": "./dist/modules/rasterDraw.js"
|
|
60
|
-
},
|
|
61
|
-
"./svgRasterPolicy": {
|
|
62
|
-
"types": "./dist/modules/svgRasterPolicy.d.ts",
|
|
63
|
-
"import": "./dist/modules/svgRasterPolicy.js"
|
|
64
|
-
},
|
|
65
|
-
"./svgRaster": {
|
|
66
|
-
"types": "./dist/modules/svgRaster.d.ts",
|
|
67
|
-
"import": "./dist/modules/svgRaster.js"
|
|
68
|
-
},
|
|
69
|
-
"./svgViewBox": {
|
|
70
|
-
"types": "./dist/modules/svgViewBox.d.ts",
|
|
71
|
-
"import": "./dist/modules/svgViewBox.js"
|
|
72
|
-
},
|
|
73
|
-
"./rigAssetFix": {
|
|
74
|
-
"types": "./dist/modules/rigAssetFix.d.ts",
|
|
75
|
-
"import": "./dist/modules/rigAssetFix.js"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"files": [
|
|
79
|
-
"dist/**/*",
|
|
80
|
-
"assets/**/*.json",
|
|
81
|
-
"README.md",
|
|
82
|
-
"LICENSE"
|
|
83
|
-
],
|
|
84
|
-
"bin": {
|
|
85
|
-
"distark-check": "./dist/cli/distark-check.js"
|
|
86
|
-
},
|
|
87
|
-
"scripts": {
|
|
88
|
-
"install-cli": "npm run build && printf '#!/bin/sh\\nexec node %s/dist/cli/distark-check.js \"$@\"\\n' $(pwd) > $HOME/bin/distark-check && chmod +x $HOME/bin/distark-check",
|
|
89
|
-
"build": "tsc",
|
|
90
|
-
"check": "node dist/cli/distark-check.js",
|
|
91
|
-
"test-cli": "npm run build && node dist/tests/test-cli.js",
|
|
92
|
-
"test-torso-pivot": "npm run build && node dist/tests/test-torso-pivot.js",
|
|
93
|
-
"watch": "tsc --watch",
|
|
94
|
-
"dev": "tsc --watch & http-server -p 8080",
|
|
95
|
-
"clean": "rm -rf dist",
|
|
96
|
-
"serve": "http-server -p 8080",
|
|
97
|
-
"test": "npm run build && for f in dist/tests/test-*.js; do echo \"\\n>>> $f\" && node \"$f\" || exit 1; done",
|
|
98
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
99
|
-
},
|
|
100
|
-
"keywords": [
|
|
101
|
-
"character",
|
|
102
|
-
"rig",
|
|
103
|
-
"animation",
|
|
104
|
-
"canvas",
|
|
105
|
-
"rendering",
|
|
106
|
-
"2d"
|
|
107
|
-
],
|
|
108
|
-
"author": "liaokira",
|
|
109
|
-
"license": "MIT",
|
|
110
|
-
"devDependencies": {
|
|
111
|
-
"@types/node": "^25.2.0",
|
|
112
|
-
"playwright": "^1.58.2",
|
|
113
|
-
"typescript": "^5.3.3"
|
|
114
|
-
},
|
|
115
|
-
"optionalDependencies": {
|
|
116
|
-
"skia-canvas": "^3.0.8"
|
|
117
|
-
},
|
|
118
|
-
"repository": {
|
|
119
|
-
"type": "git",
|
|
120
|
-
"url": "git+https://github.com/jtoy/distark_render.git"
|
|
121
|
-
},
|
|
122
|
-
"bugs": {
|
|
123
|
-
"url": "https://github.com/jtoy/distark_render/issues"
|
|
124
|
-
},
|
|
125
|
-
"homepage": "https://github.com/jtoy/distark_render#readme"
|
|
126
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "distark-render",
|
|
3
|
+
"version": "1.2.3",
|
|
4
|
+
"description": "Rendering-agnostic character rig system with TypeScript",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/modules/renderRig.js",
|
|
7
|
+
"types": "./dist/modules/renderRig.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/modules/renderRig.d.ts",
|
|
11
|
+
"import": "./dist/modules/renderRig.js"
|
|
12
|
+
},
|
|
13
|
+
"./imageLoad": {
|
|
14
|
+
"types": "./dist/modules/imageLoad.d.ts",
|
|
15
|
+
"import": "./dist/modules/imageLoad.js"
|
|
16
|
+
},
|
|
17
|
+
"./eyeSystem": {
|
|
18
|
+
"types": "./dist/modules/eyeSystem.d.ts",
|
|
19
|
+
"import": "./dist/modules/eyeSystem.js"
|
|
20
|
+
},
|
|
21
|
+
"./mouthSystem": {
|
|
22
|
+
"types": "./dist/modules/mouthSystem.d.ts",
|
|
23
|
+
"import": "./dist/modules/mouthSystem.js"
|
|
24
|
+
},
|
|
25
|
+
"./types": {
|
|
26
|
+
"types": "./dist/types.d.ts",
|
|
27
|
+
"import": "./dist/types.js"
|
|
28
|
+
},
|
|
29
|
+
"./p5": {
|
|
30
|
+
"types": "./dist/modules/adapters/p5Renderer.d.ts",
|
|
31
|
+
"import": "./dist/modules/adapters/p5Renderer.js"
|
|
32
|
+
},
|
|
33
|
+
"./skia": {
|
|
34
|
+
"types": "./dist/modules/adapters/skiaRenderer.d.ts",
|
|
35
|
+
"import": "./dist/modules/adapters/skiaRenderer.js"
|
|
36
|
+
},
|
|
37
|
+
"./characterValidator": {
|
|
38
|
+
"types": "./dist/modules/characterValidator.d.ts",
|
|
39
|
+
"import": "./dist/modules/characterValidator.js"
|
|
40
|
+
},
|
|
41
|
+
"./animationDiff": {
|
|
42
|
+
"types": "./dist/modules/animationDiff.d.ts",
|
|
43
|
+
"import": "./dist/modules/animationDiff.js"
|
|
44
|
+
},
|
|
45
|
+
"./browserSceneRenderer": {
|
|
46
|
+
"types": "./dist/modules/browserSceneRenderer.d.ts",
|
|
47
|
+
"import": "./dist/modules/browserSceneRenderer.js"
|
|
48
|
+
},
|
|
49
|
+
"./sceneRenderer": {
|
|
50
|
+
"types": "./dist/modules/sceneRenderer.d.ts",
|
|
51
|
+
"import": "./dist/modules/sceneRenderer.js"
|
|
52
|
+
},
|
|
53
|
+
"./worldOrder": {
|
|
54
|
+
"types": "./dist/modules/worldOrder.d.ts",
|
|
55
|
+
"import": "./dist/modules/worldOrder.js"
|
|
56
|
+
},
|
|
57
|
+
"./rasterDraw": {
|
|
58
|
+
"types": "./dist/modules/rasterDraw.d.ts",
|
|
59
|
+
"import": "./dist/modules/rasterDraw.js"
|
|
60
|
+
},
|
|
61
|
+
"./svgRasterPolicy": {
|
|
62
|
+
"types": "./dist/modules/svgRasterPolicy.d.ts",
|
|
63
|
+
"import": "./dist/modules/svgRasterPolicy.js"
|
|
64
|
+
},
|
|
65
|
+
"./svgRaster": {
|
|
66
|
+
"types": "./dist/modules/svgRaster.d.ts",
|
|
67
|
+
"import": "./dist/modules/svgRaster.js"
|
|
68
|
+
},
|
|
69
|
+
"./svgViewBox": {
|
|
70
|
+
"types": "./dist/modules/svgViewBox.d.ts",
|
|
71
|
+
"import": "./dist/modules/svgViewBox.js"
|
|
72
|
+
},
|
|
73
|
+
"./rigAssetFix": {
|
|
74
|
+
"types": "./dist/modules/rigAssetFix.d.ts",
|
|
75
|
+
"import": "./dist/modules/rigAssetFix.js"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"files": [
|
|
79
|
+
"dist/**/*",
|
|
80
|
+
"assets/**/*.json",
|
|
81
|
+
"README.md",
|
|
82
|
+
"LICENSE"
|
|
83
|
+
],
|
|
84
|
+
"bin": {
|
|
85
|
+
"distark-check": "./dist/cli/distark-check.js"
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"install-cli": "npm run build && printf '#!/bin/sh\\nexec node %s/dist/cli/distark-check.js \"$@\"\\n' $(pwd) > $HOME/bin/distark-check && chmod +x $HOME/bin/distark-check",
|
|
89
|
+
"build": "tsc",
|
|
90
|
+
"check": "node dist/cli/distark-check.js",
|
|
91
|
+
"test-cli": "npm run build && node dist/tests/test-cli.js",
|
|
92
|
+
"test-torso-pivot": "npm run build && node dist/tests/test-torso-pivot.js",
|
|
93
|
+
"watch": "tsc --watch",
|
|
94
|
+
"dev": "tsc --watch & http-server -p 8080",
|
|
95
|
+
"clean": "rm -rf dist",
|
|
96
|
+
"serve": "http-server -p 8080",
|
|
97
|
+
"test": "npm run build && for f in dist/tests/test-*.js; do echo \"\\n>>> $f\" && node \"$f\" || exit 1; done",
|
|
98
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
99
|
+
},
|
|
100
|
+
"keywords": [
|
|
101
|
+
"character",
|
|
102
|
+
"rig",
|
|
103
|
+
"animation",
|
|
104
|
+
"canvas",
|
|
105
|
+
"rendering",
|
|
106
|
+
"2d"
|
|
107
|
+
],
|
|
108
|
+
"author": "liaokira",
|
|
109
|
+
"license": "MIT",
|
|
110
|
+
"devDependencies": {
|
|
111
|
+
"@types/node": "^25.2.0",
|
|
112
|
+
"playwright": "^1.58.2",
|
|
113
|
+
"typescript": "^5.3.3"
|
|
114
|
+
},
|
|
115
|
+
"optionalDependencies": {
|
|
116
|
+
"skia-canvas": "^3.0.8"
|
|
117
|
+
},
|
|
118
|
+
"repository": {
|
|
119
|
+
"type": "git",
|
|
120
|
+
"url": "git+https://github.com/jtoy/distark_render.git"
|
|
121
|
+
},
|
|
122
|
+
"bugs": {
|
|
123
|
+
"url": "https://github.com/jtoy/distark_render/issues"
|
|
124
|
+
},
|
|
125
|
+
"homepage": "https://github.com/jtoy/distark_render#readme"
|
|
126
|
+
}
|