@mlightcad/cad-simple-viewer 1.5.5 → 1.5.6
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/LICENSE +1 -1
- package/README.md +3 -0
- package/dist/{index.js → cad-simple-viewer.js} +16583 -14248
- package/dist/cad-simple-viewer.umd.cjs +921 -0
- package/dist/dxf-parser-worker.js +2002 -0
- package/dist/libredwg-parser-worker.js +5388 -5122
- package/dist/mtext-renderer-worker.js +3061 -2858
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +3 -0
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +7 -0
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +84 -10
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcDbOpenDatabaseOptions.d.ts +29 -0
- package/lib/app/AcDbOpenDatabaseOptions.d.ts.map +1 -1
- package/lib/app/AcDbOpenDatabaseOptions.js +10 -1
- package/lib/app/AcDbOpenDatabaseOptions.js.map +1 -1
- package/lib/app/index.d.ts +1 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +1 -0
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApCacheFontCmd.d.ts +25 -0
- package/lib/command/AcApCacheFontCmd.d.ts.map +1 -0
- package/lib/command/AcApCacheFontCmd.js +142 -0
- package/lib/command/AcApCacheFontCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
- package/lib/command/AcApSysVarCmd.js +5 -11
- package/lib/command/AcApSysVarCmd.js.map +1 -1
- package/lib/command/convert/AcApPngConvertor.d.ts +1 -1
- package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
- package/lib/command/convert/AcApPngConvertor.js +5 -2
- package/lib/command/convert/AcApPngConvertor.js.map +1 -1
- package/lib/command/draw/AcApArcCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApArcCmd.js +2 -5
- package/lib/command/draw/AcApArcCmd.js.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.js +2 -5
- package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
- package/lib/command/draw/AcApHatchCmd.d.ts +1 -1
- package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMLineCmd.js +2 -2
- package/lib/command/draw/AcApMLineCmd.js.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.js +2 -5
- package/lib/command/draw/AcApPolygonCmd.js.map +1 -1
- package/lib/command/draw/AcApRectCmd.d.ts +6 -0
- package/lib/command/draw/AcApRectCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApRectCmd.js +12 -10
- package/lib/command/draw/AcApRectCmd.js.map +1 -1
- package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApXLineCmd.js +1 -1
- package/lib/command/draw/AcApXLineCmd.js.map +1 -1
- package/lib/command/index.d.ts +1 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +1 -0
- package/lib/command/index.js.map +1 -1
- package/lib/command/layer/AcApLayerCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCmd.js +13 -23
- package/lib/command/layer/AcApLayerCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.js +3 -13
- package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.js +8 -18
- package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.js +11 -21
- package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.js +7 -17
- package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.js +4 -14
- package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerOffCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOffCmd.js +11 -21
- package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.js +2 -13
- package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.js +2 -13
- package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.js +2 -13
- package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.js +4 -15
- package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts +0 -7
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.js +4 -14
- package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.js +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +9 -4
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApRotateCmd.js +2 -5
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/modify/AcApUnisolateObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApUnisolateObjectsCmd.js +3 -3
- package/lib/command/modify/AcApUnisolateObjectsCmd.js.map +1 -1
- package/lib/editor/command/AcEdCommand.d.ts +16 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +23 -0
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/AcEdUiColor.d.ts +13 -13
- package/lib/editor/global/AcEdUiColor.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiColor.js +21 -20
- package/lib/editor/global/AcEdUiColor.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +7 -1
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/grip/AcEdGripEditSession.d.ts +29 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.js +76 -0
- package/lib/editor/grip/AcEdGripEditSession.js.map +1 -0
- package/lib/editor/grip/AcEdGripHandle.d.ts +20 -0
- package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripHandle.js +59 -0
- package/lib/editor/grip/AcEdGripHandle.js.map +1 -0
- package/lib/editor/grip/AcEdGripManager.d.ts +159 -0
- package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripManager.js +336 -0
- package/lib/editor/grip/AcEdGripManager.js.map +1 -0
- package/lib/editor/grip/AcEdGripPolicy.d.ts +6 -0
- package/lib/editor/grip/AcEdGripPolicy.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripPolicy.js +30 -0
- package/lib/editor/grip/AcEdGripPolicy.js.map +1 -0
- package/lib/editor/grip/AcEdGripPreviewJig.d.ts +21 -0
- package/lib/editor/grip/AcEdGripPreviewJig.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripPreviewJig.js +73 -0
- package/lib/editor/grip/AcEdGripPreviewJig.js.map +1 -0
- package/lib/editor/grip/index.d.ts +5 -0
- package/lib/editor/grip/index.d.ts.map +1 -0
- package/lib/editor/grip/index.js +5 -0
- package/lib/editor/grip/index.js.map +1 -0
- package/lib/editor/index.d.ts +1 -0
- package/lib/editor/index.d.ts.map +1 -1
- package/lib/editor/index.js +1 -0
- package/lib/editor/index.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +2 -2
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdOsnapResolver.d.ts +34 -0
- package/lib/editor/input/AcEdOsnapResolver.d.ts.map +1 -0
- package/lib/editor/input/AcEdOsnapResolver.js +117 -0
- package/lib/editor/input/AcEdOsnapResolver.js.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.js +6 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +20 -1
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.js +3 -0
- package/lib/editor/input/handler/AcEdKeywordHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.js +6 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +17 -1
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdPointHandler.js +89 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdStringHandler.js +3 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -1
- package/lib/editor/input/index.d.ts +1 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +1 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/session/AcEdInputSession.d.ts +11 -1
- package/lib/editor/input/session/AcEdInputSession.d.ts.map +1 -1
- package/lib/editor/input/session/AcEdInputSession.js.map +1 -1
- package/lib/editor/input/session/AcEdPromptInputSession.d.ts +51 -0
- package/lib/editor/input/session/AcEdPromptInputSession.d.ts.map +1 -0
- package/lib/editor/input/session/AcEdPromptInputSession.js +109 -0
- package/lib/editor/input/session/AcEdPromptInputSession.js.map +1 -0
- package/lib/editor/input/session/index.d.ts +1 -0
- package/lib/editor/input/session/index.d.ts.map +1 -1
- package/lib/editor/input/session/index.js +1 -0
- package/lib/editor/input/session/index.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +10 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +67 -35
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +0 -11
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +9 -119
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +26 -23
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +135 -83
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.js +2 -2
- package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +7 -0
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +12 -0
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/i18n/en/command.d.ts +3 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +3 -0
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +26 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +134 -108
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/en/main.d.ts +3 -0
- package/lib/i18n/en/main.d.ts.map +1 -1
- package/lib/i18n/en/main.js +4 -1
- package/lib/i18n/en/main.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +3 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +3 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +26 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +134 -108
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/i18n/zh/main.d.ts +3 -0
- package/lib/i18n/zh/main.d.ts.map +1 -1
- package/lib/i18n/zh/main.js +4 -1
- package/lib/i18n/zh/main.js.map +1 -1
- package/lib/plugin/AcApLazyPluginRegistration.d.ts +3 -8
- package/lib/plugin/AcApLazyPluginRegistration.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +2 -2
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
- package/lib/util/AcApFontUtil.d.ts +14 -2
- package/lib/util/AcApFontUtil.d.ts.map +1 -1
- package/lib/util/AcApFontUtil.js +18 -0
- package/lib/util/AcApFontUtil.js.map +1 -1
- package/lib/view/AcTrEntityDisplayController.d.ts +46 -0
- package/lib/view/AcTrEntityDisplayController.d.ts.map +1 -0
- package/lib/view/AcTrEntityDisplayController.js +114 -0
- package/lib/view/AcTrEntityDisplayController.js.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts +27 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js +65 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -0
- package/lib/view/AcTrLayer.d.ts +7 -0
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +11 -2
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayout.d.ts +1 -1
- package/lib/view/AcTrLayout.js +2 -2
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrProgressiveOpenFitController.d.ts +64 -0
- package/lib/view/AcTrProgressiveOpenFitController.d.ts.map +1 -0
- package/lib/view/AcTrProgressiveOpenFitController.js +209 -0
- package/lib/view/AcTrProgressiveOpenFitController.js.map +1 -0
- package/lib/view/AcTrView2d.d.ts +95 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +539 -200
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +13 -11
- package/dist/index.umd.cjs +0 -897
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { AcGeBox2d, AcGeVector2d } from '@mlightcad/data-model';
|
|
38
|
+
/**
|
|
39
|
+
* Coordinates camera framing while a document is opened and entities are still
|
|
40
|
+
* being batch-converted into the scene.
|
|
41
|
+
*
|
|
42
|
+
* Responsibilities:
|
|
43
|
+
* - Throttled incremental fit for large drawings while entities convert
|
|
44
|
+
* - Final fit once conversion completes (always from batch geometry bounds)
|
|
45
|
+
* - Stop auto-framing when the user pans or zooms manually
|
|
46
|
+
* - Yield to the render loop so geometry appears progressively
|
|
47
|
+
*
|
|
48
|
+
* The host view ({@link AcTrView2d}) supplies layout fit boxes and performs
|
|
49
|
+
* the actual camera updates through {@link AcTrProgressiveOpenFitZoomFn}.
|
|
50
|
+
*/
|
|
51
|
+
var AcTrProgressiveOpenFitController = /** @class */ (function () {
|
|
52
|
+
function AcTrProgressiveOpenFitController(zoomTo) {
|
|
53
|
+
this.zoomTo = zoomTo;
|
|
54
|
+
this.active = false;
|
|
55
|
+
this.userAdjusted = false;
|
|
56
|
+
this.programmaticDepth = 0;
|
|
57
|
+
this.incrementalEnabled = false;
|
|
58
|
+
this.initialPendingCount = 0;
|
|
59
|
+
this.lastZoomAt = 0;
|
|
60
|
+
}
|
|
61
|
+
Object.defineProperty(AcTrProgressiveOpenFitController.prototype, "isActive", {
|
|
62
|
+
get: function () {
|
|
63
|
+
return this.active;
|
|
64
|
+
},
|
|
65
|
+
enumerable: false,
|
|
66
|
+
configurable: true
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Starts progressive open framing for the current document open operation.
|
|
70
|
+
*/
|
|
71
|
+
AcTrProgressiveOpenFitController.prototype.begin = function (pendingEntityCount) {
|
|
72
|
+
this.active = true;
|
|
73
|
+
this.userAdjusted = false;
|
|
74
|
+
this.lastZoomAt = 0;
|
|
75
|
+
this.initialPendingCount = pendingEntityCount;
|
|
76
|
+
this.lastFittedBox = undefined;
|
|
77
|
+
this.incrementalEnabled = this.shouldEnableIncrementalFit();
|
|
78
|
+
};
|
|
79
|
+
/** Ends progressive open framing. */
|
|
80
|
+
AcTrProgressiveOpenFitController.prototype.end = function () {
|
|
81
|
+
this.active = false;
|
|
82
|
+
this.incrementalEnabled = false;
|
|
83
|
+
this.lastFittedBox = undefined;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Applies the terminal fit after all entities are converted, unless the user
|
|
87
|
+
* already adjusted the view manually.
|
|
88
|
+
*/
|
|
89
|
+
AcTrProgressiveOpenFitController.prototype.applyFinalFit = function (resolveFitBox) {
|
|
90
|
+
if (this.userAdjusted) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
var box = resolveFitBox();
|
|
94
|
+
if (box) {
|
|
95
|
+
this.applyZoom(box);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Notifies the controller that the active layout camera changed. User-driven
|
|
100
|
+
* changes cancel further auto framing.
|
|
101
|
+
*/
|
|
102
|
+
AcTrProgressiveOpenFitController.prototype.onLayoutViewChanged = function () {
|
|
103
|
+
if (!this.active || this.userAdjusted || this.programmaticDepth > 0) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.userAdjusted = true;
|
|
107
|
+
this.end();
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Called after one entity (or group bucket) was added to the scene during open.
|
|
111
|
+
*/
|
|
112
|
+
AcTrProgressiveOpenFitController.prototype.afterGeometryBatch = function (resolveFitBox, entityIndex) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
114
|
+
return __generator(this, function (_a) {
|
|
115
|
+
switch (_a.label) {
|
|
116
|
+
case 0:
|
|
117
|
+
this.maybeIncrementalFit(resolveFitBox);
|
|
118
|
+
if (!(entityIndex != null)) return [3 /*break*/, 2];
|
|
119
|
+
return [4 /*yield*/, this.yieldForRender(entityIndex)];
|
|
120
|
+
case 1:
|
|
121
|
+
_a.sent();
|
|
122
|
+
_a.label = 2;
|
|
123
|
+
case 2: return [2 /*return*/];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Yields to {@link requestAnimationFrame} periodically so the render loop can
|
|
130
|
+
* paint converted geometry during document open.
|
|
131
|
+
*/
|
|
132
|
+
AcTrProgressiveOpenFitController.prototype.yieldForRender = function (entityIndex) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
+
return __generator(this, function (_a) {
|
|
135
|
+
switch (_a.label) {
|
|
136
|
+
case 0:
|
|
137
|
+
if (!this.active ||
|
|
138
|
+
entityIndex % AcTrProgressiveOpenFitController.YIELD_EVERY !== 0) {
|
|
139
|
+
return [2 /*return*/];
|
|
140
|
+
}
|
|
141
|
+
return [4 /*yield*/, new Promise(function (resolve) {
|
|
142
|
+
requestAnimationFrame(function () { return resolve(); });
|
|
143
|
+
})];
|
|
144
|
+
case 1:
|
|
145
|
+
_a.sent();
|
|
146
|
+
return [2 /*return*/];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
AcTrProgressiveOpenFitController.prototype.maybeIncrementalFit = function (resolveFitBox) {
|
|
152
|
+
if (!this.active || !this.incrementalEnabled || this.userAdjusted) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
var now = performance.now();
|
|
156
|
+
if (now - this.lastZoomAt <
|
|
157
|
+
AcTrProgressiveOpenFitController.FIT_INTERVAL_MS) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
var box = resolveFitBox();
|
|
161
|
+
if (!box || !this.shouldApplyIncrementalFit(box)) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this.lastZoomAt = now;
|
|
165
|
+
this.applyZoom(box);
|
|
166
|
+
};
|
|
167
|
+
AcTrProgressiveOpenFitController.prototype.shouldEnableIncrementalFit = function () {
|
|
168
|
+
return (this.initialPendingCount >=
|
|
169
|
+
AcTrProgressiveOpenFitController.SMALL_ENTITY_THRESHOLD);
|
|
170
|
+
};
|
|
171
|
+
AcTrProgressiveOpenFitController.prototype.shouldApplyIncrementalFit = function (box) {
|
|
172
|
+
var lastBox = this.lastFittedBox;
|
|
173
|
+
if (!lastBox) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
var lastArea = this.estimateBoxArea(lastBox);
|
|
177
|
+
if (lastArea <= Number.EPSILON) {
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
return (this.estimateBoxArea(box) >=
|
|
181
|
+
lastArea * AcTrProgressiveOpenFitController.BBOX_GROWTH_RATIO);
|
|
182
|
+
};
|
|
183
|
+
AcTrProgressiveOpenFitController.prototype.applyZoom = function (box, margin) {
|
|
184
|
+
if (margin === void 0) { margin = 1.1; }
|
|
185
|
+
this.programmaticDepth++;
|
|
186
|
+
try {
|
|
187
|
+
this.zoomTo(box, margin);
|
|
188
|
+
this.lastFittedBox = this.snapshotFitBox(box);
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
this.programmaticDepth--;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
AcTrProgressiveOpenFitController.prototype.estimateBoxArea = function (box) {
|
|
195
|
+
var size = new AcGeVector2d();
|
|
196
|
+
box.getSize(size);
|
|
197
|
+
return Math.abs(size.x) * Math.abs(size.y);
|
|
198
|
+
};
|
|
199
|
+
AcTrProgressiveOpenFitController.prototype.snapshotFitBox = function (box) {
|
|
200
|
+
return new AcGeBox2d({ x: box.min.x, y: box.min.y }, { x: box.max.x, y: box.max.y });
|
|
201
|
+
};
|
|
202
|
+
AcTrProgressiveOpenFitController.SMALL_ENTITY_THRESHOLD = 500;
|
|
203
|
+
AcTrProgressiveOpenFitController.BBOX_GROWTH_RATIO = 1.5;
|
|
204
|
+
AcTrProgressiveOpenFitController.FIT_INTERVAL_MS = 500;
|
|
205
|
+
AcTrProgressiveOpenFitController.YIELD_EVERY = 32;
|
|
206
|
+
return AcTrProgressiveOpenFitController;
|
|
207
|
+
}());
|
|
208
|
+
export { AcTrProgressiveOpenFitController };
|
|
209
|
+
//# sourceMappingURL=AcTrProgressiveOpenFitController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcTrProgressiveOpenFitController.js","sourceRoot":"","sources":["../../src/view/AcTrProgressiveOpenFitController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAQ/D;;;;;;;;;;;;GAYG;AACH;IAcE,0CAA6B,MAAoC;QAApC,WAAM,GAAN,MAAM,CAA8B;QARzD,WAAM,GAAG,KAAK,CAAA;QACd,iBAAY,GAAG,KAAK,CAAA;QACpB,sBAAiB,GAAG,CAAC,CAAA;QACrB,uBAAkB,GAAG,KAAK,CAAA;QAC1B,wBAAmB,GAAG,CAAC,CAAA;QAEvB,eAAU,GAAG,CAAC,CAAA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G,CAAC,GAAG,CAAC,CAAC,EAAE,CAC/B,CAAA;IACH,CAAC;IAnKuB,uDAAsB,GAAG,GAAG,AAAN,CAAM;IAC5B,kDAAiB,GAAG,GAAG,AAAN,CAAM;IACvB,gDAAe,GAAG,GAAG,AAAN,CAAM;IACrB,4CAAW,GAAG,EAAE,AAAL,CAAK;IAiK1C,uCAAC;CAAA,AArKD,IAqKC;SArKY,gCAAgC"}
|
package/lib/view/AcTrView2d.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AcDbDatabase, AcDbEntity, AcDbLayerTableRecord, AcDbLayerTableRecordAttrs, AcDbLayout, AcDbObjectId, AcGeBox2d, AcGeBox3d, AcGePoint2d, AcGePoint2dLike } from '@mlightcad/data-model';
|
|
2
2
|
import { AcTrHtmlTransientManager, AcTrRenderer } from '@mlightcad/three-renderer';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import { AcEdBaseView, AcEdCalculateSizeCallback, AcEdSpatialQueryResultItemEx, AcEdViewMode } from '../editor';
|
|
4
|
+
import { AcEdBaseView, AcEdCalculateSizeCallback, AcEdGripManager, AcEdSpatialQueryResultItemEx, AcEdViewMode } from '../editor';
|
|
5
5
|
import { AcTrLayoutView } from './AcTrLayoutView';
|
|
6
6
|
import { AcTrScene } from './AcTrScene';
|
|
7
7
|
/**
|
|
@@ -113,6 +113,27 @@ export declare class AcTrView2d extends AcEdBaseView {
|
|
|
113
113
|
* race during document open.
|
|
114
114
|
*/
|
|
115
115
|
private _externallyFramedLayouts;
|
|
116
|
+
/** Progressive camera framing while entities batch-convert at document open. */
|
|
117
|
+
private readonly _progressiveOpenFit;
|
|
118
|
+
/** Entity display policy for layer-aware conversion skipping. */
|
|
119
|
+
private readonly _entityDisplay;
|
|
120
|
+
/**
|
|
121
|
+
* Layer names with an in-flight {@link convertMissingEntitiesOnLayer} pass.
|
|
122
|
+
*
|
|
123
|
+
* {@link updateLayer} triggers that conversion fire-and-forget when a layer
|
|
124
|
+
* becomes visible again. Rapid or repeated layer-on events for the same name
|
|
125
|
+
* would otherwise start parallel {@link batchConvert} runs over the same
|
|
126
|
+
* pending entities. `hasEntity` prevents duplicate scene entries, but not the
|
|
127
|
+
* wasted conversion work — this set skips re-entry until the current pass ends.
|
|
128
|
+
*/
|
|
129
|
+
private readonly _convertingLayers;
|
|
130
|
+
/**
|
|
131
|
+
* When true, entity conversion during document open is deferred across
|
|
132
|
+
* event-loop turns so geometry appears incrementally.
|
|
133
|
+
*/
|
|
134
|
+
private _progressiveRendering;
|
|
135
|
+
/** Grip point display and drag editing (Write mode only). */
|
|
136
|
+
private _gripManager;
|
|
116
137
|
/**
|
|
117
138
|
* Creates a new 2D CAD viewer instance.
|
|
118
139
|
*
|
|
@@ -151,12 +172,36 @@ export declare class AcTrView2d extends AcEdBaseView {
|
|
|
151
172
|
* @returns The renderer instance
|
|
152
173
|
*/
|
|
153
174
|
get renderer(): AcTrRenderer;
|
|
175
|
+
/** Grip point manager for the view (Write mode only). */
|
|
176
|
+
get gripManager(): AcEdGripManager;
|
|
154
177
|
/**
|
|
155
178
|
* Gets whether the view needs to be re-rendered.
|
|
156
179
|
*
|
|
157
180
|
* @returns True if the view is dirty and needs re-rendering
|
|
158
181
|
*/
|
|
159
182
|
get isDirty(): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* True while {@link addEntity} batch-conversion callbacks are still running.
|
|
185
|
+
*
|
|
186
|
+
* Parsing can report 100% before this reaches zero; callers opening files
|
|
187
|
+
* should wait on this (as {@link zoomToFitDrawing} does) before hiding
|
|
188
|
+
* progress UI or assuming the canvas is ready.
|
|
189
|
+
*/
|
|
190
|
+
get isProcessingEntities(): boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Whether entity conversion during document open is deferred for progressive display.
|
|
193
|
+
*/
|
|
194
|
+
get progressiveRendering(): boolean;
|
|
195
|
+
set progressiveRendering(value: boolean);
|
|
196
|
+
/**
|
|
197
|
+
* Enables progressive camera framing while entities are batch-converted at
|
|
198
|
+
* document open. Pair with {@link zoomToFitDrawing} for the final accurate fit.
|
|
199
|
+
*/
|
|
200
|
+
beginProgressiveOpenFit(): void;
|
|
201
|
+
/**
|
|
202
|
+
* Disables progressive open framing after the final zoom-to-fit runs.
|
|
203
|
+
*/
|
|
204
|
+
endProgressiveOpenFit(): void;
|
|
160
205
|
/**
|
|
161
206
|
* Sets whether the view needs to be re-rendered.
|
|
162
207
|
*
|
|
@@ -226,6 +271,18 @@ export declare class AcTrView2d extends AcEdBaseView {
|
|
|
226
271
|
* CAD scene graph used for rendering and HTML export.
|
|
227
272
|
*/
|
|
228
273
|
get cadScene(): AcTrScene;
|
|
274
|
+
/**
|
|
275
|
+
* Converts every drawable entity into the scene before offline export.
|
|
276
|
+
*
|
|
277
|
+
* Interactive viewing skips off/frozen layers for performance; HTML snapshots
|
|
278
|
+
* store layer visibility separately and need full geometry so the exported
|
|
279
|
+
* layer panel can toggle layers on later.
|
|
280
|
+
*
|
|
281
|
+
* Converted geometry remains in the live scene after this call completes.
|
|
282
|
+
*/
|
|
283
|
+
ensureEntitiesConvertedForExport(options?: {
|
|
284
|
+
includeInvisibleLayers?: boolean;
|
|
285
|
+
}): Promise<void>;
|
|
229
286
|
/**
|
|
230
287
|
* The internal THREE scene used by this view.
|
|
231
288
|
*/
|
|
@@ -503,7 +560,31 @@ export declare class AcTrView2d extends AcEdBaseView {
|
|
|
503
560
|
* Default value is false.
|
|
504
561
|
*/
|
|
505
562
|
private toggleStatsVisibility;
|
|
563
|
+
private toLayerInfo;
|
|
564
|
+
private resolveLayerInfo;
|
|
565
|
+
/**
|
|
566
|
+
* Converts entities on the given layer that were skipped while the layer was
|
|
567
|
+
* off/frozen and therefore are not yet present in the scene.
|
|
568
|
+
*/
|
|
569
|
+
private convertMissingEntitiesOnLayer;
|
|
506
570
|
private drawEntity;
|
|
571
|
+
/**
|
|
572
|
+
* Finishes geometry for a converted entity. Progressive mode defers MTEXT/SHAPE
|
|
573
|
+
* to async workers; non-progressive mode uses synchronous drawing from
|
|
574
|
+
* {@link drawEntity}(..., false).
|
|
575
|
+
*/
|
|
576
|
+
private finishEntityGeometry;
|
|
577
|
+
/**
|
|
578
|
+
* Returns true when an entity already produced drawable geometry via syncDraw.
|
|
579
|
+
* MText/Shape expose syncDraw even when delay=true left the entity empty.
|
|
580
|
+
*/
|
|
581
|
+
private entityUsedSyncDraw;
|
|
582
|
+
/**
|
|
583
|
+
* Finishes deferred MText/Shape geometry inside a block group before it is
|
|
584
|
+
* split by layer. Block-reference attributes are created during INSERT
|
|
585
|
+
* worldDraw and can be left empty when progressive open passes delay=true.
|
|
586
|
+
*/
|
|
587
|
+
private ensureGroupDrawableGeometry;
|
|
507
588
|
/**
|
|
508
589
|
* Walks the given block table record once and creates one
|
|
509
590
|
* `AcTrViewportView` for every real `AcDbViewport` entity it finds
|
|
@@ -530,6 +611,13 @@ export declare class AcTrView2d extends AcEdBaseView {
|
|
|
530
611
|
*/
|
|
531
612
|
private batchConvert;
|
|
532
613
|
private handleGroup;
|
|
614
|
+
/**
|
|
615
|
+
* Rebinds text materials after INSERT groups are split/reparented by layer.
|
|
616
|
+
*
|
|
617
|
+
* Layer remapping can replace mesh materials; text must keep entity-trait
|
|
618
|
+
* colours (especially ACI-7 foreground on paper layouts).
|
|
619
|
+
*/
|
|
620
|
+
private refreshTextMaterialsInObjectTree;
|
|
533
621
|
/**
|
|
534
622
|
* Remaps layer metadata/material bindings from a source layer to the effective render layer.
|
|
535
623
|
*
|
|
@@ -544,6 +632,12 @@ export declare class AcTrView2d extends AcEdBaseView {
|
|
|
544
632
|
* @param effectiveLayerName - Final layer name used by rendering and style updates.
|
|
545
633
|
*/
|
|
546
634
|
private remapInheritedLayerObjects;
|
|
635
|
+
/**
|
|
636
|
+
* Layer-0 block contents with ByLayer color resolve to ACI-7 foreground materials before
|
|
637
|
+
* INSERT remapping. Those materials must still inherit the INSERT layer when their colour
|
|
638
|
+
* is layer-bound, while explicit ACI-7 entities on layer 0 stay untouched.
|
|
639
|
+
*/
|
|
640
|
+
private shouldRemapInheritedLayerMaterial;
|
|
547
641
|
/**
|
|
548
642
|
* Some DXF conversion paths lose `isByLayerColor` on layer-0 block contents while still
|
|
549
643
|
* retaining other ByLayer markers (lineType/lineWeight/transparency). For AutoCAD-compatible
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcTrView2d.d.ts","sourceRoot":"","sources":["../../src/view/AcTrView2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,UAAU,EAEV,oBAAoB,EACpB,yBAAyB,EACzB,UAAU,EAEV,YAAY,EAMZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,eAAe,EAGhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAGL,wBAAwB,EACxB,YAAY,EAKb,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,YAAY,EACZ,yBAAyB,
|
|
1
|
+
{"version":3,"file":"AcTrView2d.d.ts","sourceRoot":"","sources":["../../src/view/AcTrView2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,UAAU,EAEV,oBAAoB,EACpB,yBAAyB,EACzB,UAAU,EAEV,YAAY,EAMZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,eAAe,EAGhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAGL,wBAAwB,EACxB,YAAY,EAKb,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,YAAY,EACZ,yBAAyB,EAGzB,eAAe,EAIf,4BAA4B,EAC5B,YAAY,EAGb,MAAM,WAAW,CAAA;AAUlB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,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