mxdraw 0.1.105 → 0.1.106
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/dist/index.d.ts +3802 -0
- package/dist/{types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts → lib/MxModule/McEdGetPointWorldDrawObject/index.d.ts} +0 -0
- package/dist/lib/MxModule/McEdGetPointWorldDrawObject/index.js +1 -1
- package/dist/{types/MxModule/McGePoint3d/McGePoint3d.d.ts → lib/MxModule/McGePoint3d/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGePoint3d/index.js +1 -1
- package/dist/{types/MxModule/McGePoint3dArray/McGePoint3dArray.d.ts → lib/MxModule/McGePoint3dArray/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGePoint3dArray/index.js +1 -1
- package/dist/{types/MxModule/McGeTool/McGeTool.d.ts → lib/MxModule/McGeTool/index.d.ts} +3 -2
- package/dist/lib/MxModule/McGeTool/index.js +1 -1
- package/dist/{types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts → lib/MxModule/McGiWorldDraw/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGiWorldDraw/index.js +1 -1
- package/dist/{types/MxModule/McGiWorldDrawType/McGiWorldDrawType.d.ts → lib/MxModule/McGiWorldDrawType/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGiWorldDrawType/index.js +1 -1
- package/dist/{types/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.d.ts → lib/MxModule/MrxDbgUiPrBaseReturn/index.d.ts} +0 -0
- package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/index.js +1 -1
- package/dist/{types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts → lib/MxModule/MrxDbgUiPrPoint/index.d.ts} +2 -1
- package/dist/lib/MxModule/MrxDbgUiPrPoint/index.js +1 -1
- package/dist/{types/MxModule/MrxDbgUtils/MrxDbgUtils.d.ts → lib/MxModule/MrxDbgUtils/index.d.ts} +3 -2
- package/dist/lib/MxModule/MrxDbgUtils/index.js +1 -1
- package/dist/{types/MxModule/Mx3PointArc/Mx3PointArc.d.ts → lib/MxModule/Mx3PointArc/index.d.ts} +5 -6
- package/dist/lib/MxModule/Mx3PointArc/index.js +1 -1
- package/dist/{types/MxModule/MxCADObject/MxCADObject.d.ts → lib/MxModule/MxCADObject/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxCADObject/index.js +1 -1
- package/dist/{types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts → lib/MxModule/MxDb2LineAngularDimension/index.d.ts} +2 -4
- package/dist/lib/MxModule/MxDb2LineAngularDimension/index.js +1 -1
- package/dist/{types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts → lib/MxModule/MxDbAlignedDimension/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbAlignedDimension/index.js +1 -1
- package/dist/{types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts → lib/MxModule/MxDbAnyLine/index.d.ts} +4 -5
- package/dist/lib/MxModule/MxDbAnyLine/index.js +1 -1
- package/dist/{types/MxModule/MxDbArea/MxDbArea.d.ts → lib/MxModule/MxDbArea/index.d.ts} +1 -3
- package/dist/lib/MxModule/MxDbArea/index.js +1 -1
- package/dist/{types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts → lib/MxModule/MxDbCloudLine/index.d.ts} +4 -5
- package/dist/lib/MxModule/MxDbCloudLine/index.js +1 -1
- package/dist/{types/MxModule/MxDbCoord/MxDbCoord.d.ts → lib/MxModule/MxDbCoord/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbCoord/index.js +1 -1
- package/dist/{types/MxModule/MxDbDatabase/MxDbDatabase.d.ts → lib/MxModule/MxDbDatabase/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxDbDatabase/index.js +1 -1
- package/dist/{types/MxModule/MxDbEllipse/MxDbEllipse.d.ts → lib/MxModule/MxDbEllipse/index.d.ts} +4 -5
- package/dist/lib/MxModule/MxDbEllipse/index.js +1 -1
- package/dist/{types/MxModule/MxDbEntity/MxDbEntity.d.ts → lib/MxModule/MxDbEntity/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbEntity/index.js +1 -1
- package/dist/{types/MxModule/MxDbGroup/MxDbGroup.d.ts → lib/MxModule/MxDbGroup/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxDbGroup/index.js +1 -1
- package/dist/{types/MxModule/MxDbHatch/MxDbHatch.d.ts → lib/MxModule/MxDbHatch/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbHatch/index.js +1 -1
- package/dist/{types/MxModule/MxDbImage/MxDbImage.d.ts → lib/MxModule/MxDbImage/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbImage/index.js +1 -1
- package/dist/{types/MxModule/MxDbLayerTableRecord/MxDbLayerTableRecord.d.ts → lib/MxModule/MxDbLayerTableRecord/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxDbLayerTableRecord/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +0 -0
- package/dist/lib/MxModule/MxDbLeadComment/MxDbLeadComment.js +1 -1
- package/dist/lib/MxModule/MxDbLeadComment/index.d.ts +24 -0
- package/dist/lib/MxModule/MxDbLeadComment/index.js +1 -1
- package/dist/{types/MxModule/MxDbLeadTag/MxDbLeadTag.d.ts → lib/MxModule/MxDbLeadTag/index.d.ts} +1 -2
- package/dist/lib/MxModule/MxDbLeadTag/index.js +1 -1
- package/dist/{types/MxModule/MxDbLine/MxDbLine.d.ts → lib/MxModule/MxDbLine/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbLine/index.js +1 -1
- package/dist/{types/MxModule/MxDbPolyline/MxDbPolyline.d.ts → lib/MxModule/MxDbPolyline/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbPolyline/index.js +1 -1
- package/dist/{types/MxModule/MxDbRect/MxDbRect.d.ts → lib/MxModule/MxDbRect/index.d.ts} +5 -6
- package/dist/lib/MxModule/MxDbRect/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +0 -2
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -1
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/index.d.ts +26 -0
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +4 -5
- package/dist/lib/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.js +1 -1
- package/dist/lib/MxModule/MxDbRegularPolygon/index.d.ts +20 -0
- package/dist/lib/MxModule/MxDbRegularPolygon/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbSVG/MxDbSVG.d.ts +0 -1
- package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +1 -1
- package/dist/lib/MxModule/MxDbSVG/index.d.ts +92 -0
- package/dist/lib/MxModule/MxDbSVG/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbSVGText/MxDbSVGText.d.ts +0 -1
- package/dist/lib/MxModule/MxDbSVGText/MxDbSVGText.js +1 -1
- package/dist/lib/MxModule/MxDbSVGText/index.d.ts +18 -0
- package/dist/lib/MxModule/MxDbSVGText/index.js +1 -1
- package/dist/{types/MxModule/MxDbText/MxDbText.d.ts → lib/MxModule/MxDbText/index.d.ts} +3 -4
- package/dist/lib/MxModule/MxDbText/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDrawObject/MxDrawObject.d.ts +0 -0
- package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +1 -1
- package/dist/lib/MxModule/MxDrawObject/index.d.ts +822 -0
- package/dist/lib/MxModule/MxDrawObject/index.js +1 -1
- package/dist/{types/MxModule/MxFilters/MxFilters.d.ts → lib/MxModule/MxFilters/index.d.ts} +3 -4
- package/dist/lib/MxModule/MxFilters/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxFun/MxFun.d.ts +3 -3
- package/dist/lib/MxModule/MxFun/MxFun.js +1 -1
- package/dist/lib/MxModule/MxFun/index.d.ts +592 -0
- package/dist/lib/MxModule/MxFun/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxThreeJS/MxThreeJS.d.ts +10 -11
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +1 -1
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.d.ts +2 -0
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +1 -1
- package/dist/lib/MxModule/MxThreeJS/index.d.ts +3 -0
- package/dist/lib/MxModule/MxThreeJS/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxType/MxType.d.ts +0 -0
- package/dist/lib/MxModule/MxType/MxType.js +1 -1
- package/dist/lib/MxModule/MxType/index.d.ts +44 -0
- package/dist/lib/MxModule/MxType/index.js +1 -1
- package/dist/{types/MxModule/Mxassembly/Mxassembly.d.ts → lib/MxModule/Mxassembly/index.d.ts} +9 -7
- package/dist/lib/MxModule/Mxassembly/index.js +1 -1
- package/dist/{types/MxModule/loadCoreCode/loadCoreCode.d.ts → lib/MxModule/loadCoreCode/index.d.ts} +0 -0
- package/dist/lib/MxModule/loadCoreCode/index.js +1 -1
- package/dist/{types → lib}/MxModule/loadCoreCode/mxUiData.d.ts +2 -2
- package/dist/lib/MxModule/loadCoreCode/mxUiData.js +1 -1
- package/dist/{types → lib}/MxModule/loadCoreCode/mxcadassembly_es5.d.ts +0 -0
- package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1 -1
- package/dist/{types → lib}/MxModule/loadCoreCode/mxfun.es5.d.ts +0 -0
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/{types → lib}/MxModule/store/PubsubClass.d.ts +0 -0
- package/dist/lib/MxModule/store/PubsubClass.js +1 -1
- package/dist/{types → lib}/MxModule/store/StoreClass.d.ts +1 -1
- package/dist/lib/MxModule/store/StoreClass.js +1 -1
- package/dist/{types → lib}/MxModule/store/index.d.ts +0 -0
- package/dist/lib/MxModule/store/index.js +1 -1
- package/dist/{types → lib}/MxModule/store/store.d.ts +4 -4
- package/dist/lib/MxModule/store/store.js +1 -1
- package/dist/{types/MxModule/useCanvasResizeListener/useCanvasResizeListener.d.ts → lib/MxModule/useCanvasResizeListener/index.d.ts} +2 -2
- package/dist/lib/MxModule/useCanvasResizeListener/index.js +1 -1
- package/dist/{types → lib}/doc.d.ts +1 -1
- package/dist/lib/doc.js +1 -1
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/mxdraw.d.ts +43 -0
- package/dist/lib/mxdraw.js +1 -1
- package/dist/{types → lib}/tools/algorithm/math.d.ts +0 -0
- package/dist/lib/tools/algorithm/math.js +1 -1
- package/dist/{types → lib}/tools/algorithm/random.d.ts +0 -0
- package/dist/lib/tools/algorithm/random.js +1 -1
- package/dist/{types → lib}/tools/dom/create.d.ts +0 -0
- package/dist/lib/tools/dom/create.js +1 -1
- package/dist/{types → lib}/tools/dynamicImport/index.d.ts +0 -0
- package/dist/lib/tools/dynamicImport/index.js +1 -1
- package/dist/{types → lib}/tools/formatting/index.d.ts +0 -0
- package/dist/lib/tools/formatting/index.js +1 -1
- package/dist/{types → lib}/tools/proxy/index.d.ts +0 -0
- package/dist/lib/tools/proxy/index.js +1 -1
- package/dist/{types → lib}/tools/three/index.d.ts +14 -15
- package/dist/lib/tools/three/index.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/package.json +16 -10
- package/dist/lib/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js +0 -1
- package/dist/lib/MxModule/McGePoint3d/McGePoint3d.js +0 -1
- package/dist/lib/MxModule/McGePoint3dArray/McGePoint3dArray.js +0 -1
- package/dist/lib/MxModule/McGeTool/McGeTool.js +0 -1
- package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js +0 -1
- package/dist/lib/MxModule/McGiWorldDrawType/McGiWorldDrawType.js +0 -1
- package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.js +0 -1
- package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +0 -1
- package/dist/lib/MxModule/MrxDbgUtils/MrxDbgUtils.js +0 -1
- package/dist/lib/MxModule/Mx3PointArc/Mx3PointArc.js +0 -1
- package/dist/lib/MxModule/MxCADObject/MxCADObject.js +0 -1
- package/dist/lib/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.js +0 -1
- package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +0 -1
- package/dist/lib/MxModule/MxDbAnyLine/MxDbAnyLine.js +0 -1
- package/dist/lib/MxModule/MxDbArea/MxDbArea.js +0 -1
- package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +0 -1
- package/dist/lib/MxModule/MxDbCoord/MxDbCoord.js +0 -1
- package/dist/lib/MxModule/MxDbDatabase/MxDbDatabase.js +0 -1
- package/dist/lib/MxModule/MxDbEllipse/MxDbEllipse.js +0 -1
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +0 -1
- package/dist/lib/MxModule/MxDbGroup/MxDbGroup.js +0 -1
- package/dist/lib/MxModule/MxDbHatch/MxDbHatch.js +0 -1
- package/dist/lib/MxModule/MxDbImage/MxDbImage.js +0 -1
- package/dist/lib/MxModule/MxDbLayerTableRecord/MxDbLayerTableRecord.js +0 -1
- package/dist/lib/MxModule/MxDbLeadTag/MxDbLeadTag.js +0 -1
- package/dist/lib/MxModule/MxDbLine/MxDbLine.js +0 -1
- package/dist/lib/MxModule/MxDbPolyline/MxDbPolyline.js +0 -1
- package/dist/lib/MxModule/MxDbRect/MxDbRect.js +0 -1
- package/dist/lib/MxModule/MxDbText/MxDbText.js +0 -1
- package/dist/lib/MxModule/MxFilters/MxFilters.js +0 -1
- package/dist/lib/MxModule/Mxassembly/Mxassembly.js +0 -1
- package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +0 -1
- package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +0 -1
- package/dist/mxdraw.es5.js +0 -1
- package/dist/types/MxModule/McEdGetPointWorldDrawObject/index.d.ts +0 -3
- package/dist/types/MxModule/McGePoint3d/index.d.ts +0 -3
- package/dist/types/MxModule/McGePoint3dArray/index.d.ts +0 -3
- package/dist/types/MxModule/McGeTool/index.d.ts +0 -4
- package/dist/types/MxModule/McGiWorldDraw/index.d.ts +0 -2
- package/dist/types/MxModule/McGiWorldDrawType/index.d.ts +0 -2
- package/dist/types/MxModule/MrxDbgUiPrBaseReturn/index.d.ts +0 -3
- package/dist/types/MxModule/MrxDbgUiPrPoint/index.d.ts +0 -3
- package/dist/types/MxModule/MrxDbgUtils/index.d.ts +0 -4
- package/dist/types/MxModule/Mx3PointArc/index.d.ts +0 -3
- package/dist/types/MxModule/MxCADObject/index.d.ts +0 -3
- package/dist/types/MxModule/MxDb2LineAngularDimension/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbAlignedDimension/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbAnyLine/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbArea/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbCloudLine/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbCoord/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbDatabase/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbEllipse/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbEntity/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbGroup/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbHatch/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbImage/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLayerTableRecord/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLeadComment/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLeadTag/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLine/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbPolyline/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbRect/index.d.ts +0 -2
- package/dist/types/MxModule/MxDbRectBoxLeadComment/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbRegularPolygon/index.d.ts +0 -2
- package/dist/types/MxModule/MxDbSVG/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbSVGText/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbText/index.d.ts +0 -3
- package/dist/types/MxModule/MxDrawObject/index.d.ts +0 -3
- package/dist/types/MxModule/MxFilters/index.d.ts +0 -2
- package/dist/types/MxModule/MxFun/index.d.ts +0 -3
- package/dist/types/MxModule/MxThreeJS/MxThreeJS.mixin.d.ts +0 -2
- package/dist/types/MxModule/MxThreeJS/index.d.ts +0 -3
- package/dist/types/MxModule/MxType/index.d.ts +0 -2
- package/dist/types/MxModule/Mxassembly/index.d.ts +0 -3
- package/dist/types/MxModule/loadCoreCode/index.d.ts +0 -3
- package/dist/types/MxModule/useCanvasResizeListener/index.d.ts +0 -3
- package/dist/types/mxdraw.d.ts +0 -86
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mxdraw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.106",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/mxdraw.umd.js",
|
|
7
|
-
"module": "dist/
|
|
8
|
-
"typings": "dist/
|
|
7
|
+
"module": "dist/lib/index.js",
|
|
8
|
+
"typings": "dist/lib/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dev": "node examples/server.js",
|
|
25
25
|
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
|
|
26
26
|
"prebuild": "rimraf dist",
|
|
27
|
-
"build": "tsc --module
|
|
27
|
+
"build": "tsc --module es2015 --outDir dist/lib && rollup -c rollup.config.ts && typedoc --out docs && node compress",
|
|
28
28
|
"builddebug": "tsc --module commonjs && rollup -c rollup.config.ts",
|
|
29
29
|
"oldDocs": "typedoc --out docs --target es6 --theme minimal --mode file src",
|
|
30
30
|
"docs": "npm run patch && npm run doctoc && typedoc --out docs",
|
|
@@ -69,19 +69,21 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@babel/cli": "^7.17.6",
|
|
72
|
-
"@babel/core": "^7.
|
|
72
|
+
"@babel/core": "^7.19.3",
|
|
73
73
|
"@babel/preset-env": "^7.16.11",
|
|
74
74
|
"@babel/preset-react": "^7.16.5",
|
|
75
|
+
"@babel/register": "^7.0.0",
|
|
75
76
|
"@commitlint/cli": "^7.1.2",
|
|
76
77
|
"@commitlint/config-conventional": "^7.1.2",
|
|
77
78
|
"@rollup/plugin-alias": "^3.1.8",
|
|
78
79
|
"@rollup/plugin-legacy": "^2.2.0",
|
|
79
80
|
"@types/jest": "^23.3.2",
|
|
80
81
|
"@types/jquery": "^3.5.9",
|
|
81
|
-
"@types/lodash": "^4.14.
|
|
82
|
+
"@types/lodash": "^4.14.186",
|
|
82
83
|
"@types/node": "^10.11.0",
|
|
83
84
|
"@types/offscreencanvas": "^2019.6.4",
|
|
84
|
-
"babel-
|
|
85
|
+
"babel-core": "^7.0.0-bridge.0",
|
|
86
|
+
"babel-jest": "^29.2.1",
|
|
85
87
|
"babel-loader": "^8.2.3",
|
|
86
88
|
"babel-plugin-component": "^1.1.1",
|
|
87
89
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -95,6 +97,7 @@
|
|
|
95
97
|
"css-loader": "^6.5.1",
|
|
96
98
|
"cz-conventional-changelog": "^2.1.0",
|
|
97
99
|
"doctoc": "^2.1.0",
|
|
100
|
+
"esbuild": "^0.15.11",
|
|
98
101
|
"express": "^4.17.1",
|
|
99
102
|
"extract-text-webpack-plugin": "^3.0.2",
|
|
100
103
|
"file-loader": "^6.2.0",
|
|
@@ -111,9 +114,13 @@
|
|
|
111
114
|
"replace-in-file": "^3.4.2",
|
|
112
115
|
"rimraf": "^2.6.2",
|
|
113
116
|
"rollup": "^2.70.2",
|
|
117
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
114
118
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
115
119
|
"rollup-plugin-copy": "^3.4.0",
|
|
120
|
+
"rollup-plugin-dts": "^4.2.3",
|
|
121
|
+
"rollup-plugin-esbuild": "^4.10.1",
|
|
116
122
|
"rollup-plugin-json": "^3.1.0",
|
|
123
|
+
"rollup-plugin-node-externals": "^5.0.0",
|
|
117
124
|
"rollup-plugin-node-resolve": "^3.4.0",
|
|
118
125
|
"rollup-plugin-sizes": "^1.0.4",
|
|
119
126
|
"rollup-plugin-sourcemaps": "^0.4.2",
|
|
@@ -122,6 +129,7 @@
|
|
|
122
129
|
"rollup-plugin-visualizer": "^5.5.2",
|
|
123
130
|
"semantic-release": "^15.9.16",
|
|
124
131
|
"shelljs": "^0.8.3",
|
|
132
|
+
"three": "0.113.2",
|
|
125
133
|
"travis-deploy-once": "^5.0.9",
|
|
126
134
|
"ts-jest": "^23.10.2",
|
|
127
135
|
"ts-loader": "^9.2.6",
|
|
@@ -145,8 +153,6 @@
|
|
|
145
153
|
"dependencies": {
|
|
146
154
|
"element-resize-event-polyfill": "^1.0.5",
|
|
147
155
|
"jquery": "^3.6.0",
|
|
148
|
-
"lodash": "^4.17.21"
|
|
149
|
-
"rollup-plugin-cleanup": "^3.2.1",
|
|
150
|
-
"three": "0.113.2"
|
|
156
|
+
"lodash": "^4.17.21"
|
|
151
157
|
}
|
|
152
158
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var store_1=require("../store/store"),McEdGetPointWorldDrawObject=function(){function t(){var t,r=this;this._McEdGetPointWorldDraw=new(null===(t=store_1.default.state.MxFun)||void 0===t?void 0:t.getMxJigCmdManager().McEdGetPointWorldDrawObjectClass()),this._get=function(){return r._McEdGetPointWorldDraw}}return t.prototype.drawCircle=function(t,r){return this._McEdGetPointWorldDraw.drawCircle(t,r)},t.prototype.drawLine=function(t,r){return this._McEdGetPointWorldDraw.drawLine(t,r)},t.prototype.drawEntity=function(t,r){return this._McEdGetPointWorldDraw.drawEntity(t,r)},t.prototype.drawText=function(t,r,o,e){return this._McEdGetPointWorldDraw.drawText(t,r,o,e)},t.prototype.setDraw=function(t){return this._McEdGetPointWorldDraw.setDraw(t)},t.prototype.setColor=function(t){return this._McEdGetPointWorldDraw.setColor(t)},t.prototype.getColor=function(){return this._McEdGetPointWorldDraw.getColor()},t.prototype.drawCustomEntity=function(t,r){return this._McEdGetPointWorldDraw.drawCustomEntity(t,r)},t}();exports.default=McEdGetPointWorldDrawObject;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Mxassembly_1=require("../Mxassembly"),store_1=require("../store/store"),McGeTool=function(){function e(){this.mxgeTool=null}return e.prototype.initImp=function(){this.mxgeTool||store_1.default.state.Mxassembly&&(this.mxgeTool=new store_1.default.state.Mxassembly.McGeTool)},e.prototype.calcArea=function(e){if(this.initImp(),e instanceof Array){var t=Mxassembly_1.default.NewMcGePoint3dArray(e);return this.mxgeTool.calcArea(t)}return this.mxgeTool.calcArea(e)},e.prototype.pointInPolyline=function(e,t){this.initImp();var o=t;t instanceof Array&&(o=Mxassembly_1.default.NewMcGePoint3dArray(t));var r=Mxassembly_1.default.NewMcGePoint3d(e.x,e.y,e.z);return this.mxgeTool.pointInPolyline(r,o)},e}();exports.default=McGeTool;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var McGiWorldDrawType;Object.defineProperty(exports,"__esModule",{value:!0}),function(r){r[r.kWorldDraw=1]="kWorldDraw",r[r.kDynDragDraw=2]="kDynDragDraw",r[r.kSelectDraw=3]="kSelectDraw"}(McGiWorldDrawType||(McGiWorldDrawType={})),exports.default=McGiWorldDrawType;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var MrxDbgUiPrBaseReturn;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e[e.kCancel=-2]="kCancel",e[e.kNone=-1]="kNone",e[e.kOk=0]="kOk",e[e.kKeyWord=1]="kKeyWord"}(MrxDbgUiPrBaseReturn||(MrxDbgUiPrBaseReturn={})),exports.default=MrxDbgUiPrBaseReturn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _MrxDbgUiPrPoint,McEdGetPointWorldDrawObject_1=require("../McEdGetPointWorldDrawObject"),store_1=require("../store/store"),MrxDbgUiPrPoint=function(){function t(){var t;_MrxDbgUiPrPoint=new(null===(t=store_1.default.state.MxFun)||void 0===t?void 0:t.getMxJigCmdManager().getMrxDbgUiPrPointClass())}return t.prototype.keyWords=function(){return _MrxDbgUiPrPoint.keyWords()},t.prototype.setKeyWords=function(t){return _MrxDbgUiPrPoint.setKeyWords(t)},t.prototype.message=function(){return _MrxDbgUiPrPoint.message()},t.prototype.setMessage=function(t){return _MrxDbgUiPrPoint.setMessage(t)},t.prototype.keyWordPicked=function(){return _MrxDbgUiPrPoint.keyWordPicked()},t.prototype.isKeyWordPicked=function(t){return _MrxDbgUiPrPoint.isKeyWordPicked(t)},t.prototype.setUserDraw=function(t){if("function"!=typeof t)return _MrxDbgUiPrPoint.setUserDraw(t._get?t._get():t);var r=new McEdGetPointWorldDrawObject_1.default;r.setDraw(t),_MrxDbgUiPrPoint.setUserDraw(r._get())},t.prototype.value=function(){return _MrxDbgUiPrPoint.value()},t.prototype.valueDocCoord=function(){return _MrxDbgUiPrPoint.valueDocCoord()},t.prototype.basePt=function(){return _MrxDbgUiPrPoint.basePt()},t.prototype.setBasePt=function(t){return _MrxDbgUiPrPoint.setBasePt(t)},t.prototype.setUseBasePt=function(t){return _MrxDbgUiPrPoint.setUseBasePt(t)},t.prototype.go=function(t){return t?(_MrxDbgUiPrPoint.go(t),new Promise(function(t,r){t(null)})):new Promise(function(t,r){_MrxDbgUiPrPoint.go(function(r){t(0!=r?null:_MrxDbgUiPrPoint.value())})})},t.prototype.goWhile=function(t,r){return _MrxDbgUiPrPoint.goWhile(t,r)},t.prototype.drawReserve=function(t){return _MrxDbgUiPrPoint.drawReserve(t)},t.prototype.setInputToucheType=function(t){return _MrxDbgUiPrPoint.setInputToucheType(t)},t.prototype.getInputToucheType=function(){return _MrxDbgUiPrPoint.getInputToucheType()},t}();exports.default=MrxDbgUiPrPoint;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxFun_1=require("../MxFun"),store_1=require("../store/store"),MrxDbgUtils=function(){function t(){this.imp=null}return t.prototype.initImp=function(){if(!this.imp&&store_1.default.state.MxFun){var t=store_1.default.state.MxFun;this.imp=new t.getMrxDbgUtilsClass}},t.prototype.findEntAtPoint=function(t,e,i){return void 0===e&&(e=null),this.initImp(),i||(i=MxFun_1.default.getCurrentDraw()),this.imp.findEntAtPoint(i,t,e)},t.prototype.selectEnt=function(t,e){return this.initImp(),this.imp.selectEnt(t)},t}();exports.default=MrxDbgUtils;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])})(n,o)};return function(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),index_1=require("../../tools/three/index"),Mx3PointArc=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.point1=new three_1.Vector3,n.point2=new three_1.Vector3,n.point3=new three_1.Vector3,n}return __extends(n,t),n.prototype.getTypeName=function(){return"Mx3PointArc"},n.prototype.create=function(){return new n},n.prototype.worldDraw=function(t){var n=(0,index_1.createThreePointArc)(this.point1,this.point2,this.point3,!0).arc;t.drawEntity(n)},n.prototype.getGripPoints=function(){return[this.point1,this.point2,this.point3]},n.prototype.moveGripPointsAt=function(t,n){return 0===t?this.point1.add(n):1===t?this.point2.add(n):2===t&&this.point3.add(n),!0},n.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.point3.copy(t.point3),t},n.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.point3=this.point3,t},n}(MxDbEntity_1.default);exports.default=Mx3PointArc;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxCADObject=function(){function e(e){this._mxCAD=e}return e.prototype.newFile=function(){this._mxCAD.newFile()},e.prototype.undo=function(){this._mxCAD.undo()},e.prototype.openFile=function(e,t){this._mxCAD.openFile(e,t)},e.prototype.saveFile=function(e,t){this._mxCAD.saveFile(e,t)},e.prototype.getDisplayFromServer=function(){this._mxCAD.getDisplayFromServer()},e.prototype.getFileName=function(){return this._mxCAD.getFileName()},e.prototype.getAllLayerData=function(){return this._mxCAD.getAllLayerData()},e}();exports.default=MxCADObject;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),three_1=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDb2LineAngularDimension=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e.point3=new THREE.Vector3,e}return __extends(e,t),e.prototype.calculateLineAngle=function(t,e,n){var i=2*Math.PI/360;return{startAngle:180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI*i,endAngle:180*Math.atan2(n.y-t.y,n.x-t.x)/Math.PI*i}},e.prototype.worldDraw=function(t){if(t.getType()==McGiWorldDrawType_1.default.kWorldDraw||t.getType()==McGiWorldDrawType_1.default.kDynDragDraw){var e=t.getColor(),n=t.getMxObject(),i=MxThreeJS_1.default.createLine(this.point1,this.point2,e);t.drawEntity(i);var o=MxThreeJS_1.default.createLine(this.point2,this.point3,e);t.drawEntity(o);var r=this.calculateLineAngle(this.point2,this.point1,this.point3),p=r.startAngle,a=r.endAngle,s=this.point2.distanceTo(this.point1),h=this.point2.distanceTo(this.point3),u=(s>h?h:s)/4,c=three_1.MathUtils.radToDeg(p-a);c<0&&(c+=360);var l=n.screenCoordLong2Doc(50),y=new three_1.ArcCurve(this.point2.x,this.point2.y,u,p,a,!0),d=(new three_1.BufferGeometry).setFromPoints(y.getPoints(50)),f=new three_1.LineBasicMaterial({color:"#ff0000"}),w=new three_1.Line(d,f);t.drawEntity(w);var _=y.getPoint(.5),x=new THREE.Vector3(_.x,_.y,0),g=x.sub(this.point2),M=g.length()+.5*l;g.normalize().multiplyScalar(M),x=this.point2.clone().add(g);var D=MxThreeJS_1.default.creatTextSprite(c.toFixed(3)+"°",x,.5*l,0,e);null!=D&&t.drawEntity(D)}else t.drawLine(this.point1,this.point2),t.drawLine(this.point3,this.point2)},e.prototype.getGripPoints=function(){return[this.point1,this.point2,this.point3]},e.prototype.moveGripPointsAt=function(t,e){return 0===t?this.point1.add(e):1===t?this.point2.add(e):2===t&&this.point3.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.point3.copy(t.point3),t},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.point3=this.point3,t},e.prototype.create=function(){return new e},e.prototype.transformBy=function(t){this.point1.applyMatrix4(t),this.point2.applyMatrix4(t)},e.prototype.getTypeName=function(){return"MxDb2LineAngularDimension"},e}(MxDbEntity_1.default);exports.default=MxDb2LineAngularDimension;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbAlignedDimension=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbAlignedDimension"},e.prototype.getDirection=function(t,e,r){var n=new THREE.Vector3(t.x,t.y,0),i=new THREE.Vector3(1,0,0),o=t.angleTo(i),a=-1;(o<7*Math.PI/18||o>10*Math.PI/18)&&e.x>r.x&&(a=1);var p=new THREE.Matrix4;return p.makeRotationZ(Math.PI/2*a),n.applyMatrix4(p),n},e.prototype.getDimText=function(){return new THREE.Vector3(this.point1.x-this.point2.x,this.point1.y-this.point2.y,0).length().toFixed(3)},e.prototype.worldDraw=function(t){if(t.getType()==McGiWorldDrawType_1.default.kWorldDraw||t.getType()==McGiWorldDrawType_1.default.kDynDragDraw){var e,r,n,i,o,a,p,y=this.point1,c=this.point2,x=new THREE.Vector3(y.x-c.x,y.y-c.y,0),E=this.getDirection(x,y,c),u=new THREE.Matrix4;u.makeScale(.01,.01,.01),(h=new THREE.Vector3(E.x,E.y,0)).applyMatrix4(u);var l=new THREE.Vector3(y.x+h.x,y.y+h.y,0),w=new THREE.Vector3(c.x+h.x,c.y+h.y,0),s=16777215;a=MxThreeJS_1.default.createPoint(y,s),p=MxThreeJS_1.default.createPoint(c,s),u.identity(),u.makeScale(.2,.2,0),new THREE.Vector3(E.x,E.y,0).applyMatrix4(u),u.identity(),u.makeScale(.02,.02,0);var T=new THREE.Vector3(E.x,E.y,0);T.applyMatrix4(u),t.drawLine(l,w),e=MxThreeJS_1.default.createLine(new THREE.Vector3(l.x+2*T.x,l.y+2*T.y,0),new THREE.Vector3(y.x+T.x,y.y+T.y,0),s),r=MxThreeJS_1.default.createLine(new THREE.Vector3(w.x+2*T.x,w.y+2*T.y,0),new THREE.Vector3(c.x+T.x,c.y+T.y,0),s);var h,d=new THREE.Vector3(1,0,0),M=x.angleTo(d);(h=new THREE.Vector3(E.x,E.y,0)).normalize();var f=y.distanceTo(c);x.y<0?M=M<Math.PI/2?2*Math.PI-M:Math.PI-M:M>Math.PI/2&&(M=Math.PI+M);var R=t.getMxObject();R&&(M-=R.getViewAngle());var H=this.getDimText();null!=(n=MxThreeJS_1.default.creatTextSprite(H,new THREE.Vector3(w.x+x.x/2+h.x*f/30,w.y+x.y/2+h.y*f/30,0),.07*f,M,s))&&t.drawEntity(n),u.identity(),u.makeScale(.08,.08,.08);var V=new THREE.Matrix4;V.makeRotationZ(17*Math.PI/18);var _=new THREE.Vector3(x.x,x.y,0);_.applyMatrix4(u),_.applyMatrix4(V),V.identity(),V.makeRotationZ(17*-Math.PI/18);var g=new THREE.Vector3(x.x,x.y,0);g.applyMatrix4(u),g.applyMatrix4(V);var D=new Array;D.push(new THREE.Vector3(l.x,l.y,0),new THREE.Vector3(l.x+_.x,l.y+_.y,0),new THREE.Vector3(l.x+g.x,l.y+g.y,0)),i=MxThreeJS_1.default.createTriangle(D,s),V.identity(),V.makeRotationZ(Math.PI/18),(_=new THREE.Vector3(x.x,x.y,0)).applyMatrix4(u),_.applyMatrix4(V),V.identity(),V.makeRotationZ(-Math.PI/18),(g=new THREE.Vector3(x.x,x.y,0)).applyMatrix4(u),g.applyMatrix4(V);var v=new Array;v.push(new THREE.Vector3(w.x,w.y,0),new THREE.Vector3(w.x+_.x,w.y+_.y,0),new THREE.Vector3(w.x+g.x,w.y+g.y,0)),o=MxThreeJS_1.default.createTriangle(v,s),t.drawEntity(e),t.drawEntity(r),i&&t.drawEntity(i),o&&t.drawEntity(o),t.drawEntity(a),t.drawEntity(p)}else t.drawLine(this.point1,this.point2)},e.prototype.setPoint1=function(t){this.point1=t},e.prototype.setPoint2=function(t){this.point2=t},e.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.point1.add(e):(t=1)&&this.point2.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t},e.prototype.create=function(){return new e},e}(MxDbEntity_1.default);exports.default=MxDbAlignedDimension;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var index_1=require("../../tools/three/index"),three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbAnyLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbAnyLine"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){var e=t.getMxObject(),n=(0,index_1.createAnyLine)(this.points);n.geometry.computeBoundingBox();var r=new three_1.Vector3;if(n.geometry.boundingBox.getCenter(r),t.drawEntity(n),t.getType()===McGiWorldDrawType_1.default.kSelectDraw){var o=new three_1.Vector3;n.geometry.boundingBox.getSize(o),o.addScalar(e.screenCoordLong2Doc(20));var i=o.x/2,u=o.y/2,p={x:r.x-i,y:r.y-u},y={x:r.x+i,y:r.y-u},c={x:r.x+i,y:r.y+u},s={x:r.x-i,y:r.y+u};t.drawLine(p.x,p.y,y.x,y.y),t.drawLine(y.x,y.y,c.x,c.y),t.drawLine(c.x,c.y,s.x,s.y),t.drawLine(s.x,s.y,p.x,p.y)}},e.prototype.getCenter=function(){var t=new three_1.Geometry;t.vertices=this.points;var e=new three_1.Vector3;return t.computeBoundingBox(),t.boundingBox.getCenter(e),e},e.prototype.getGripPoints=function(){return[this.getCenter()]},e.prototype.moveGripPointsAt=function(t,e){return this.points.forEach(function(t){t.add(e)}),!0},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var n=t.points;return this.points=[],n.forEach(function(t){e.points.push(new three_1.Vector3(t.x,t.y,t.z))}),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t},e}(MxDbEntity_1.default);exports.default=MxDbAnyLine;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),McGeTool_1=require("../McGeTool"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxDbHatch_1=require("../MxDbHatch"),MxFun_1=require("../MxFun"),MxThreeJS_1=require("../MxThreeJS"),MxDbArea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e.isFill=!1,e.fillColor=6697540,e.fillOpacity=.7,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbArea"},e.prototype.create=function(){return new e},e.prototype.getDimText=function(){return McGeTool_1.default.calcArea(this.points).toFixed(2)},e.prototype.worldDraw=function(t){if(this.points.length<3)2==this.points.length&&t.drawLine(this.points[0],this.points[1]);else{for(var e=this.points[0],o=e.clone(),r=e.clone(),i=this.points.length,n=1;n<i;n++){var s=this.points[n];o.x>s.x&&(o.x=s.x),o.y>s.y&&(o.y=s.y),r.x<s.x&&(r.x=s.x),r.y<s.y&&(r.y=s.y),t.drawLine(e,s),e=s}t.drawLine(e,this.points[0]);var p=new THREE.Vector3(o.x+.5*(r.x-o.x),o.y+.5*(r.y-o.y)),l=t.getColor(),u=MxFun_1.default.screenCoordLong2Doc(20),c=MxThreeJS_1.default.creatTextSprite(this.getDimText(),p,u,0,l);if(null!=c&&t.drawEntity(c),t.getType()==McGiWorldDrawType_1.default.kWorldDraw&&this.isFill){t.setColor(this.fillColor),t.setOpacity(this.fillOpacity),t.setRenderOrder(t.getRenderOrder()-1);var a=new MxDbHatch_1.default;a.points=this.points,a.worldDraw(t)}}},e.prototype.getGripPoints=function(){return this.points},e.prototype.moveGripPointsAt=function(t,e){return!(t>=this.points.length)&&(this.points[t].add(e),!0)},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var o=t.points;return this.points=[],o.forEach(function(t){e.points.push(new THREE.Vector3(t.x,t.y,t.z))}),this.dwgInHelp(t,["isFill","fillColor","fillOpacity"]),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,this.dwgOutHelp(t,["isFill","fillColor","fillOpacity"]),t},e.prototype.addPoint=function(t){this.points.push(t.clone())},e.prototype.getPoints=function(){return this.points},e.prototype.clearPoint=function(){this.points=[]},e}(MxDbEntity_1.default);exports.default=MxDbArea;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbCloudLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e.radius=16,e.drawGeometry=null,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbCloudLine"},e.prototype.create=function(){return new e},e.prototype.setRadius=function(t){this.radius=t,this.drawGeometry=null},e.prototype.getRadius=function(){return this.radius},e.prototype.clacNewArcDiameterPoint=function(t){if(0==this.points.length)return t;var e=this.points[this.points.length-1],r=2*this.radius,n=e.distanceTo(t);if(n<r)return null;var o=r*(t.x-e.x)/n+e.x,i=r*(t.y-e.y)/n+e.y;return new three_1.Vector3(o,i,e.z)},e.prototype.createCloudArcCurvePoints=function(t,e,r){var n=new three_1.Vector3((t.x+e.x)/2,(t.y+e.y)/2,0);r||(r=n.distanceTo(t));var o,i,s,a,u=(o=n,i=t,s=e,a=2*Math.PI/360,{startAngle:180*Math.atan2(i.y-o.y,i.x-o.x)/Math.PI*a,endAngle:180*Math.atan2(s.y-o.y,s.x-o.x)/Math.PI*a}),h=u.startAngle,y=u.endAngle;return new three_1.ArcCurve(n.x,n.y,r,h,y,!0).getPoints(10)},e.prototype.addPoint=function(t,e){var r=this.clacNewArcDiameterPoint(t);if(r)if(this.points.push(r),e){if(this.points.length<2)return;var n=this.points[this.points.length-2],o=this.createCloudArcCurvePoints(n,r),i=this.drawGeometry;i||(i=new three_1.Geometry),o.forEach(function(t){null===i||void 0===i||i.vertices.push(new three_1.Vector3(t.x,t.y,0))}),this.drawGeometry=new three_1.Geometry,this.drawGeometry.vertices=i.vertices}else this.drawGeometry=null},e.prototype.addLine=function(t,e){this.addPoint(t);for(var r=2*this.radius,n=this.points[this.points.length-1],o=n.distanceTo(e),i=Math.round(o/r),s=0;s<i;s++){o=n.distanceTo(e);var a=r*(e.x-n.x)/o+n.x,u=r*(e.y-n.y)/o+n.y,h=new three_1.Vector3(a,u,e.z);this.addPoint(h),n=h}return this.points[this.points.length-1]},e.prototype.reCalculateDrawGeometry=function(){var t=this;if(this.drawGeometry=new three_1.Geometry,!(this.points.length<2))for(var e=this.points[0],r=this.points.length,n=1;n<r;n++){var o=this.points[n];this.createCloudArcCurvePoints(e,o).forEach(function(e){var r;null===(r=t.drawGeometry)||void 0===r||r.vertices.push(new three_1.Vector3(e.x,e.y,0))}),e=o}},e.prototype.worldDraw=function(t){var e;if(t.getType()===McGiWorldDrawType_1.default.kSelectDraw){if(!this.drawGeometry)return;this.drawGeometry.computeBoundingBox();var r=new three_1.Vector3;this.drawGeometry.boundingBox.getSize(r);var n=new three_1.Vector3;this.drawGeometry.boundingBox.getCenter(n);var o=r.x/2,i=r.y/2,s={x:n.x-o,y:n.y-i},a={x:n.x+o,y:n.y-i},u={x:n.x+o,y:n.y+i},h={x:n.x-o,y:n.y+i};t.drawLine(s.x,s.y,a.x,a.y),t.drawLine(a.x,a.y,u.x,u.y),t.drawLine(u.x,u.y,h.x,h.y),t.drawLine(h.x,h.y,s.x,s.y)}else{if(this.drawGeometry||this.reCalculateDrawGeometry(),0==(null===(e=this.drawGeometry)||void 0===e?void 0:e.vertices.length))return;t.drawGeometryLines(this.drawGeometry)}},e.prototype.getCenter=function(){var t=new three_1.Geometry;t.vertices=this.points;var e=new three_1.Vector3;return t.computeBoundingBox(),t.boundingBox.getCenter(e),e},e.prototype.getGripPoints=function(){return[this.getCenter()]},e.prototype.moveGripPointsAt=function(t,e){return this.points.forEach(function(t){t.add(e)}),this.drawGeometry=null,!0},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var r=t.points;return this.points=[],r.forEach(function(t){e.points.push(new three_1.Vector3(t.x,t.y,t.z))}),this.drawGeometry=null,this.radius=t.radius,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t.radius=this.radius,t},e}(MxDbEntity_1.default);exports.default=MxDbCloudLine;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(o,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])})(o,n)};return function(o,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxDbCoord=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.point1=new THREE.Vector3,o.point2=new THREE.Vector3,o}return __extends(o,t),o.prototype.worldDraw=function(t){var o=t.getMxObject();t.drawLine(this.point1,this.point2);var n=this.point2.clone(),i=o.screenCoordLong2Doc(20),r=6*i;n.x=n.x+r,t.drawLine(this.point2,n);var e=new THREE.Vector3,p=new THREE.Vector3,s=o.docCoord2Cad(this.point1.x,this.point1.y,this.point1.z),u=s.x.toFixed(3),c=s.y.toFixed(3);e.x=this.point2.x+.3*i+.5*r,e.y=this.point2.y+.1*i+.5*i,t.drawText(u,i,0,e),p.x=this.point2.x+.3*i+.5*r,p.y=this.point2.y-.1*i-.5*i,t.drawText(c,i,0,p)},o.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t},o.prototype.moveGripPointsAt=function(t,o){return 0==t?this.point1.add(o):1==t&&this.point2.add(o),!0},o.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),!0},o.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t},o.prototype.create=function(){return new o},o.prototype.transformBy=function(t){this.point1.applyMatrix4(t),this.point2.applyMatrix4(t)},o.prototype.getTypeName=function(){return"MxDbCoord"},o}(MxDbEntity_1.default);exports.default=MxDbCoord;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbDatabase=function(){function t(t){this._mxDatabase=t}return t.prototype.addLayer=function(t){return this._mxDatabase.addLayer(t)},t.prototype.showLayer=function(t,e){this._mxDatabase.showLayer(t,e)},t.prototype.setCurrentLayer=function(t){return this._mxDatabase.setCurrentLayer(t)},t.prototype.getLayer=function(t){return this._mxDatabase.getLayer(t)},t.prototype.addEntity=function(t){return this._mxDatabase.addMxEntity(t)},t.prototype.getGroup=function(t){return this._mxDatabase.getGroupDictionary().getAt(t)},t.prototype.addGroup=function(t){return this._mxDatabase.getGroupDictionary().add(t)},t.prototype.getEntityInGroup=function(t){return this._mxDatabase.getGroupDictionary().getEntityInGroup(t)},t.prototype.deleteGroup=function(t){return this._mxDatabase.getGroupDictionary().delete(t)},t}();exports.default=MxDbDatabase;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),index_1=require("../../tools/three/index"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEllipse=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new three_1.Vector3,e.point2=new three_1.Vector3,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbEllipse"},e.prototype.worldDraw=function(t){var e=(0,index_1.createThreeEllipse)(this.point1,this.point2,t.getColor()),o=t.getMxObject();e.geometry.computeBoundingBox();var n=new three_1.Vector3;if(e.geometry.boundingBox.getCenter(n),t.getType()===McGiWorldDrawType_1.default.kSelectDraw){var r=new three_1.Vector3;e.geometry.boundingBox.getSize(r),r.addScalar(o.screenCoordLong2Doc(10));var i=r.x/2,p=r.y/2,y={x:n.x-i,y:n.y-p},u={x:n.x+i,y:n.y-p},s={x:n.x+i,y:n.y+p},c={x:n.x-i,y:n.y+p};t.drawLine(y.x,y.y,u.x,u.y),t.drawLine(u.x,u.y,s.x,s.y),t.drawLine(s.x,s.y,c.x,c.y),t.drawLine(c.x,c.y,y.x,y.y)}t.drawEntity(e)},e.prototype.getGripPoints=function(){var t=new three_1.Vector3(.5*(this.point2.x+this.point1.x),.5*(this.point2.y+this.point1.y),0);return[this.point1,this.point2,t]},e.prototype.moveGripPointsAt=function(t,e){return 0===t?this.point1.add(e):1===t?this.point2.add(e):2===t&&(this.point1.add(e),this.point2.add(e)),!0},e.prototype.create=function(){return new e},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),t},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t},e}(MxDbEntity_1.default);exports.default=MxDbEllipse;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxType_1=require("../MxType"),store_1=require("../store/store"),MxDbEntity=function(){function t(){this.color=16777215,this.renderOrder=30,this.opacity=1,this.visible=!0,this.userData={},this.sGuid="",this.dLineWidth=0,this.lineWidthByPixels=!0,this.dDashArray=0,this.dDashRatio=0,this.layer="",this._event={}}return t.prototype.initGuid=function(t){this.sGuid.length>0?console.log("mx: init guid error"):this.sGuid=t},t.prototype.dwgInHelp=function(t,e){var i=function(t){return t instanceof Array?r(t):"object"==typeof t?function(t){return!!(t.isVector3||t.isVector2||t.isVector4)}(t)?t.clone():2==t.datatype?new THREE.Vector2(t.x,t.y):3==t.datatype?new THREE.Vector3(t.x,t.y,t.z):4==t.datatype?new THREE.Vector4(t.x,t.y,t.z,t.w):n(t,Object.create(null)):t},r=function(t){return t.map(function(t){return i(t)})},n=function(t,e){for(var r in t)t[r]&&(e[r]=i(t[r]));return e},o=this;return e.forEach(function(e){t[e]&&(o[e]=i(t[e]))}),!0},t.prototype.dwgOutHelp=function(t,e){var i=this;return e.forEach(function(e){t[e]=i[e];var r,n=(r=i[e]).isVector3?3:r.isVector2?2:r.isVector4?4:0;n&&(t[e].datatype=n)}),t},t.prototype.callEvent=function(t,e){return void 0!=this._event[t]?this._event[t](e):void 0},t.prototype.create=function(){return new(0,this.constructor)},t.prototype.transformBy=function(t){},t.prototype.getGeomExtents=function(){return null},t.prototype.getImp=function(){return this.MxDbEntityImp},t.prototype.setNeedUpdateDisplay=function(t){var e=this.getImp();return!!e&&(t?e.upDisplay():e.setDirtyDisplay(!0),!0)},t.prototype.getMxObject=function(){var t=this.getImp();return t?t.getMxObject():null},t.prototype.onViewChange=function(){return!1},t.prototype.objectId=function(){var t=this.getImp();return t?t.objectId():0},t.prototype.erase=function(){var t=this.getImp();return!!t&&t.erase()},t.prototype.setLayer=function(t){var e=this.getImp();e&&e.nodifySetLayer(),this.layer=t},t.prototype.getLayer=function(){return this.layer},t.prototype.setColor=function(t){this.color=t},t.prototype.getColor=function(){return this.color},t.prototype.clone=function(t){var e=this.create(),i={type:t||MxType_1.default.MxCloneType.kClone};return this.dwgOut(i),e.dwgIn(i),e.sGuid="",e},t.prototype.onDwgIn=function(t){this.color=t.color,this.renderOrder=t.renderOrder,this.opacity=t.opacity,this.visible=t.visible,t.userData?this.userData=JSON.parse(JSON.stringify(t.userData)):this.userData={},this.dLineWidth=t.lineWidth,this.lineWidthByPixels=t.lineWidthByPixels,this.dDashArray=t.dashArray,this.dDashRatio=t.dashRatio,this.layer=t.layer,t.guid&&(this.sGuid=t.guid)},t.prototype.onDwgOut=function(t){t.color=this.color,t.renderOrder=this.renderOrder,t.opacity=this.opacity,t.visible=this.visible,Object.keys(this.userData).length>0&&(t.userData=this.userData),t.lineWidth=this.dLineWidth,t.lineWidthByPixels=this.lineWidthByPixels,t.dashArray=this.dDashArray,t.dashRatio=this.dDashRatio,t.layer=this.layer,t.guid=this.sGuid},t.prototype.rxInit=function(){store_1.default.state.MxFun.initMxDbEntityType(this)},t.prototype.setRenderOrder=function(t){this.renderOrder=t},t.prototype.getRenderOrder=function(){return this.renderOrder},t.prototype.setLineWidthByPixels=function(t){this.lineWidthByPixels=t},t.prototype.getLineWidthByPixels=function(){return this.lineWidthByPixels},t.prototype.setLineWidth=function(t){this.dLineWidth=t},t.prototype.getLineWidth=function(){return this.dLineWidth},t.prototype.getGetLength=function(){return 0},t.prototype.setDashLen=function(t){var e=this.getGetLength();if(!(e<1e-6||t<1e-6)){var i=Math.floor(e/t);i<1e-6&&(this.dDashRatio=0),this.dDashArray=1/i}},t.prototype.setDashRatio=function(t){this.dDashRatio=t},t.prototype.setDashArray=function(t){this.dDashArray=t},t.prototype.setDash=function(t,e){this.dDashArray=t,this.dDashRatio=e,0==this.dLineWidth&&(this.dLineWidth=6,this.lineWidthByPixels=!0)},t.prototype.getDash=function(){return{dDashArray:this.dDashArray,dDashRatio:this.dDashRatio}},t.prototype.setDashLineDisplay=function(t){t?(this.dDashArray<1e-5&&(this.dDashArray=.03),this.dDashRatio<1e-5&&(this.dDashRatio=.1),0==this.dLineWidth&&(this.dLineWidth=6,this.lineWidthByPixels=!0)):(this.dDashArray=0,this.dDashRatio=0)},t.prototype.isDashLineDisplay=function(){return this.dDashArray>0&&this.dDashRatio>0},t.prototype.guid=function(){return this.sGuid},t.prototype.onEndGripEidt=function(){this.callEvent("onEndGripEidt")},t.prototype.onStartGripEidt=function(){return this.callEvent("onStartGripEidt")},t.prototype.addEvent=function(t,e){this._event[t]=e},t.prototype.removeEvent=function(t){this._event[t]=void 0},t}();exports.default=MxDbEntity;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])})(r,n)};return function(r,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),__spreadArray=this&&this.__spreadArray||function(t,r,n){if(n||2===arguments.length)for(var o,e=0,i=r.length;e<i;e++)!o&&e in r||(o||(o=Array.prototype.slice.call(r,0,e)),o[e]=r[e]);return t.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(exports,"__esModule",{value:!0});var index_1=require("../../tools/three/index"),THREE=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxDbHatch=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.points=[],r}return __extends(r,t),r.prototype.worldDraw=function(t){t.getType()===McGiWorldDrawType_1.default.kWorldDraw?t.drawSolid(this.points):t.drawLines(__spreadArray(__spreadArray([],this.points,!0),[this.points[0]],!1))},r.prototype.getTypeName=function(){return"MxDbHatch"},r.prototype.moveGripPointsAt=function(t,r){return 0===t?this.points.forEach(function(t){t.add(r)}):this.points[t-1]&&this.points[t-1].add(r),!0},r.prototype.setPoints=function(t){this.points=t.map(function(t){return t.clone()})},r.prototype.getGripPoints=function(){if(this.points.length>0){var t=(0,index_1.computeBounding)(this.points).centerPoint;return __spreadArray([t],this.points,!0)}return[]},r.prototype.dwgIn=function(t){this.onDwgIn(t);var r=t.points;return this.points=r.map(function(t){var r=t.x,n=t.y,o=t.z;return new THREE.Vector3(r,n,o)}),!0},r.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t},r}(MxDbEntity_1.default);exports.default=MxDbHatch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function a(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxFun_1=require("../MxFun"),MxType_1=require("../MxType"),MxDbImage=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pt1=new THREE.Vector3,e.pt2=new THREE.Vector3,e.imagePath="",e.isLoadMaterialFromPath=!0,e.material=null,e.angle=0,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbImage"},e.prototype.getAngle=function(){return this.angle},e.prototype.setAngle=function(t){this.angle=t},e.prototype.worldDraw=function(t){var e=this,i=new THREE.Vector3(this.pt1.x,this.pt2.y),a=new THREE.Vector3(this.pt2.x,this.pt1.y);if(Math.abs(this.angle)>1e-5){var r=new THREE.Vector3(.5*(this.pt1.x-this.pt2.x)+this.pt2.x,.5*(this.pt1.y-this.pt2.y)+this.pt2.y),n=new THREE.Matrix4;n.makeRotationZ(this.angle);var s=(new THREE.Matrix4).makeTranslation(r.x,r.y,r.z).multiply(n).multiply((new THREE.Matrix4).makeTranslation(-r.x,-r.y,-r.z));t.setMatrix(s)}if(1==t.getType()){if(t.drawSelectLine(this.pt1,i),t.drawSelectLine(i,this.pt2),t.drawSelectLine(this.pt2,a),t.drawSelectLine(a,this.pt1),this.material){for(var o=Math.abs(this.pt1.x-this.pt2.x),p=Math.abs(this.pt1.y-this.pt2.y),h=new THREE.PlaneGeometry(o,p),l=Math.min(this.pt1.x,this.pt2.x),u=Math.min(this.pt1.y,this.pt2.y),y=0;y<h.vertices.length;y++)h.vertices[y].x+=l+.5*o,h.vertices[y].y+=u+.5*p,h.vertices[y].z=0;(d=new THREE.Mesh(h,this.material)).material.depthTest=!1,t.drawEntity(d)}else if(this.imagePath.length>0&&this.isLoadMaterialFromPath){var c=this,m=t.getMxObject();MxFun_1.default.loadImageMaterial(this.imagePath,function(t){e.isLoadMaterialFromPath=!1,t&&(c.setMaterial(t),c.setNeedUpdateDisplay(),m.updateDisplay())})}}else if(this.material){for(o=Math.abs(this.pt1.x-this.pt2.x),p=Math.abs(this.pt1.y-this.pt2.y),h=new THREE.PlaneGeometry(o,p),l=Math.min(this.pt1.x,this.pt2.x),u=Math.min(this.pt1.y,this.pt2.y),y=0;y<h.vertices.length;y++)h.vertices[y].x+=l+.5*o,h.vertices[y].y+=u+.5*p,h.vertices[y].z=0;var d;(d=new THREE.Mesh(h,this.material)).material.depthTest=!1,t.drawEntity(d)}else t.drawLine(this.pt1,i),t.drawLine(i,this.pt2),t.drawLine(this.pt2,a),t.drawLine(a,this.pt1);t.setMatrix(null)},e.prototype.setImagePath=function(t){this.imagePath=t,this.isLoadMaterialFromPath=!0,this.material=null},e.prototype.getImagePath=function(){return this.imagePath},e.prototype.setMaterial=function(t){this.material=t},e.prototype.loadMaterial=function(t){var e=this;t&&(this.imagePath=t),this.isLoadMaterialFromPath=!1,this.material=null;var i=this;MxFun_1.default.loadImageMaterial(this.imagePath,function(t){e.isLoadMaterialFromPath=!1,i.setMaterial(t)})},e.prototype.setPoint1=function(t){this.pt1=t},e.prototype.getPoint1=function(){return this.pt1},e.prototype.setPoint2=function(t){this.pt2=t},e.prototype.getPoint2=function(){return this.pt2},e.prototype.getGripPoints=function(){var t=[];t.push(this.pt1),t.push(this.pt2);var e=new THREE.Vector3(this.pt1.x+.5*(this.pt2.x-this.pt1.x),this.pt1.y+.5*(this.pt2.y-this.pt1.y));return t.push(e),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.pt1.add(e):1==t?this.pt2.add(e):2==t&&(this.pt1.add(e),this.pt2.add(e)),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.pt1.copy(t.pt1),this.pt2.copy(t.pt2),this.imagePath=t.imagePath.substr(0),this.isLoadMaterialFromPath=!0,t.angle&&(this.angle=t.angle),t.material&&(this.material=t.material),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.pt1=this.pt1,t.pt2=this.pt2,t.imagePath=this.imagePath,t.angle=this.angle,t.type==MxType_1.default.MxCloneType.kDragClone&&(t.material=this.material),t},e.prototype.create=function(){return new e},e}(MxDbEntity_1.default);exports.default=MxDbImage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbLeadTag=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.point=new THREE.Vector3,t.leadLen=88,t.text="",t.textHeight=24,t}return __extends(t,e),t.prototype.getTypeName=function(){return"MxDbLeadTag"},t.prototype.createDots=function(e,t){var n=e.x,o=e.y,r=(e.z,new THREE.Shape);r.arc(n,o,t.screenCoordLong2Doc(6),0,2*Math.PI,!0);var i=new THREE.Path;i.arc(n,o,t.screenCoordLong2Doc(3),0,2*Math.PI,!0),r.holes.push(i);var a=new THREE.ShapeGeometry(r),s=new THREE.MeshPhongMaterial({color:"#ff0000",transparent:!0}),c=new THREE.Shape;c.arc(n,o,t.screenCoordLong2Doc(3),0,2*Math.PI,!0);var p=new THREE.ShapeGeometry(c),d=new THREE.MeshPhongMaterial({color:"#e2da8f",transparent:!0}),x=new THREE.Mesh(a,s),u=new THREE.Mesh(p,d);return x.add(u),x},t.prototype.worldDraw=function(e){var t=e.getMxObject(),n=this.createDots(this.point,t);if(e.drawEntity(n),n.geometry.computeBoundingBox(),e.drawSelectLine(n.geometry.boundingBox.max,n.geometry.boundingBox.min),2!==e.getType()){var o=e.getMxObject().screenCoordLong2Doc(this.leadLen),r=new THREE.Vector3(this.point.x+2*o,this.point.y+o,0),i=r.x-o,a=new THREE.Vector3(i,r.y,r.z);e.setLineWidth(4),e.setColor("#ffe605"),e.drawLines([this.point,a,r]);var s=e.getMxObject().screenCoordLong2Doc(this.textHeight),c=r.clone().setX(r.x);e.setColor(16744448);var p=MxThreeJS_1.default.creatTextSprite(this.text,c,s,0,e.getColor());if(p){var d=new THREE.Box3,x=new THREE.Vector3;d.expandByObject(p),d.getSize(x),p.position.setX(p.position.x+x.x/2);var u=e.getMxObject().screenCoordLong2Doc(5),E=d.min.clone().setX(d.min.x+x.x/2).setY(d.min.y-u),h=d.max.clone().setX(d.max.x+x.x/2).setY(d.min.y+u);h.setY(d.max.y+u);var y=new THREE.Vector3(E.x,h.y),w=new THREE.Vector3(h.x,E.y);e.setColor("#ffffff"),e.setLineWidth(0),e.drawLine(E,y),e.drawLine(h,w),e.drawLine(E,w),e.drawLine(y,h);var l=u/2,f=[],g=[];f.push(new THREE.Vector3(y.x+l,y.y-u,y.z),new THREE.Vector3(y.x+l,y.y-l,y.z),new THREE.Vector3(y.x+u,y.y-l,y.z)),g.push(new THREE.Vector3(w.x-l,w.y+u,w.z),new THREE.Vector3(w.x-l,w.y+l,w.z),new THREE.Vector3(w.x-u,w.y+l,w.z)),e.drawLines(f),e.drawLines(g),e.setOpacity(.5),e.setColor("#663244"),e.setRenderOrder(-100),e.drawSolid([E,y,h,w]),e.setRenderOrder(100),e.drawEntity(p)}}},t.prototype.getGripPoints=function(){return[this.point]},t.prototype.onViewChange=function(){return this.setNeedUpdateDisplay(),!0},t.prototype.moveGripPointsAt=function(e,t){return 0===e&&this.point.add(t),!0},t.prototype.dwgIn=function(e){return this.onDwgIn(e),this.dwgInHelp(e,["point","text","textHeight","leadLen"]),!0},t.prototype.dwgOut=function(e){return this.onDwgOut(e),this.dwgOutHelp(e,["point","text","textHeight","leadLen"]),e},t}(MxDbEntity_1.default);exports.default=MxDbLeadTag;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxDbLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pt1=new THREE.Vector3,e.pt2=new THREE.Vector3,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbLine"},e.prototype.worldDraw=function(t){t.drawLine(this.pt1,this.pt2)},e.prototype.setPoint1=function(t){this.pt1=t},e.prototype.getPoint1=function(){return this.pt1},e.prototype.setPoint2=function(t){this.pt2=t},e.prototype.getPoint2=function(){return this.pt2},e.prototype.getGripPoints=function(){var t=[];t.push(this.pt1),t.push(this.pt2);var e=new THREE.Vector3(this.pt1.x+.5*(this.pt2.x-this.pt1.x),this.pt1.y+.5*(this.pt2.y-this.pt1.y),0);return t.push(e),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.pt1.add(e):1==t?this.pt2.add(e):2==t&&(this.pt1.add(e),this.pt2.add(e)),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.pt1.copy(t.pt1),this.pt2.copy(t.pt2),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.pt1=this.pt1,t.pt2=this.pt2,t},e.prototype.create=function(){return new e},e.prototype.getGeomExtents=function(){return new three_1.Box3(this.pt1,this.pt2)},e.prototype.getGetLength=function(){return this.pt1.distanceTo(this.pt2)},e}(MxDbEntity_1.default);exports.default=MxDbLine;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])})(n,o)};return function(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxDbPolyline=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.points=[],n}return __extends(n,t),n.prototype.getTypeName=function(){return"MxDbPolyline"},n.prototype.worldDraw=function(t){this.points.length<2||t.drawLines(this.points)},n.prototype.getGripPoints=function(){return this.points},n.prototype.moveGripPointsAt=function(t,n){return!(t>=this.points.length)&&(this.points[t].add(n),!0)},n.prototype.create=function(){return new n},n.prototype.dwgIn=function(t){var n=this;this.onDwgIn(t);var o=t.points;return this.points=[],o.forEach(function(t){n.points.push(new THREE.Vector3(t.x,t.y,t.z))}),!0},n.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t},n.prototype.addVertexAt=function(t){this.points.push(t)},n.prototype.numVerts=function(){return this.points.length},n.prototype.getPointAt=function(t){return t<this.points.length?this.points[t]:null},n.prototype.setPointAt=function(t,n){return t<this.points.length&&(this.points[t]=n,!0)},n}(MxDbEntity_1.default);exports.default=MxDbPolyline;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var a in e=arguments[r])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0});var MxDbEntity_1=require("../MxDbEntity"),three_1=require("three"),index_1=require("../../tools/three/index"),MxFun_1=require("../MxFun"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbRect=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cornerRadius=[],e.pt1=new three_1.Vector3,e.pt2=new three_1.Vector3,e.isSolidColorFill=!1,e.isLoadMaterialFromPath=!0,e.material=null,e}return __extends(e,t),e.prototype.worldDraw=function(t){var e=this,r=(0,index_1.computeRectPoints)(this.pt1,this.pt2);if(this.cornerRadius.length>0&&(r=(0,index_1.getToGenerateRoundedCorners)(r,this.cornerRadius)),t.getType()!=McGiWorldDrawType_1.default.kWorldDraw)return r.push(r[0]),void t.drawLines(r);var i={transparent:!0,depthTest:!1,opacity:this.opacity,visible:this.visible};if(this.isSolidColorFill){r=r.map(function(t){var e=t.x,r=t.y;return new three_1.Vector2(e,r)});var a=void 0;a=new three_1.ShapeGeometry(new three_1.Shape(r));var o=new three_1.MeshBasicMaterial(__assign({color:this.filter?this.filter._getFilterColor(this.color,this.opacity):new three_1.Color(this.color)},i)),n=new three_1.Mesh(a,o);t.drawEntity(n)}else if(this.fillImageSrc){if(this.material){r=r.map(function(t){var e=t.x,r=t.y;return new three_1.Vector2(e,r)});o=this.material,a=new three_1.ShapeGeometry(new three_1.Shape(r));if(a=(0,index_1.repairGeometryFaceVertexUvs)(a),this.filter){var s=o.map;this.fillImageParam&&(this.fillImageParam.center&&(s.center=this.fillImageParam.center),this.fillImageParam.offset&&(s.offset=this.fillImageParam.offset),this.fillImageParam.repeat&&(s.repeat=this.fillImageParam.repeat),this.fillImageParam.rotation&&(s.rotation=this.fillImageParam.rotation));var l=this.filter._getFilterShaderData(s);o=new three_1.ShaderMaterial(__assign(__assign({},l),i))}o.depthTest=!1,o.transparent=!0,o.opacity=this.opacity,o.visible=this.visible;n=new three_1.Mesh(a,o);t.drawEntity(n)}else if(this.fillImageSrc.length>0&&this.isLoadMaterialFromPath){var h=this;MxFun_1.default.loadImageMaterial(this.fillImageSrc,function(t){e.isLoadMaterialFromPath=!1,t&&(h.material=t,h.setNeedUpdateDisplay(),MxFun_1.default.updateDisplay())})}}else{a=(new three_1.BufferGeometry).setFromPoints(r),o=new three_1.LineBasicMaterial(__assign({color:this.getColor()},i));var p=new three_1.LineLoop(a,o);t.drawEntity(p)}},e.prototype.getGripPoints=function(){var t=[];t.push(this.pt1);var e=new three_1.Line3(this.pt1,this.pt2),r=new three_1.Vector3;return e.getCenter(r),t.push(r),t.push(this.pt2),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.pt1.add(e):1==t?(this.pt1.add(e),this.pt2.add(e)):2==t&&this.pt2.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.pt1.copy(t.pt1),this.pt2.copy(t.pt2),this.isSolidColorFill=t.isSolidColorFill,this.fillImageSrc=t.fillImageSrc,this.fillImageParam=t.fillImageParam,this.cornerRadius=t.cornerRadius,this.filter=t.filter,this.isLoadMaterialFromPath=!0,this.material=null,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.pt1=this.pt1,t.pt2=this.pt2,t.isSolidColorFill=this.isSolidColorFill,t.fillImageSrc=this.fillImageSrc,t.fillImageParam=this.fillImageParam,t.cornerRadius=this.cornerRadius,t.filter=this.filter,t},e.prototype.create=function(){return new e},e.prototype.transformBy=function(t){this.pt1.applyMatrix4(t),this.pt2.applyMatrix4(t)},e.prototype.setRadius=function(t,e){void 0===e&&(e=!0),t instanceof Array?this.cornerRadius=t.map(function(t){return e?MxFun_1.default.screenCoordLong2Doc(t):t}):this.cornerRadius=t>0?e?[MxFun_1.default.screenCoordLong2Doc(t),MxFun_1.default.screenCoordLong2Doc(t),MxFun_1.default.screenCoordLong2Doc(t),MxFun_1.default.screenCoordLong2Doc(t)]:[t,t,t,t]:[]},e.prototype.getTypeName=function(){return"MxDbRect"},e.prototype.getFilter=function(){return this.filter},e.prototype.setFilter=function(t){this.filter=t,this.isLoadMaterialFromPath=!0,this.material=null},e.prototype.setFillImagePath=function(t){this.fillImageSrc=t,this.isLoadMaterialFromPath=!0,this.material=null,this.fillImageSrc&&(this.isSolidColorFill=!1)},e.prototype.getFillImagePath=function(){return this.fillImageSrc},e}(MxDbEntity_1.default);exports.default=MxDbRect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var formatting_1=require("../../tools/formatting"),three_1=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbText=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.position=new three_1.Vector3,e.text="",e.height=1,e.angle=0,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbText"},e.prototype.worldDraw=function(t){if(this.text.length>0&&(t.drawText(this.text,this.height,this.angle,this.position),t.getType()===McGiWorldDrawType_1.default.kSelectDraw)){var e=MxThreeJS_1.default.creatTextSprite(this.text,this.position,this.height,this.angle,16777215);if(e){var i=new three_1.Box3;i.expandByObject(e);var r=i.min,n=i.max,o={x:r.x,y:n.y},s={x:n.x,y:r.y};t.drawLine(r.x,r.y,o.x,o.y),t.drawLine(o.x,o.y,n.x,n.y),t.drawLine(n.x,n.y,s.x,s.y),t.drawLine(s.x,s.y,r.x,r.y)}}},e.prototype.getGripPoints=function(){return[this.position]},e.prototype.moveGripPointsAt=function(t,e){return 0===t&&this.position.add(e),!0},e.prototype.create=function(){return new e},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.position.copy(t.position),this.text=t.text.substr(0),this.height=t.height,this.angle=t.angle,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.position=this.position,t.text=this.text,t.height=this.height,t.angle=this.angle,t},e.prototype.getGeomExtents=function(){var t=document.createElement("canvas").getContext("2d");if(null==t)return null;var e=(0,formatting_1.formatString)("normal {0}px Arial","256");t.font=e;var i=t.measureText(this.text).width/256,r=this.position.x-i*this.height*.5,n=this.position.y-.5*this.height,o=this.position.x+i*this.height*.5,s=this.position.y+.5*this.height;return new three_1.Box3(new three_1.Vector3(r,n,this.position.z),new three_1.Vector3(o,s,this.position.z))},e}(MxDbEntity_1.default);exports.default=MxDbText;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxFilters=function(){function t(){this.uniformObj={},this.filtersStr="",this.filtersTypes="",this.VSHADER_SOURCE="\n varying vec2 v_Uv; \n void main () {\n v_Uv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",this.FSHADER_SOURCE="\n varying vec2 v_Uv;\n uniform sampler2D e_Texture;\n uniform mat4 colorMatrix;\n ".concat(this.filtersStr,"\n void main () {\n vec4 color = texture2D( e_Texture, v_Uv );\n color = color * colorMatrix;\n ").concat(this.filtersTypes,"\n gl_FragColor = color;\n }"),this._matrix=new three_1.Matrix4}return t.prototype.channel=function(t){var e=t.r,r=void 0===e?1:e,i=t.g,o=void 0===i?1:i,n=t.b,s=void 0===n?1:n;return this._matrix=(new three_1.Matrix4).set(r,0,0,0,0,o,0,0,0,0,s,0,0,0,0,1).multiply(this._matrix),this},t.prototype.brightness=function(t){return this._matrix=(new three_1.Matrix4).set(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1).multiply(this._matrix),this},t.prototype.saturate=function(t){var e=.2126*(1-t),r=.7152*(1-t),i=.0722*(1-t);return this._matrix=(new three_1.Matrix4).set(e+t,r,i,0,e,r+t,i,0,e,r,i+t,0,0,0,0,1).multiply(this._matrix),this},t.prototype.contrast=function(t){var e=.5*(1-t);return this._matrix=(new three_1.Matrix4).set(t,0,0,0,0,t,0,0,0,0,t,0,e,e,e,1).multiply(this._matrix),this},t.prototype.opacity=function(t){return this._matrix=(new three_1.Matrix4).set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,t).multiply(this._matrix),this},t.prototype.invert=function(t){var e=1-2*t;return this._matrix=(new three_1.Matrix4).set(e,0,0,0,0,e,0,0,0,0,e,0,t,t,t,1).multiply(this._matrix),this},t.prototype.grayscale=function(t){void 0===t&&(t=1);var e=.2126*t,r=.7152*t,i=.0722*t;return this._matrix=(new three_1.Matrix4).set(e+1-t,r,i,0,e,r+1-t,i,0,e,r,i+1-t,0,0,0,0,1).multiply(this._matrix),this},t.prototype.sepia=function(t){return void 0===t&&(t=1),this._matrix=(new three_1.Matrix4).set(1-.607*t,.769*t,.189*t,0,.349*t,1-.314*t,.168*t,0,.272*t,.534*t,1-.869*t,0,0,0,0,1).multiply(this._matrix),this},t.prototype.hueRotate=function(t){var e=t/180*Math.PI,r=Math.cos(e),i=Math.sin(e);return this._matrix=(new three_1.Matrix4).set(.2126+.7874*r+-.2126*i,.7152+-.7152*r+-.7152*i,.0722+-.0722*r+.9278*i,0,.2126+-.2126*r+.143*i,.7152+r*(1-.7152)+.14*i,.0722+-.0722*r+-.283*i,0,.2126+-.2126*r+-.7874*i,.7152+-.7152*r+.7152*i,.0722+.9278*r+.0722*i,0,0,0,0,1).multiply(this._matrix),this},t.prototype.convolution=function(t,e,r){return void 0===e&&(e=1/9),void 0===r&&(r=521),this.uniformObj=__assign(__assign({},this.uniformObj),{cKernel:{value:t.toArray()},stStep:{value:e},scaleFactor:{value:r}}),this.filtersTypes.indexOf("convolutionTextureColor")<0&&(this.filtersStr+="\n uniform float cKernel[9];\n uniform float stStep;\n uniform float scaleFactor;\n vec4 convolutionTextureColor(vec4 color) {\n vec2 offsets[9];\n offsets[0] = vec2(-1.0,-1.0);\n offsets[1] = vec2(0.0,-1.0);\n offsets[2] = vec2(1.0,-1.0);\n offsets[3] = vec2(-1.0,0.0);\n offsets[4] = vec2(0.0,0.0);\n offsets[5] = vec2(1.0,0.0);\n offsets[6] = vec2(-1.0,1.0);\n offsets[7] = vec2(0.0,1.0);\n offsets[8] = vec2(1.0,1.0);\n \n vec4 sum = color;\n for(int i = 0; i < 9; i++) {\n sum = sum + cKernel[i] * scaleFactor * texture2D(e_Texture, v_Uv + offsets[i] / stStep);\n };\n return sum;\n }",this.filtersTypes+="color = convolutionTextureColor(color);\n"),this},t.prototype.reset=function(){return this.uniformObj={},this.filtersStr="",this.filtersTypes="",this._matrix=new three_1.Matrix4,this},t.prototype._getFilterShaderData=function(t){return{uniforms:__assign({e_Texture:{value:t},colorMatrix:{value:this._matrix}},this.uniformObj),vertexShader:this.VSHADER_SOURCE,fragmentShader:this.FSHADER_SOURCE}},t.prototype._getFilterColor=function(t,e){void 0===t&&(t="#000000"),void 0===e&&(e=1);var r=(t=new three_1.Color(t)).r,i=t.g,o=t.b,n=this._matrix.toArray(),s=(n[12],n[13],n[14],n[15],n[0]*r+n[1]*r+n[2]*r+n[3]*e),a=n[4]*i+n[5]*i+n[6]*i+n[7]*e,u=n[8]*o+n[9]*o+n[10]*o+n[11]*e;return t.setRGB(s,a,u),t},t}();exports.default=MxFilters;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var store_1=require("../store/store"),Mxassembly=function(){function t(){this.mxassembly=null}return t.prototype.initImp=function(){this.mxassembly||store_1.default.state.Mxassembly&&(this.mxassembly=store_1.default.state.Mxassembly)},t.prototype.NewMcGePoint3d=function(t,e,s){this.initImp();var r=new this.mxassembly.McGePoint3d;return t&&(r.x=t),e&&(r.y=e),s&&(r.z=s),r},t.prototype.NewMcGePoint3dArray=function(t){var e=this;this.initImp();var s=new this.mxassembly.McGePoint3dArray;return t&&t.forEach(function(t){var r=e.NewMcGePoint3d();r.x=t.x,r.y=t.y,r.z=t.z,s.append(r)}),s},t}();exports.default=Mxassembly;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var dynamicImport_1=require("../../tools/dynamicImport"),store_1=require("../store"),mxfun_es5_js_1=require("./mxfun.es5.js"),mxcadassembly_es5_js_1=require("./mxcadassembly_es5.js");function rxInitMxEntity(){var e;null===(e=store_1.default.state.MxFun)||void 0===e||e.initDynamicCreate(dynamicImport_1.dynamicCreateMxObject)}function loadCoreCode(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(t){return[2,new Promise(function(t,n){return __awaiter(e,void 0,void 0,function(){var e,r,o;return __generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),store_1.default.state.MxFun?(console.error("mx loadCoreCode ady call"),t(),[2]):(e=window,r=window,[4,(0,dynamicImport_1.dynamicImport)("jquery")]);case 1:return e.$=r.jQuery=i.sent(),window.MxDocumentReady=void 0,window.MxUiMain=function(e){var t=e("./MxFun").MxFun;store_1.default.commit("setMxFun",t),store_1.default.events.emit("MxUiMain",e),window.MxUiMain=void 0},window.MxMain=function(e){return store_1.default.events.emit("MxMain",e),window.MxMain=void 0,rxInitMxEntity(),t(),0},(0,mxcadassembly_es5_js_1.default)().then(function(e){store_1.default.commit("setMxassembly",e)}),(0,mxfun_es5_js_1.default)(),[3,3];case 2:return o=i.sent(),n({code:"error",msg:o}),[3,3];case 3:return[2]}})})})]})})}exports.default=loadCoreCode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(exports,"__esModule",{value:!0});var store_1=require("../store/store"),create_1=require("../../tools/dom/create"),dynamicImport_1=require("../../tools/dynamicImport"),_=require("lodash");function useCanvasResizeListener(e,t,r){return void 0===r&&(r=100),__awaiter(this,void 0,void 0,function(){var n,a,o;return __generator(this,function(i){switch(i.label){case 0:return store_1.default.state.MxFun?e?(n=e).isLoadCanvasResizeListene?[3,2]:(n.isLoadCanvasResizeListene=!0,a=void 0,e.addEvent("addResizeEvent",function(e){a=e}),[4,(0,dynamicImport_1.dynamicImport)("element-resize-event-polyfill")]):(console.error("请确保mxdrawObj参数 是通过调用MxFun.createMxObject的callback回调函数拿到的mxDraw对象"),[2]):(console.error("请先调用loadCoreCode方法! "),[2]);case 1:i.sent(),(o=(0,create_1.createCanvasParent)(t)).addEventListener?o.addEventListener("resize",_.throttle(function(e){a&&a()},r),!1):console.log("mx: parentdiv[addEventListener] invalid"),i.label=2;case 2:return[2]}})})}exports.default=useCanvasResizeListener;
|