@itwin/core-frontend 5.14.0-dev.2 → 5.14.0-dev.20
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/CHANGELOG.md +48 -1
- package/lib/cjs/BriefcaseConnection.d.ts +32 -0
- package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
- package/lib/cjs/BriefcaseConnection.js +43 -23
- package/lib/cjs/BriefcaseConnection.js.map +1 -1
- package/lib/cjs/GeoServices.d.ts +3 -0
- package/lib/cjs/GeoServices.d.ts.map +1 -1
- package/lib/cjs/GeoServices.js +8 -1
- package/lib/cjs/GeoServices.js.map +1 -1
- package/lib/cjs/TentativePoint.d.ts.map +1 -1
- package/lib/cjs/TentativePoint.js +5 -14
- package/lib/cjs/TentativePoint.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +1 -1
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.d.ts +0 -2
- package/lib/cjs/extension/ExtensionAdmin.d.ts.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.js +44 -22
- package/lib/cjs/extension/ExtensionAdmin.js.map +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts.map +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.js +2 -2
- package/lib/cjs/extension/providers/RemoteExtensionProvider.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +16 -19
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +2 -0
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +1 -0
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts +11 -5
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js +37 -13
- package/lib/cjs/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +4 -2
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/esm/BriefcaseConnection.d.ts +32 -0
- package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
- package/lib/esm/BriefcaseConnection.js +44 -24
- package/lib/esm/BriefcaseConnection.js.map +1 -1
- package/lib/esm/GeoServices.d.ts +3 -0
- package/lib/esm/GeoServices.d.ts.map +1 -1
- package/lib/esm/GeoServices.js +8 -1
- package/lib/esm/GeoServices.js.map +1 -1
- package/lib/esm/TentativePoint.d.ts.map +1 -1
- package/lib/esm/TentativePoint.js +6 -15
- package/lib/esm/TentativePoint.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +1 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.d.ts +0 -2
- package/lib/esm/extension/ExtensionAdmin.d.ts.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.js +44 -22
- package/lib/esm/extension/ExtensionAdmin.js.map +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts.map +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.js +2 -2
- package/lib/esm/extension/providers/RemoteExtensionProvider.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +16 -19
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +2 -0
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +1 -0
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts +11 -5
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js +36 -12
- package/lib/esm/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +4 -2
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +2 -2
- package/package.json +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TentativePoint.js","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAW,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAiB,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAClB,QAAQ,GAAG,KAAK,CAAC;IACjB,QAAQ,CAAc;IACtB,MAAM,CAAsB;IACnC,IAAY,kBAAkB,KAAa,OAAO,IAAI,CAAC,CAAC,CAAC;IACxC,MAAM,GAAY,IAAI,OAAO,EAAE,CAAC;IAChC,SAAS,GAAY,IAAI,OAAO,EAAE,CAAC;IACnC,UAAU,GAAY,IAAI,OAAO,EAAE,CAAC;IAC7C,iBAAiB,CAAmC;IACrD,QAAQ,CAAkB;IAE1B,aAAa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Q,IAAI,QAAQ,YAAY,SAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC;oBAC1G,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC,gDAAgD;;oBAE/E,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,8CAA8C;YAClH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LocatingElements\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport { HitListHolder } from \"./ElementLocateManager\";\r\nimport { HitDetail, HitList, HitPriority, HitSource, SnapDetail, SnapHeat, SnapMode } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { BeButton, BeButtonEvent } from \"./tools/Tool\";\r\nimport { ViewHandleType, ViewManip } from \"./tools/ViewTool\";\r\nimport { DecorateContext } from \"./ViewContext\";\r\nimport { ScreenViewport } from \"./Viewport\";\r\nimport { expectDefined } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport class TentativePoint {\r\n public isActive = false;\r\n public currSnap?: SnapDetail;\r\n public tpHits?: HitList<HitDetail>;\r\n private get _hotDistanceInches(): number { return 0.21; }\r\n private readonly _point: Point3d = new Point3d();\r\n private readonly _rawPoint: Point3d = new Point3d();\r\n private readonly _viewPoint: Point3d = new Point3d();\r\n private _tentativePromise?: Promise<SnapDetail | undefined>;\r\n public viewport?: ScreenViewport;\r\n\r\n public onInitialized() { }\r\n public setHitList(list?: HitList<HitDetail>) { this.tpHits = list; }\r\n\r\n /** @return true if the tentative point is currently active and snapped to an element. */\r\n public get isSnapped(): boolean { return undefined !== this.currSnap; }\r\n\r\n /** @return The current snap path when TentativePoint.isSnapped or undefined. */\r\n public getCurrSnap(): SnapDetail | undefined { return this.currSnap; }\r\n\r\n public getPoint(): Point3d {\r\n const snap = this.currSnap;\r\n return !snap ? this._point : snap.adjustedPoint;\r\n }\r\n\r\n public setPoint(point: Point3d): void {\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n this._point.setFrom(point);\r\n }\r\n\r\n public clear(doErase: boolean): void {\r\n if (doErase) {\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n }\r\n IModelApp.accuSnap.destroy();\r\n this.isActive = false;\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public removeTentative(): void {\r\n this._tentativePromise = undefined;\r\n if (!this.isActive)\r\n return;\r\n IModelApp.accuSnap.erase();\r\n if (this.getCurrSnap())\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n else\r\n this.viewport?.invalidateDecorations();\r\n this.isActive = false;\r\n }\r\n\r\n public setCurrSnap(newSnap?: SnapDetail): void {\r\n if (newSnap)\r\n newSnap.setSnapPoint(newSnap.snapPoint, SnapHeat.InRange); // Reset adjustedPoint from pre-located snap and set SnapHeat...\r\n this.currSnap = newSnap;\r\n }\r\n\r\n public showTentative(): void {\r\n if (this.isSnapped) {\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n IModelApp.accuSnap.displayToolTip(this._viewPoint, expectDefined(this.viewport), undefined);\r\n } else {\r\n this.viewport?.invalidateDecorations();\r\n }\r\n this.isActive = true;\r\n }\r\n\r\n public getHitAndList(holder: HitListHolder): SnapDetail | undefined {\r\n const hit = this.currSnap;\r\n if (hit) {\r\n holder.setHitList(this.tpHits);\r\n this.tpHits = undefined;\r\n }\r\n return hit;\r\n }\r\n\r\n public onButtonEvent(ev: BeButtonEvent): void {\r\n switch (ev.button) {\r\n case BeButton.Data:\r\n if (!ev.isDown)\r\n return; // cleared on down...\r\n break;\r\n case BeButton.Reset:\r\n if (ev.isDown)\r\n return; // cleared on up...\r\n break;\r\n case BeButton.Middle:\r\n return;\r\n }\r\n\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public decorate(context: DecorateContext): void {\r\n const viewport = context.viewport;\r\n if (!this.isActive || !viewport)\r\n return;\r\n\r\n const tpSize = Math.floor(viewport.pixelsPerInch * 0.4) + 0.5;\r\n const toSizeOutline = tpSize + 1;\r\n const position = context.viewport.worldToView(this._point);\r\n position.x = Math.floor(position.x) + 0.5;\r\n position.y = Math.floor(position.y) + 0.5;\r\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\r\n ctx.lineWidth = 3;\r\n ctx.moveTo(-toSizeOutline, 0);\r\n ctx.lineTo(toSizeOutline, 0);\r\n ctx.moveTo(0, -toSizeOutline);\r\n ctx.lineTo(0, toSizeOutline);\r\n ctx.stroke();\r\n\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"white\";\r\n ctx.lineWidth = 1;\r\n if (!this.isSnapped)\r\n ctx.setLineDash([4, 1]);\r\n\r\n ctx.shadowColor = \"black\";\r\n ctx.shadowBlur = 5;\r\n ctx.moveTo(-tpSize, 0);\r\n ctx.lineTo(tpSize, 0);\r\n ctx.moveTo(0, -tpSize);\r\n ctx.lineTo(0, tpSize);\r\n ctx.stroke();\r\n };\r\n context.addCanvasDecoration({ position, drawDecoration });\r\n }\r\n\r\n private async getSnap(newSearch: boolean): Promise<SnapDetail | undefined> {\r\n // Use next hit from previous search when using tentative to cycle through hits...\r\n let thisHit = (!newSearch && undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n\r\n // Use existing AccuSnap hit list if one exists...\r\n if (undefined === thisHit) {\r\n this.tpHits = undefined;\r\n thisHit = IModelApp.accuSnap.getHitAndList(this);\r\n }\r\n\r\n if (undefined === thisHit) {\r\n // search for elements around the current raw point (search should not be affected by locks!)\r\n const aperture = (2.0 * expectDefined(this.viewport).pixelsFromInches(IModelApp.locateManager.apertureInches) / 2.0) + 1.5;\r\n const options = IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...\r\n const picker = IModelApp.locateManager.picker;\r\n\r\n options.hitSource = HitSource.TentativeSnap;\r\n if (0 === picker.doPick(expectDefined(this.viewport), this._rawPoint, aperture, options))\r\n return undefined;\r\n\r\n this.tpHits = picker.getHitList(true);\r\n thisHit = (undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n } else if (thisHit instanceof SnapDetail) {\r\n // Make the current AccuSnap the TentativePoint snap...\r\n return thisHit;\r\n }\r\n\r\n if (undefined === thisHit)\r\n return undefined;\r\n\r\n const snapModes = IModelApp.accuSnap.getActiveSnapModes(); // Get the list of point snap modes to consider\r\n if (1 === snapModes.length && SnapMode.Intersection === snapModes[0])\r\n snapModes.push(SnapMode.Nearest); // Add nearest when doing intersection by itself to support finding extended intersections...\r\n\r\n const thisSnap = await AccuSnap.requestSnap(thisHit, snapModes, this._hotDistanceInches, IModelApp.accuSnap.keypointDivisor, this.tpHits);\r\n\r\n if (undefined !== thisSnap)\r\n IModelApp.accuDraw.onSnap(thisSnap); // AccuDraw can adjust nearest snap to intersection of circle (polar distance lock) or line (axis lock) with snapped to curve...\r\n\r\n return thisSnap;\r\n }\r\n\r\n private static arePointsCloseEnough(pt1: Point3d, pt2: Point3d, pixelDistance: number): boolean { return pt1.distance(pt2) < (pixelDistance + 1.5); }\r\n\r\n public process(ev: BeButtonEvent): void {\r\n if (undefined !== this._tentativePromise)\r\n return;\r\n\r\n const currTool = IModelApp.toolAdmin.viewTool;\r\n if (currTool && currTool.inDynamicUpdate)\r\n return; // trying to tentative snap while view is changing isn't useful...\r\n\r\n const wasActive = this.isActive;\r\n this.removeTentative(); // remove the TP cross if it is already on the screen\r\n const lastPtView = this._viewPoint.clone();\r\n\r\n this.viewport = expectDefined(ev.viewport);\r\n this._point.setFrom(ev.point);\r\n this._rawPoint.setFrom(ev.rawPoint);\r\n this._viewPoint.setFrom(ev.viewPoint);\r\n\r\n const newSearch = (!this.isSnapped || !TentativePoint.arePointsCloseEnough(lastPtView, this._viewPoint, this.viewport.pixelsFromInches(IModelApp.locateManager.apertureInches)));\r\n const promise = this.getSnap(newSearch);\r\n this._tentativePromise = promise;\r\n\r\n promise.then((newSnap) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n // Ignore response if we're no longer interested in this tentative.\r\n if (this._tentativePromise === promise) {\r\n this._tentativePromise = undefined;\r\n this.setCurrSnap(newSnap); // Adopt the snap as current\r\n IModelApp.accuSnap.clear(); // make sure there's no AccuSnap active after a tentative point (otherwise we continually snap to it).\r\n if (this.isSnapped)\r\n this._point.setFrom(expectDefined(this.currSnap).snapPoint);\r\n else if (wasActive && newSearch)\r\n this._point.setFrom(ev.rawPoint);\r\n this.showTentative(); // show the TP cross\r\n\r\n if (this.isSnapped) {\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n } else if (IModelApp.accuDraw.isActive) {\r\n const point = this.getPoint().clone();\r\n const vp = expectDefined(ev.viewport);\r\n if (vp.isSnapAdjustmentRequired) {\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, false);\r\n const hit = new HitDetail({\r\n testPoint: point,\r\n viewport: vp,\r\n hitSource: HitSource.TentativeSnap,\r\n hitPoint: point,\r\n sourceId: \"\",\r\n priority: HitPriority.Unknown,\r\n distXY: 0,\r\n distFraction: 0,\r\n });\r\n\r\n const snap = new SnapDetail(hit);\r\n this.setCurrSnap(snap);\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n this.setPoint(this.getPoint());\r\n } else {\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n const savePoint = point.clone();\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!point.isExactEqual(savePoint))\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n this.setPoint(point);\r\n }\r\n } else {\r\n IModelApp.toolAdmin.adjustPoint(this.getPoint(), expectDefined(ev.viewport));\r\n }\r\n\r\n IModelApp.accuDraw.onTentative();\r\n if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))\r\n currTool.updateTargetCenter(); // Change target center to tentative location...\r\n else\r\n IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...\r\n }\r\n });\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TentativePoint.js","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAsB,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAiB,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAClB,QAAQ,GAAG,KAAK,CAAC;IACjB,QAAQ,CAAc;IACtB,MAAM,CAAsB;IACnC,IAAY,kBAAkB,KAAa,OAAO,IAAI,CAAC,CAAC,CAAC;IACxC,MAAM,GAAY,IAAI,OAAO,EAAE,CAAC;IAChC,SAAS,GAAY,IAAI,OAAO,EAAE,CAAC;IACnC,UAAU,GAAY,IAAI,OAAO,EAAE,CAAC;IAC7C,iBAAiB,CAAmC;IACrD,QAAQ,CAAkB;IAE1B,aAAa,KAAK,CAAC;IACnB,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AE,IAAI,CAAC,CAAC,CAAC,8CAA8C;YAClH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LocatingElements\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport { HitListHolder } from \"./ElementLocateManager\";\r\nimport { HitDetail, HitList, HitSource, SnapDetail, SnapHeat, SnapMode } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { BeButton, BeButtonEvent } from \"./tools/Tool\";\r\nimport { ViewHandleType, ViewManip } from \"./tools/ViewTool\";\r\nimport { DecorateContext } from \"./ViewContext\";\r\nimport { ScreenViewport } from \"./Viewport\";\r\nimport { expectDefined } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport class TentativePoint {\r\n public isActive = false;\r\n public currSnap?: SnapDetail;\r\n public tpHits?: HitList<HitDetail>;\r\n private get _hotDistanceInches(): number { return 0.21; }\r\n private readonly _point: Point3d = new Point3d();\r\n private readonly _rawPoint: Point3d = new Point3d();\r\n private readonly _viewPoint: Point3d = new Point3d();\r\n private _tentativePromise?: Promise<SnapDetail | undefined>;\r\n public viewport?: ScreenViewport;\r\n\r\n public onInitialized() { }\r\n public setHitList(list?: HitList<HitDetail>) { this.tpHits = list; }\r\n\r\n /** @return true if the tentative point is currently active and snapped to an element. */\r\n public get isSnapped(): boolean { return undefined !== this.currSnap; }\r\n\r\n /** @return The current snap path when TentativePoint.isSnapped or undefined. */\r\n public getCurrSnap(): SnapDetail | undefined { return this.currSnap; }\r\n\r\n public getPoint(): Point3d {\r\n const snap = this.currSnap;\r\n return !snap ? this._point : snap.adjustedPoint;\r\n }\r\n\r\n public setPoint(point: Point3d): void {\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n this._point.setFrom(point);\r\n }\r\n\r\n public clear(doErase: boolean): void {\r\n if (doErase) {\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n }\r\n IModelApp.accuSnap.destroy();\r\n this.isActive = false;\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public removeTentative(): void {\r\n this._tentativePromise = undefined;\r\n if (!this.isActive)\r\n return;\r\n IModelApp.accuSnap.erase();\r\n if (this.getCurrSnap())\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n else\r\n this.viewport?.invalidateDecorations();\r\n this.isActive = false;\r\n }\r\n\r\n public setCurrSnap(newSnap?: SnapDetail): void {\r\n if (newSnap)\r\n newSnap.setSnapPoint(newSnap.snapPoint, SnapHeat.InRange); // Reset adjustedPoint from pre-located snap and set SnapHeat...\r\n this.currSnap = newSnap;\r\n }\r\n\r\n public showTentative(): void {\r\n if (this.isSnapped) {\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n IModelApp.accuSnap.displayToolTip(this._viewPoint, expectDefined(this.viewport), undefined);\r\n } else {\r\n this.viewport?.invalidateDecorations();\r\n }\r\n this.isActive = true;\r\n }\r\n\r\n public getHitAndList(holder: HitListHolder): SnapDetail | undefined {\r\n const hit = this.currSnap;\r\n if (hit) {\r\n holder.setHitList(this.tpHits);\r\n this.tpHits = undefined;\r\n }\r\n return hit;\r\n }\r\n\r\n public onButtonEvent(ev: BeButtonEvent): void {\r\n switch (ev.button) {\r\n case BeButton.Data:\r\n if (!ev.isDown)\r\n return; // cleared on down...\r\n break;\r\n case BeButton.Reset:\r\n if (ev.isDown)\r\n return; // cleared on up...\r\n break;\r\n case BeButton.Middle:\r\n return;\r\n }\r\n\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public decorate(context: DecorateContext): void {\r\n const viewport = context.viewport;\r\n if (!this.isActive || !viewport)\r\n return;\r\n\r\n const tpSize = Math.floor(viewport.pixelsPerInch * 0.4) + 0.5;\r\n const toSizeOutline = tpSize + 1;\r\n const position = context.viewport.worldToView(this._point);\r\n position.x = Math.floor(position.x) + 0.5;\r\n position.y = Math.floor(position.y) + 0.5;\r\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\r\n ctx.lineWidth = 3;\r\n ctx.moveTo(-toSizeOutline, 0);\r\n ctx.lineTo(toSizeOutline, 0);\r\n ctx.moveTo(0, -toSizeOutline);\r\n ctx.lineTo(0, toSizeOutline);\r\n ctx.stroke();\r\n\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"white\";\r\n ctx.lineWidth = 1;\r\n if (!this.isSnapped)\r\n ctx.setLineDash([4, 1]);\r\n\r\n ctx.shadowColor = \"black\";\r\n ctx.shadowBlur = 5;\r\n ctx.moveTo(-tpSize, 0);\r\n ctx.lineTo(tpSize, 0);\r\n ctx.moveTo(0, -tpSize);\r\n ctx.lineTo(0, tpSize);\r\n ctx.stroke();\r\n };\r\n context.addCanvasDecoration({ position, drawDecoration });\r\n }\r\n\r\n private async getSnap(newSearch: boolean): Promise<SnapDetail | undefined> {\r\n // Use next hit from previous search when using tentative to cycle through hits...\r\n let thisHit = (!newSearch && undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n\r\n // Use existing AccuSnap hit list if one exists...\r\n if (undefined === thisHit) {\r\n this.tpHits = undefined;\r\n thisHit = IModelApp.accuSnap.getHitAndList(this);\r\n }\r\n\r\n if (undefined === thisHit) {\r\n // search for elements around the current raw point (search should not be affected by locks!)\r\n const aperture = (2.0 * expectDefined(this.viewport).pixelsFromInches(IModelApp.locateManager.apertureInches) / 2.0) + 1.5;\r\n const options = IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...\r\n const picker = IModelApp.locateManager.picker;\r\n\r\n options.hitSource = HitSource.TentativeSnap;\r\n if (0 === picker.doPick(expectDefined(this.viewport), this._rawPoint, aperture, options))\r\n return undefined;\r\n\r\n this.tpHits = picker.getHitList(true);\r\n thisHit = (undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n } else if (thisHit instanceof SnapDetail) {\r\n // Make the current AccuSnap the TentativePoint snap...\r\n return thisHit;\r\n }\r\n\r\n if (undefined === thisHit)\r\n return undefined;\r\n\r\n const snapModes = IModelApp.accuSnap.getActiveSnapModes(); // Get the list of point snap modes to consider\r\n if (1 === snapModes.length && SnapMode.Intersection === snapModes[0])\r\n snapModes.push(SnapMode.Nearest); // Add nearest when doing intersection by itself to support finding extended intersections...\r\n\r\n const thisSnap = await AccuSnap.requestSnap(thisHit, snapModes, this._hotDistanceInches, IModelApp.accuSnap.keypointDivisor, this.tpHits);\r\n\r\n if (undefined !== thisSnap)\r\n IModelApp.accuDraw.onSnap(thisSnap); // AccuDraw can adjust nearest snap to intersection of circle (polar distance lock) or line (axis lock) with snapped to curve...\r\n\r\n return thisSnap;\r\n }\r\n\r\n private static arePointsCloseEnough(pt1: Point3d, pt2: Point3d, pixelDistance: number): boolean { return pt1.distance(pt2) < (pixelDistance + 1.5); }\r\n\r\n public process(ev: BeButtonEvent): void {\r\n if (undefined !== this._tentativePromise)\r\n return;\r\n\r\n const currTool = IModelApp.toolAdmin.viewTool;\r\n if (currTool && currTool.inDynamicUpdate)\r\n return; // trying to tentative snap while view is changing isn't useful...\r\n\r\n const wasActive = this.isActive;\r\n this.removeTentative(); // remove the TP cross if it is already on the screen\r\n const lastPtView = this._viewPoint.clone();\r\n\r\n this.viewport = expectDefined(ev.viewport);\r\n this._point.setFrom(ev.point);\r\n this._rawPoint.setFrom(ev.rawPoint);\r\n this._viewPoint.setFrom(ev.viewPoint);\r\n\r\n const newSearch = (!this.isSnapped || !TentativePoint.arePointsCloseEnough(lastPtView, this._viewPoint, this.viewport.pixelsFromInches(IModelApp.locateManager.apertureInches)));\r\n const promise = this.getSnap(newSearch);\r\n this._tentativePromise = promise;\r\n\r\n promise.then((newSnap) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n // Ignore response if we're no longer interested in this tentative.\r\n if (this._tentativePromise === promise) {\r\n this._tentativePromise = undefined;\r\n this.setCurrSnap(newSnap); // Adopt the snap as current\r\n IModelApp.accuSnap.clear(); // make sure there's no AccuSnap active after a tentative point (otherwise we continually snap to it).\r\n if (this.isSnapped)\r\n this._point.setFrom(expectDefined(this.currSnap).snapPoint);\r\n else if (wasActive && newSearch)\r\n this._point.setFrom(ev.rawPoint);\r\n this.showTentative(); // show the TP cross\r\n\r\n if (this.isSnapped) {\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n } else if (IModelApp.accuDraw.isActive) {\r\n const point = this.getPoint().clone();\r\n const vp = expectDefined(ev.viewport);\r\n if (vp.isSnapAdjustmentRequired) {\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, false);\r\n // NOTE: Apply similar adjustments as ToolAdmin.adjustSnapPoint for snap that isn't hot with AccuDraw is active...\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!IModelApp.accuDraw.adjustPoint(point, vp, false))\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, true);\r\n this.setPoint(point);\r\n } else {\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n const savePoint = point.clone();\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!point.isExactEqual(savePoint))\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n this.setPoint(point);\r\n }\r\n } else {\r\n IModelApp.toolAdmin.adjustPoint(this.getPoint(), expectDefined(ev.viewport));\r\n }\r\n\r\n IModelApp.accuDraw.onTentative();\r\n if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))\r\n currTool.updateTargetCenter(); // Change target center to tentative location...\r\n else\r\n IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...\r\n }\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -103,7 +103,7 @@ export * from "./internal/render/webgl/IModelFrameLifecycle";
|
|
|
103
103
|
export type { TxnEntityChange, TxnEntityChangeIterable, TxnEntityChangeType, TxnEntityChanges, TxnEntityChangesFilterOptions, TxnEntityMetadataCriterion, } from "./TxnEntityChanges";
|
|
104
104
|
/** Deprecated frontend alias for the common TxnEntityMetadata interface.
|
|
105
105
|
* @public
|
|
106
|
-
* @deprecated in 5.13.0. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.
|
|
106
|
+
* @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.
|
|
107
107
|
*/
|
|
108
108
|
export type TxnEntityMetadata = _TxnEntityMetadata;
|
|
109
109
|
export { type TileTreeDiscloser, DisclosedTileTreeSet, type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf, readElementGraphics, type BatchTableProperties, RealityTileTree, type RealityTileGeometry, RealityTile, type RenderGraphicTileTreeArgs, type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin, type TileContent, type TiledGraphicsProvider, type TileDrawArgParams, TileDrawArgs, type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference, type GeometryTileTreeReferenceOptions, type TileParams, TileRequestChannels, type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel, TileRequest, type TileTreeOwner, type TileTreeParams, TileGraphicType, TileTreeReference, type TileTreeSupplier, TileTreeLoadStatus, TileTree, Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes, TileUsageMarker, TileUser, BingElevationProvider, QuadId, type QuadIdProps, MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme, type MapLayerIndex, MapTileProjection, MapTile, MapLayerTileTreeReference, MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources, MapLayerImageryProviderStatus, MapLayerImageryProvider, ImageryMapLayerFormat, MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry, type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient, type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord, MapCartoRectangle, ImageryMapLayerTreeReference, EllipsoidTerrainProvider, getCesiumAssetUrl, MapTileTreeScaleRangeVisibility, MapTileTree, type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider, type TerrainProvider, TerrainProviderRegistry, } from "./tile/internal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAI/F,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAA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G;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
|
|
1
|
+
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../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AAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AAEzC,sGAAsG;AACtG,OAAO,8BAA8B,CAAC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
|
|
@@ -34,8 +34,6 @@ export declare class ExtensionAdmin {
|
|
|
34
34
|
* @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).
|
|
35
35
|
*/
|
|
36
36
|
registerHost(hostUrl: string): void;
|
|
37
|
-
/** Returns the hostname of an input string. Throws an error if input is not a valid hostname (or URL). */
|
|
38
|
-
private getHostName;
|
|
39
37
|
/** Loops over all enabled Extensions and triggers each one if the provided event is defined. */
|
|
40
38
|
private activateExtensionEvents;
|
|
41
39
|
/** Executes the extension. Catches and logs any errors (so that an extension will not crash the main application). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionAdmin.d.ts","sourceRoot":"","sources":["../../../src/extension/ExtensionAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ExtensionAdmin.d.ts","sourceRoot":"","sources":["../../../src/extension/ExtensionAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA0DxE;;;GAGG;AACH,qBAAa,cAAc;IACzB,2GAA2G;IAC3G,OAAO,CAAC,WAAW,CAA0E;IAC7F,OAAO,CAAC,MAAM,CAAW;IAEzB;;OAEG;IACI,SAAS,sBAEd;;IAMF;;;;;OAKG;IACU,YAAY,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBrE;;;;OAIG;IACU,aAAa,CAAC,SAAS,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAM3E;;;;OAIG;IACI,YAAY,CAAC,OAAO,EAAE,MAAM;IAOnC,gGAAgG;YAClF,uBAAuB;IAarC,sHAAsH;YACxG,QAAQ;CAOvB"}
|
|
@@ -7,6 +7,45 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Logger } from "@itwin/core-bentley";
|
|
9
9
|
import { FrontendLoggerCategory } from "../common/FrontendLoggerCategory";
|
|
10
|
+
/** The Extensions loading system has the following goals:
|
|
11
|
+
* 1. Only fetch what is needed when it is required
|
|
12
|
+
* 1. Load a manifest file
|
|
13
|
+
* 2. Load the the main module when necessary (usually at an activation event)
|
|
14
|
+
* 2. Download the extension's files
|
|
15
|
+
*
|
|
16
|
+
* 3 ways to load an Extension into the system:
|
|
17
|
+
*
|
|
18
|
+
* 1. Load both the Extension Manifest and import the main module of the extension from a local file/package.
|
|
19
|
+
* 2. A minimum set of properties to get the manifest and javascript from a remote server.
|
|
20
|
+
* 3. A minimum set of properties to get the manifest and javascript from Bentley's Extension Service.
|
|
21
|
+
*
|
|
22
|
+
* An Extension must be added to ExtensionAdmin before it can be executed during activation events.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes hostnames for comparison.
|
|
26
|
+
* @returns The normalized hostname of a URL or bare hostname.
|
|
27
|
+
* @throws Error if the input cannot be parsed, or does not contain a hostname.
|
|
28
|
+
*/
|
|
29
|
+
function normalizeHostname(input) {
|
|
30
|
+
const invalid = () => new Error(`"${input}" is not a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).`);
|
|
31
|
+
// inputs without a scheme (e.g., https://) will throw an error in the URL constructor
|
|
32
|
+
const inputWithScheme = /^[a-z][a-z0-9+\-.]*:\/\//i.test(input) ? input : `https://${input}`;
|
|
33
|
+
let hostname;
|
|
34
|
+
try {
|
|
35
|
+
hostname = new URL(inputWithScheme).hostname.toLowerCase();
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
throw invalid();
|
|
39
|
+
}
|
|
40
|
+
// strip only a leading "www." label - removing "www" anywhere would make unrelated
|
|
41
|
+
// hosts like "wwwexample.com" compare equal to "example.com"
|
|
42
|
+
const normalized = hostname.startsWith("www.") ? hostname.substring("www.".length) : hostname;
|
|
43
|
+
// schemes with an optional or opaque host (e.g. file:///, data:) parse successfully but carry no
|
|
44
|
+
// hostname, and an input of just "www." normalizes to nothing. Neither can identify a host.
|
|
45
|
+
if (normalized.length === 0)
|
|
46
|
+
throw invalid();
|
|
47
|
+
return normalized;
|
|
48
|
+
}
|
|
10
49
|
/** The Extension Admin controls the list of currently loaded Extensions.
|
|
11
50
|
*
|
|
12
51
|
* @alpha
|
|
@@ -31,10 +70,10 @@ export class ExtensionAdmin {
|
|
|
31
70
|
* @alpha
|
|
32
71
|
*/
|
|
33
72
|
async addExtension(provider) {
|
|
34
|
-
if (provider.hostname) {
|
|
35
|
-
const
|
|
36
|
-
if (this._hosts.
|
|
37
|
-
throw new Error(`Error loading extension: ${
|
|
73
|
+
if (provider.hostname !== undefined && this._hosts.length > 0) {
|
|
74
|
+
const hostname = normalizeHostname(provider.hostname);
|
|
75
|
+
if (this._hosts.indexOf(hostname) < 0) {
|
|
76
|
+
throw new Error(`Error loading extension: ${provider.hostname} was not registered.`);
|
|
38
77
|
}
|
|
39
78
|
}
|
|
40
79
|
try {
|
|
@@ -65,28 +104,11 @@ export class ExtensionAdmin {
|
|
|
65
104
|
* @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).
|
|
66
105
|
*/
|
|
67
106
|
registerHost(hostUrl) {
|
|
68
|
-
const hostname =
|
|
107
|
+
const hostname = normalizeHostname(hostUrl);
|
|
69
108
|
if (this._hosts.indexOf(hostname) < 0) {
|
|
70
109
|
this._hosts.push(hostname);
|
|
71
110
|
}
|
|
72
111
|
}
|
|
73
|
-
/** Returns the hostname of an input string. Throws an error if input is not a valid hostname (or URL). */
|
|
74
|
-
getHostName(inputUrl) {
|
|
75
|
-
// inputs without a protocol (e.g., http://) will throw an error in URL constructor
|
|
76
|
-
const inputWithProtocol = /(http|https):\/\//.test(inputUrl) ?
|
|
77
|
-
inputUrl :
|
|
78
|
-
`https://${inputUrl}`;
|
|
79
|
-
try {
|
|
80
|
-
const hostname = new URL(inputWithProtocol).hostname.replace("www.", "");
|
|
81
|
-
return hostname;
|
|
82
|
-
}
|
|
83
|
-
catch (e) {
|
|
84
|
-
if (e instanceof TypeError) {
|
|
85
|
-
throw new Error("Argument hostUrl should be a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).");
|
|
86
|
-
}
|
|
87
|
-
throw e;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
112
|
/** Loops over all enabled Extensions and triggers each one if the provided event is defined. */
|
|
91
113
|
async activateExtensionEvents(event) {
|
|
92
114
|
for (const extension of this._extensions.values()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionAdmin.js","sourceRoot":"","sources":["../../../src/extension/ExtensionAdmin.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"ExtensionAdmin.js","sourceRoot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I,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAC/D,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,OAAe;QACjC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,gGAAgG;IACxF,KAAK,CAAC,uBAAuB,CAAC,KAAa;QACjD,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,gBAAgB;gBACtC,SAAS;YAEX,KAAK,MAAM,eAAe,IAAI,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBAClE,IAAI,eAAe,KAAK,KAAK,EAAE,CAAC;oBAC9B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,8DAA8D;gBAC1F,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,sHAAsH;IAC9G,KAAK,CAAC,QAAQ,CAAC,SAA6B;QAClD,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,EAAE,6BAA6B,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC3H,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Extensions\r\n */\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\n\r\nimport { FrontendLoggerCategory } from \"../common/FrontendLoggerCategory\";\r\nimport type { ExtensionManifest, ExtensionProvider } from \"./Extension\";\r\n\r\n/** The Extensions loading system has the following goals:\r\n * 1. Only fetch what is needed when it is required\r\n * 1. Load a manifest file\r\n * 2. Load the the main module when necessary (usually at an activation event)\r\n * 2. Download the extension's files\r\n *\r\n * 3 ways to load an Extension into the system:\r\n *\r\n * 1. Load both the Extension Manifest and import the main module of the extension from a local file/package.\r\n * 2. A minimum set of properties to get the manifest and javascript from a remote server.\r\n * 3. A minimum set of properties to get the manifest and javascript from Bentley's Extension Service.\r\n *\r\n * An Extension must be added to ExtensionAdmin before it can be executed during activation events.\r\n */\r\n\r\n/**\r\n * Normalizes hostnames for comparison.\r\n * @returns The normalized hostname of a URL or bare hostname.\r\n * @throws Error if the input cannot be parsed, or does not contain a hostname.\r\n */\r\nfunction normalizeHostname(input: string): string {\r\n const invalid = () => new Error(`\"${input}\" is not a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).`);\r\n\r\n // inputs without a scheme (e.g., https://) will throw an error in the URL constructor\r\n const inputWithScheme = /^[a-z][a-z0-9+\\-.]*:\\/\\//i.test(input) ? input : `https://${input}`;\r\n\r\n let hostname;\r\n try {\r\n hostname = new URL(inputWithScheme).hostname.toLowerCase();\r\n } catch {\r\n throw invalid();\r\n }\r\n\r\n // strip only a leading \"www.\" label - removing \"www\" anywhere would make unrelated\r\n // hosts like \"wwwexample.com\" compare equal to \"example.com\"\r\n const normalized = hostname.startsWith(\"www.\") ? hostname.substring(\"www.\".length) : hostname;\r\n\r\n // schemes with an optional or opaque host (e.g. file:///, data:) parse successfully but carry no\r\n // hostname, and an input of just \"www.\" normalizes to nothing. Neither can identify a host.\r\n if (normalized.length === 0)\r\n throw invalid();\r\n\r\n return normalized;\r\n}\r\n\r\n/**\r\n * A \"ready to use\" Extension (contains a manifest object and an extension provider to help execute).\r\n * Will be used as the type for in-memory extensions in the ExtensionAdmin\r\n */\r\ninterface InstalledExtension {\r\n /** An extension provider that has been added to ExtensionAdmin */\r\n provider: ExtensionProvider;\r\n /** The manifest (package.json) of the extension */\r\n manifest: ExtensionManifest;\r\n}\r\n\r\n/** The Extension Admin controls the list of currently loaded Extensions.\r\n *\r\n * @alpha\r\n */\r\nexport class ExtensionAdmin {\r\n /** Defines the set of extensions that are currently known and can be invoked during activation events. */\r\n private _extensions: Map<string, InstalledExtension> = new Map<string, InstalledExtension>();\r\n private _hosts: string[];\r\n\r\n /** Fired when an Extension has been added or removed.\r\n * @internal\r\n */\r\n public onStartup = async () => {\r\n await this.activateExtensionEvents(\"onStartup\");\r\n };\r\n\r\n public constructor() {\r\n this._hosts = [];\r\n }\r\n\r\n /**\r\n * Adds an extension.\r\n * The manifest will be fetched and the extension will be activated on an activation event.\r\n * @param provider\r\n * @alpha\r\n */\r\n public async addExtension(provider: ExtensionProvider): Promise<void> {\r\n if (provider.hostname !== undefined && this._hosts.length > 0) {\r\n const hostname = normalizeHostname(provider.hostname);\r\n if (this._hosts.indexOf(hostname) < 0) {\r\n throw new Error(`Error loading extension: ${provider.hostname} was not registered.`);\r\n }\r\n }\r\n try {\r\n const manifest = await provider.getManifest();\r\n this._extensions.set(manifest.name, {\r\n manifest,\r\n provider,\r\n });\r\n // TODO - temporary fix to execute the missed startup event\r\n if (manifest.activationEvents.includes(\"onStartup\"))\r\n provider.execute(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n } catch (e) {\r\n throw new Error(`Failed to get extension manifest ${provider.hostname ? `at ${provider.hostname}` : \"\"}: ${String(e)}`);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a list of extensions\r\n * @param providers\r\n * @alpha\r\n */\r\n public async addExtensions(providers: ExtensionProvider[]): Promise<void[]> {\r\n return Promise.all(\r\n providers.map(async (provider) => this.addExtension(provider)),\r\n );\r\n }\r\n\r\n /**\r\n * Registers a hostname for an extension.\r\n * Once a hostname has been registered, only remote extensions from registered hosts are permitted to be added.\r\n * @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).\r\n */\r\n public registerHost(hostUrl: string) {\r\n const hostname = normalizeHostname(hostUrl);\r\n if (this._hosts.indexOf(hostname) < 0) {\r\n this._hosts.push(hostname);\r\n }\r\n }\r\n\r\n /** Loops over all enabled Extensions and triggers each one if the provided event is defined. */\r\n private async activateExtensionEvents(event: string) {\r\n for (const extension of this._extensions.values()) {\r\n if (!extension.manifest.activationEvents)\r\n continue;\r\n\r\n for (const activationEvent of extension.manifest.activationEvents) {\r\n if (activationEvent === event) {\r\n this._execute(extension); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Executes the extension. Catches and logs any errors (so that an extension will not crash the main application). */\r\n private async _execute(extension: InstalledExtension) {\r\n try {\r\n await extension.provider.execute();\r\n } catch (e) {\r\n Logger.logError(FrontendLoggerCategory.Extensions, `Error executing extension ${extension.manifest.name}: ${String(e)}`);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -17,7 +17,7 @@ export interface RemoteExtensionProviderProps {
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class RemoteExtensionProvider implements ExtensionProvider {
|
|
19
19
|
private readonly _props;
|
|
20
|
-
/** The
|
|
20
|
+
/** The hostname of the server where the extension is hosted. */
|
|
21
21
|
readonly hostname: string;
|
|
22
22
|
constructor(_props: RemoteExtensionProviderProps);
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteExtensionProvider.d.ts","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,iBAAiB;IAInD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,
|
|
1
|
+
{"version":3,"file":"RemoteExtensionProvider.d.ts","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,iBAAiB;IAInD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,gEAAgE;IAChE,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAEJ,MAAM,EAAE,4BAA4B;IAIjE;;;OAGG;IACU,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC;;;OAGG;IACU,WAAW,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAIvD"}
|
|
@@ -8,11 +8,11 @@ import { loadScript } from "./ExtensionLoadScript";
|
|
|
8
8
|
*/
|
|
9
9
|
export class RemoteExtensionProvider {
|
|
10
10
|
_props;
|
|
11
|
-
/** The
|
|
11
|
+
/** The hostname of the server where the extension is hosted. */
|
|
12
12
|
hostname;
|
|
13
13
|
constructor(_props) {
|
|
14
14
|
this._props = _props;
|
|
15
|
-
this.hostname = new URL(this._props.jsUrl).hostname
|
|
15
|
+
this.hostname = new URL(this._props.jsUrl).hostname;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Attempts to execute an extension.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteExtensionProvider.js","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAanD;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAIL;IAH7B,
|
|
1
|
+
{"version":3,"file":"RemoteExtensionProvider.js","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAanD;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAIL;IAH7B,gEAAgE;IAChD,QAAQ,CAAS;IAEjC,YAA6B,MAAoC;QAApC,WAAM,GAAN,MAAM,CAA8B;QAC/D,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,OAAO;QAClB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,WAAW;QACtB,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CAEF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport type {\r\n ExtensionManifest,\r\n ExtensionProvider,\r\n} from \"../Extension\";\r\nimport { request } from \"../../request/Request\";\r\nimport { loadScript } from \"./ExtensionLoadScript\";\r\n\r\n/**\r\n * Required props for a remote extension provider\r\n * @alpha\r\n */\r\nexport interface RemoteExtensionProviderProps {\r\n /** URL where the extension entry point can be loaded from */\r\n jsUrl: string;\r\n /** URL where the manifest (package.json) can be loaded from */\r\n manifestUrl: string;\r\n}\r\n\r\n/**\r\n * Implements a \"remote\" extension.\r\n * Remote extensions are hosted on an external server.\r\n * The execute() and getManifest() methods are used by the ExtensionAdmin to load and execute the extension.\r\n * @alpha\r\n */\r\nexport class RemoteExtensionProvider implements ExtensionProvider {\r\n /** The hostname of the server where the extension is hosted. */\r\n public readonly hostname: string;\r\n\r\n constructor(private readonly _props: RemoteExtensionProviderProps) {\r\n this.hostname = new URL(this._props.jsUrl).hostname;\r\n }\r\n\r\n /**\r\n * Attempts to execute an extension.\r\n * Throws an error if the provided jsUrl is not accessible.\r\n */\r\n public async execute(): Promise<string> {\r\n return loadScript(this._props.jsUrl);\r\n }\r\n\r\n /**\r\n * Attempts to fetch an extension's manifest (package.json) file.\r\n * Throws an error if the provided manifestUrl is not accessible.\r\n */\r\n public async getManifest(): Promise<ExtensionManifest> {\r\n return request(this._props.manifestUrl, \"json\");\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCompositor.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/SceneCompositor.ts"],"names":[],"mappings":"AAIA;;GAEG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAC2D,cAAc,EAE/E,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAe,WAAW,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,EAAE,cA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aAAa,EAAE,OAAO,GAAG,IAAI;aAC9F,iBAAiB,IAAI,IAAI;IAEzC,8GAA8G;IAC9G,aAAoB,oBAAoB,IAAI,WAAW,CAAC;IAExD,aAAoB,UAAU,IAAI,aAAa,CAAC;IAChD,aAAoB,aAAa,IAAI,aAAa,CAAC;IACnD,aAAoB,gBAAgB,IAAI,MAAM,CAAC;IAE/C,IAAW,eAAe,IAAI,OAAO,CAAkC;IAEvE,SAAS,aAAa,MAAM,EAAE,MAAM;WAOtB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;aAIrC,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,GAAG,IAAI;CACxE"}
|
|
@@ -227,8 +227,8 @@ class FrameBuffers {
|
|
|
227
227
|
idsAndZComposite;
|
|
228
228
|
idsAndAltZComposite;
|
|
229
229
|
edlDrawCol;
|
|
230
|
-
init(textures, depth, depthMS) {
|
|
231
|
-
if (!this.initPotentialMSFbos(textures, depth, depthMS))
|
|
230
|
+
init(textures, depth, depthMS, boundColor) {
|
|
231
|
+
if (!this.initPotentialMSFbos(textures, depth, depthMS, boundColor))
|
|
232
232
|
return false;
|
|
233
233
|
this.depthAndOrder = FrameBuffer.create([expectDefined(textures.depthAndOrder)], depth);
|
|
234
234
|
this.hilite = FrameBuffer.create([expectDefined(textures.hilite)], depth);
|
|
@@ -236,7 +236,7 @@ class FrameBuffers {
|
|
|
236
236
|
if (!this.depthAndOrder || !this.hilite || !this.hiliteUsingStencil)
|
|
237
237
|
return false;
|
|
238
238
|
assert(undefined === this.opaqueAll);
|
|
239
|
-
if (!this.initPotentialMSMRTFbos(textures, depth, depthMS))
|
|
239
|
+
if (!this.initPotentialMSMRTFbos(textures, depth, depthMS, boundColor))
|
|
240
240
|
return false;
|
|
241
241
|
assert(undefined !== textures.accumulation && undefined !== textures.revealage);
|
|
242
242
|
const colors = [textures.accumulation, textures.revealage];
|
|
@@ -253,9 +253,8 @@ class FrameBuffers {
|
|
|
253
253
|
&& undefined !== this.clearTranslucent
|
|
254
254
|
&& undefined !== this.pingPong;
|
|
255
255
|
}
|
|
256
|
-
initPotentialMSFbos(textures, depth, depthMS) {
|
|
257
|
-
|
|
258
|
-
assert(undefined !== boundColor && undefined !== textures.color);
|
|
256
|
+
initPotentialMSFbos(textures, depth, depthMS, boundColor) {
|
|
257
|
+
assert(undefined !== textures.color);
|
|
259
258
|
if (undefined === depthMS) {
|
|
260
259
|
this.opaqueColor = FrameBuffer.create([boundColor], depth);
|
|
261
260
|
this.opaqueAndCompositeColor = FrameBuffer.create([textures.color], depth);
|
|
@@ -268,10 +267,8 @@ class FrameBuffers {
|
|
|
268
267
|
return undefined !== this.opaqueColor
|
|
269
268
|
&& undefined !== this.opaqueAndCompositeColor;
|
|
270
269
|
}
|
|
271
|
-
initPotentialMSMRTFbos(textures, depth, depthMs) {
|
|
272
|
-
|
|
273
|
-
assert(undefined !== boundColor &&
|
|
274
|
-
undefined !== textures.color &&
|
|
270
|
+
initPotentialMSMRTFbos(textures, depth, depthMs, boundColor) {
|
|
271
|
+
assert(undefined !== textures.color &&
|
|
275
272
|
undefined !== textures.featureId &&
|
|
276
273
|
undefined !== textures.depthAndOrder &&
|
|
277
274
|
undefined !== textures.accumulation &&
|
|
@@ -385,23 +382,23 @@ class FrameBuffers {
|
|
|
385
382
|
this.idsAndAltZComposite = dispose(this.idsAndAltZComposite);
|
|
386
383
|
}
|
|
387
384
|
}
|
|
388
|
-
enableMultiSampling(textures, depth, depthMS) {
|
|
385
|
+
enableMultiSampling(textures, depth, depthMS, boundColor) {
|
|
389
386
|
this.opaqueColor = dispose(this.opaqueColor);
|
|
390
387
|
this.opaqueAndCompositeColor = dispose(this.opaqueAndCompositeColor);
|
|
391
|
-
let rVal = this.initPotentialMSFbos(textures, depth, depthMS);
|
|
388
|
+
let rVal = this.initPotentialMSFbos(textures, depth, depthMS, boundColor);
|
|
392
389
|
this.opaqueAll = dispose(this.opaqueAll);
|
|
393
390
|
this.opaqueAndCompositeAll = dispose(this.opaqueAndCompositeAll);
|
|
394
|
-
rVal = this.initPotentialMSMRTFbos(textures, depth, depthMS);
|
|
391
|
+
rVal = this.initPotentialMSMRTFbos(textures, depth, depthMS, boundColor);
|
|
395
392
|
return rVal;
|
|
396
393
|
}
|
|
397
|
-
disableMultiSampling(textures, depth) {
|
|
394
|
+
disableMultiSampling(textures, depth, boundColor) {
|
|
398
395
|
this.opaqueAll = dispose(this.opaqueAll);
|
|
399
396
|
this.opaqueAndCompositeAll = dispose(this.opaqueAndCompositeAll);
|
|
400
|
-
if (!this.initPotentialMSMRTFbos(textures, depth, undefined))
|
|
397
|
+
if (!this.initPotentialMSMRTFbos(textures, depth, undefined, boundColor))
|
|
401
398
|
return false;
|
|
402
399
|
this.opaqueColor = dispose(this.opaqueColor);
|
|
403
400
|
this.opaqueAndCompositeColor = dispose(this.opaqueAndCompositeColor);
|
|
404
|
-
return this.initPotentialMSFbos(textures, depth, undefined);
|
|
401
|
+
return this.initPotentialMSFbos(textures, depth, undefined, boundColor);
|
|
405
402
|
}
|
|
406
403
|
get isDisposed() {
|
|
407
404
|
return undefined === this.opaqueColor && undefined === this.opaqueAndCompositeColor && undefined === this.depthAndOrder
|
|
@@ -1444,7 +1441,7 @@ class Compositor extends SceneCompositor {
|
|
|
1444
1441
|
this._depthMS = undefined;
|
|
1445
1442
|
if (this._depth !== undefined) {
|
|
1446
1443
|
return this._textures.init(this._width, this._height, this._antialiasSamples)
|
|
1447
|
-
&& this._fbos.init(this._textures, this._depth, this._depthMS)
|
|
1444
|
+
&& this._fbos.init(this._textures, this._depth, this._depthMS, expectDefined(this.target.outputColorTexture))
|
|
1448
1445
|
&& this._geom.init(this._textures)
|
|
1449
1446
|
&& this.eyeDomeLighting.init(this._width, this._height, this._depth);
|
|
1450
1447
|
}
|
|
@@ -1459,11 +1456,11 @@ class Compositor extends SceneCompositor {
|
|
|
1459
1456
|
if (!this._textures.enableMultiSampling(this._width, this._height, this._antialiasSamples))
|
|
1460
1457
|
return false;
|
|
1461
1458
|
assert(undefined !== this._depth && undefined !== this._depthMS);
|
|
1462
|
-
return this._fbos.enableMultiSampling(this._textures, this._depth, this._depthMS);
|
|
1459
|
+
return this._fbos.enableMultiSampling(this._textures, this._depth, this._depthMS, expectDefined(this.target.outputColorTexture));
|
|
1463
1460
|
}
|
|
1464
1461
|
disableMultiSampling() {
|
|
1465
1462
|
assert(undefined !== this._depth);
|
|
1466
|
-
if (!this._fbos.disableMultiSampling(this._textures, this._depth))
|
|
1463
|
+
if (!this._fbos.disableMultiSampling(this._textures, this._depth, expectDefined(this.target.outputColorTexture)))
|
|
1467
1464
|
return false;
|
|
1468
1465
|
// Want to disable multisampling without deleting & reallocating other stuff.
|
|
1469
1466
|
this._depthMS = dispose(this._depthMS);
|