@itwin/core-frontend 4.0.0-dev.86 → 4.0.0-dev.89
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 +14 -1
- package/lib/cjs/IModeljs-css.d.ts +2 -2
- package/lib/cjs/IModeljs-css.d.ts.map +1 -1
- package/lib/cjs/IModeljs-css.js +3 -3
- package/lib/cjs/IModeljs-css.js.map +1 -1
- package/lib/cjs/render/RenderMaterial.d.ts +8 -0
- package/lib/cjs/render/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/render/RenderMaterial.js.map +1 -1
- package/lib/cjs/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/render/webgl/System.js +2 -0
- package/lib/cjs/render/webgl/System.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.d.ts +14 -0
- package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlReader.js +23 -1
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +1 -1
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +2 -2
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js +4 -2
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.d.ts +4 -0
- package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +4 -0
- package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/TileTree.js +1 -1
- package/lib/cjs/tile/TileTree.js.map +1 -1
- package/lib/esm/IModeljs-css.d.ts +2 -2
- package/lib/esm/IModeljs-css.d.ts.map +1 -1
- package/lib/esm/IModeljs-css.js +3 -3
- package/lib/esm/IModeljs-css.js.map +1 -1
- package/lib/esm/render/RenderMaterial.d.ts +8 -0
- package/lib/esm/render/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/render/RenderMaterial.js.map +1 -1
- package/lib/esm/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/render/webgl/System.js +2 -0
- package/lib/esm/render/webgl/System.js.map +1 -1
- package/lib/esm/tile/ImdlReader.d.ts +14 -0
- package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
- package/lib/esm/tile/ImdlReader.js +24 -2
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +1 -1
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +2 -2
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js +4 -2
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.d.ts +4 -0
- package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +4 -0
- package/lib/esm/tile/TileDrawArgs.js.map +1 -1
- package/lib/esm/tile/TileTree.js +1 -1
- package/lib/esm/tile/TileTree.js.map +1 -1
- package/package.json +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAsI;AACtI,oDAA6G;AAE7G,2DAAwD;AAOxD,gDAA6C;AAG7C,MAAM,YAAY,GAAG,IAAI,uBAAO,EAAE,CAAC;AACnC,MAAM,YAAY,GAAG,uBAAO,CAAC,MAAM,EAAE,CAAC;AACtC,MAAM,cAAc,GAAG,uBAAO,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,aAAa,GAAG,uBAAO,CAAC,UAAU,EAAE,CAAC;AAC3C,MAAM,aAAa,GAAG,uBAAO,CAAC,UAAU,EAAE,CAAC;AAC3C,MAAM,eAAe,GAAG,wBAAQ,CAAC,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CAAC,CAAC;IACxF,CAAC;IAED,4JAA4J;IACrJ,aAAa,CAAC,IAAU;QAC7B,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,mEAAmE;IAC5D,mBAAmB;QACxB,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAED,oVAAoV;IAC7U,QAAQ,CAAC,IAAU;QACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,IAAU;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,oBAAoB,CAAC,MAAc,IAAU,CAAC;IAErD,eAAe;IACf,IAAW,4BAA4B,KAAyB,OAAO,SAAS,CAAC,CAAC,CAAC;CACpF;AA3UD,oCA2UC","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 Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { GraphicBranch } from \"../render/GraphicBranch\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ViewingSpace } from \"../ViewingSpace\";\r\nimport { CoordSystem } from \"../CoordSystem\";\r\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\r\n\r\nconst scratchRange = new Range3d();\r\nconst scratchPoint = Point3d.create();\r\nconst scratchPoint4d = Point4d.create();\r\nconst scratchXRange = Range1d.createNull();\r\nconst scratchYRange = Range1d.createNull();\r\nconst scratchMatrix4d = Matrix4d.createIdentity();\r\n\r\n/** Parameters used to construct [[TileDrawArgs]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TileDrawArgParams {\r\n /** Context for the scene into which the tiles are to be rendered. */\r\n context: SceneContext;\r\n /** Transform to be applied when drawing the tiles. */\r\n location: Transform;\r\n /** The tile tree from which to obtain tiles. */\r\n tree: TileTree;\r\n /** The time at which these args were created. */\r\n now: BeTimePoint;\r\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\r\n viewFlagOverrides: ViewFlagOverrides;\r\n /** Clip volume used to clip the tiles. */\r\n clipVolume?: RenderClipVolume;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n parentsAndChildrenExclusive: boolean;\r\n /** Symbology overrides to apply to the tiles. */\r\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\r\n /** Optionally customizes the view's symbology overrides for the tiles. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optionally overrides the view's hidden line settings. */\r\n hiddenLineSettings?: HiddenLine.Settings;\r\n /** If defined, tiles should be culled if they do not intersect this clip. */\r\n intersectionClip?: ClipVector;\r\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\r\n * or \"0xffffffff\" for any node that does *not* apply a transform.\r\n * @internal\r\n */\r\n animationTransformNodeId?: number;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n boundingRange?: Range3d;\r\n /** @alpha */\r\n maximumScreenSpaceError?: number;\r\n}\r\n\r\n/**\r\n * Provides context used when selecting and drawing [[Tile]]s.\r\n * @see [[TileTree.selectTiles]]\r\n * @see [[TileTree.draw]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class TileDrawArgs {\r\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\r\n public readonly location: Transform;\r\n /** The tile tree being drawn. */\r\n public readonly tree: TileTree;\r\n /** Optional clip volume applied to the tiles. */\r\n public clipVolume: RenderClipVolume | undefined;\r\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\r\n public readonly context: SceneContext;\r\n /** Describes the viewed volume. */\r\n public viewingSpace: ViewingSpace;\r\n /** Holds the tile graphics to be drawn. */\r\n public readonly graphics: GraphicBranch = new GraphicBranch();\r\n /** @internal */\r\n public readonly now: BeTimePoint;\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n protected _frustumPlanes?: FrustumPlanes;\r\n /** @internal */\r\n public planarClassifier?: RenderPlanarClassifier;\r\n /** @internal */\r\n public drape?: RenderTextureDrape;\r\n /** Optional clip volume applied to all tiles in the view. */\r\n public readonly viewClip?: ClipVector;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n public parentsAndChildrenExclusive: boolean;\r\n /** @internal */\r\n private _appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optional overrides for the view's hidden line settings. */\r\n public hiddenLineSettings?: HiddenLine.Settings;\r\n /** Tiles that we want to draw and that are ready to draw. May not actually be selected, e.g. if sibling tiles are not yet ready. */\r\n public readonly readyTiles = new Set<Tile>();\r\n /** For perspective views, the view-Z of the near plane. */\r\n private readonly _nearFrontCenter?: Point3d;\r\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\r\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\r\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\r\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\r\n /** If defined, tiles will be culled if they do not intersect this clip. */\r\n public intersectionClip?: ClipVector;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n public boundingRange?: Range3d;\r\n /** @internal */\r\n public readonly pixelSizeScaleFactor;\r\n /** @internal */\r\n public readonly animationTransformNodeId?: number;\r\n /** @alpha */\r\n public maximumScreenSpaceError;\r\n\r\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\r\n public getPixelSize(tile: Tile): number {\r\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\r\n if (undefined !== sizeFromProjection)\r\n return sizeFromProjection;\r\n\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\r\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\r\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\r\n if (!sizeProjectionCorners)\r\n return undefined;\r\n\r\n /* For maps or global reality models we use the projected screen rectangle rather than sphere to calculate pixel size to avoid excessive tiles at horizon. */\r\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\r\n scratchXRange.setNull();\r\n scratchYRange.setNull();\r\n\r\n let behindEye = false;\r\n for (const corner of sizeProjectionCorners) {\r\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\r\n if (viewCorner.w < 0.0) {\r\n behindEye = true;\r\n break;\r\n }\r\n\r\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\r\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\r\n }\r\n if (behindEye)\r\n return undefined;\r\n\r\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\r\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\r\n * Device scaling is not applied.\r\n */\r\n public computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\r\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\r\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\r\n const viewZ = this.context.viewport.rotation.rowZ();\r\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\r\n if (viewZ.dotProduct(toFront) < radius) {\r\n center = this._nearFrontCenter;\r\n } else {\r\n // Find point on sphere closest to eye.\r\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\r\n\r\n if (toEye) { // Only if tile is not already behind the eye.\r\n toEye.scaleInPlace(radius);\r\n center.addInPlace(toEye);\r\n }\r\n }\r\n }\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n }\r\n\r\n /** Compute this size of a sphere on screen in pixels */\r\n public getRangePixelSize(range: Range3d): number {\r\n const transformedRange = this.location.multiplyRange(range, scratchRange);\r\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\r\n const radius = transformedRange.diagonal().magnitude();\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\r\n }\r\n\r\n /** @internal */\r\n public getTileGraphics(tile: Tile) {\r\n return tile.produceGraphics();\r\n }\r\n\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n public get frustumPlanes(): FrustumPlanes {\r\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\r\n }\r\n\r\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\r\n public get worldToViewMap(): Map4d {\r\n return this.viewingSpace.worldToViewMap;\r\n }\r\n\r\n private computePixelSizeScaleFactor(): number {\r\n // Check to see if a model display transform with non-uniform scaling is being used.\r\n const mat = this.context.viewport.view.modelDisplayTransformProvider?.getModelDisplayTransform(this.tree.modelId)?.matrix;\r\n if (!mat)\r\n return 1;\r\n\r\n const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());\r\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\r\n return 1;\r\n\r\n // If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.\r\n const rangeDiag = this.tree.range.diagonal();\r\n let maxS = 0;\r\n let maxR = 0;\r\n if (scale[0] > scale[1])\r\n maxS = (scale[0] > scale[2] ? 0 : 2);\r\n else\r\n maxS = (scale[1] > scale[2] ? 1 : 2);\r\n\r\n if (rangeDiag.x > rangeDiag.y)\r\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\r\n else\r\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\r\n\r\n return maxS !== maxR ? scale[maxS] : 1;\r\n }\r\n\r\n /** Constructor */\r\n public constructor(params: TileDrawArgParams) {\r\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\r\n this.location = location;\r\n this.tree = tree;\r\n this.context = context;\r\n this.now = now;\r\n this._appearanceProvider = params.appearanceProvider;\r\n this.hiddenLineSettings = params.hiddenLineSettings;\r\n this.animationTransformNodeId = params.animationTransformNodeId;\r\n this.boundingRange = params.boundingRange;\r\n this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.\r\n\r\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\r\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\r\n this.clipVolume = clipVolume;\r\n\r\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\r\n this.graphics.symbologyOverrides = symbologyOverrides;\r\n this.graphics.animationId = tree.modelId;\r\n\r\n this.viewingSpace = context.viewingSpace;\r\n this._frustumPlanes = FrustumPlanes.fromFrustum(this.viewingSpace.getFrustum());\r\n\r\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\r\n this.drape = context.getTextureDrapeForModel(tree.modelId);\r\n\r\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\r\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\r\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\r\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\r\n }\r\n\r\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\r\n if (context.viewport.isCameraOn)\r\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\r\n\r\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\r\n }\r\n\r\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\r\n * @see [[Viewport.tileSizeModifier]].\r\n * @public\r\n */\r\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\r\n\r\n /** @internal */\r\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\r\n\r\n /** @internal */\r\n public getTileRadius(tile: Tile): number {\r\n let range: Range3d = tile.range.clone(scratchRange);\r\n if (tile.tree.is2d) {\r\n // 2d tiles have a fixed Z range of [-1, 1]. Sometimes (e.g., hypermodeling) we draw them within a 3d view. Prevent Z from artificially expanding the radius.\r\n range.low.z = range.high.z = 0;\r\n }\r\n\r\n range = this.location.multiplyRange(range, range);\r\n return 0.5 * range.low.distance(range.high);\r\n }\r\n\r\n /** @internal */\r\n public get clip(): ClipVector | undefined {\r\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\r\n }\r\n\r\n /** Add a provider to supplement or override the symbology overrides for the view.\r\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\r\n * after they have potentially been modified by the existing provider.\r\n * @public\r\n */\r\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\r\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\r\n }\r\n\r\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\r\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\r\n return this._appearanceProvider;\r\n }\r\n\r\n /** @internal */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._produceGraphicBranch(this.graphics);\r\n }\r\n /** @internal */\r\n public get secondaryClassifiers(): Map<number, RenderPlanarClassifier>| undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\r\n if (graphics.isEmpty)\r\n return undefined;\r\n\r\n const opts = {\r\n iModel: this.tree.iModel,\r\n clipVolume: this.clipVolume,\r\n classifierOrDrape: this.planarClassifier ?? this.drape,\r\n appearanceProvider: this.appearanceProvider,\r\n hline: this.hiddenLineSettings,\r\n secondaryClassifiers: this.secondaryClassifiers,\r\n };\r\n\r\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\r\n if (undefined !== this.animationTransformNodeId)\r\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\r\n\r\n return graphic;\r\n }\r\n\r\n /** Output graphics for all accumulated tiles. */\r\n public drawGraphics(): void {\r\n const graphics = this.produceGraphics();\r\n if (undefined !== graphics)\r\n this.context.outputGraphic(graphics);\r\n }\r\n\r\n /** Output graphics of the specified type for all accumulated tiles. */\r\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\r\n const branch = this._produceGraphicBranch(graphics);\r\n if (undefined !== branch)\r\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\r\n }\r\n\r\n /** Indicate that graphics for the specified tile are desired but not yet available. Subsequently a request will be enqueued to load the tile's graphics. */\r\n public insertMissing(tile: Tile): void {\r\n this.context.insertMissingTile(tile);\r\n }\r\n\r\n /** Indicate that some requested child tiles are not yet loaded. */\r\n public markChildrenLoading(): void {\r\n this.context.markChildrenLoading();\r\n }\r\n\r\n /** Indicate that the specified tile is being used for some purpose by the [[SceneContext]]'s [[Viewport]]. Typically \"used\" means \"displayed\", but the exact meaning is up to the [[TileTree]] - for example, \"used\" might also mean that the tile's children are being used. A tile that is \"in use\" by any [[Viewport]] will not be discarded. */\r\n public markUsed(tile: Tile): void {\r\n tile.usageMarker.mark(this.context.viewport, this.now);\r\n }\r\n\r\n /** Indicate that the specified tile should be displayed and that its graphics are ready to be displayed. The number of \"ready\" tiles is used in conjunction with the number of \"missing\" tiles to convey to the user how complete the current view is.\r\n * @see [[insertMissing]]\r\n */\r\n public markReady(tile: Tile): void {\r\n this.readyTiles.add(tile);\r\n }\r\n\r\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\r\n * @internal\r\n */\r\n public processSelectedTiles(_tiles: Tile[]): void { }\r\n\r\n /* @internal */\r\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAsI;AACtI,oDAA6G;AAE7G,2DAAwD;AAOxD,gDAA6C;AAG7C,MAAM,YAAY,GAAG,IAAI,uBAAO,EAAE,CAAC;AACnC,MAAM,YAAY,GAAG,uBAAO,CAAC,MAAM,EAAE,CAAC;AACtC,MAAM,cAAc,GAAG,uBAAO,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,aAAa,GAAG,uBAAO,CAAC,UAAU,EAAE,CAAC;AAC3C,MAAM,aAAa,GAAG,uBAAO,CAAC,UAAU,EAAE,CAAC;AAC3C,MAAM,eAAe,GAAG,wBAAQ,CAAC,cAAc,EAAE,CAAC;AAwClD;;;;;;GAMG;AACH,MAAa,YAAY;IAqCvB,mFAAmF;IACnF,IAAW,iBAAiB,KAAwB,OAAO,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC7F,sFAAsF;IACtF,IAAW,kBAAkB,KAA6C,OAAO,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAYpH,kHAAkH;IAC3G,YAAY,CAAC,IAAU;QAC5B,MAAM,kBAAkB,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,SAAS,KAAK,kBAAkB;YAClC,OAAO,kBAAkB,CAAC;QAE5B,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,uGAAuG;QAChJ,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAExC,MAAM,aAAa,GAAG,IAAI,CAAC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AAe;IACf,IAAW,4BAA4B,KAAyB,OAAO,SAAS,CAAC,CAAC,CAAC;CACpF;AA/UD,oCA+UC","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 Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { GraphicBranch } from \"../render/GraphicBranch\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ViewingSpace } from \"../ViewingSpace\";\r\nimport { CoordSystem } from \"../CoordSystem\";\r\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\r\n\r\nconst scratchRange = new Range3d();\r\nconst scratchPoint = Point3d.create();\r\nconst scratchPoint4d = Point4d.create();\r\nconst scratchXRange = Range1d.createNull();\r\nconst scratchYRange = Range1d.createNull();\r\nconst scratchMatrix4d = Matrix4d.createIdentity();\r\n\r\n/** Parameters used to construct [[TileDrawArgs]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TileDrawArgParams {\r\n /** Context for the scene into which the tiles are to be rendered. */\r\n context: SceneContext;\r\n /** Transform to be applied when drawing the tiles. */\r\n location: Transform;\r\n /** The tile tree from which to obtain tiles. */\r\n tree: TileTree;\r\n /** The time at which these args were created. */\r\n now: BeTimePoint;\r\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\r\n viewFlagOverrides: ViewFlagOverrides;\r\n /** Clip volume used to clip the tiles. */\r\n clipVolume?: RenderClipVolume;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n parentsAndChildrenExclusive: boolean;\r\n /** Symbology overrides to apply to the tiles. */\r\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\r\n /** Optionally customizes the view's symbology overrides for the tiles. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optionally overrides the view's hidden line settings. */\r\n hiddenLineSettings?: HiddenLine.Settings;\r\n /** If defined, tiles should be culled if they do not intersect this clip. */\r\n intersectionClip?: ClipVector;\r\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\r\n * or \"0xffffffff\" for any node that does *not* apply a transform.\r\n * @internal\r\n */\r\n animationTransformNodeId?: number;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n boundingRange?: Range3d;\r\n /** @alpha */\r\n maximumScreenSpaceError?: number;\r\n}\r\n\r\n/**\r\n * Provides context used when selecting and drawing [[Tile]]s.\r\n * @see [[TileTree.selectTiles]]\r\n * @see [[TileTree.draw]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class TileDrawArgs {\r\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\r\n public readonly location: Transform;\r\n /** The tile tree being drawn. */\r\n public readonly tree: TileTree;\r\n /** Optional clip volume applied to the tiles. */\r\n public clipVolume: RenderClipVolume | undefined;\r\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\r\n public readonly context: SceneContext;\r\n /** Describes the viewed volume. */\r\n public viewingSpace: ViewingSpace;\r\n /** Holds the tile graphics to be drawn. */\r\n public readonly graphics: GraphicBranch = new GraphicBranch();\r\n /** @internal */\r\n public readonly now: BeTimePoint;\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n protected _frustumPlanes?: FrustumPlanes;\r\n /** @internal */\r\n public planarClassifier?: RenderPlanarClassifier;\r\n /** @internal */\r\n public drape?: RenderTextureDrape;\r\n /** Optional clip volume applied to all tiles in the view. */\r\n public readonly viewClip?: ClipVector;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n public parentsAndChildrenExclusive: boolean;\r\n /** @internal */\r\n private _appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optional overrides for the view's hidden line settings. */\r\n public hiddenLineSettings?: HiddenLine.Settings;\r\n /** Tiles that we want to draw and that are ready to draw. May not actually be selected, e.g. if sibling tiles are not yet ready. */\r\n public readonly readyTiles = new Set<Tile>();\r\n /** Tiles whose contents should be kept in memory regardless of whether or not they are selected for display.\r\n * @internal\r\n */\r\n public readonly touchedTiles = new Set<Tile>();\r\n /** For perspective views, the view-Z of the near plane. */\r\n private readonly _nearFrontCenter?: Point3d;\r\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\r\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\r\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\r\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\r\n /** If defined, tiles will be culled if they do not intersect this clip. */\r\n public intersectionClip?: ClipVector;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n public boundingRange?: Range3d;\r\n /** @internal */\r\n public readonly pixelSizeScaleFactor;\r\n /** @internal */\r\n public readonly animationTransformNodeId?: number;\r\n /** @alpha */\r\n public maximumScreenSpaceError;\r\n\r\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\r\n public getPixelSize(tile: Tile): number {\r\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\r\n if (undefined !== sizeFromProjection)\r\n return sizeFromProjection;\r\n\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\r\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\r\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\r\n if (!sizeProjectionCorners)\r\n return undefined;\r\n\r\n /* For maps or global reality models we use the projected screen rectangle rather than sphere to calculate pixel size to avoid excessive tiles at horizon. */\r\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\r\n scratchXRange.setNull();\r\n scratchYRange.setNull();\r\n\r\n let behindEye = false;\r\n for (const corner of sizeProjectionCorners) {\r\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\r\n if (viewCorner.w < 0.0) {\r\n behindEye = true;\r\n break;\r\n }\r\n\r\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\r\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\r\n }\r\n if (behindEye)\r\n return undefined;\r\n\r\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\r\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\r\n * Device scaling is not applied.\r\n */\r\n public computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\r\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\r\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\r\n const viewZ = this.context.viewport.rotation.rowZ();\r\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\r\n if (viewZ.dotProduct(toFront) < radius) {\r\n center = this._nearFrontCenter;\r\n } else {\r\n // Find point on sphere closest to eye.\r\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\r\n\r\n if (toEye) { // Only if tile is not already behind the eye.\r\n toEye.scaleInPlace(radius);\r\n center.addInPlace(toEye);\r\n }\r\n }\r\n }\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n }\r\n\r\n /** Compute this size of a sphere on screen in pixels */\r\n public getRangePixelSize(range: Range3d): number {\r\n const transformedRange = this.location.multiplyRange(range, scratchRange);\r\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\r\n const radius = transformedRange.diagonal().magnitude();\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\r\n }\r\n\r\n /** @internal */\r\n public getTileGraphics(tile: Tile) {\r\n return tile.produceGraphics();\r\n }\r\n\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n public get frustumPlanes(): FrustumPlanes {\r\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\r\n }\r\n\r\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\r\n public get worldToViewMap(): Map4d {\r\n return this.viewingSpace.worldToViewMap;\r\n }\r\n\r\n private computePixelSizeScaleFactor(): number {\r\n // Check to see if a model display transform with non-uniform scaling is being used.\r\n const mat = this.context.viewport.view.modelDisplayTransformProvider?.getModelDisplayTransform(this.tree.modelId)?.matrix;\r\n if (!mat)\r\n return 1;\r\n\r\n const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());\r\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\r\n return 1;\r\n\r\n // If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.\r\n const rangeDiag = this.tree.range.diagonal();\r\n let maxS = 0;\r\n let maxR = 0;\r\n if (scale[0] > scale[1])\r\n maxS = (scale[0] > scale[2] ? 0 : 2);\r\n else\r\n maxS = (scale[1] > scale[2] ? 1 : 2);\r\n\r\n if (rangeDiag.x > rangeDiag.y)\r\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\r\n else\r\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\r\n\r\n return maxS !== maxR ? scale[maxS] : 1;\r\n }\r\n\r\n /** Constructor */\r\n public constructor(params: TileDrawArgParams) {\r\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\r\n this.location = location;\r\n this.tree = tree;\r\n this.context = context;\r\n this.now = now;\r\n this._appearanceProvider = params.appearanceProvider;\r\n this.hiddenLineSettings = params.hiddenLineSettings;\r\n this.animationTransformNodeId = params.animationTransformNodeId;\r\n this.boundingRange = params.boundingRange;\r\n this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.\r\n\r\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\r\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\r\n this.clipVolume = clipVolume;\r\n\r\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\r\n this.graphics.symbologyOverrides = symbologyOverrides;\r\n this.graphics.animationId = tree.modelId;\r\n\r\n this.viewingSpace = context.viewingSpace;\r\n this._frustumPlanes = FrustumPlanes.fromFrustum(this.viewingSpace.getFrustum());\r\n\r\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\r\n this.drape = context.getTextureDrapeForModel(tree.modelId);\r\n\r\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\r\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\r\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\r\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\r\n }\r\n\r\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\r\n if (context.viewport.isCameraOn)\r\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\r\n\r\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\r\n }\r\n\r\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\r\n * @see [[Viewport.tileSizeModifier]].\r\n * @public\r\n */\r\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\r\n\r\n /** @internal */\r\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\r\n\r\n /** @internal */\r\n public getTileRadius(tile: Tile): number {\r\n let range: Range3d = tile.range.clone(scratchRange);\r\n if (tile.tree.is2d) {\r\n // 2d tiles have a fixed Z range of [-1, 1]. Sometimes (e.g., hypermodeling) we draw them within a 3d view. Prevent Z from artificially expanding the radius.\r\n range.low.z = range.high.z = 0;\r\n }\r\n\r\n range = this.location.multiplyRange(range, range);\r\n return 0.5 * range.low.distance(range.high);\r\n }\r\n\r\n /** @internal */\r\n public get clip(): ClipVector | undefined {\r\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\r\n }\r\n\r\n /** Add a provider to supplement or override the symbology overrides for the view.\r\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\r\n * after they have potentially been modified by the existing provider.\r\n * @public\r\n */\r\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\r\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\r\n }\r\n\r\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\r\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\r\n return this._appearanceProvider;\r\n }\r\n\r\n /** @internal */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._produceGraphicBranch(this.graphics);\r\n }\r\n /** @internal */\r\n public get secondaryClassifiers(): Map<number, RenderPlanarClassifier>| undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\r\n if (graphics.isEmpty)\r\n return undefined;\r\n\r\n const opts = {\r\n iModel: this.tree.iModel,\r\n clipVolume: this.clipVolume,\r\n classifierOrDrape: this.planarClassifier ?? this.drape,\r\n appearanceProvider: this.appearanceProvider,\r\n hline: this.hiddenLineSettings,\r\n secondaryClassifiers: this.secondaryClassifiers,\r\n };\r\n\r\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\r\n if (undefined !== this.animationTransformNodeId)\r\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\r\n\r\n return graphic;\r\n }\r\n\r\n /** Output graphics for all accumulated tiles. */\r\n public drawGraphics(): void {\r\n const graphics = this.produceGraphics();\r\n if (undefined !== graphics)\r\n this.context.outputGraphic(graphics);\r\n }\r\n\r\n /** Output graphics of the specified type for all accumulated tiles. */\r\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\r\n const branch = this._produceGraphicBranch(graphics);\r\n if (undefined !== branch)\r\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\r\n }\r\n\r\n /** Indicate that graphics for the specified tile are desired but not yet available. Subsequently a request will be enqueued to load the tile's graphics. */\r\n public insertMissing(tile: Tile): void {\r\n this.context.insertMissingTile(tile);\r\n }\r\n\r\n /** Indicate that some requested child tiles are not yet loaded. */\r\n public markChildrenLoading(): void {\r\n this.context.markChildrenLoading();\r\n }\r\n\r\n /** Indicate that the specified tile is being used for some purpose by the [[SceneContext]]'s [[Viewport]]. Typically \"used\" means \"displayed\", but the exact meaning is up to the [[TileTree]] - for example, \"used\" might also mean that the tile's children are being used. A tile that is \"in use\" by any [[Viewport]] will not be discarded. */\r\n public markUsed(tile: Tile): void {\r\n tile.usageMarker.mark(this.context.viewport, this.now);\r\n }\r\n\r\n /** Indicate that the specified tile should be displayed and that its graphics are ready to be displayed. The number of \"ready\" tiles is used in conjunction with the number of \"missing\" tiles to convey to the user how complete the current view is.\r\n * @see [[insertMissing]]\r\n */\r\n public markReady(tile: Tile): void {\r\n this.readyTiles.add(tile);\r\n }\r\n\r\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\r\n * @internal\r\n */\r\n public processSelectedTiles(_tiles: Tile[]): void { }\r\n\r\n /* @internal */\r\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\r\n}\r\n"]}
|
package/lib/cjs/tile/TileTree.js
CHANGED
|
@@ -86,7 +86,7 @@ class TileTree {
|
|
|
86
86
|
selectTiles(args) {
|
|
87
87
|
this._lastSelected = core_bentley_1.BeTimePoint.now();
|
|
88
88
|
const tiles = this._selectTiles(args);
|
|
89
|
-
IModelApp_1.IModelApp.tileAdmin.addTilesForUser(args.context.viewport, tiles, args.readyTiles);
|
|
89
|
+
IModelApp_1.IModelApp.tileAdmin.addTilesForUser(args.context.viewport, tiles, args.readyTiles, args.touchedTiles);
|
|
90
90
|
args.processSelectedTiles(ti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E,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CAAC,UAAiC;IAC5D,CAAC;CACF;AAnJD,4BAmJC","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 Tiles\r\n */\r\n\r\nimport { BeDuration, BeTimePoint, dispose, Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, FrustumPlanes, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { calculateEcefToDbTransformAtLocation } from \"../BackgroundMapGeometry\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { Tile, TileDrawArgs, TileGeometryCollector, TileLoadPriority, TileTreeParams } from \"./internal\";\r\n\r\n/** Describes the current state of a [[TileTree]]. TileTrees are loaded asynchronously and may be unloaded after a period of disuse.\r\n * @see [[TileTreeOwner]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TileTreeLoadStatus {\r\n /** No attempt to load the tile tree has yet been made. */\r\n NotLoaded,\r\n /** The tile tree is in the process of being loaded. */\r\n Loading,\r\n /** The tile tree has been successfully loaded. */\r\n Loaded,\r\n /** An attempt to load the tile tree failed. */\r\n NotFound,\r\n}\r\n\r\n/** A hierarchical level-of-detail tree of [3d Tiles](https://github.com/CesiumGS/3d-tiles) to be rendered in a [[Viewport]].\r\n * Tile trees originate from a variety of sources:\r\n * - Each [[GeometricModelState]] can supply its graphics as a tile tree;\r\n * - A [[DisplayStyleState]]'s map settings or reality models;\r\n * - [ViewAttachment]($backend)s in a [[SheetModelState]];\r\n * - [[TiledGraphicsProvider]]s associated with a viewport.\r\n *\r\n * The same TileTree can be displayed in any number of viewports using multiple [[TileTreeReference]]s.\r\n * A TileTree's lifetime is managed by a [[TileTreeOwner]].\r\n *\r\n * @note Some methods carry a warning that they should **not** be overridden by subclasses; typically a protected method exists that can be\r\n * overridden instead to customize the behavior. For example, [[selectTiles]] should not be overridden; instead, override the[[_selectTiles]] method\r\n * that it calls.\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class TileTree {\r\n private _isDisposed = false;\r\n /** @internal */\r\n protected _lastSelected = BeTimePoint.now();\r\n /** @internal */\r\n protected _clipVolume?: RenderClipVolume;\r\n public readonly iModel: IModelConnection;\r\n /** Transform from this tile tree's coordinate space to the iModel's coordinate space. */\r\n public readonly iModelTransform: Transform;\r\n /** Uniquely identifies this tree among all other tile trees associated with the iModel. */\r\n public readonly id: string;\r\n /** A 64-bit identifier for this tile tree, unique within the context of its [[IModelConnection]].\r\n * For a tile tree associated with a [[GeometricModelState]], this is the Id of the model. Other types of tile trees\r\n * typically use a transient Id obtained from [[IModelConnection.transientIds]].\r\n */\r\n public readonly modelId: Id64String;\r\n /** The length of time after which tiles belonging to this tree are considered elegible for disposal if they are no longer in use. */\r\n public readonly expirationTime: BeDuration;\r\n /** @internal */\r\n public get loadPriority(): TileLoadPriority { return this._loadPriority; }\r\n private readonly _loadPriority: TileLoadPriority;\r\n /** Optional tight bounding box around the entire contents of all of this tree's tiles. */\r\n public readonly contentRange?: ElementAlignedBox3d;\r\n\r\n /** The lowest-resolution tile in this tree. */\r\n public abstract get rootTile(): Tile;\r\n /** True if this tile tree contains 3d graphics. */\r\n public abstract get is3d(): boolean;\r\n /** Returns the maximum depth of this tree, if any. */\r\n public abstract get maxDepth(): number | undefined;\r\n\r\n /** The overrides that should be applied to the view's [ViewFlags]($common) when this tile tree is drawn. Can be overridden by individual [[TileTreeReference]]s. */\r\n public abstract get viewFlagOverrides(): ViewFlagOverrides;\r\n\r\n /** True if this tile tree has no bounds - e.g., a tile tree representing a globe is unbounded. */\r\n public get isContentUnbounded(): boolean {\r\n return false;\r\n }\r\n\r\n /** Implement this method to select tiles of appropriate resolution. */\r\n protected abstract _selectTiles(args: TileDrawArgs): Tile[];\r\n\r\n /** Produce graphics of appropriate resolution to be drawn in a [[Viewport]]. */\r\n public abstract draw(args: TileDrawArgs): void;\r\n\r\n /** Discard tiles and/or tile contents, presumably based on a least-recently-used and/or least-likely-to-be-needed criterion. */\r\n public abstract prune(): void;\r\n\r\n /** True if this tile tree contains 2d graphics. */\r\n public get is2d(): boolean { return !this.is3d; }\r\n /** @internal */\r\n public get isPointCloud(): boolean { return false; }\r\n /** @internal */\r\n public get clipVolume(): RenderClipVolume | undefined { return this._clipVolume; }\r\n\r\n /** The volume of space occupied by this tile tree. */\r\n public get range(): ElementAlignedBox3d { return this.rootTile.range; }\r\n /** The most recent time at which tiles [[selectTiles]] was called. */\r\n public get lastSelectedTime(): BeTimePoint { return this._lastSelected; }\r\n /** True if a tile and its child tiles should not be drawn simultaneously.\r\n * Default: true.\r\n */\r\n public get parentsAndChildrenExclusive(): boolean { return true; }\r\n\r\n /** Constructor */\r\n protected constructor(params: TileTreeParams) {\r\n this._lastSelected = BeTimePoint.now();\r\n this.iModel = params.iModel;\r\n this.iModelTransform = params.location;\r\n this._clipVolume = params.clipVolume;\r\n this.modelId = params.modelId;\r\n this.id = params.id;\r\n this.contentRange = params.contentRange;\r\n\r\n const admin = IModelApp.tileAdmin;\r\n this._loadPriority = params.priority;\r\n this.expirationTime = params.expirationTime ?? admin.tileExpirationTime;\r\n }\r\n\r\n /** Selects tiles of appropriate resolution for some purpose like drawing to the screen, producing a shadow map, etc.\r\n * @note Do **not** override this method. Implement [[_selectTiles]].\r\n */\r\n public selectTiles(args: TileDrawArgs): Tile[] {\r\n this._lastSelected = BeTimePoint.now();\r\n const tiles = this._selectTiles(args);\r\n IModelApp.tileAdmin.addTilesForUser(args.context.viewport, tiles, args.readyTiles);\r\n args.processSelectedTiles(tiles);\r\n return tiles;\r\n }\r\n\r\n /** True if [[dispose]] has been called on this tile tree. */\r\n public get isDisposed(): boolean { return this._isDisposed; }\r\n\r\n /** Dispose of this tree and any resources owned by it. This is typically invoked by a [[TileTreeOwner]]. */\r\n public dispose(): void {\r\n if (this.isDisposed)\r\n return;\r\n\r\n this._isDisposed = true;\r\n dispose(this.rootTile);\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n this.rootTile.collectStatistics(stats);\r\n }\r\n\r\n /** Returns the number of [[Tile]]s currently in memory belonging to this tree, primarily for debugging. */\r\n public countTiles(): number {\r\n return 1 + this.rootTile.countDescendants();\r\n }\r\n\r\n /** @internal */\r\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, location: Transform, frustumPlanes?: FrustumPlanes): void {\r\n this.rootTile.extendRangeForContent(range, matrix, location, frustumPlanes);\r\n }\r\n\r\n /**\r\n * Return the transform from the tile tree's coordinate space to [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates.\r\n * If a geographic coordinate system is present then this transform will be calculated at the tile tree center.\r\n * @beta\r\n */\r\n public async getEcefTransform(): Promise<Transform | undefined> {\r\n if (!this.iModel.ecefLocation)\r\n return undefined;\r\n\r\n let dbToEcef: Transform | undefined;\r\n const range = this.contentRange ? this.contentRange : this.range;\r\n const center = range.localXYZToWorld(.5, .5, .5);\r\n if (center) {\r\n this.iModelTransform.multiplyPoint3d(center, center);\r\n const ecefToDb = await calculateEcefToDbTransformAtLocation(center, this.iModel);\r\n dbToEcef = ecefToDb?.inverse();\r\n }\r\n if (!dbToEcef)\r\n dbToEcef = this.iModel.ecefLocation.getTransform();\r\n\r\n return dbToEcef.multiplyTransformTransform(this.iModelTransform);\r\n }\r\n\r\n /** Populate [[TileGeometryCollector.polyfaces]] with geometry obtained from this tile tree's tiles satisfying the collector's criteria.\r\n * The base implementation does nothing.\r\n * @see [[TileTreeReference.createGeometryTreeReference]] to attempt to create a TileTree that can collect geometry.\r\n * @beta\r\n */\r\n public collectTileGeometry(_collector: TileGeometryCollector): void {\r\n }\r\n}\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"TileTree.js","sourceRoot":"","sources":["../../../src/tile/TileTree.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAmF;AAGnF,oEAAgF;AAChF,4CAAyC;AAMzC;;;;GAIG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,0DAA0D;IAC1D,qEAAS,CAAA;IACT,uDAAuD;IACvD,iEAAO,CAAA;IACP,kDAAkD;IAClD,+DAAM,CAAA;IACN,+CAA+C;IAC/C,mEAAQ,CAAA;AACV,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAsB,QAAQ;IAkB5B,gBAAgB;IAChB,IAAW,YAAY,KAAuB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAe1E,kGAAkG;IAClG,IAAW,kBAAkB;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAWD,mDAAmD;IACnD,IAAW,IAAI,KAAc,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,gBAAgB;IAChB,IAAW,YAAY,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IACpD,gBAAgB;IAChB,IAAW,UAAU,KAAmC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAElF,sDAAsD;IACtD,IAAW,KAAK,KAA0B,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,sEAAsE;IACtE,IAAW,gBAAgB,KAAkB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACzE;;OAEG;IACH,IAAW,2BAA2B,KAAc,OAAO,IAAI,CAAC,CAAC,CAAC;IAElE,kBAAkB;IAClB,YAAsB,MAAsB;QAhEpC,gBAAW,GAAG,KAAK,CAAC;QAC5B,gBAAgB;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AC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CAAC,UAAiC;IAC5D,CAAC;CACF;AAnJD,4BAmJC","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 Tiles\r\n */\r\n\r\nimport { BeDuration, BeTimePoint, dispose, Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, FrustumPlanes, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { calculateEcefToDbTransformAtLocation } from \"../BackgroundMapGeometry\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { Tile, TileDrawArgs, TileGeometryCollector, TileLoadPriority, TileTreeParams } from \"./internal\";\r\n\r\n/** Describes the current state of a [[TileTree]]. TileTrees are loaded asynchronously and may be unloaded after a period of disuse.\r\n * @see [[TileTreeOwner]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TileTreeLoadStatus {\r\n /** No attempt to load the tile tree has yet been made. */\r\n NotLoaded,\r\n /** The tile tree is in the process of being loaded. */\r\n Loading,\r\n /** The tile tree has been successfully loaded. */\r\n Loaded,\r\n /** An attempt to load the tile tree failed. */\r\n NotFound,\r\n}\r\n\r\n/** A hierarchical level-of-detail tree of [3d Tiles](https://github.com/CesiumGS/3d-tiles) to be rendered in a [[Viewport]].\r\n * Tile trees originate from a variety of sources:\r\n * - Each [[GeometricModelState]] can supply its graphics as a tile tree;\r\n * - A [[DisplayStyleState]]'s map settings or reality models;\r\n * - [ViewAttachment]($backend)s in a [[SheetModelState]];\r\n * - [[TiledGraphicsProvider]]s associated with a viewport.\r\n *\r\n * The same TileTree can be displayed in any number of viewports using multiple [[TileTreeReference]]s.\r\n * A TileTree's lifetime is managed by a [[TileTreeOwner]].\r\n *\r\n * @note Some methods carry a warning that they should **not** be overridden by subclasses; typically a protected method exists that can be\r\n * overridden instead to customize the behavior. For example, [[selectTiles]] should not be overridden; instead, override the[[_selectTiles]] method\r\n * that it calls.\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class TileTree {\r\n private _isDisposed = false;\r\n /** @internal */\r\n protected _lastSelected = BeTimePoint.now();\r\n /** @internal */\r\n protected _clipVolume?: RenderClipVolume;\r\n public readonly iModel: IModelConnection;\r\n /** Transform from this tile tree's coordinate space to the iModel's coordinate space. */\r\n public readonly iModelTransform: Transform;\r\n /** Uniquely identifies this tree among all other tile trees associated with the iModel. */\r\n public readonly id: string;\r\n /** A 64-bit identifier for this tile tree, unique within the context of its [[IModelConnection]].\r\n * For a tile tree associated with a [[GeometricModelState]], this is the Id of the model. Other types of tile trees\r\n * typically use a transient Id obtained from [[IModelConnection.transientIds]].\r\n */\r\n public readonly modelId: Id64String;\r\n /** The length of time after which tiles belonging to this tree are considered elegible for disposal if they are no longer in use. */\r\n public readonly expirationTime: BeDuration;\r\n /** @internal */\r\n public get loadPriority(): TileLoadPriority { return this._loadPriority; }\r\n private readonly _loadPriority: TileLoadPriority;\r\n /** Optional tight bounding box around the entire contents of all of this tree's tiles. */\r\n public readonly contentRange?: ElementAlignedBox3d;\r\n\r\n /** The lowest-resolution tile in this tree. */\r\n public abstract get rootTile(): Tile;\r\n /** True if this tile tree contains 3d graphics. */\r\n public abstract get is3d(): boolean;\r\n /** Returns the maximum depth of this tree, if any. */\r\n public abstract get maxDepth(): number | undefined;\r\n\r\n /** The overrides that should be applied to the view's [ViewFlags]($common) when this tile tree is drawn. Can be overridden by individual [[TileTreeReference]]s. */\r\n public abstract get viewFlagOverrides(): ViewFlagOverrides;\r\n\r\n /** True if this tile tree has no bounds - e.g., a tile tree representing a globe is unbounded. */\r\n public get isContentUnbounded(): boolean {\r\n return false;\r\n }\r\n\r\n /** Implement this method to select tiles of appropriate resolution. */\r\n protected abstract _selectTiles(args: TileDrawArgs): Tile[];\r\n\r\n /** Produce graphics of appropriate resolution to be drawn in a [[Viewport]]. */\r\n public abstract draw(args: TileDrawArgs): void;\r\n\r\n /** Discard tiles and/or tile contents, presumably based on a least-recently-used and/or least-likely-to-be-needed criterion. */\r\n public abstract prune(): void;\r\n\r\n /** True if this tile tree contains 2d graphics. */\r\n public get is2d(): boolean { return !this.is3d; }\r\n /** @internal */\r\n public get isPointCloud(): boolean { return false; }\r\n /** @internal */\r\n public get clipVolume(): RenderClipVolume | undefined { return this._clipVolume; }\r\n\r\n /** The volume of space occupied by this tile tree. */\r\n public get range(): ElementAlignedBox3d { return this.rootTile.range; }\r\n /** The most recent time at which tiles [[selectTiles]] was called. */\r\n public get lastSelectedTime(): BeTimePoint { return this._lastSelected; }\r\n /** True if a tile and its child tiles should not be drawn simultaneously.\r\n * Default: true.\r\n */\r\n public get parentsAndChildrenExclusive(): boolean { return true; }\r\n\r\n /** Constructor */\r\n protected constructor(params: TileTreeParams) {\r\n this._lastSelected = BeTimePoint.now();\r\n this.iModel = params.iModel;\r\n this.iModelTransform = params.location;\r\n this._clipVolume = params.clipVolume;\r\n this.modelId = params.modelId;\r\n this.id = params.id;\r\n this.contentRange = params.contentRange;\r\n\r\n const admin = IModelApp.tileAdmin;\r\n this._loadPriority = params.priority;\r\n this.expirationTime = params.expirationTime ?? admin.tileExpirationTime;\r\n }\r\n\r\n /** Selects tiles of appropriate resolution for some purpose like drawing to the screen, producing a shadow map, etc.\r\n * @note Do **not** override this method. Implement [[_selectTiles]].\r\n */\r\n public selectTiles(args: TileDrawArgs): Tile[] {\r\n this._lastSelected = BeTimePoint.now();\r\n const tiles = this._selectTiles(args);\r\n IModelApp.tileAdmin.addTilesForUser(args.context.viewport, tiles, args.readyTiles, args.touchedTiles);\r\n args.processSelectedTiles(tiles);\r\n return tiles;\r\n }\r\n\r\n /** True if [[dispose]] has been called on this tile tree. */\r\n public get isDisposed(): boolean { return this._isDisposed; }\r\n\r\n /** Dispose of this tree and any resources owned by it. This is typically invoked by a [[TileTreeOwner]]. */\r\n public dispose(): void {\r\n if (this.isDisposed)\r\n return;\r\n\r\n this._isDisposed = true;\r\n dispose(this.rootTile);\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n this.rootTile.collectStatistics(stats);\r\n }\r\n\r\n /** Returns the number of [[Tile]]s currently in memory belonging to this tree, primarily for debugging. */\r\n public countTiles(): number {\r\n return 1 + this.rootTile.countDescendants();\r\n }\r\n\r\n /** @internal */\r\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, location: Transform, frustumPlanes?: FrustumPlanes): void {\r\n this.rootTile.extendRangeForContent(range, matrix, location, frustumPlanes);\r\n }\r\n\r\n /**\r\n * Return the transform from the tile tree's coordinate space to [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates.\r\n * If a geographic coordinate system is present then this transform will be calculated at the tile tree center.\r\n * @beta\r\n */\r\n public async getEcefTransform(): Promise<Transform | undefined> {\r\n if (!this.iModel.ecefLocation)\r\n return undefined;\r\n\r\n let dbToEcef: Transform | undefined;\r\n const range = this.contentRange ? this.contentRange : this.range;\r\n const center = range.localXYZToWorld(.5, .5, .5);\r\n if (center) {\r\n this.iModelTransform.multiplyPoint3d(center, center);\r\n const ecefToDb = await calculateEcefToDbTransformAtLocation(center, this.iModel);\r\n dbToEcef = ecefToDb?.inverse();\r\n }\r\n if (!dbToEcef)\r\n dbToEcef = this.iModel.ecefLocation.getTransform();\r\n\r\n return dbToEcef.multiplyTransformTransform(this.iModelTransform);\r\n }\r\n\r\n /** Populate [[TileGeometryCollector.polyfaces]] with geometry obtained from this tile tree's tiles satisfying the collector's criteria.\r\n * The base implementation does nothing.\r\n * @see [[TileTreeReference.createGeometryTreeReference]] to attempt to create a TileTree that can collect geometry.\r\n * @beta\r\n */\r\n public collectTileGeometry(_collector: TileGeometryCollector): void {\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModeljs-css.d.ts","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IModeljs-css.d.ts","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,GAAG,SAqIzB,CAAC"}
|
package/lib/esm/IModeljs-css.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module IModelApp
|
|
8
|
-
*/
|
|
9
6
|
// cSpell:ignore segoe
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
10
|
let iModelJsCss = `
|
|
11
11
|
:root {
|
|
12
12
|
--background-1:#ffffff;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F
|
|
1
|
+
{"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIrC,CAAC;AAEF,mEAAmE;AACnE,CAAC,GAAG,EAAE;IACJ,8DAA8D;IAC9D,IAAI,WAAW,KAAK,OAAO,QAAQ;QACjC,OAAO;IACT,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACrH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,GAAG,gEAAgE,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,wFAAwF;IACtH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,WAAW,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACrD,CAAC,CAAC,EAAE,CAAC","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// cSpell:ignore segoe\r\n\r\n/**\r\n * @internal\r\n */\r\nlet iModelJsCss: string | undefined = `\r\n:root {\r\n --background-1:#ffffff;\r\n --background-2:#f8f9fb;\r\n --background-3:#eef0f3;\r\n --background-4:#dce0e3;\r\n --background-5:#c7ccd1;\r\n --foreground-body:#000000;\r\n --foreground-primary:#008be1;\r\n --foreground-success:#56a91c;\r\n --foreground-alert:#d30a0a;\r\n --foreground-warning:#f18b12;\r\n --safe-area-top: constant(safe-area-inset-top);\r\n --safe-area-top: env(safe-area-inset-top);\r\n --safe-area-left: constant(safe-area-inset-left);\r\n --safe-area-left: env(safe-area-inset-left);\r\n --safe-area-bottom: constant(safe-area-inset-bottom);\r\n --safe-area-bottom: env(safe-area-inset-bottom);\r\n --safe-area-right: constant(safe-area-inset-right);\r\n --safe-area-right: env(safe-area-inset-right);\r\n --logo-foreground-body:#000000;\r\n --logo-background-1:#ffffff;\r\n}\r\n\r\n.logo-card-logo {\r\n width:124px;\r\n overflow:hidden;\r\n vertical-align:text-top;\r\n text-align:center\r\n}\r\n\r\n.logo-card-logo img {\r\n margin-top:4px;\r\n border: solid 3px var(--logo-background-1)\r\n}\r\n\r\n.logo-card-message {\r\n font-size:13px;\r\n line-height:1.25;\r\n margin-block-start:.5em;\r\n margin-block-end:3em;\r\n width:90%;\r\n opacity:.7\r\n}\r\n\r\n.logo-card-header {\r\n margin:auto;\r\n font-size:18px;\r\n font-weight:bold;\r\n opacity:.85\r\n}\r\n\r\n.logo-cards {\r\n position:relative;\r\n width:100%\r\n}\r\n\r\n.imodeljs-modal-overlay {\r\n top:0;\r\n left:0;\r\n width:100%;\r\n height:100%;\r\n position:absolute;\r\n display:flex;\r\n justify-content:center;\r\n align-items:center;\r\n background-color:rgba(0,0,0,.5);\r\n z-index:10000;\r\n}\r\n\r\n.imodeljs-modal {\r\n border-radius:3px;\r\n box-shadow: 0px 1px 3px 0 rgba(0,0,0,0.1);\r\n color:var(--logo-foreground-body);\r\n background-color:var(--logo-background-1);\r\n font-family:\"Segoe UI\",\"Open Sans\",sans-serif;\r\n font-weight:normal;\r\n font-stretch:normal;\r\n font-style:normal;\r\n letter-spacing:normal;\r\n text-align:left;\r\n --width-border: max(var(--safe-area-left), var(--safe-area-right), 16px);\r\n --height-border: max(var(--safe-area-top), var(--safe-area-bottom), 16px);\r\n max-height: calc(100% - (2 * var(--height-border)));\r\n overflow: auto;\r\n}\r\n\r\n@media (max-width:450px) {\r\n .imodeljs-about .logo-card-logo {\r\n width: 90px;\r\n }\r\n}\r\n\r\n@media (max-height:450px) {\r\n .imodeljs-about {\r\n max-width: calc(100% - (2 * var(--width-border))) !important;\r\n width: unset !important;\r\n }\r\n .imodeljs-about .logo-card-message p {\r\n margin-block-end: 1em;\r\n }\r\n .imodeljs-about .logo-cards {\r\n margin-bottom: 2em;\r\n }\r\n}\r\n\r\n.imodeljs-modal-close {\r\n font-size:32px;\r\n text-align:right;\r\n position:relative;\r\n cursor:pointer;\r\n right:10px;\r\n top:-4px;\r\n margin:0;\r\n margin-bottom:-10px\r\n}\r\n\r\n.imodeljs-icon {\r\n z-index:11;\r\n left:8px;\r\n bottom:8px;\r\n position:absolute;\r\n width:32px;\r\n cursor:pointer;\r\n opacity:.4;\r\n filter:drop-shadow(1px 1px 1px black)\r\n}\r\n\r\n@media (hover: hover) {\r\n .imodeljs-icon:hover {\r\n opacity:1.0;\r\n }\r\n}\r\n`;\r\n\r\n// add the iTwin.js frontend .css styles into DOM head when we load\r\n(() => {\r\n // Skip adding the css to document if document does not exist.\r\n if (\"undefined\" === typeof document)\r\n return;\r\n const style = document.createElement(\"style\");\r\n style.appendChild(document.createTextNode(iModelJsCss.replace(/\\s+/gm, \" \"))); // strips multiple spaces and space+\\r\r\n const openSans = document.createElement(\"link\");\r\n openSans.rel = \"stylesheet\";\r\n openSans.href = \"https://fonts.googleapis.com/css?family=Open+Sans&display=swap\";\r\n document.head.prepend(style); // put our styles at the beginning so any application-supplied styles will override them\r\n document.head.prepend(openSans);\r\n iModelJsCss = undefined; // can only be called once\r\n})();\r\n"]}
|
|
@@ -66,6 +66,14 @@ export interface MaterialTextureMappingProps {
|
|
|
66
66
|
weight?: number;
|
|
67
67
|
/** @internal */
|
|
68
68
|
worldMapping?: boolean;
|
|
69
|
+
/** True if want to use constant LOD texture mapping for the surface texture.
|
|
70
|
+
* Default: false.
|
|
71
|
+
*/
|
|
72
|
+
useConstantLod?: boolean;
|
|
73
|
+
/** Parameters for constant LOD mapping mode.
|
|
74
|
+
* See [[TextureMapping.ConstantLodParamProps]] for defaults.
|
|
75
|
+
*/
|
|
76
|
+
constantLodProps?: TextureMapping.ConstantLodParamProps;
|
|
69
77
|
}
|
|
70
78
|
/** Arguments supplied to [[RenderSystem.createRenderMaterial]].
|
|
71
79
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,+GAA+G;IAC/G,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,OAAO,EAAE,aAAa,CAAC;IAEvB,sGAAsG;IACtG,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC;IAEpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gBAAgB;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RenderMaterial.d.ts","s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AEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,kGAAkG;IAClG,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,2HAA2H;IAC3H,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, NormalMapParams, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs.diffuse]].\r\n * @public\r\n */\r\nexport interface MaterialDiffuseProps {\r\n /** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.\r\n * Default: 0.6\r\n */\r\n weight?: number;\r\n}\r\n\r\n/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.\r\n * @see [[CreateRenderMaterialArgs.specular]].\r\n * @public\r\n */\r\nexport interface MaterialSpecularProps {\r\n /** The color of the specular reflections.\r\n * Default: white.\r\n */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying the strength of the specular reflections.\r\n * Default: 0.4\r\n */\r\n weight?: number;\r\n\r\n /** An exponent in [0..infinity] describing the shininess of the surface.\r\n * Default: 13.5\r\n */\r\n exponent?: number;\r\n}\r\n\r\n/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.\r\n * @see [[CreateRenderMaterialArgs.textureMapping]].\r\n * @public\r\n */\r\nexport interface MaterialTextureMappingProps {\r\n /** The texture from which the image is obtained. */\r\n texture: RenderTexture;\r\n\r\n /** The parameters describing a normal map to use either in place of or in addition to the texture. */\r\n normalMapParams?: NormalMapParams;\r\n\r\n /** The mode controlling how the image is mapped onto the surface.\r\n * Default: [TextureMapping.Mode.Parametric]($common).\r\n */\r\n mode?: TextureMapping.Mode;\r\n\r\n /** A 2x3 matrix for computing the UV coordinates.\r\n * Default: [TextureMapping.Trans2x3.identity]($common).\r\n */\r\n transform?: TextureMapping.Trans2x3;\r\n\r\n /** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.\r\n * A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.\r\n * Default: 1.\r\n */\r\n weight?: number;\r\n\r\n /** @internal */\r\n worldMapping?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n\r\n /** Specifies the transparency of the material from 0.0 (fully transparent) to 1.0 (fully opaque).\r\n * If defined, this overrides the transparency of any surface to which the material is applied, and is multiplied with the\r\n * transparency of the material's [[textureMapping]] when sampling the texture.\r\n */\r\n alpha?: number;\r\n\r\n /** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */\r\n diffuse?: MaterialDiffuseProps;\r\n\r\n /** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */\r\n specular?: MaterialSpecularProps;\r\n\r\n /** Maps [RenderTexture]($common) images to the surfaces to which the material is applied to customize their appearance. */\r\n textureMapping?: MaterialTextureMappingProps;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, NormalMapParams, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs.diffuse]].\r\n * @public\r\n */\r\nexport interface MaterialDiffuseProps {\r\n /** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.\r\n * Default: 0.6\r\n */\r\n weight?: number;\r\n}\r\n\r\n/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.\r\n * @see [[CreateRenderMaterialArgs.specular]].\r\n * @public\r\n */\r\nexport interface MaterialSpecularProps {\r\n /** The color of the specular reflections.\r\n * Default: white.\r\n */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying the strength of the specular reflections.\r\n * Default: 0.4\r\n */\r\n weight?: number;\r\n\r\n /** An exponent in [0..infinity] describing the shininess of the surface.\r\n * Default: 13.5\r\n */\r\n exponent?: number;\r\n}\r\n\r\n/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.\r\n * @see [[CreateRenderMaterialArgs.textureMapping]].\r\n * @public\r\n */\r\nexport interface MaterialTextureMappingProps {\r\n /** The texture from which the image is obtained. */\r\n texture: RenderTexture;\r\n\r\n /** The parameters describing a normal map to use either in place of or in addition to the texture. */\r\n normalMapParams?: NormalMapParams;\r\n\r\n /** The mode controlling how the image is mapped onto the surface.\r\n * Default: [TextureMapping.Mode.Parametric]($common).\r\n */\r\n mode?: TextureMapping.Mode;\r\n\r\n /** A 2x3 matrix for computing the UV coordinates.\r\n * Default: [TextureMapping.Trans2x3.identity]($common).\r\n */\r\n transform?: TextureMapping.Trans2x3;\r\n\r\n /** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.\r\n * A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.\r\n * Default: 1.\r\n */\r\n weight?: number;\r\n\r\n /** @internal */\r\n worldMapping?: boolean;\r\n\r\n /** True if want to use constant LOD texture mapping for the surface texture.\r\n * Default: false.\r\n */\r\n useConstantLod?: boolean;\r\n\r\n /** Parameters for constant LOD mapping mode.\r\n * See [[TextureMapping.ConstantLodParamProps]] for defaults.\r\n */\r\n constantLodProps?: TextureMapping.ConstantLodParamProps;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n\r\n /** Specifies the transparency of the material from 0.0 (fully transparent) to 1.0 (fully opaque).\r\n * If defined, this overrides the transparency of any surface to which the material is applied, and is multiplied with the\r\n * transparency of the material's [[textureMapping]] when sampling the texture.\r\n */\r\n alpha?: number;\r\n\r\n /** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */\r\n diffuse?: MaterialDiffuseProps;\r\n\r\n /** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */\r\n specular?: MaterialSpecularProps;\r\n\r\n /** Maps [RenderTexture]($common) images to the surfaces to which the material is applied to customize their appearance. */\r\n textureMapping?: MaterialTextureMappingProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"System.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/System.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAyB,UAAU,EAAiB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAY,mBAAmB,EAAE,OAAO,EAAE,QAAQ,EAAkC,iBAAiB,EAAe,kBAAkB,EAAE,cAAc,EAAE,aAAa,EAAsD,MAAM,oBAAoB,CAAC;AAC7P,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAGxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,2BA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441,6 +441,8 @@ export class System extends RenderSystem {
|
|
|
441
441
|
mapMode: args.textureMapping.mode,
|
|
442
442
|
textureWeight: args.textureMapping.weight,
|
|
443
443
|
worldMapping: args.textureMapping.worldMapping,
|
|
444
|
+
useConstantLod: args.textureMapping.useConstantLod,
|
|
445
|
+
constantLodProps: args.textureMapping.constantLodProps,
|
|
444
446
|
}));
|
|
445
447
|
params.textureMapping.normalMapParams = args.textureMapping.normalMapParams;
|
|
446
448
|
}
|