@itwin/core-common 5.1.0-dev.3 → 5.1.0-dev.5

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.
@@ -426,6 +426,11 @@ export declare namespace RenderSchedule {
426
426
  getBatchIdForFeature(feature: PackedFeatureWithIndex): number;
427
427
  /** @alpha */
428
428
  get maxBatchId(): number;
429
+ /**
430
+ * Replaces all elementIds in a ScriptProps object with an empty string. Returns modified ScriptProps.
431
+ * @param scheduleScript The script props to modify.
432
+ * @internal */
433
+ static removeScheduleScriptElementIds(scheduleScript: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps;
429
434
  }
430
435
  /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.
431
436
  * @see [DisplayStyle.loadScheduleScript]($backend) to obtain the script reference for a display style.
@@ -1 +1 @@
1
- {"version":3,"file":"RenderSchedule.d.ts","sourceRoot":"","sources":["../../src/RenderSchedule.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAEL,iBAAiB,EAAE,WAAW,EAAQ,UAAU,EACjD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACqB,UAAU,EAAgC,4BAA4B,EAAW,OAAO,EAAE,OAAO,EAAE,SAAS,EAA8B,QAAQ,EAAE,MAAM,EACrL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AA8BtD;;;;GAIG;AACH,yBAAiB,cAAc,CAAC;IAC9B;;;OAGG;IACH,KAAY,aAAa;QACvB,+GAA+G;QAC/G,IAAI,IAAI;QACR;;WAEG;QACH,MAAM,IAAI;KACX;IAED,iEAAiE;IACjE,UAAiB,kBAAkB;QACj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GAAG,oBAAoB;QAMlE;;WAEG;QACI,MAAM,IAAI,WAAW;KAG7B;CACF"}
@@ -936,6 +936,20 @@ var RenderSchedule;
936
936
  get maxBatchId() {
937
937
  return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));
938
938
  }
939
+ /**
940
+ * Replaces all elementIds in a ScriptProps object with an empty string. Returns modified ScriptProps.
941
+ * @param scheduleScript The script props to modify.
942
+ * @internal */
943
+ static removeScheduleScriptElementIds(scheduleScript) {
944
+ scheduleScript.forEach((modelTimeline) => {
945
+ modelTimeline.elementTimelines.forEach((elementTimeline) => {
946
+ if (elementTimeline.elementIds) {
947
+ elementTimeline.elementIds = "";
948
+ }
949
+ });
950
+ });
951
+ return scheduleScript;
952
+ }
939
953
  }
940
954
  RenderSchedule.Script = Script;
941
955
  /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.
@@ -1 +1 @@
1
- {"version":3,"file":"RenderSchedule.js","sourceRoot":"","sources":["../../src/RenderSchedule.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAG6B;AAE7B,wDAE8B;AAC9B,yCAAsC;AACtC,yDAAyE;AAGzE,SAAS,WAAW,CAAC,KAAa,EAAE,GAAW,EAAE,QAAgB;IAC/D,OAAO,KAAK,GAAG,QAAQ,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,cAAc,CAAC,KAAe,EAAE,GAAa,EAAE,QAAgB;IACtE,OAAO,IAAI,mBAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,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C,CAAC;YAC/D,OAAO,KAAK,CAAC;QACf,CAAC;KACF;IAvDY,mCAAoB,uBAuDhC,CAAA;IAED;;;;;;;;OAQG;IACH,MAAa,aAAa;QAChB,YAAY,GAAG,CAAC,CAAC;QACR,OAAO,GAA2B,EAAE,CAAC;QAEtD,uFAAuF;QAChF,gBAAgB,CAAC,OAAmB;YACzC,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;YAC7E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,OAAO,OAAO,CAAC;QACjB,CAAC;QAED;;WAEG;QACI,MAAM;YACX,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,CAAC;KACF;IAjBY,4BAAa,gBAiBzB,CAAA;AACH,CAAC,EA93CgB,cAAc,8BAAd,cAAc,QA83C9B","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 DisplayStyles\r\n */\r\n\r\nimport {\r\n assert, compareBooleans, compareNumbers, comparePossiblyUndefined, compareStrings, compareStringsOrUndefined,\r\n CompressedId64Set, Constructor, Id64, Id64String, OrderedId64Iterable,\r\n} from \"@itwin/core-bentley\";\r\nimport { EntityReferenceSet } from \"./EntityReference\";\r\nimport {\r\n ClipPlane, ClipPrimitive, ClipVector, ConvexClipPlaneSet, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Point4d, Range1d, Transform, UnionOfConvexClipPlaneSets, Vector3d, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\nimport { RgbColor } from \"./RgbColor\";\r\nimport { FeatureAppearance, FeatureOverrides } from \"./FeatureSymbology\";\r\nimport {PackedFeatureWithIndex} from \"./FeatureTable\";\r\n\r\nfunction interpolate(start: number, end: number, fraction: number): number {\r\n return start + fraction * (end - start);\r\n}\r\n\r\nfunction interpolateRgb(start: RgbColor, end: RgbColor, fraction: number): RgbColor {\r\n return new RgbColor(interpolate(start.r, end.r, fraction), interpolate(start.g, end.g, fraction), interpolate(start.b, end.b, fraction));\r\n}\r\n\r\nfunction compareXYZ(lhs: XYAndZ, rhs: XYAndZ): number {\r\n return compareNumbers(lhs.x, rhs.x) || compareNumbers(lhs.y, rhs.y) || compareNumbers(lhs.z, rhs.z);\r\n}\r\n\r\nfunction compare4d(lhs: Point4d, rhs: Point4d): number {\r\n return compareNumbers(lhs.x, rhs.x) || compareNumbers(lhs.y, rhs.y) || compareNumbers(lhs.z, rhs.z) || compareNumbers(lhs.w, rhs.w);\r\n}\r\n\r\nconst scratchVec3a = new Vector3d();\r\nconst scratchVec3b = new Vector3d();\r\nfunction compareMatrices(lhs: Matrix3d, rhs: Matrix3d): number {\r\n return compareXYZ(lhs.columnX(scratchVec3a), rhs.columnX(scratchVec3b))\r\n || compareXYZ(lhs.columnY(scratchVec3a), rhs.columnY(scratchVec3b))\r\n || compareXYZ(lhs.columnZ(scratchVec3a), rhs.columnZ(scratchVec3b));\r\n}\r\n\r\nfunction compareDurations(lhs: Range1d, rhs: Range1d): number {\r\n return compareNumbers(lhs.low, rhs.low) || compareNumbers(lhs.high, rhs.high);\r\n}\r\n\r\n/** Namespace containing types that collectively define a script that animates the contents of a view by adjusting the visibility, position,\r\n * and/or symbology of groups of elements over time. A [[RenderSchedule.Script]] is hosted by a [RenderTimeline]($backend) element. The script\r\n * can be associated with a [DisplayStyleState]($frontend) by way of its [[DisplayStyleSettings.renderTimeline]] property.\r\n * @public\r\n */\r\nexport namespace RenderSchedule {\r\n /** Defines how two interpolate between two entries in a [[RenderSchedule.Timeline]].\r\n * @note Currently only Linear and Step are supported. Any other value is treated as Step.\r\n * @see [[RenderSchedule.TimelineEntry]].\r\n */\r\n export enum Interpolation {\r\n /** Each timeline entry's value is discrete - the timeline jumps from one entry's value directly to another. */\r\n Step = 1,\r\n /** Given two entries on the timeline and a timepoint in between them, linearly interpolate based on the timepoint's distance between the\r\n * two entries.\r\n */\r\n Linear = 2,\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.TimelineEntry]]. */\r\n export interface TimelineEntryProps {\r\n /** The time point in seconds in the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time). */\r\n time: number;\r\n /** How to interpolate from this entry to the next entry in the timeline.\r\n * Currently, anything other than [[RenderSchedule.Interpolation.Linear]] is treated as [[RenderSchedule.Interpolation.Step]].\r\n * Additional interpolation modes may become supported in the future.\r\n */\r\n interpolation?: Interpolation;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.VisibilityEntry]]. */\r\n export interface VisibilityEntryProps extends TimelineEntryProps {\r\n /** Visibility of the geometry from 0 (invisible) to 100 (fully visible), with intermediate values appearing increasingly less transparent.\r\n * Default: 100 (fully visible).\r\n */\r\n value?: number;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.ColorEntry]]. */\r\n export interface ColorEntryProps extends TimelineEntryProps {\r\n /** The color applied to the geometry, with each component specified as an integer in [0, 255].\r\n * e.g., (0, 0, 0) represents black and (255, 255, 255) represents white.\r\n * If `undefined`, the geometry is displayed in its actual color.\r\n */\r\n value?: { red: number, green: number, blue: number };\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.CuttingPlane]]. */\r\n export interface CuttingPlaneProps {\r\n /** (x,y,z) of a point on the plane. */\r\n position: number[];\r\n /** (x, y, z) of the plane direction (towards the clip) */\r\n direction: number[];\r\n /** If true, the clip plane is ignored and the geometry is displayed unclipped. */\r\n visible?: boolean;\r\n /** If true, the clip plane is ignored and the geometry is not displayed. */\r\n hidden?: boolean;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.CuttingPlaneEntry]]. */\r\n export interface CuttingPlaneEntryProps extends TimelineEntryProps {\r\n /** The clip plane, or undefined if the geometry is not clipped. */\r\n value?: CuttingPlaneProps;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.TransformComponents]]. */\r\n export interface TransformComponentsProps {\r\n /** (x, y, z) of position - applied after rotation. */\r\n position?: number[];\r\n /** Quaternion representing rotation. */\r\n orientation?: number[];\r\n /** (x, y, z) of pivot - applied before rotation. */\r\n pivot?: number[];\r\n }\r\n\r\n /** JSON representation of a [Transform]($core-geometry) associated with a [[RenderSchedule.TransformEntryProps]]. */\r\n export interface TransformProps extends TransformComponentsProps {\r\n /** 3 X 4 transformation matrix containing 3 arrays of matrix rows consisting of 4 numbers each: [qx qy qz ax]\r\n * where the fourth columnn in each row holds the translation.\r\n * `undefined` is equivalent to an identity transform.\r\n * This transform is only used if position, orientation, and/or pivot are undefined.\r\n */\r\n transform?: number[][];\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.TransformEntry]]. */\r\n export interface TransformEntryProps extends TimelineEntryProps {\r\n /** The transformation matrix, with `undefined` corresponding to an identity matrix. */\r\n value?: TransformProps;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.Timeline]]. */\r\n export interface TimelineProps {\r\n /** Timeline controlling the visibility of the associated geometry. */\r\n visibilityTimeline?: VisibilityEntryProps[];\r\n /** Timeline controlling the colors of the associated geometry. */\r\n colorTimeline?: ColorEntryProps[];\r\n /** Timeline applying transforms to the associated geometry. */\r\n transformTimeline?: TransformEntryProps[];\r\n /** Timeline applying [ClipVector]($core-geometry)s to the associated geometry. */\r\n cuttingPlaneTimeline?: CuttingPlaneEntryProps[];\r\n }\r\n\r\n /** JSON representation of an [[RenderSchedule.ElementTimeline]]. */\r\n export interface ElementTimelineProps extends TimelineProps {\r\n /** A positive integer that uniquely identifies this timeline among all element timelines in the [[RenderSchedule.Script]]. */\r\n batchId: number;\r\n /** The Ids of the elements to which this timeline applies.\r\n * @note Prefer the compressed representation - lists of element Ids can be comparatively enormous.\r\n * @note For a [[DisplayStyleSettingsProps]] associated with a [DisplayStyleState]($frontend) obtained via [IModelConnection.Views.load]($frontend),\r\n * this property will be an empty `CompressedId64Set`. They are omitted to conserve bandwidth and memory because they are not needed for display on the frontend.\r\n */\r\n elementIds: Id64String[] | CompressedId64Set;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.ModelTimeline]]. */\r\n export interface ModelTimelineProps extends TimelineProps {\r\n /** The Id of the [GeometricModelState]($frontend) to which the timeline applies. */\r\n modelId: Id64String;\r\n /** @alpha */\r\n realityModelUrl?: string; // defined only for \"context\" reality models (attached through display style)\r\n /** Timelines affecting groups of elements. */\r\n elementTimelines: ElementTimelineProps[];\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.Script]]. */\r\n export type ScriptProps = ModelTimelineProps[];\r\n\r\n /** Describes the value of some property at a specific point along a [[RenderSchedule.Timeline]].\r\n * @see [[RenderSchedule.VisibilityEntry]]\r\n * @see [[RenderSchedule.ColorEntry]]\r\n * @see [[RenderSchedule.TransformEntry]]\r\n * @see [[RenderSchedule.CuttingPlaneEntry]]\r\n */\r\n export class TimelineEntry {\r\n /** The time point in seconds in the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time). */\r\n public readonly time: number;\r\n /** How to interpolate from this entry to the next entry in the timeline. */\r\n public readonly interpolation: Interpolation;\r\n\r\n public constructor(props: TimelineEntryProps) {\r\n this.time = props.time;\r\n this.interpolation = props.interpolation === Interpolation.Linear ? props.interpolation : Interpolation.Step;\r\n }\r\n\r\n public toJSON(): TimelineEntryProps {\r\n const props: TimelineEntryProps = {\r\n time: this.time,\r\n };\r\n\r\n if (this.interpolation === Interpolation.Linear)\r\n props.interpolation = this.interpolation;\r\n\r\n return props;\r\n }\r\n\r\n public compareTo(other: TimelineEntry): number {\r\n return compareNumbers(this.interpolation, other.interpolation) || compareNumbers(this.time, other.time);\r\n }\r\n\r\n public equals(other: TimelineEntry): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n }\r\n\r\n /** A timeline entry that controls the visibility of the associated geometry. */\r\n export class VisibilityEntry extends TimelineEntry {\r\n /** The visibility of the geometry at this point on the timeline, in the range [0, 100] where 0 is completely invisible, 100 is completely visible,\r\n * and values in between indicate increasing opacity.\r\n */\r\n public readonly value: number;\r\n\r\n public constructor(props: VisibilityEntryProps) {\r\n super(props);\r\n if (typeof props.value !== \"number\")\r\n this.value = 100;\r\n else\r\n this.value = Math.max(0, Math.min(100, props.value));\r\n }\r\n\r\n public override toJSON(): VisibilityEntryProps {\r\n const props = super.toJSON() as VisibilityEntryProps;\r\n if (100 !== this.value)\r\n props.value = this.value;\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: VisibilityEntry): number {\r\n assert(other instanceof VisibilityEntry);\r\n return super.compareTo(other) || compareNumbers(this.value, other.value);\r\n }\r\n }\r\n\r\n /** A timeline entry controlling the color of the affected geometry. */\r\n export class ColorEntry extends TimelineEntry {\r\n /** If defined, the color in which to draw the geometry. If undefined, the geometry is drawn in its actual color. */\r\n public readonly value: RgbColor | undefined;\r\n\r\n public constructor(props: ColorEntryProps) {\r\n super(props);\r\n if (props.value)\r\n this.value = new RgbColor(props.value.red, props.value.green, props.value.blue);\r\n }\r\n\r\n public override toJSON(): ColorEntryProps {\r\n const props = super.toJSON() as ColorEntryProps;\r\n if (this.value) {\r\n props.value = {\r\n red: this.value.r,\r\n green: this.value.g,\r\n blue: this.value.b,\r\n };\r\n }\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: ColorEntry): number {\r\n assert(other instanceof ColorEntry);\r\n return super.compareTo(other) || comparePossiblyUndefined((lhs, rhs) => lhs.compareTo(rhs), this.value, other.value);\r\n }\r\n }\r\n\r\n /** Describes the components of a [[RenderSchedule.TransformEntry]] as a rotation around a pivot point followed by a translation. */\r\n export class TransformComponents {\r\n /** Pivot point - applied before rotation. */\r\n public readonly pivot: Vector3d;\r\n /** Quaternion rotation. */\r\n public readonly orientation: Point4d;\r\n /** Translation - applied after rotation. */\r\n public readonly position: Vector3d;\r\n\r\n public constructor(position: Vector3d, pivot: Vector3d, orientation: Point4d) {\r\n this.position = position;\r\n this.pivot = pivot;\r\n this.orientation = orientation;\r\n }\r\n\r\n public static fromJSON(props: TransformComponentsProps): TransformComponents | undefined {\r\n if (props.pivot && props.position && props.orientation)\r\n return new TransformComponents(Vector3d.fromJSON(props.position), Vector3d.fromJSON(props.pivot), Point4d.fromJSON(props.orientation));\r\n else\r\n return undefined;\r\n }\r\n\r\n public toJSON(): TransformComponentsProps {\r\n return {\r\n position: [this.position.x, this.position.y, this.position.z],\r\n pivot: [this.pivot.x, this.pivot.y, this.pivot.z],\r\n orientation: [this.orientation.x, this.orientation.y, this.orientation.z, this.orientation.w],\r\n };\r\n }\r\n\r\n public compareTo(other: TransformComponents): number {\r\n return compareXYZ(this.pivot, other.pivot) || compareXYZ(this.position, other.position) || compare4d(this.orientation, other.orientation);\r\n }\r\n\r\n public equals(other: TransformComponents): boolean {\r\n return this.pivot.isAlmostEqual(other.pivot) && this.position.isAlmostEqual(other.position) && this.orientation.isAlmostEqual(other.orientation);\r\n }\r\n }\r\n\r\n /** A timeline entry that applies rotation, scaling, and/or translation to the affected geometry. */\r\n export class TransformEntry extends TimelineEntry {\r\n /** The transform matrix to be applied to the geometry, used only if [[components]] is not defined. */\r\n public readonly value: Readonly<Transform>;\r\n /** The transform represented as a rotation about a pivot point followed by a translation. If undefined, [[value]] is used instead. */\r\n public readonly components?: TransformComponents;\r\n\r\n public constructor(props: TransformEntryProps) {\r\n super(props);\r\n this.value = props.value ? Transform.fromJSON(props.value.transform) : Transform.identity;\r\n if (props.value)\r\n this.components = TransformComponents.fromJSON(props.value);\r\n }\r\n\r\n public override toJSON(): TransformEntryProps {\r\n const props = super.toJSON() as TransformEntryProps;\r\n if (this.components) {\r\n props.value = this.components.toJSON();\r\n props.value.transform = this.value.toRows();\r\n } else {\r\n props.value = { transform: this.value.toRows() };\r\n }\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: TransformEntry): number {\r\n assert(other instanceof TransformEntry);\r\n const cmp = super.compareTo(other);\r\n if (0 !== cmp)\r\n return cmp;\r\n\r\n if (this.components || other.components) {\r\n if (!this.components || !other.components)\r\n return this.components ? 1 : -1;\r\n\r\n return this.components.compareTo(other.components);\r\n }\r\n\r\n return compareXYZ(this.value.origin, other.value.origin) || compareMatrices(this.value.matrix, other.value.matrix);\r\n }\r\n }\r\n\r\n /** Defines a [ClipPlane]($core-geometry) associated with a [[RenderSchedule.CuttingPlaneEntry]]. */\r\n export class CuttingPlane {\r\n /** A point on the plane. */\r\n public readonly position: XYAndZ;\r\n /** The direction perpendicular to the plane pointing toward the clip. */\r\n public readonly direction: XYAndZ;\r\n /** If true, the clip plane is ignored and the geometry is never clipped. */\r\n public readonly visible: boolean;\r\n /** If true, the clip plane is ignored and the geometry is always clipped. */\r\n public readonly hidden: boolean;\r\n\r\n public constructor(props: CuttingPlaneProps) {\r\n this.position = Point3d.fromJSON(props.position);\r\n this.direction = Point3d.fromJSON(props.direction);\r\n this.hidden = true === props.hidden;\r\n this.visible = true === props.visible;\r\n }\r\n\r\n public toJSON(): CuttingPlaneProps {\r\n const props: CuttingPlaneProps = {\r\n position: [this.position.x, this.position.y, this.position.z],\r\n direction: [this.direction.x, this.direction.y, this.direction.z],\r\n };\r\n\r\n if (this.visible)\r\n props.visible = true;\r\n\r\n if (this.hidden)\r\n props.hidden = true;\r\n\r\n return props;\r\n }\r\n\r\n public compareTo(other: CuttingPlane): number {\r\n return compareXYZ(this.position, other.position) || compareXYZ(this.direction, other.direction) || compareBooleans(this.visible, other.visible) || compareBooleans(this.hidden, other.hidden);\r\n }\r\n\r\n public equals(other: CuttingPlane): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n }\r\n\r\n /** A timeline entry that applies a [ClipPlane]($core-geometry) to the affected geometry. */\r\n export class CuttingPlaneEntry extends TimelineEntry {\r\n /** The definition of the [ClipPlane]($core-geometry), or undefined if this entry applies no clipping. */\r\n public readonly value: CuttingPlane | undefined;\r\n\r\n public constructor(props: CuttingPlaneEntryProps) {\r\n super(props);\r\n if (props.value)\r\n this.value = new CuttingPlane(props.value);\r\n }\r\n\r\n public override toJSON(): CuttingPlaneEntryProps {\r\n const props = super.toJSON() as CuttingPlaneEntryProps;\r\n if (this.value)\r\n props.value = this.value.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: CuttingPlaneEntry): number {\r\n assert(other instanceof CuttingPlaneEntry);\r\n return super.compareTo(other) || comparePossiblyUndefined((x, y) => x.compareTo(y), this.value, other.value);\r\n }\r\n }\r\n\r\n /** Identifies a fractional position along a [[RenderSchedule.Timeline]] between any two [[RenderSchedule.TimelineEntry]]'s within a [[RenderSchedule.TimelineEntryList]].\r\n * @internal\r\n */\r\n export class Interval {\r\n /** The index of the first timeline entry within the list. */\r\n public lowerIndex!: number;\r\n /** The index of the second timeline entry within the list. */\r\n public upperIndex!: number;\r\n /** The normalized distance between the two timeline entries. */\r\n public fraction!: number;\r\n\r\n public constructor(lower = 0, upper = 0, fraction = 0) {\r\n this.init(lower, upper, fraction);\r\n }\r\n\r\n public init(lower = 0, upper = 0, fraction = 0): void {\r\n this.lowerIndex = lower;\r\n this.upperIndex = upper;\r\n this.fraction = fraction;\r\n }\r\n }\r\n\r\n /** A list of the [[RenderSchedule.TimelineEntry]] objects within a [[RenderSchedule.Timeline]]. The type parameters are:\r\n * - T, a subclass of TimelineEntry with a `value` property specifying the value of the property controlled by the timeline at that entry's time point.\r\n * - P, the JSON representation from which T is to be constructed.\r\n * - V, the type of `T.value`.\r\n */\r\n export class TimelineEntryList<T extends TimelineEntry & { readonly value: V }, P extends TimelineEntryProps, V> implements Iterable<T> {\r\n private readonly _entries: ReadonlyArray<T>;\r\n /** The total time period represented by the entries in this list. */\r\n public readonly duration: Range1d;\r\n\r\n public constructor(props: P[], ctor: Constructor<T>) {\r\n this.duration = Range1d.createNull();\r\n this._entries = props.map((x) => {\r\n const entry = new ctor(x);\r\n this.duration.extendX(entry.time);\r\n return entry;\r\n });\r\n }\r\n\r\n /** The number of entries in the list. */\r\n public get length(): number {\r\n return this._entries.length;\r\n }\r\n\r\n /** An iterator over the entries in the list. */\r\n public [Symbol.iterator](): Iterator<T> {\r\n return this._entries[Symbol.iterator]();\r\n }\r\n\r\n /** Look up an entry by its position in the list. */\r\n public getEntry(index: number): T | undefined {\r\n return this._entries[index];\r\n }\r\n\r\n /** Look up the value of an entry by its position in the list. */\r\n public getValue(index: number): V | undefined {\r\n return this.getEntry(index)?.value;\r\n }\r\n\r\n public toJSON(): P[] {\r\n return this._entries.map((x) => x.toJSON() as P);\r\n }\r\n\r\n public compareTo(other: TimelineEntryList<T, P, V>): number {\r\n let cmp = compareNumbers(this._entries.length, other._entries.length) || compareDurations(this.duration, other.duration);\r\n if (0 === cmp) {\r\n for (let i = 0; i < this.length; i++)\r\n if (0 !== (cmp = this._entries[i].compareTo(other._entries[i])))\r\n break;\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n public equals(other: TimelineEntryList<T, P, V>): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n\r\n /** @internal */\r\n public findInterval(time: number, interval?: Interval): Interval | undefined {\r\n if (this.length === 0)\r\n return undefined;\r\n\r\n interval = interval ?? new Interval();\r\n if (time < this._entries[0].time) {\r\n interval.init(0, 0, 0);\r\n return interval;\r\n }\r\n\r\n const last = this.length - 1;\r\n if (time >= this._entries[last].time) {\r\n interval.init(last, last, 0);\r\n return interval;\r\n }\r\n\r\n for (let i = 0; i < last; i++) {\r\n const time0 = this._entries[i].time;\r\n const time1 = this._entries[i + 1].time;\r\n if (time0 <= time && time1 >= time) {\r\n let fraction;\r\n if (Interpolation.Linear === this._entries[i].interpolation)\r\n fraction = (time - time0) / (time1 - time0);\r\n else\r\n fraction = 0;\r\n\r\n interval.init(i, i + 1, fraction);\r\n return interval;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n }\r\n\r\n const scratchInterval = new Interval();\r\n\r\n /** A list of [[RenderSchedule.VisibilityEntry]]s within a [[RenderSchedule.Timeline]]. */\r\n export class VisibilityTimelineEntries extends TimelineEntryList<VisibilityEntry, VisibilityEntryProps, number> {\r\n /** Returns the visibility value for the entry at the specified position in the list, or 100 (fully-visible) if no such entry exists. */\r\n public override getValue(index: number): number {\r\n return super.getValue(index) ?? 100;\r\n }\r\n }\r\n\r\n /** A list of [[RenderSchedule.TransformEntry]]s within a [[RenderSchedule.Timeline]]. */\r\n export class TransformTimelineEntries extends TimelineEntryList<TransformEntry, TransformEntryProps, Readonly<Transform>> {\r\n /** Returns the transform for the entry at the specified position in the list, or an identity transform if no such entry exists. */\r\n public override getValue(index: number): Readonly<Transform> {\r\n return super.getValue(index) ?? Transform.identity;\r\n }\r\n }\r\n\r\n /** Specifies how to animate a set of geometry over time within a [[RenderSchedule.Script]].\r\n * A [[RenderSchedule.Script]] can contain any number of [[RenderSchedule.Timeline]]s, each affecting different sets of geometry.\r\n * @see [[RenderSchedule.ElementTimeline]] and [[RenderSchedule.ModelTimeline]].\r\n */\r\n export class Timeline {\r\n /** Sequence controlling the visibility of the geometry. */\r\n public readonly visibility?: VisibilityTimelineEntries;\r\n /** Sequence controlling the color of the geometry. */\r\n public readonly color?: TimelineEntryList<ColorEntry, ColorEntryProps, RgbColor | undefined>;\r\n /** Sequence controlling the position, orientation, and/or scale of the geometry. */\r\n public readonly transform?: TransformTimelineEntries;\r\n /** Sequence controlling how the geometry is clipped. */\r\n public readonly cuttingPlane?: TimelineEntryList<CuttingPlaneEntry, CuttingPlaneEntryProps, CuttingPlane | undefined>;\r\n /** The total time period represented by this timeline. */\r\n public readonly duration: Range1d;\r\n\r\n public constructor(props: TimelineProps) {\r\n this.duration = Range1d.createNull();\r\n\r\n if (props.visibilityTimeline) {\r\n this.visibility = new VisibilityTimelineEntries(props.visibilityTimeline, VisibilityEntry);\r\n this.duration.extendRange(this.visibility.duration);\r\n }\r\n\r\n if (props.colorTimeline) {\r\n this.color = new TimelineEntryList(props.colorTimeline, ColorEntry);\r\n this.duration.extendRange(this.color.duration);\r\n }\r\n\r\n if (props.transformTimeline) {\r\n this.transform = new TransformTimelineEntries(props.transformTimeline, TransformEntry);\r\n this.duration.extendRange(this.transform.duration);\r\n }\r\n\r\n if (props.cuttingPlaneTimeline) {\r\n this.cuttingPlane = new TimelineEntryList(props.cuttingPlaneTimeline, CuttingPlaneEntry);\r\n this.duration.extendRange(this.cuttingPlane.duration);\r\n }\r\n }\r\n\r\n public toJSON(): TimelineProps {\r\n return {\r\n visibilityTimeline: this.visibility?.toJSON(),\r\n colorTimeline: this.color?.toJSON(),\r\n transformTimeline: this.transform?.toJSON(),\r\n cuttingPlaneTimeline: this.cuttingPlane?.toJSON(),\r\n };\r\n }\r\n\r\n public compareTo(other: Timeline): number {\r\n const cmp = compareDurations(this.duration, other.duration);\r\n if (0 !== cmp)\r\n return cmp;\r\n\r\n // Do cheaper checks before iterating through timeline entries\r\n if (!!this.visibility !== !!other.visibility)\r\n return this.visibility ? 1 : -1;\r\n else if (!!this.color !== !!other.color)\r\n return this.color ? 1 : -1;\r\n else if (!!this.transform !== !!other.transform)\r\n return this.transform ? 1 : -1;\r\n else if (!!this.cuttingPlane !== !!other.cuttingPlane)\r\n return this.cuttingPlane ? 1 : -1;\r\n\r\n return comparePossiblyUndefined((x, y) => x.compareTo(y), this.visibility, other.visibility) || comparePossiblyUndefined((x, y) => x.compareTo(y), this.color, other.color)\r\n || comparePossiblyUndefined((x, y) => x.compareTo(y), this.transform, other.transform) || comparePossiblyUndefined((x, y) => x.compareTo(y), this.cuttingPlane, other.cuttingPlane);\r\n }\r\n\r\n public equals(other: Timeline): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n\r\n /** Get the visibility of the geometry at the specified time point. */\r\n public getVisibility(time: number): number {\r\n let interval;\r\n if (!this.visibility || !(interval = this.visibility.findInterval(time, scratchInterval)))\r\n return 100;\r\n\r\n let visibility = this.visibility.getValue(interval.lowerIndex) ?? 100;\r\n if (interval.fraction > 0)\r\n visibility = interpolate(visibility, this.visibility.getValue(interval.upperIndex) ?? 100, interval.fraction);\r\n\r\n return visibility;\r\n }\r\n\r\n /** Get the color of the geometry at the specified time point, or undefined if the color is not overridden at that time point. */\r\n public getColor(time: number): RgbColor | undefined {\r\n let interval;\r\n if (!this.color || !(interval = this.color.findInterval(time, scratchInterval)))\r\n return undefined;\r\n\r\n const start = this.color.getValue(interval.lowerIndex);\r\n if (start && interval.fraction > 0) {\r\n const end = this.color.getValue(interval.upperIndex);\r\n if (end)\r\n return interpolateRgb(start, end, interval.fraction);\r\n }\r\n\r\n return start;\r\n }\r\n\r\n /** Get the transform applied to the geometry at the specified time point. */\r\n public getAnimationTransform(time: number): Readonly<Transform> {\r\n let interval;\r\n if (!this.transform || !(interval = this.transform.findInterval(time, scratchInterval)))\r\n return Transform.identity;\r\n\r\n let transform = this.transform.getValue(interval.lowerIndex);\r\n if (interval.fraction > 0) {\r\n const comp0 = this.transform.getEntry(interval.lowerIndex)?.components;\r\n const comp1 = this.transform.getEntry(interval.upperIndex)?.components;\r\n if (comp0 && comp1) {\r\n const sum = Point4d.interpolateQuaternions(comp0.orientation, interval.fraction, comp1.orientation);\r\n const matrix = Matrix3d.createFromQuaternion(sum);\r\n const pre = Transform.createTranslation(comp0.pivot);\r\n const post = Transform.createTranslation(comp0.position.interpolate(interval.fraction, comp1.position));\r\n const product = post.multiplyTransformMatrix3d(matrix);\r\n product.multiplyTransformTransform(pre, product);\r\n transform = product;\r\n } else {\r\n const end = this.transform.getValue(interval.upperIndex);\r\n const q0 = transform.matrix.inverse()?.toQuaternion();\r\n const q1 = end.matrix.inverse()?.toQuaternion();\r\n if (q0 && q1) {\r\n const sum = Point4d.interpolateQuaternions(q0, interval.fraction, q1);\r\n const matrix = Matrix3d.createFromQuaternion(sum);\r\n\r\n const origin0 = Vector3d.createFrom(transform.origin);\r\n const origin1 = Vector3d.createFrom(end.origin);\r\n transform = Transform.createRefs(origin0.interpolate(interval.fraction, origin1), matrix);\r\n }\r\n }\r\n }\r\n\r\n return transform;\r\n }\r\n\r\n /** Get the clipping plane applied to the geometry at the specified time point, or undefined if the geometry is unclipped at that time point. */\r\n public getCuttingPlane(time: number): Plane3dByOriginAndUnitNormal | undefined {\r\n let interval;\r\n if (!this.cuttingPlane || !(interval = this.cuttingPlane.findInterval(time, scratchInterval)))\r\n return undefined;\r\n\r\n const start = this.cuttingPlane.getValue(interval.lowerIndex);\r\n if (!start)\r\n return undefined;\r\n\r\n const position = Point3d.createFrom(start.position);\r\n const direction = Vector3d.createFrom(start.direction);\r\n const end = interval.fraction > 0 ? this.cuttingPlane.getValue(interval.upperIndex) : undefined;\r\n if (end) {\r\n position.interpolate(interval.fraction, end.position, position);\r\n direction.interpolate(interval.fraction, end.direction, direction);\r\n } else {\r\n if (start.hidden || start.visible)\r\n return undefined;\r\n }\r\n\r\n direction.negate(direction);\r\n direction.normalizeInPlace();\r\n\r\n return Plane3dByOriginAndUnitNormal.create(position, direction);\r\n }\r\n\r\n /** Create a ClipVector from the [[RenderSchedule.CuttingPlane]] applied to the geometry at the specified time point, if any. */\r\n public getClipVector(time: number): ClipVector | undefined {\r\n const plane = this.getCuttingPlane(time);\r\n if (!plane)\r\n return undefined;\r\n\r\n const cp = ClipPlane.createPlane(plane);\r\n const cps = UnionOfConvexClipPlaneSets.createConvexSets([ConvexClipPlaneSet.createPlanes([cp])]);\r\n const prim = ClipPrimitive.createCapture(cps);\r\n return ClipVector.createCapture([prim]);\r\n }\r\n\r\n /** @internal */\r\n protected getFeatureAppearance(visibility: number, time: number): FeatureAppearance | undefined {\r\n const transparency = visibility < 100 ? (1 - visibility / 100) : undefined;\r\n const rgb = this.getColor(time);\r\n return undefined !== rgb || undefined !== transparency ? FeatureAppearance.fromJSON({ rgb, transparency }) : undefined;\r\n }\r\n }\r\n\r\n /** Specifies how to animate the geometry belonging to a set of [GeometricElement]($backend)s as part of a [[RenderSchedule.Script]]. */\r\n export class ElementTimeline extends Timeline {\r\n /** A positive integer that uniquely identififes this timeline among all ElementTimelines in the [[RenderSchedule.Script]]. */\r\n public readonly batchId: number;\r\n private readonly _elementIds: Id64String[] | CompressedId64Set;\r\n\r\n private constructor(props: ElementTimelineProps) {\r\n super(props);\r\n this.batchId = props.batchId;\r\n this._elementIds = props.elementIds;\r\n }\r\n\r\n public static fromJSON(props?: ElementTimelineProps): ElementTimeline {\r\n return new ElementTimeline(props ?? { elementIds: [], batchId: 0 });\r\n }\r\n\r\n public override toJSON(): ElementTimelineProps {\r\n return {\r\n ...super.toJSON(),\r\n batchId: this.batchId,\r\n elementIds: this._elementIds,\r\n };\r\n }\r\n\r\n public get containsElementIds(): boolean {\r\n return this._elementIds.length > 0;\r\n }\r\n\r\n private compareElementIds(other: ElementTimeline): number {\r\n if (typeof this._elementIds === typeof other._elementIds) {\r\n const cmp = compareNumbers(this._elementIds.length, other._elementIds.length);\r\n if (0 !== cmp)\r\n return cmp;\r\n\r\n if (typeof this._elementIds === \"string\") {\r\n assert(typeof other._elementIds === \"string\");\r\n return compareStrings(this._elementIds, other._elementIds);\r\n }\r\n }\r\n\r\n // One or both are stored as arrays, in which case they might contain the same Ids in different orders. We will consider them different in that case.\r\n const mine = this.elementIds[Symbol.iterator]();\r\n const theirs = other.elementIds[Symbol.iterator]();\r\n while (true) {\r\n const a = mine.next();\r\n const b = theirs.next();\r\n if (a.done !== b.done)\r\n return compareBooleans(!!a.done, !!b.done);\r\n else if (a.done)\r\n return 0;\r\n\r\n const cmp = compareStrings(a.value, b.value);\r\n if (0 !== cmp)\r\n return cmp;\r\n }\r\n }\r\n\r\n public override compareTo(other: ElementTimeline): number {\r\n assert(other instanceof ElementTimeline);\r\n return compareNumbers(this.batchId, other.batchId) || this.compareElementIds(other) || super.compareTo(other);\r\n }\r\n\r\n /** @internal */\r\n public static getElementIds(ids: Id64String[] | CompressedId64Set): Iterable<Id64String> {\r\n if (typeof ids === \"string\")\r\n return CompressedId64Set.iterable(ids);\r\n else if (Array.isArray(ids)) {\r\n return ids;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n /** The Ids of the elements controlled by this timeline. */\r\n public get elementIds(): Iterable<Id64String> {\r\n return ElementTimeline.getElementIds(this._elementIds);\r\n }\r\n\r\n /** True if this timeline affects the color or transparency of the elements. */\r\n public get containsFeatureOverrides(): boolean {\r\n return undefined !== this.visibility || undefined !== this.color;\r\n }\r\n\r\n /** If true, applying this timeline requires special tiles to be generated in which groups of elements are batched into nodes.\r\n * @internal\r\n */\r\n public get requiresBatching(): boolean {\r\n if (this.cuttingPlane)\r\n return true;\r\n\r\n return this.batchId !== 0 && (undefined !== this.color || undefined !== this.visibility);\r\n }\r\n\r\n /** True if this timeline affects the position, orientation, or scale of the elements. */\r\n public get containsTransform(): boolean {\r\n return undefined !== this.transform;\r\n }\r\n\r\n /** @internal */\r\n public addSymbologyOverrides(overrides: FeatureOverrides, time: number): void {\r\n assert(0 !== this.batchId);\r\n\r\n const vis = this.getVisibility(time);\r\n if (vis <= 0) {\r\n overrides.setAnimationNodeNeverDrawn(this.batchId);\r\n return;\r\n }\r\n\r\n const appearance = this.getFeatureAppearance(vis, time);\r\n if (appearance)\r\n overrides.overrideAnimationNode(this.batchId, appearance);\r\n }\r\n }\r\n\r\n /** Specifies how to animate the geometry within a [GeometricModel]($backend) as part of a [[RenderSchedule.Script]]. */\r\n export class ModelTimeline extends Timeline {\r\n /** The Id of the [GeometricModel]($backend) to be animated. */\r\n public readonly modelId: Id64String;\r\n /** @internal */\r\n public readonly realityModelUrl?: string;\r\n /** Timelines specifying how to animate groups of [GeometricElement]($backend)s within the model. */\r\n public readonly elementTimelines: ReadonlyArray<ElementTimeline>;\r\n /** @internal */\r\n public readonly transformBatchIds: ReadonlyArray<number>;\r\n /** True if this timeline affects the color or transparency of the geometry. */\r\n public readonly containsFeatureOverrides: boolean;\r\n /** True if this timeline applies clipping to the model. */\r\n public readonly containsModelClipping: boolean;\r\n /** If true, applying this timeline requires special tiles to be generated in which groups of elements are batched into nodes.\r\n * @internal\r\n */\r\n public readonly requiresBatching: boolean;\r\n /** True if this timeline affects the position, orientation, or scale of the geometry. */\r\n public readonly containsTransform: boolean;\r\n /** True if any [[RenderSchedule.ElementTimeline]]s exist and none of them contain any element Ids. This generally indicates that\r\n * the backend was instructed to omit the Ids to save space when supplying the script.\r\n */\r\n public readonly omitsElementIds: boolean;\r\n private _maxBatchId?: number;\r\n /** Tile tree suppliers perform **very** frequent ordered comparisons of ModelTimelines. They need to be fast. */\r\n private readonly _cachedComparisons = new WeakMap<ModelTimeline, number>();\r\n /** When loading tiles we need to quickly map element Ids to batch Ids. This map is initialized on first call to [[getTimelineForElement]] to facilitate that lookup. */\r\n private _idPairToElementTimeline?: Id64.Uint32Map<ElementTimeline>;\r\n private _discreteBatchIds?: Set<number>;\r\n\r\n private constructor(props: ModelTimelineProps) {\r\n super(props);\r\n\r\n this.modelId = props.modelId;\r\n this.realityModelUrl = props.realityModelUrl;\r\n this.containsModelClipping = undefined !== this.cuttingPlane;\r\n\r\n let containsFeatureOverrides = undefined !== this.visibility || undefined !== this.color;\r\n let requiresBatching = false;\r\n let containsTransform = false;\r\n\r\n const transformBatchIds: number[] = [];\r\n const elementTimelines: ElementTimeline[] = [];\r\n let containsElementIds = false;\r\n for (const elProps of props.elementTimelines) {\r\n const el = ElementTimeline.fromJSON(elProps);\r\n elementTimelines.push(el);\r\n\r\n this.duration.extendRange(el.duration);\r\n\r\n if (el.containsTransform) {\r\n containsTransform = true;\r\n if (el.batchId)\r\n transformBatchIds.push(el.batchId);\r\n }\r\n\r\n containsFeatureOverrides ||= el.containsFeatureOverrides;\r\n requiresBatching ||= el.requiresBatching;\r\n containsElementIds = containsElementIds || el.containsElementIds;\r\n }\r\n\r\n this.elementTimelines = elementTimelines;\r\n this.transformBatchIds = transformBatchIds;\r\n this.omitsElementIds = elementTimelines.length > 0 && !containsElementIds;\r\n\r\n this.containsFeatureOverrides = containsFeatureOverrides;\r\n this.requiresBatching = requiresBatching;\r\n this.containsTransform = containsTransform;\r\n }\r\n\r\n public static fromJSON(props?: ModelTimelineProps): ModelTimeline {\r\n return new ModelTimeline(props ?? { elementTimelines: [], modelId: Id64.invalid });\r\n }\r\n\r\n public override toJSON(): ModelTimelineProps {\r\n return {\r\n ...super.toJSON(),\r\n modelId: this.modelId,\r\n realityModelUrl: this.realityModelUrl,\r\n elementTimelines: this.elementTimelines.map((x) => x.toJSON()),\r\n };\r\n }\r\n\r\n public override compareTo(other: ModelTimeline): number {\r\n if (this === other)\r\n return 0;\r\n\r\n const cached = this._cachedComparisons.get(other);\r\n if (undefined !== cached)\r\n return cached;\r\n\r\n assert(other instanceof ModelTimeline);\r\n let cmp = compareStrings(this.modelId, other.modelId) || compareStringsOrUndefined(this.realityModelUrl, other.realityModelUrl)\r\n || compareNumbers(this.elementTimelines.length, other.elementTimelines.length) || compareBooleans(this.containsFeatureOverrides, other.containsFeatureOverrides)\r\n || compareBooleans(this.containsModelClipping, other.containsModelClipping) || compareBooleans(this.containsTransform, other.containsTransform)\r\n || super.compareTo(other);\r\n\r\n if (0 === cmp) {\r\n for (let i = 0; i < this.elementTimelines.length; i++)\r\n if (0 !== (cmp = this.elementTimelines[i].compareTo(other.elementTimelines[i])))\r\n break;\r\n }\r\n\r\n this._cachedComparisons.set(other, cmp);\r\n other._cachedComparisons.set(this, -cmp);\r\n return cmp;\r\n }\r\n\r\n /** Look up the element timeline with the specified batch Id. */\r\n public findByBatchId(batchId: number): ElementTimeline | undefined {\r\n return this.elementTimelines.find((x) => x.batchId === batchId);\r\n }\r\n\r\n /** @internal */\r\n public addSymbologyOverrides(overrides: FeatureOverrides, time: number): void {\r\n const appearance = this.getFeatureAppearance(this.getVisibility(time), time);\r\n if (appearance)\r\n overrides.override({ modelId: this.modelId, appearance });\r\n\r\n for (const timeline of this.elementTimelines)\r\n timeline.addSymbologyOverrides(overrides, time);\r\n }\r\n\r\n /** Obtain the transform applied to the model at the specified time point, if any. */\r\n public getTransform(batchId: number, time: number): Readonly<Transform> | undefined {\r\n return this.findByBatchId(batchId)?.getAnimationTransform(time);\r\n }\r\n\r\n /** Get the highest batchId of any ElementTimeline in this timeline. */\r\n public get maxBatchId(): number {\r\n if (undefined === this._maxBatchId) {\r\n this._maxBatchId = 0;\r\n for (const elem of this.elementTimelines)\r\n this._maxBatchId = Math.max(this._maxBatchId, elem.batchId);\r\n }\r\n\r\n return this._maxBatchId;\r\n }\r\n\r\n /** Given the two halves of an [Id64]($bentley) return the [[ElementTimeline]] containing the corresponding element.\r\n * @note The first call to this method populates a mapping for fast lookup.\r\n * @alpha\r\n */\r\n public getTimelineForElement(idLo: number, idHi: number): ElementTimeline | undefined {\r\n if (!this._idPairToElementTimeline) {\r\n this._idPairToElementTimeline = new Id64.Uint32Map<ElementTimeline>();\r\n for (const timeline of this.elementTimelines) {\r\n for (const elementId of timeline.elementIds) {\r\n // NB: a malformed script may place the same element Id into multiple timelines. We're not going to check for such data errors here.\r\n this._idPairToElementTimeline.setById(elementId, timeline);\r\n }\r\n }\r\n }\r\n\r\n return this._idPairToElementTimeline.get(idLo, idHi);\r\n }\r\n\r\n /** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.\r\n * @alpha\r\n */\r\n public get discreteBatchIds(): Set<number> {\r\n if (!this._discreteBatchIds) {\r\n this._discreteBatchIds = new Set<number>(this.transformBatchIds);\r\n for (const timeline of this.elementTimelines)\r\n if (!timeline.containsTransform && undefined !== timeline.cuttingPlane)\r\n this._discreteBatchIds.add(timeline.batchId);\r\n }\r\n\r\n return this._discreteBatchIds;\r\n }\r\n\r\n /** @internal see ImdlReader.readAnimationBranches */\r\n public getBatchIdForFeature(feature: PackedFeatureWithIndex): number {\r\n assert(Id64.fromUint32PairObject(feature.modelId) === this.modelId);\r\n const elementTimeline = this.getTimelineForElement(feature.elementId.lower, feature.elementId.upper);\r\n return elementTimeline?.batchId ?? 0;\r\n }\r\n }\r\n\r\n /** Specifies how to animate the contents of a [ViewState]($frontend) over time. The script contains any number of [[RenderSchedule.ModelTimeline]]s, each describing how\r\n * to animate one of the models in the view.\r\n * @see [RenderTimeline]($backend) to create an [Element]($backend) to host a script.\r\n * @see [[DisplayStyleSettings.renderTimeline]] to associate a [RenderTimeline]($backend)'s script with a [DisplayStyle]($backend).\r\n * @see [DisplayStyleState.scheduleScript]($frontend) to obtain the script associated with a display style.\r\n * @see [[RenderSchedule.ScriptBuilder]] to define a new script.\r\n */\r\n export class Script {\r\n /** Timelines specifying how to animate individual models within the view. */\r\n public readonly modelTimelines: ReadonlyArray<ModelTimeline>;\r\n /** True if this script applies clipping to any models. */\r\n public readonly containsModelClipping: boolean;\r\n /** If true, applying this timeline requires special tiles to be generated in which groups of elements are batched into nodes.\r\n * @internal\r\n */\r\n public readonly requiresBatching: boolean;\r\n /** True if this script affects the position, orientation, or scale of the geometry. */\r\n public readonly containsTransform: boolean;\r\n /** True if this script affects the color or transparency of the geometry. */\r\n public readonly containsFeatureOverrides: boolean;\r\n /** The total time period over which this script animates. */\r\n public readonly duration: Range1d;\r\n /** The batchIds of all nodes in all timelines that apply a transform.\r\n * @internal\r\n */\r\n public readonly transformBatchIds: ReadonlySet<number>;\r\n /** Tile tree references perform **very** frequent ordered comparisons of Scripts. They need to be fast. */\r\n private readonly _cachedComparisons = new WeakMap<Script, number>();\r\n private _discreteBatchIds?: Set<number>;\r\n private _lastFeatureModelTimeline?: { timeline?: ModelTimeline, idLower: number, idUpper: number };\r\n private _maxBatchId?: number;\r\n\r\n public compareTo(other: Script): number {\r\n if (this === other)\r\n return 0;\r\n\r\n const cached = this._cachedComparisons.get(other);\r\n if (undefined !== cached)\r\n return cached;\r\n\r\n let cmp = compareNumbers(this.modelTimelines.length, other.modelTimelines.length) || compareBooleans(this.containsModelClipping, other.containsModelClipping)\r\n || compareBooleans(this.requiresBatching, other.requiresBatching) || compareBooleans(this.containsTransform, other.containsTransform)\r\n || compareBooleans(this.containsFeatureOverrides, other.containsFeatureOverrides) || compareDurations(this.duration, other.duration);\r\n\r\n if (0 === cmp) {\r\n for (let i = 0; i < this.modelTimelines.length; i++)\r\n if (0 !== (cmp = this.modelTimelines[i].compareTo(other.modelTimelines[i])))\r\n break;\r\n }\r\n\r\n this._cachedComparisons.set(other, cmp);\r\n other._cachedComparisons.set(this, -cmp);\r\n return cmp;\r\n }\r\n public equals(other: Script): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n\r\n protected constructor(props: Readonly<ScriptProps>) {\r\n this.duration = Range1d.createNull();\r\n const transformBatchIds = new Set<number>();\r\n\r\n const modelTimelines: ModelTimeline[] = [];\r\n let containsModelClipping = false;\r\n let requiresBatching = false;\r\n let containsTransform = false;\r\n let containsFeatureOverrides = false;\r\n\r\n for (const modelProps of props) {\r\n const model = ModelTimeline.fromJSON(modelProps);\r\n modelTimelines.push(model);\r\n\r\n this.duration.extendRange(model.duration);\r\n\r\n containsModelClipping ||= model.containsModelClipping;\r\n requiresBatching ||= model.requiresBatching;\r\n containsTransform ||= model.containsTransform;\r\n containsFeatureOverrides ||= model.containsFeatureOverrides;\r\n\r\n for (const batchId of model.transformBatchIds)\r\n transformBatchIds.add(batchId);\r\n }\r\n\r\n this.modelTimelines = modelTimelines;\r\n this.containsModelClipping = containsModelClipping;\r\n this.containsTransform = containsTransform;\r\n this.requiresBatching = requiresBatching || this.containsTransform;\r\n this.containsFeatureOverrides = containsFeatureOverrides;\r\n this.transformBatchIds = transformBatchIds;\r\n }\r\n\r\n public static fromJSON(props: Readonly<ScriptProps>): Script | undefined {\r\n if (!Array.isArray(props) || props.length === 0)\r\n return undefined;\r\n\r\n return new Script(props);\r\n }\r\n\r\n public toJSON(): ScriptProps {\r\n return this.modelTimelines.map((x) => x.toJSON());\r\n }\r\n\r\n /** Look up the timeline that animates the specified model, if any. */\r\n public find(modelId: Id64String): ModelTimeline | undefined {\r\n return this.modelTimelines.find((x) => x.modelId === modelId);\r\n }\r\n\r\n /** @internal */\r\n public getTransformBatchIds(modelId: Id64String): ReadonlyArray<number> | undefined {\r\n return this.find(modelId)?.transformBatchIds;\r\n }\r\n\r\n /** @internal */\r\n public getTransform(modelId: Id64String, batchId: number, time: number): Readonly<Transform> | undefined {\r\n return this.find(modelId)?.getTransform(batchId, time);\r\n }\r\n\r\n /** @internal */\r\n public addSymbologyOverrides(overrides: FeatureOverrides, time: number): void {\r\n for (const timeline of this.modelTimelines)\r\n timeline.addSymbologyOverrides(overrides, time);\r\n }\r\n\r\n /** Used by the [Entity.collectReferenceIds]($backend) method overrides in RenderTimeline and DisplayStyle.\r\n * @internal\r\n */\r\n public discloseIds(ids: EntityReferenceSet) {\r\n for (const model of this.modelTimelines) {\r\n ids.addModel(model.modelId);\r\n for (const element of model.elementTimelines)\r\n for (const id of element.elementIds)\r\n ids.addElement(id);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public modelRequiresBatching(modelId: Id64String): boolean {\r\n // Only if the script contains animation (cutting plane, transform or visibility by node ID) do we require separate tilesets for animations.\r\n return this.requiresBatching && this.modelTimelines.some((x) => x.modelId === modelId && x.requiresBatching);\r\n }\r\n\r\n /** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.\r\n * @alpha\r\n */\r\n public get discreteBatchIds(): Set<number> {\r\n if (this._discreteBatchIds)\r\n return this._discreteBatchIds;\r\n\r\n this._discreteBatchIds = new Set<number>();\r\n for (const timeline of this.modelTimelines)\r\n for (const batchId of timeline.discreteBatchIds)\r\n this._discreteBatchIds.add(batchId);\r\n\r\n return this._discreteBatchIds;\r\n }\r\n\r\n /** @internal see ImdlReader.readAnimationBranches. */\r\n public getBatchIdForFeature(feature: PackedFeatureWithIndex): number {\r\n let timeline;\r\n const prev = this._lastFeatureModelTimeline;\r\n if (prev && prev.idLower === feature.modelId.lower && prev.idUpper === feature.modelId.upper) {\r\n timeline = prev.timeline;\r\n } else {\r\n const modelId = Id64.fromUint32PairObject(feature.modelId);\r\n timeline = this.find(modelId);\r\n this._lastFeatureModelTimeline = { timeline, idLower: feature.modelId.lower, idUpper: feature.modelId.upper };\r\n }\r\n\r\n return timeline?.getBatchIdForFeature(feature) ?? 0;\r\n }\r\n\r\n /** @alpha */\r\n public get maxBatchId(): number {\r\n return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));\r\n }\r\n }\r\n\r\n /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.\r\n * @see [DisplayStyle.loadScheduleScript]($backend) to obtain the script reference for a display style.\r\n * @see [DisplayStyleState.scheduleScript]($frontend) or [DisplayStyleState.changeRenderTimeline]($frontend) to change a display style's script on the frontend.\r\n */\r\n export class ScriptReference {\r\n /** The Id of the element - if any - from which the script originated.\r\n * A schedule script may originate from one of the following sources:\r\n * - A [RenderTimeline]($backend) element stored in the iModel; or\r\n * - The `scheduleScript` JSON property of a [DisplayStyle]($backend) element stored in the iModel; or\r\n * - Any other source outside of the iModel, such as code that generates the script on the frontend, a script obtained from some server, etc.\r\n *\r\n * The [[sourceId]] property identifies the Id of the element from which the script originated; an empty or invalid [Id64String]($bentley) indicates the script did not\r\n * originate from any persistent element. If the Id is valid, the contents of [[script]] are assumed to match those stored on the source element.\r\n */\r\n public readonly sourceId: Id64String;\r\n /** The script defining the rendering timelines to be applied. */\r\n public readonly script: Script;\r\n\r\n /** Create a reference to a [[script]] with no [[sourceId]]. */\r\n public constructor(script: Script);\r\n\r\n /** Create a reference to a [[script]] with the specified [[sourceId]]. */\r\n public constructor(sourceId: Id64String, script: Script);\r\n\r\n /** @internal Use one of the public constructor overloads which forward to this one. */\r\n public constructor(sourceIdOrScript: Id64String | Script, scriptIfSourceId?: Script);\r\n\r\n /** @internal Use one of the public constructor overloads which forward to this one. */\r\n public constructor(sourceIdOrScript: Id64String | Script, scriptIfSourceId?: Script) {\r\n if (typeof sourceIdOrScript === \"string\") {\r\n assert(scriptIfSourceId instanceof Script);\r\n this.sourceId = sourceIdOrScript;\r\n this.script = scriptIfSourceId;\r\n } else {\r\n assert(undefined === scriptIfSourceId);\r\n this.script = sourceIdOrScript;\r\n this.sourceId = Id64.invalid;\r\n }\r\n }\r\n }\r\n\r\n /** Used as part of a [[RenderSchedule.ScriptBuilder]] to define a [[RenderSchedule.Timeline]]. Functions that append\r\n * to the timeline expect entries to be appended in chronological order - i.e., you cannot append an entry that is earlier\r\n * than a previously appended entry.\r\n * @see [[RenderSchedule.ElementTimelineBuilder]] and [[RenderSchedule.ModelTimelineBuilder]].\r\n */\r\n export class TimelineBuilder {\r\n /** Timeline controlling visibility. */\r\n public visibility?: VisibilityEntryProps[];\r\n /** Timeline controlling color. */\r\n public color?: ColorEntryProps[];\r\n /** Timeline controlling position and orientation. */\r\n public transform?: TransformEntryProps[];\r\n /** Timeline controlling clipping. */\r\n public cuttingPlane?: CuttingPlaneEntryProps[];\r\n\r\n /** Append a new [[RenderSchedule.VisibilityEntry]] to the timeline. `time` must be more recent than any previously-appended visibility entries. */\r\n public addVisibility(time: number, visibility: number | undefined, interpolation = Interpolation.Linear): void {\r\n if (!this.visibility)\r\n this.visibility = [];\r\n\r\n this.visibility.push({ time, value: visibility, interpolation });\r\n }\r\n\r\n /** Append a new [[RenderSchedule.ColorEntry]] to the timeline. `time` must be more recent than any previously-appended color entries. */\r\n public addColor(time: number, color: RgbColor | { red: number, green: number, blue: number } | undefined, interpolation = Interpolation.Linear): void {\r\n if (!this.color)\r\n this.color = [];\r\n\r\n const value = color instanceof RgbColor ? { red: color.r, green: color.g, blue: color.b } : color;\r\n this.color.push({ time, value, interpolation });\r\n }\r\n\r\n /** Append a new [[RenderSchedule.CuttingPlaneEntry]] to the timeline. `time` must be more recent than any previously-appended cutting plane entries. */\r\n public addCuttingPlane(time: number, plane: { position: XYAndZ, direction: XYAndZ, visible?: boolean, hidden?: boolean } | undefined, interpolation = Interpolation.Linear): void {\r\n if (!this.cuttingPlane)\r\n this.cuttingPlane = [];\r\n\r\n let value: CuttingPlaneProps | undefined;\r\n if (plane) {\r\n value = {\r\n position: [plane.position.x, plane.position.y, plane.position.z],\r\n direction: [plane.direction.x, plane.direction.y, plane.direction.z],\r\n };\r\n\r\n if (plane.visible)\r\n value.visible = true;\r\n\r\n if (plane.hidden)\r\n value.hidden = true;\r\n }\r\n\r\n this.cuttingPlane.push({ time, value, interpolation });\r\n }\r\n\r\n /** Append a new [[RenderSchedule.TransformEntry]] to the timeline. `time` must be more recent than any previously-appended transform entries. */\r\n public addTransform(time: number, transform: Readonly<Transform> | undefined, components?: { pivot: XYAndZ, orientation: Point4d, position: XYAndZ }, interpolation = Interpolation.Linear): void {\r\n if (!this.transform)\r\n this.transform = [];\r\n\r\n const value: TransformProps = { transform: transform?.toRows() };\r\n if (components) {\r\n value.pivot = [components.pivot.x, components.pivot.y, components.pivot.z];\r\n value.orientation = components.orientation.toJSON();\r\n value.position = [components.position.x, components.position.y, components.position.z];\r\n }\r\n\r\n this.transform.push({ time, value, interpolation });\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.Timeline]] produced by this builder.\r\n * @see [[RenderSchedule.ScriptBuilder.finish]] to obtain the JSON for the entire [[RenderSchedule.Script]].\r\n */\r\n public finish(): TimelineProps {\r\n const props: TimelineProps = {};\r\n if (this.visibility?.length)\r\n props.visibilityTimeline = this.visibility;\r\n\r\n if (this.color?.length)\r\n props.colorTimeline = this.color;\r\n\r\n if (this.transform?.length)\r\n props.transformTimeline = this.transform;\r\n\r\n if (this.cuttingPlane?.length)\r\n props.cuttingPlaneTimeline = this.cuttingPlane;\r\n\r\n return props;\r\n }\r\n }\r\n\r\n /** As part of a [[RenderSchedule.ScriptBuilder]], assembles a [[RenderSchedule.ElementTimeline]].\r\n * @see [[RenderSchedule.ModelTimelineBuilder.addElementTimeline]].\r\n */\r\n export class ElementTimelineBuilder extends TimelineBuilder {\r\n /** A positive integer that uniquely identifies this timeline among all element timelines in the [[RenderSchedule.Script]].\r\n * [[RenderSchedule.ScriptBuilder]] ensures each ElementTimelineBuilder receives a unique batch Id.\r\n */\r\n public readonly batchId: number;\r\n /** The compressed set of Ids of the elements affected by this timeline. */\r\n public readonly elementIds: CompressedId64Set;\r\n\r\n /** Constructor - typically not used directly.\r\n * @see [[RenderSchedule.ModelTimelineBuilder.addElementTimeline]] to create an ElementTimelineBuilder.\r\n */\r\n public constructor(batchId: number, elementIds: CompressedId64Set) {\r\n super();\r\n this.batchId = batchId;\r\n this.elementIds = elementIds;\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.ElementTimeline]] produced by this builder.\r\n * @see [[RenderSchedule.ScriptBuilder.finish]] to obtain the JSON for the entire [[RenderSchedule.Script]].\r\n */\r\n public override finish(): ElementTimelineProps {\r\n const props = super.finish() as ElementTimelineProps;\r\n props.batchId = this.batchId;\r\n props.elementIds = this.elementIds;\r\n return props;\r\n }\r\n }\r\n\r\n /** As part of a [[RenderSchedule.ScriptBuilder, assembles a [[RenderSchedule.ModelTimeline]].\r\n * @see [[RenderSchedule.ScriptBuilder.addModelTimeline]].\r\n */\r\n export class ModelTimelineBuilder extends TimelineBuilder {\r\n /** The Id of the model affected by this timeline. */\r\n public readonly modelId: Id64String;\r\n /** @internal */\r\n public realityModelUrl?: string;\r\n private readonly _obtainNextBatchId: () => number;\r\n private readonly _elements: ElementTimelineBuilder[] = [];\r\n\r\n /** Constructor - typically not used directly.\r\n * @see [[RenderSchedule.ScriptBuilder.addModelTimeline]] to create a ModelTimelineBuilder.\r\n */\r\n public constructor(modelId: Id64String, obtainNextBatchId: () => number) {\r\n super();\r\n this.modelId = modelId;\r\n this._obtainNextBatchId = obtainNextBatchId;\r\n }\r\n\r\n /** Add a new [[RenderSchedule.ElementTimeline]] to be applied to the specified elements.\r\n * This function will sort and compress the Ids if they are not already compressed.\r\n *\r\n */\r\n public addElementTimeline(elementIds: CompressedId64Set | Iterable<Id64String>): ElementTimelineBuilder {\r\n const batchId = this._obtainNextBatchId();\r\n let ids: CompressedId64Set;\r\n\r\n // It's far too easy to accidentally pass a single Id (compiler can't help).\r\n if (typeof elementIds === \"string\" && Id64.isValidId64(elementIds))\r\n elementIds = [elementIds];\r\n\r\n if (typeof elementIds === \"string\") {\r\n // Already compressed.\r\n ids = elementIds;\r\n } else {\r\n const sorted = Array.from(elementIds);\r\n OrderedId64Iterable.sortArray(sorted);\r\n ids = CompressedId64Set.compressIds(sorted);\r\n }\r\n\r\n const builder = new ElementTimelineBuilder(batchId, ids);\r\n this._elements.push(builder);\r\n return builder;\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.ModelTimeline]] produced by this builder.\r\n * @see [[RenderSchedule.ScriptBuilder.finish]] to obtain the JSON for the entire [[RenderSchedule.Script]].\r\n */\r\n public override finish(): ModelTimelineProps {\r\n const props = super.finish() as ModelTimelineProps;\r\n props.modelId = this.modelId;\r\n if (undefined !== this.realityModelUrl)\r\n props.realityModelUrl = this.realityModelUrl;\r\n\r\n props.elementTimelines = this._elements.map((x) => x.finish());\r\n return props;\r\n }\r\n }\r\n\r\n /** Assembles the JSON representation for a new [[RenderSchedule.Script]]. Ensure that entries on any given element timeline are added chronologically. As an extremely simple example, the following code produces a script that changes the color of a single element:\r\n * ```ts\r\n * const script = new ScriptBuilder();\r\n * const model = script.addModelTimeline(\"0x123\");\r\n * const element = model.addElementTimeline([ \"0x456\" ]);\r\n * element.addColor(Date.now(), new RgbColor(0xff, 0x7f, 0));\r\n * const scriptProps = script.finish();\r\n * ```\r\n */\r\n export class ScriptBuilder {\r\n private _nextBatchId = 1;\r\n private readonly _models: ModelTimelineBuilder[] = [];\r\n\r\n /** Add a new [[RenderSchedule.ModelTimeline]] to be applied to the specified model. */\r\n public addModelTimeline(modelId: Id64String): ModelTimelineBuilder {\r\n const builder = new ModelTimelineBuilder(modelId, () => this._nextBatchId++);\r\n this._models.push(builder);\r\n return builder;\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.Script]] produced by this builder.\r\n * @see [RenderTimeline.scriptProps]($backend) to assign the new script to a RenderTimeline element.\r\n */\r\n public finish(): ScriptProps {\r\n return this._models.map((x) => x.finish());\r\n }\r\n }\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B;YACzC,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;YAC7E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,OAAO,OAAO,CAAC;QACjB,CAAC;QAED;;WAEG;QACI,MAAM;YACX,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,CAAC;KACF;IAjBY,4BAAa,gBAiBzB,CAAA;AACH,CAAC,EA74CgB,cAAc,8BAAd,cAAc,QA64C9B","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 DisplayStyles\r\n */\r\n\r\nimport {\r\n assert, compareBooleans, compareNumbers, comparePossiblyUndefined, compareStrings, compareStringsOrUndefined,\r\n CompressedId64Set, Constructor, Id64, Id64String, OrderedId64Iterable,\r\n} from \"@itwin/core-bentley\";\r\nimport { EntityReferenceSet } from \"./EntityReference\";\r\nimport {\r\n ClipPlane, ClipPrimitive, ClipVector, ConvexClipPlaneSet, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Point4d, Range1d, Transform, UnionOfConvexClipPlaneSets, Vector3d, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\nimport { RgbColor } from \"./RgbColor\";\r\nimport { FeatureAppearance, FeatureOverrides } from \"./FeatureSymbology\";\r\nimport {PackedFeatureWithIndex} from \"./FeatureTable\";\r\n\r\nfunction interpolate(start: number, end: number, fraction: number): number {\r\n return start + fraction * (end - start);\r\n}\r\n\r\nfunction interpolateRgb(start: RgbColor, end: RgbColor, fraction: number): RgbColor {\r\n return new RgbColor(interpolate(start.r, end.r, fraction), interpolate(start.g, end.g, fraction), interpolate(start.b, end.b, fraction));\r\n}\r\n\r\nfunction compareXYZ(lhs: XYAndZ, rhs: XYAndZ): number {\r\n return compareNumbers(lhs.x, rhs.x) || compareNumbers(lhs.y, rhs.y) || compareNumbers(lhs.z, rhs.z);\r\n}\r\n\r\nfunction compare4d(lhs: Point4d, rhs: Point4d): number {\r\n return compareNumbers(lhs.x, rhs.x) || compareNumbers(lhs.y, rhs.y) || compareNumbers(lhs.z, rhs.z) || compareNumbers(lhs.w, rhs.w);\r\n}\r\n\r\nconst scratchVec3a = new Vector3d();\r\nconst scratchVec3b = new Vector3d();\r\nfunction compareMatrices(lhs: Matrix3d, rhs: Matrix3d): number {\r\n return compareXYZ(lhs.columnX(scratchVec3a), rhs.columnX(scratchVec3b))\r\n || compareXYZ(lhs.columnY(scratchVec3a), rhs.columnY(scratchVec3b))\r\n || compareXYZ(lhs.columnZ(scratchVec3a), rhs.columnZ(scratchVec3b));\r\n}\r\n\r\nfunction compareDurations(lhs: Range1d, rhs: Range1d): number {\r\n return compareNumbers(lhs.low, rhs.low) || compareNumbers(lhs.high, rhs.high);\r\n}\r\n\r\n/** Namespace containing types that collectively define a script that animates the contents of a view by adjusting the visibility, position,\r\n * and/or symbology of groups of elements over time. A [[RenderSchedule.Script]] is hosted by a [RenderTimeline]($backend) element. The script\r\n * can be associated with a [DisplayStyleState]($frontend) by way of its [[DisplayStyleSettings.renderTimeline]] property.\r\n * @public\r\n */\r\nexport namespace RenderSchedule {\r\n /** Defines how two interpolate between two entries in a [[RenderSchedule.Timeline]].\r\n * @note Currently only Linear and Step are supported. Any other value is treated as Step.\r\n * @see [[RenderSchedule.TimelineEntry]].\r\n */\r\n export enum Interpolation {\r\n /** Each timeline entry's value is discrete - the timeline jumps from one entry's value directly to another. */\r\n Step = 1,\r\n /** Given two entries on the timeline and a timepoint in between them, linearly interpolate based on the timepoint's distance between the\r\n * two entries.\r\n */\r\n Linear = 2,\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.TimelineEntry]]. */\r\n export interface TimelineEntryProps {\r\n /** The time point in seconds in the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time). */\r\n time: number;\r\n /** How to interpolate from this entry to the next entry in the timeline.\r\n * Currently, anything other than [[RenderSchedule.Interpolation.Linear]] is treated as [[RenderSchedule.Interpolation.Step]].\r\n * Additional interpolation modes may become supported in the future.\r\n */\r\n interpolation?: Interpolation;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.VisibilityEntry]]. */\r\n export interface VisibilityEntryProps extends TimelineEntryProps {\r\n /** Visibility of the geometry from 0 (invisible) to 100 (fully visible), with intermediate values appearing increasingly less transparent.\r\n * Default: 100 (fully visible).\r\n */\r\n value?: number;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.ColorEntry]]. */\r\n export interface ColorEntryProps extends TimelineEntryProps {\r\n /** The color applied to the geometry, with each component specified as an integer in [0, 255].\r\n * e.g., (0, 0, 0) represents black and (255, 255, 255) represents white.\r\n * If `undefined`, the geometry is displayed in its actual color.\r\n */\r\n value?: { red: number, green: number, blue: number };\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.CuttingPlane]]. */\r\n export interface CuttingPlaneProps {\r\n /** (x,y,z) of a point on the plane. */\r\n position: number[];\r\n /** (x, y, z) of the plane direction (towards the clip) */\r\n direction: number[];\r\n /** If true, the clip plane is ignored and the geometry is displayed unclipped. */\r\n visible?: boolean;\r\n /** If true, the clip plane is ignored and the geometry is not displayed. */\r\n hidden?: boolean;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.CuttingPlaneEntry]]. */\r\n export interface CuttingPlaneEntryProps extends TimelineEntryProps {\r\n /** The clip plane, or undefined if the geometry is not clipped. */\r\n value?: CuttingPlaneProps;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.TransformComponents]]. */\r\n export interface TransformComponentsProps {\r\n /** (x, y, z) of position - applied after rotation. */\r\n position?: number[];\r\n /** Quaternion representing rotation. */\r\n orientation?: number[];\r\n /** (x, y, z) of pivot - applied before rotation. */\r\n pivot?: number[];\r\n }\r\n\r\n /** JSON representation of a [Transform]($core-geometry) associated with a [[RenderSchedule.TransformEntryProps]]. */\r\n export interface TransformProps extends TransformComponentsProps {\r\n /** 3 X 4 transformation matrix containing 3 arrays of matrix rows consisting of 4 numbers each: [qx qy qz ax]\r\n * where the fourth columnn in each row holds the translation.\r\n * `undefined` is equivalent to an identity transform.\r\n * This transform is only used if position, orientation, and/or pivot are undefined.\r\n */\r\n transform?: number[][];\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.TransformEntry]]. */\r\n export interface TransformEntryProps extends TimelineEntryProps {\r\n /** The transformation matrix, with `undefined` corresponding to an identity matrix. */\r\n value?: TransformProps;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.Timeline]]. */\r\n export interface TimelineProps {\r\n /** Timeline controlling the visibility of the associated geometry. */\r\n visibilityTimeline?: VisibilityEntryProps[];\r\n /** Timeline controlling the colors of the associated geometry. */\r\n colorTimeline?: ColorEntryProps[];\r\n /** Timeline applying transforms to the associated geometry. */\r\n transformTimeline?: TransformEntryProps[];\r\n /** Timeline applying [ClipVector]($core-geometry)s to the associated geometry. */\r\n cuttingPlaneTimeline?: CuttingPlaneEntryProps[];\r\n }\r\n\r\n /** JSON representation of an [[RenderSchedule.ElementTimeline]]. */\r\n export interface ElementTimelineProps extends TimelineProps {\r\n /** A positive integer that uniquely identifies this timeline among all element timelines in the [[RenderSchedule.Script]]. */\r\n batchId: number;\r\n /** The Ids of the elements to which this timeline applies.\r\n * @note Prefer the compressed representation - lists of element Ids can be comparatively enormous.\r\n * @note For a [[DisplayStyleSettingsProps]] associated with a [DisplayStyleState]($frontend) obtained via [IModelConnection.Views.load]($frontend),\r\n * this property will be an empty `CompressedId64Set`. They are omitted to conserve bandwidth and memory because they are not needed for display on the frontend.\r\n */\r\n elementIds: Id64String[] | CompressedId64Set;\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.ModelTimeline]]. */\r\n export interface ModelTimelineProps extends TimelineProps {\r\n /** The Id of the [GeometricModelState]($frontend) to which the timeline applies. */\r\n modelId: Id64String;\r\n /** @alpha */\r\n realityModelUrl?: string; // defined only for \"context\" reality models (attached through display style)\r\n /** Timelines affecting groups of elements. */\r\n elementTimelines: ElementTimelineProps[];\r\n }\r\n\r\n /** JSON representation of a [[RenderSchedule.Script]]. */\r\n export type ScriptProps = ModelTimelineProps[];\r\n\r\n /** Describes the value of some property at a specific point along a [[RenderSchedule.Timeline]].\r\n * @see [[RenderSchedule.VisibilityEntry]]\r\n * @see [[RenderSchedule.ColorEntry]]\r\n * @see [[RenderSchedule.TransformEntry]]\r\n * @see [[RenderSchedule.CuttingPlaneEntry]]\r\n */\r\n export class TimelineEntry {\r\n /** The time point in seconds in the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time). */\r\n public readonly time: number;\r\n /** How to interpolate from this entry to the next entry in the timeline. */\r\n public readonly interpolation: Interpolation;\r\n\r\n public constructor(props: TimelineEntryProps) {\r\n this.time = props.time;\r\n this.interpolation = props.interpolation === Interpolation.Linear ? props.interpolation : Interpolation.Step;\r\n }\r\n\r\n public toJSON(): TimelineEntryProps {\r\n const props: TimelineEntryProps = {\r\n time: this.time,\r\n };\r\n\r\n if (this.interpolation === Interpolation.Linear)\r\n props.interpolation = this.interpolation;\r\n\r\n return props;\r\n }\r\n\r\n public compareTo(other: TimelineEntry): number {\r\n return compareNumbers(this.interpolation, other.interpolation) || compareNumbers(this.time, other.time);\r\n }\r\n\r\n public equals(other: TimelineEntry): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n }\r\n\r\n /** A timeline entry that controls the visibility of the associated geometry. */\r\n export class VisibilityEntry extends TimelineEntry {\r\n /** The visibility of the geometry at this point on the timeline, in the range [0, 100] where 0 is completely invisible, 100 is completely visible,\r\n * and values in between indicate increasing opacity.\r\n */\r\n public readonly value: number;\r\n\r\n public constructor(props: VisibilityEntryProps) {\r\n super(props);\r\n if (typeof props.value !== \"number\")\r\n this.value = 100;\r\n else\r\n this.value = Math.max(0, Math.min(100, props.value));\r\n }\r\n\r\n public override toJSON(): VisibilityEntryProps {\r\n const props = super.toJSON() as VisibilityEntryProps;\r\n if (100 !== this.value)\r\n props.value = this.value;\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: VisibilityEntry): number {\r\n assert(other instanceof VisibilityEntry);\r\n return super.compareTo(other) || compareNumbers(this.value, other.value);\r\n }\r\n }\r\n\r\n /** A timeline entry controlling the color of the affected geometry. */\r\n export class ColorEntry extends TimelineEntry {\r\n /** If defined, the color in which to draw the geometry. If undefined, the geometry is drawn in its actual color. */\r\n public readonly value: RgbColor | undefined;\r\n\r\n public constructor(props: ColorEntryProps) {\r\n super(props);\r\n if (props.value)\r\n this.value = new RgbColor(props.value.red, props.value.green, props.value.blue);\r\n }\r\n\r\n public override toJSON(): ColorEntryProps {\r\n const props = super.toJSON() as ColorEntryProps;\r\n if (this.value) {\r\n props.value = {\r\n red: this.value.r,\r\n green: this.value.g,\r\n blue: this.value.b,\r\n };\r\n }\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: ColorEntry): number {\r\n assert(other instanceof ColorEntry);\r\n return super.compareTo(other) || comparePossiblyUndefined((lhs, rhs) => lhs.compareTo(rhs), this.value, other.value);\r\n }\r\n }\r\n\r\n /** Describes the components of a [[RenderSchedule.TransformEntry]] as a rotation around a pivot point followed by a translation. */\r\n export class TransformComponents {\r\n /** Pivot point - applied before rotation. */\r\n public readonly pivot: Vector3d;\r\n /** Quaternion rotation. */\r\n public readonly orientation: Point4d;\r\n /** Translation - applied after rotation. */\r\n public readonly position: Vector3d;\r\n\r\n public constructor(position: Vector3d, pivot: Vector3d, orientation: Point4d) {\r\n this.position = position;\r\n this.pivot = pivot;\r\n this.orientation = orientation;\r\n }\r\n\r\n public static fromJSON(props: TransformComponentsProps): TransformComponents | undefined {\r\n if (props.pivot && props.position && props.orientation)\r\n return new TransformComponents(Vector3d.fromJSON(props.position), Vector3d.fromJSON(props.pivot), Point4d.fromJSON(props.orientation));\r\n else\r\n return undefined;\r\n }\r\n\r\n public toJSON(): TransformComponentsProps {\r\n return {\r\n position: [this.position.x, this.position.y, this.position.z],\r\n pivot: [this.pivot.x, this.pivot.y, this.pivot.z],\r\n orientation: [this.orientation.x, this.orientation.y, this.orientation.z, this.orientation.w],\r\n };\r\n }\r\n\r\n public compareTo(other: TransformComponents): number {\r\n return compareXYZ(this.pivot, other.pivot) || compareXYZ(this.position, other.position) || compare4d(this.orientation, other.orientation);\r\n }\r\n\r\n public equals(other: TransformComponents): boolean {\r\n return this.pivot.isAlmostEqual(other.pivot) && this.position.isAlmostEqual(other.position) && this.orientation.isAlmostEqual(other.orientation);\r\n }\r\n }\r\n\r\n /** A timeline entry that applies rotation, scaling, and/or translation to the affected geometry. */\r\n export class TransformEntry extends TimelineEntry {\r\n /** The transform matrix to be applied to the geometry, used only if [[components]] is not defined. */\r\n public readonly value: Readonly<Transform>;\r\n /** The transform represented as a rotation about a pivot point followed by a translation. If undefined, [[value]] is used instead. */\r\n public readonly components?: TransformComponents;\r\n\r\n public constructor(props: TransformEntryProps) {\r\n super(props);\r\n this.value = props.value ? Transform.fromJSON(props.value.transform) : Transform.identity;\r\n if (props.value)\r\n this.components = TransformComponents.fromJSON(props.value);\r\n }\r\n\r\n public override toJSON(): TransformEntryProps {\r\n const props = super.toJSON() as TransformEntryProps;\r\n if (this.components) {\r\n props.value = this.components.toJSON();\r\n props.value.transform = this.value.toRows();\r\n } else {\r\n props.value = { transform: this.value.toRows() };\r\n }\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: TransformEntry): number {\r\n assert(other instanceof TransformEntry);\r\n const cmp = super.compareTo(other);\r\n if (0 !== cmp)\r\n return cmp;\r\n\r\n if (this.components || other.components) {\r\n if (!this.components || !other.components)\r\n return this.components ? 1 : -1;\r\n\r\n return this.components.compareTo(other.components);\r\n }\r\n\r\n return compareXYZ(this.value.origin, other.value.origin) || compareMatrices(this.value.matrix, other.value.matrix);\r\n }\r\n }\r\n\r\n /** Defines a [ClipPlane]($core-geometry) associated with a [[RenderSchedule.CuttingPlaneEntry]]. */\r\n export class CuttingPlane {\r\n /** A point on the plane. */\r\n public readonly position: XYAndZ;\r\n /** The direction perpendicular to the plane pointing toward the clip. */\r\n public readonly direction: XYAndZ;\r\n /** If true, the clip plane is ignored and the geometry is never clipped. */\r\n public readonly visible: boolean;\r\n /** If true, the clip plane is ignored and the geometry is always clipped. */\r\n public readonly hidden: boolean;\r\n\r\n public constructor(props: CuttingPlaneProps) {\r\n this.position = Point3d.fromJSON(props.position);\r\n this.direction = Point3d.fromJSON(props.direction);\r\n this.hidden = true === props.hidden;\r\n this.visible = true === props.visible;\r\n }\r\n\r\n public toJSON(): CuttingPlaneProps {\r\n const props: CuttingPlaneProps = {\r\n position: [this.position.x, this.position.y, this.position.z],\r\n direction: [this.direction.x, this.direction.y, this.direction.z],\r\n };\r\n\r\n if (this.visible)\r\n props.visible = true;\r\n\r\n if (this.hidden)\r\n props.hidden = true;\r\n\r\n return props;\r\n }\r\n\r\n public compareTo(other: CuttingPlane): number {\r\n return compareXYZ(this.position, other.position) || compareXYZ(this.direction, other.direction) || compareBooleans(this.visible, other.visible) || compareBooleans(this.hidden, other.hidden);\r\n }\r\n\r\n public equals(other: CuttingPlane): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n }\r\n\r\n /** A timeline entry that applies a [ClipPlane]($core-geometry) to the affected geometry. */\r\n export class CuttingPlaneEntry extends TimelineEntry {\r\n /** The definition of the [ClipPlane]($core-geometry), or undefined if this entry applies no clipping. */\r\n public readonly value: CuttingPlane | undefined;\r\n\r\n public constructor(props: CuttingPlaneEntryProps) {\r\n super(props);\r\n if (props.value)\r\n this.value = new CuttingPlane(props.value);\r\n }\r\n\r\n public override toJSON(): CuttingPlaneEntryProps {\r\n const props = super.toJSON() as CuttingPlaneEntryProps;\r\n if (this.value)\r\n props.value = this.value.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n public override compareTo(other: CuttingPlaneEntry): number {\r\n assert(other instanceof CuttingPlaneEntry);\r\n return super.compareTo(other) || comparePossiblyUndefined((x, y) => x.compareTo(y), this.value, other.value);\r\n }\r\n }\r\n\r\n /** Identifies a fractional position along a [[RenderSchedule.Timeline]] between any two [[RenderSchedule.TimelineEntry]]'s within a [[RenderSchedule.TimelineEntryList]].\r\n * @internal\r\n */\r\n export class Interval {\r\n /** The index of the first timeline entry within the list. */\r\n public lowerIndex!: number;\r\n /** The index of the second timeline entry within the list. */\r\n public upperIndex!: number;\r\n /** The normalized distance between the two timeline entries. */\r\n public fraction!: number;\r\n\r\n public constructor(lower = 0, upper = 0, fraction = 0) {\r\n this.init(lower, upper, fraction);\r\n }\r\n\r\n public init(lower = 0, upper = 0, fraction = 0): void {\r\n this.lowerIndex = lower;\r\n this.upperIndex = upper;\r\n this.fraction = fraction;\r\n }\r\n }\r\n\r\n /** A list of the [[RenderSchedule.TimelineEntry]] objects within a [[RenderSchedule.Timeline]]. The type parameters are:\r\n * - T, a subclass of TimelineEntry with a `value` property specifying the value of the property controlled by the timeline at that entry's time point.\r\n * - P, the JSON representation from which T is to be constructed.\r\n * - V, the type of `T.value`.\r\n */\r\n export class TimelineEntryList<T extends TimelineEntry & { readonly value: V }, P extends TimelineEntryProps, V> implements Iterable<T> {\r\n private readonly _entries: ReadonlyArray<T>;\r\n /** The total time period represented by the entries in this list. */\r\n public readonly duration: Range1d;\r\n\r\n public constructor(props: P[], ctor: Constructor<T>) {\r\n this.duration = Range1d.createNull();\r\n this._entries = props.map((x) => {\r\n const entry = new ctor(x);\r\n this.duration.extendX(entry.time);\r\n return entry;\r\n });\r\n }\r\n\r\n /** The number of entries in the list. */\r\n public get length(): number {\r\n return this._entries.length;\r\n }\r\n\r\n /** An iterator over the entries in the list. */\r\n public [Symbol.iterator](): Iterator<T> {\r\n return this._entries[Symbol.iterator]();\r\n }\r\n\r\n /** Look up an entry by its position in the list. */\r\n public getEntry(index: number): T | undefined {\r\n return this._entries[index];\r\n }\r\n\r\n /** Look up the value of an entry by its position in the list. */\r\n public getValue(index: number): V | undefined {\r\n return this.getEntry(index)?.value;\r\n }\r\n\r\n public toJSON(): P[] {\r\n return this._entries.map((x) => x.toJSON() as P);\r\n }\r\n\r\n public compareTo(other: TimelineEntryList<T, P, V>): number {\r\n let cmp = compareNumbers(this._entries.length, other._entries.length) || compareDurations(this.duration, other.duration);\r\n if (0 === cmp) {\r\n for (let i = 0; i < this.length; i++)\r\n if (0 !== (cmp = this._entries[i].compareTo(other._entries[i])))\r\n break;\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n public equals(other: TimelineEntryList<T, P, V>): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n\r\n /** @internal */\r\n public findInterval(time: number, interval?: Interval): Interval | undefined {\r\n if (this.length === 0)\r\n return undefined;\r\n\r\n interval = interval ?? new Interval();\r\n if (time < this._entries[0].time) {\r\n interval.init(0, 0, 0);\r\n return interval;\r\n }\r\n\r\n const last = this.length - 1;\r\n if (time >= this._entries[last].time) {\r\n interval.init(last, last, 0);\r\n return interval;\r\n }\r\n\r\n for (let i = 0; i < last; i++) {\r\n const time0 = this._entries[i].time;\r\n const time1 = this._entries[i + 1].time;\r\n if (time0 <= time && time1 >= time) {\r\n let fraction;\r\n if (Interpolation.Linear === this._entries[i].interpolation)\r\n fraction = (time - time0) / (time1 - time0);\r\n else\r\n fraction = 0;\r\n\r\n interval.init(i, i + 1, fraction);\r\n return interval;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n }\r\n\r\n const scratchInterval = new Interval();\r\n\r\n /** A list of [[RenderSchedule.VisibilityEntry]]s within a [[RenderSchedule.Timeline]]. */\r\n export class VisibilityTimelineEntries extends TimelineEntryList<VisibilityEntry, VisibilityEntryProps, number> {\r\n /** Returns the visibility value for the entry at the specified position in the list, or 100 (fully-visible) if no such entry exists. */\r\n public override getValue(index: number): number {\r\n return super.getValue(index) ?? 100;\r\n }\r\n }\r\n\r\n /** A list of [[RenderSchedule.TransformEntry]]s within a [[RenderSchedule.Timeline]]. */\r\n export class TransformTimelineEntries extends TimelineEntryList<TransformEntry, TransformEntryProps, Readonly<Transform>> {\r\n /** Returns the transform for the entry at the specified position in the list, or an identity transform if no such entry exists. */\r\n public override getValue(index: number): Readonly<Transform> {\r\n return super.getValue(index) ?? Transform.identity;\r\n }\r\n }\r\n\r\n /** Specifies how to animate a set of geometry over time within a [[RenderSchedule.Script]].\r\n * A [[RenderSchedule.Script]] can contain any number of [[RenderSchedule.Timeline]]s, each affecting different sets of geometry.\r\n * @see [[RenderSchedule.ElementTimeline]] and [[RenderSchedule.ModelTimeline]].\r\n */\r\n export class Timeline {\r\n /** Sequence controlling the visibility of the geometry. */\r\n public readonly visibility?: VisibilityTimelineEntries;\r\n /** Sequence controlling the color of the geometry. */\r\n public readonly color?: TimelineEntryList<ColorEntry, ColorEntryProps, RgbColor | undefined>;\r\n /** Sequence controlling the position, orientation, and/or scale of the geometry. */\r\n public readonly transform?: TransformTimelineEntries;\r\n /** Sequence controlling how the geometry is clipped. */\r\n public readonly cuttingPlane?: TimelineEntryList<CuttingPlaneEntry, CuttingPlaneEntryProps, CuttingPlane | undefined>;\r\n /** The total time period represented by this timeline. */\r\n public readonly duration: Range1d;\r\n\r\n public constructor(props: TimelineProps) {\r\n this.duration = Range1d.createNull();\r\n\r\n if (props.visibilityTimeline) {\r\n this.visibility = new VisibilityTimelineEntries(props.visibilityTimeline, VisibilityEntry);\r\n this.duration.extendRange(this.visibility.duration);\r\n }\r\n\r\n if (props.colorTimeline) {\r\n this.color = new TimelineEntryList(props.colorTimeline, ColorEntry);\r\n this.duration.extendRange(this.color.duration);\r\n }\r\n\r\n if (props.transformTimeline) {\r\n this.transform = new TransformTimelineEntries(props.transformTimeline, TransformEntry);\r\n this.duration.extendRange(this.transform.duration);\r\n }\r\n\r\n if (props.cuttingPlaneTimeline) {\r\n this.cuttingPlane = new TimelineEntryList(props.cuttingPlaneTimeline, CuttingPlaneEntry);\r\n this.duration.extendRange(this.cuttingPlane.duration);\r\n }\r\n }\r\n\r\n public toJSON(): TimelineProps {\r\n return {\r\n visibilityTimeline: this.visibility?.toJSON(),\r\n colorTimeline: this.color?.toJSON(),\r\n transformTimeline: this.transform?.toJSON(),\r\n cuttingPlaneTimeline: this.cuttingPlane?.toJSON(),\r\n };\r\n }\r\n\r\n public compareTo(other: Timeline): number {\r\n const cmp = compareDurations(this.duration, other.duration);\r\n if (0 !== cmp)\r\n return cmp;\r\n\r\n // Do cheaper checks before iterating through timeline entries\r\n if (!!this.visibility !== !!other.visibility)\r\n return this.visibility ? 1 : -1;\r\n else if (!!this.color !== !!other.color)\r\n return this.color ? 1 : -1;\r\n else if (!!this.transform !== !!other.transform)\r\n return this.transform ? 1 : -1;\r\n else if (!!this.cuttingPlane !== !!other.cuttingPlane)\r\n return this.cuttingPlane ? 1 : -1;\r\n\r\n return comparePossiblyUndefined((x, y) => x.compareTo(y), this.visibility, other.visibility) || comparePossiblyUndefined((x, y) => x.compareTo(y), this.color, other.color)\r\n || comparePossiblyUndefined((x, y) => x.compareTo(y), this.transform, other.transform) || comparePossiblyUndefined((x, y) => x.compareTo(y), this.cuttingPlane, other.cuttingPlane);\r\n }\r\n\r\n public equals(other: Timeline): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n\r\n /** Get the visibility of the geometry at the specified time point. */\r\n public getVisibility(time: number): number {\r\n let interval;\r\n if (!this.visibility || !(interval = this.visibility.findInterval(time, scratchInterval)))\r\n return 100;\r\n\r\n let visibility = this.visibility.getValue(interval.lowerIndex) ?? 100;\r\n if (interval.fraction > 0)\r\n visibility = interpolate(visibility, this.visibility.getValue(interval.upperIndex) ?? 100, interval.fraction);\r\n\r\n return visibility;\r\n }\r\n\r\n /** Get the color of the geometry at the specified time point, or undefined if the color is not overridden at that time point. */\r\n public getColor(time: number): RgbColor | undefined {\r\n let interval;\r\n if (!this.color || !(interval = this.color.findInterval(time, scratchInterval)))\r\n return undefined;\r\n\r\n const start = this.color.getValue(interval.lowerIndex);\r\n if (start && interval.fraction > 0) {\r\n const end = this.color.getValue(interval.upperIndex);\r\n if (end)\r\n return interpolateRgb(start, end, interval.fraction);\r\n }\r\n\r\n return start;\r\n }\r\n\r\n /** Get the transform applied to the geometry at the specified time point. */\r\n public getAnimationTransform(time: number): Readonly<Transform> {\r\n let interval;\r\n if (!this.transform || !(interval = this.transform.findInterval(time, scratchInterval)))\r\n return Transform.identity;\r\n\r\n let transform = this.transform.getValue(interval.lowerIndex);\r\n if (interval.fraction > 0) {\r\n const comp0 = this.transform.getEntry(interval.lowerIndex)?.components;\r\n const comp1 = this.transform.getEntry(interval.upperIndex)?.components;\r\n if (comp0 && comp1) {\r\n const sum = Point4d.interpolateQuaternions(comp0.orientation, interval.fraction, comp1.orientation);\r\n const matrix = Matrix3d.createFromQuaternion(sum);\r\n const pre = Transform.createTranslation(comp0.pivot);\r\n const post = Transform.createTranslation(comp0.position.interpolate(interval.fraction, comp1.position));\r\n const product = post.multiplyTransformMatrix3d(matrix);\r\n product.multiplyTransformTransform(pre, product);\r\n transform = product;\r\n } else {\r\n const end = this.transform.getValue(interval.upperIndex);\r\n const q0 = transform.matrix.inverse()?.toQuaternion();\r\n const q1 = end.matrix.inverse()?.toQuaternion();\r\n if (q0 && q1) {\r\n const sum = Point4d.interpolateQuaternions(q0, interval.fraction, q1);\r\n const matrix = Matrix3d.createFromQuaternion(sum);\r\n\r\n const origin0 = Vector3d.createFrom(transform.origin);\r\n const origin1 = Vector3d.createFrom(end.origin);\r\n transform = Transform.createRefs(origin0.interpolate(interval.fraction, origin1), matrix);\r\n }\r\n }\r\n }\r\n\r\n return transform;\r\n }\r\n\r\n /** Get the clipping plane applied to the geometry at the specified time point, or undefined if the geometry is unclipped at that time point. */\r\n public getCuttingPlane(time: number): Plane3dByOriginAndUnitNormal | undefined {\r\n let interval;\r\n if (!this.cuttingPlane || !(interval = this.cuttingPlane.findInterval(time, scratchInterval)))\r\n return undefined;\r\n\r\n const start = this.cuttingPlane.getValue(interval.lowerIndex);\r\n if (!start)\r\n return undefined;\r\n\r\n const position = Point3d.createFrom(start.position);\r\n const direction = Vector3d.createFrom(start.direction);\r\n const end = interval.fraction > 0 ? this.cuttingPlane.getValue(interval.upperIndex) : undefined;\r\n if (end) {\r\n position.interpolate(interval.fraction, end.position, position);\r\n direction.interpolate(interval.fraction, end.direction, direction);\r\n } else {\r\n if (start.hidden || start.visible)\r\n return undefined;\r\n }\r\n\r\n direction.negate(direction);\r\n direction.normalizeInPlace();\r\n\r\n return Plane3dByOriginAndUnitNormal.create(position, direction);\r\n }\r\n\r\n /** Create a ClipVector from the [[RenderSchedule.CuttingPlane]] applied to the geometry at the specified time point, if any. */\r\n public getClipVector(time: number): ClipVector | undefined {\r\n const plane = this.getCuttingPlane(time);\r\n if (!plane)\r\n return undefined;\r\n\r\n const cp = ClipPlane.createPlane(plane);\r\n const cps = UnionOfConvexClipPlaneSets.createConvexSets([ConvexClipPlaneSet.createPlanes([cp])]);\r\n const prim = ClipPrimitive.createCapture(cps);\r\n return ClipVector.createCapture([prim]);\r\n }\r\n\r\n /** @internal */\r\n protected getFeatureAppearance(visibility: number, time: number): FeatureAppearance | undefined {\r\n const transparency = visibility < 100 ? (1 - visibility / 100) : undefined;\r\n const rgb = this.getColor(time);\r\n return undefined !== rgb || undefined !== transparency ? FeatureAppearance.fromJSON({ rgb, transparency }) : undefined;\r\n }\r\n }\r\n\r\n /** Specifies how to animate the geometry belonging to a set of [GeometricElement]($backend)s as part of a [[RenderSchedule.Script]]. */\r\n export class ElementTimeline extends Timeline {\r\n /** A positive integer that uniquely identififes this timeline among all ElementTimelines in the [[RenderSchedule.Script]]. */\r\n public readonly batchId: number;\r\n private readonly _elementIds: Id64String[] | CompressedId64Set;\r\n\r\n private constructor(props: ElementTimelineProps) {\r\n super(props);\r\n this.batchId = props.batchId;\r\n this._elementIds = props.elementIds;\r\n }\r\n\r\n public static fromJSON(props?: ElementTimelineProps): ElementTimeline {\r\n return new ElementTimeline(props ?? { elementIds: [], batchId: 0 });\r\n }\r\n\r\n public override toJSON(): ElementTimelineProps {\r\n return {\r\n ...super.toJSON(),\r\n batchId: this.batchId,\r\n elementIds: this._elementIds,\r\n };\r\n }\r\n\r\n public get containsElementIds(): boolean {\r\n return this._elementIds.length > 0;\r\n }\r\n\r\n private compareElementIds(other: ElementTimeline): number {\r\n if (typeof this._elementIds === typeof other._elementIds) {\r\n const cmp = compareNumbers(this._elementIds.length, other._elementIds.length);\r\n if (0 !== cmp)\r\n return cmp;\r\n\r\n if (typeof this._elementIds === \"string\") {\r\n assert(typeof other._elementIds === \"string\");\r\n return compareStrings(this._elementIds, other._elementIds);\r\n }\r\n }\r\n\r\n // One or both are stored as arrays, in which case they might contain the same Ids in different orders. We will consider them different in that case.\r\n const mine = this.elementIds[Symbol.iterator]();\r\n const theirs = other.elementIds[Symbol.iterator]();\r\n while (true) {\r\n const a = mine.next();\r\n const b = theirs.next();\r\n if (a.done !== b.done)\r\n return compareBooleans(!!a.done, !!b.done);\r\n else if (a.done)\r\n return 0;\r\n\r\n const cmp = compareStrings(a.value, b.value);\r\n if (0 !== cmp)\r\n return cmp;\r\n }\r\n }\r\n\r\n public override compareTo(other: ElementTimeline): number {\r\n assert(other instanceof ElementTimeline);\r\n return compareNumbers(this.batchId, other.batchId) || this.compareElementIds(other) || super.compareTo(other);\r\n }\r\n\r\n /** @internal */\r\n public static getElementIds(ids: Id64String[] | CompressedId64Set): Iterable<Id64String> {\r\n if (typeof ids === \"string\")\r\n return CompressedId64Set.iterable(ids);\r\n else if (Array.isArray(ids)) {\r\n return ids;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n /** The Ids of the elements controlled by this timeline. */\r\n public get elementIds(): Iterable<Id64String> {\r\n return ElementTimeline.getElementIds(this._elementIds);\r\n }\r\n\r\n /** True if this timeline affects the color or transparency of the elements. */\r\n public get containsFeatureOverrides(): boolean {\r\n return undefined !== this.visibility || undefined !== this.color;\r\n }\r\n\r\n /** If true, applying this timeline requires special tiles to be generated in which groups of elements are batched into nodes.\r\n * @internal\r\n */\r\n public get requiresBatching(): boolean {\r\n if (this.cuttingPlane)\r\n return true;\r\n\r\n return this.batchId !== 0 && (undefined !== this.color || undefined !== this.visibility);\r\n }\r\n\r\n /** True if this timeline affects the position, orientation, or scale of the elements. */\r\n public get containsTransform(): boolean {\r\n return undefined !== this.transform;\r\n }\r\n\r\n /** @internal */\r\n public addSymbologyOverrides(overrides: FeatureOverrides, time: number): void {\r\n assert(0 !== this.batchId);\r\n\r\n const vis = this.getVisibility(time);\r\n if (vis <= 0) {\r\n overrides.setAnimationNodeNeverDrawn(this.batchId);\r\n return;\r\n }\r\n\r\n const appearance = this.getFeatureAppearance(vis, time);\r\n if (appearance)\r\n overrides.overrideAnimationNode(this.batchId, appearance);\r\n }\r\n }\r\n\r\n /** Specifies how to animate the geometry within a [GeometricModel]($backend) as part of a [[RenderSchedule.Script]]. */\r\n export class ModelTimeline extends Timeline {\r\n /** The Id of the [GeometricModel]($backend) to be animated. */\r\n public readonly modelId: Id64String;\r\n /** @internal */\r\n public readonly realityModelUrl?: string;\r\n /** Timelines specifying how to animate groups of [GeometricElement]($backend)s within the model. */\r\n public readonly elementTimelines: ReadonlyArray<ElementTimeline>;\r\n /** @internal */\r\n public readonly transformBatchIds: ReadonlyArray<number>;\r\n /** True if this timeline affects the color or transparency of the geometry. */\r\n public readonly containsFeatureOverrides: boolean;\r\n /** True if this timeline applies clipping to the model. */\r\n public readonly containsModelClipping: boolean;\r\n /** If true, applying this timeline requires special tiles to be generated in which groups of elements are batched into nodes.\r\n * @internal\r\n */\r\n public readonly requiresBatching: boolean;\r\n /** True if this timeline affects the position, orientation, or scale of the geometry. */\r\n public readonly containsTransform: boolean;\r\n /** True if any [[RenderSchedule.ElementTimeline]]s exist and none of them contain any element Ids. This generally indicates that\r\n * the backend was instructed to omit the Ids to save space when supplying the script.\r\n */\r\n public readonly omitsElementIds: boolean;\r\n private _maxBatchId?: number;\r\n /** Tile tree suppliers perform **very** frequent ordered comparisons of ModelTimelines. They need to be fast. */\r\n private readonly _cachedComparisons = new WeakMap<ModelTimeline, number>();\r\n /** When loading tiles we need to quickly map element Ids to batch Ids. This map is initialized on first call to [[getTimelineForElement]] to facilitate that lookup. */\r\n private _idPairToElementTimeline?: Id64.Uint32Map<ElementTimeline>;\r\n private _discreteBatchIds?: Set<number>;\r\n\r\n private constructor(props: ModelTimelineProps) {\r\n super(props);\r\n\r\n this.modelId = props.modelId;\r\n this.realityModelUrl = props.realityModelUrl;\r\n this.containsModelClipping = undefined !== this.cuttingPlane;\r\n\r\n let containsFeatureOverrides = undefined !== this.visibility || undefined !== this.color;\r\n let requiresBatching = false;\r\n let containsTransform = false;\r\n\r\n const transformBatchIds: number[] = [];\r\n const elementTimelines: ElementTimeline[] = [];\r\n let containsElementIds = false;\r\n for (const elProps of props.elementTimelines) {\r\n const el = ElementTimeline.fromJSON(elProps);\r\n elementTimelines.push(el);\r\n\r\n this.duration.extendRange(el.duration);\r\n\r\n if (el.containsTransform) {\r\n containsTransform = true;\r\n if (el.batchId)\r\n transformBatchIds.push(el.batchId);\r\n }\r\n\r\n containsFeatureOverrides ||= el.containsFeatureOverrides;\r\n requiresBatching ||= el.requiresBatching;\r\n containsElementIds = containsElementIds || el.containsElementIds;\r\n }\r\n\r\n this.elementTimelines = elementTimelines;\r\n this.transformBatchIds = transformBatchIds;\r\n this.omitsElementIds = elementTimelines.length > 0 && !containsElementIds;\r\n\r\n this.containsFeatureOverrides = containsFeatureOverrides;\r\n this.requiresBatching = requiresBatching;\r\n this.containsTransform = containsTransform;\r\n }\r\n\r\n public static fromJSON(props?: ModelTimelineProps): ModelTimeline {\r\n return new ModelTimeline(props ?? { elementTimelines: [], modelId: Id64.invalid });\r\n }\r\n\r\n public override toJSON(): ModelTimelineProps {\r\n return {\r\n ...super.toJSON(),\r\n modelId: this.modelId,\r\n realityModelUrl: this.realityModelUrl,\r\n elementTimelines: this.elementTimelines.map((x) => x.toJSON()),\r\n };\r\n }\r\n\r\n public override compareTo(other: ModelTimeline): number {\r\n if (this === other)\r\n return 0;\r\n\r\n const cached = this._cachedComparisons.get(other);\r\n if (undefined !== cached)\r\n return cached;\r\n\r\n assert(other instanceof ModelTimeline);\r\n let cmp = compareStrings(this.modelId, other.modelId) || compareStringsOrUndefined(this.realityModelUrl, other.realityModelUrl)\r\n || compareNumbers(this.elementTimelines.length, other.elementTimelines.length) || compareBooleans(this.containsFeatureOverrides, other.containsFeatureOverrides)\r\n || compareBooleans(this.containsModelClipping, other.containsModelClipping) || compareBooleans(this.containsTransform, other.containsTransform)\r\n || super.compareTo(other);\r\n\r\n if (0 === cmp) {\r\n for (let i = 0; i < this.elementTimelines.length; i++)\r\n if (0 !== (cmp = this.elementTimelines[i].compareTo(other.elementTimelines[i])))\r\n break;\r\n }\r\n\r\n this._cachedComparisons.set(other, cmp);\r\n other._cachedComparisons.set(this, -cmp);\r\n return cmp;\r\n }\r\n\r\n /** Look up the element timeline with the specified batch Id. */\r\n public findByBatchId(batchId: number): ElementTimeline | undefined {\r\n return this.elementTimelines.find((x) => x.batchId === batchId);\r\n }\r\n\r\n /** @internal */\r\n public addSymbologyOverrides(overrides: FeatureOverrides, time: number): void {\r\n const appearance = this.getFeatureAppearance(this.getVisibility(time), time);\r\n if (appearance)\r\n overrides.override({ modelId: this.modelId, appearance });\r\n\r\n for (const timeline of this.elementTimelines)\r\n timeline.addSymbologyOverrides(overrides, time);\r\n }\r\n\r\n /** Obtain the transform applied to the model at the specified time point, if any. */\r\n public getTransform(batchId: number, time: number): Readonly<Transform> | undefined {\r\n return this.findByBatchId(batchId)?.getAnimationTransform(time);\r\n }\r\n\r\n /** Get the highest batchId of any ElementTimeline in this timeline. */\r\n public get maxBatchId(): number {\r\n if (undefined === this._maxBatchId) {\r\n this._maxBatchId = 0;\r\n for (const elem of this.elementTimelines)\r\n this._maxBatchId = Math.max(this._maxBatchId, elem.batchId);\r\n }\r\n\r\n return this._maxBatchId;\r\n }\r\n\r\n /** Given the two halves of an [Id64]($bentley) return the [[ElementTimeline]] containing the corresponding element.\r\n * @note The first call to this method populates a mapping for fast lookup.\r\n * @alpha\r\n */\r\n public getTimelineForElement(idLo: number, idHi: number): ElementTimeline | undefined {\r\n if (!this._idPairToElementTimeline) {\r\n this._idPairToElementTimeline = new Id64.Uint32Map<ElementTimeline>();\r\n for (const timeline of this.elementTimelines) {\r\n for (const elementId of timeline.elementIds) {\r\n // NB: a malformed script may place the same element Id into multiple timelines. We're not going to check for such data errors here.\r\n this._idPairToElementTimeline.setById(elementId, timeline);\r\n }\r\n }\r\n }\r\n\r\n return this._idPairToElementTimeline.get(idLo, idHi);\r\n }\r\n\r\n /** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.\r\n * @alpha\r\n */\r\n public get discreteBatchIds(): Set<number> {\r\n if (!this._discreteBatchIds) {\r\n this._discreteBatchIds = new Set<number>(this.transformBatchIds);\r\n for (const timeline of this.elementTimelines)\r\n if (!timeline.containsTransform && undefined !== timeline.cuttingPlane)\r\n this._discreteBatchIds.add(timeline.batchId);\r\n }\r\n\r\n return this._discreteBatchIds;\r\n }\r\n\r\n /** @internal see ImdlReader.readAnimationBranches */\r\n public getBatchIdForFeature(feature: PackedFeatureWithIndex): number {\r\n assert(Id64.fromUint32PairObject(feature.modelId) === this.modelId);\r\n const elementTimeline = this.getTimelineForElement(feature.elementId.lower, feature.elementId.upper);\r\n return elementTimeline?.batchId ?? 0;\r\n }\r\n }\r\n\r\n /** Specifies how to animate the contents of a [ViewState]($frontend) over time. The script contains any number of [[RenderSchedule.ModelTimeline]]s, each describing how\r\n * to animate one of the models in the view.\r\n * @see [RenderTimeline]($backend) to create an [Element]($backend) to host a script.\r\n * @see [[DisplayStyleSettings.renderTimeline]] to associate a [RenderTimeline]($backend)'s script with a [DisplayStyle]($backend).\r\n * @see [DisplayStyleState.scheduleScript]($frontend) to obtain the script associated with a display style.\r\n * @see [[RenderSchedule.ScriptBuilder]] to define a new script.\r\n */\r\n export class Script {\r\n /** Timelines specifying how to animate individual models within the view. */\r\n public readonly modelTimelines: ReadonlyArray<ModelTimeline>;\r\n /** True if this script applies clipping to any models. */\r\n public readonly containsModelClipping: boolean;\r\n /** If true, applying this timeline requires special tiles to be generated in which groups of elements are batched into nodes.\r\n * @internal\r\n */\r\n public readonly requiresBatching: boolean;\r\n /** True if this script affects the position, orientation, or scale of the geometry. */\r\n public readonly containsTransform: boolean;\r\n /** True if this script affects the color or transparency of the geometry. */\r\n public readonly containsFeatureOverrides: boolean;\r\n /** The total time period over which this script animates. */\r\n public readonly duration: Range1d;\r\n /** The batchIds of all nodes in all timelines that apply a transform.\r\n * @internal\r\n */\r\n public readonly transformBatchIds: ReadonlySet<number>;\r\n /** Tile tree references perform **very** frequent ordered comparisons of Scripts. They need to be fast. */\r\n private readonly _cachedComparisons = new WeakMap<Script, number>();\r\n private _discreteBatchIds?: Set<number>;\r\n private _lastFeatureModelTimeline?: { timeline?: ModelTimeline, idLower: number, idUpper: number };\r\n private _maxBatchId?: number;\r\n\r\n public compareTo(other: Script): number {\r\n if (this === other)\r\n return 0;\r\n\r\n const cached = this._cachedComparisons.get(other);\r\n if (undefined !== cached)\r\n return cached;\r\n\r\n let cmp = compareNumbers(this.modelTimelines.length, other.modelTimelines.length) || compareBooleans(this.containsModelClipping, other.containsModelClipping)\r\n || compareBooleans(this.requiresBatching, other.requiresBatching) || compareBooleans(this.containsTransform, other.containsTransform)\r\n || compareBooleans(this.containsFeatureOverrides, other.containsFeatureOverrides) || compareDurations(this.duration, other.duration);\r\n\r\n if (0 === cmp) {\r\n for (let i = 0; i < this.modelTimelines.length; i++)\r\n if (0 !== (cmp = this.modelTimelines[i].compareTo(other.modelTimelines[i])))\r\n break;\r\n }\r\n\r\n this._cachedComparisons.set(other, cmp);\r\n other._cachedComparisons.set(this, -cmp);\r\n return cmp;\r\n }\r\n public equals(other: Script): boolean {\r\n return 0 === this.compareTo(other);\r\n }\r\n\r\n protected constructor(props: Readonly<ScriptProps>) {\r\n this.duration = Range1d.createNull();\r\n const transformBatchIds = new Set<number>();\r\n\r\n const modelTimelines: ModelTimeline[] = [];\r\n let containsModelClipping = false;\r\n let requiresBatching = false;\r\n let containsTransform = false;\r\n let containsFeatureOverrides = false;\r\n\r\n for (const modelProps of props) {\r\n const model = ModelTimeline.fromJSON(modelProps);\r\n modelTimelines.push(model);\r\n\r\n this.duration.extendRange(model.duration);\r\n\r\n containsModelClipping ||= model.containsModelClipping;\r\n requiresBatching ||= model.requiresBatching;\r\n containsTransform ||= model.containsTransform;\r\n containsFeatureOverrides ||= model.containsFeatureOverrides;\r\n\r\n for (const batchId of model.transformBatchIds)\r\n transformBatchIds.add(batchId);\r\n }\r\n\r\n this.modelTimelines = modelTimelines;\r\n this.containsModelClipping = containsModelClipping;\r\n this.containsTransform = containsTransform;\r\n this.requiresBatching = requiresBatching || this.containsTransform;\r\n this.containsFeatureOverrides = containsFeatureOverrides;\r\n this.transformBatchIds = transformBatchIds;\r\n }\r\n\r\n public static fromJSON(props: Readonly<ScriptProps>): Script | undefined {\r\n if (!Array.isArray(props) || props.length === 0)\r\n return undefined;\r\n\r\n return new Script(props);\r\n }\r\n\r\n public toJSON(): ScriptProps {\r\n return this.modelTimelines.map((x) => x.toJSON());\r\n }\r\n\r\n /** Look up the timeline that animates the specified model, if any. */\r\n public find(modelId: Id64String): ModelTimeline | undefined {\r\n return this.modelTimelines.find((x) => x.modelId === modelId);\r\n }\r\n\r\n /** @internal */\r\n public getTransformBatchIds(modelId: Id64String): ReadonlyArray<number> | undefined {\r\n return this.find(modelId)?.transformBatchIds;\r\n }\r\n\r\n /** @internal */\r\n public getTransform(modelId: Id64String, batchId: number, time: number): Readonly<Transform> | undefined {\r\n return this.find(modelId)?.getTransform(batchId, time);\r\n }\r\n\r\n /** @internal */\r\n public addSymbologyOverrides(overrides: FeatureOverrides, time: number): void {\r\n for (const timeline of this.modelTimelines)\r\n timeline.addSymbologyOverrides(overrides, time);\r\n }\r\n\r\n /** Used by the [Entity.collectReferenceIds]($backend) method overrides in RenderTimeline and DisplayStyle.\r\n * @internal\r\n */\r\n public discloseIds(ids: EntityReferenceSet) {\r\n for (const model of this.modelTimelines) {\r\n ids.addModel(model.modelId);\r\n for (const element of model.elementTimelines)\r\n for (const id of element.elementIds)\r\n ids.addElement(id);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public modelRequiresBatching(modelId: Id64String): boolean {\r\n // Only if the script contains animation (cutting plane, transform or visibility by node ID) do we require separate tilesets for animations.\r\n return this.requiresBatching && this.modelTimelines.some((x) => x.modelId === modelId && x.requiresBatching);\r\n }\r\n\r\n /** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.\r\n * @alpha\r\n */\r\n public get discreteBatchIds(): Set<number> {\r\n if (this._discreteBatchIds)\r\n return this._discreteBatchIds;\r\n\r\n this._discreteBatchIds = new Set<number>();\r\n for (const timeline of this.modelTimelines)\r\n for (const batchId of timeline.discreteBatchIds)\r\n this._discreteBatchIds.add(batchId);\r\n\r\n return this._discreteBatchIds;\r\n }\r\n\r\n /** @internal see ImdlReader.readAnimationBranches. */\r\n public getBatchIdForFeature(feature: PackedFeatureWithIndex): number {\r\n let timeline;\r\n const prev = this._lastFeatureModelTimeline;\r\n if (prev && prev.idLower === feature.modelId.lower && prev.idUpper === feature.modelId.upper) {\r\n timeline = prev.timeline;\r\n } else {\r\n const modelId = Id64.fromUint32PairObject(feature.modelId);\r\n timeline = this.find(modelId);\r\n this._lastFeatureModelTimeline = { timeline, idLower: feature.modelId.lower, idUpper: feature.modelId.upper };\r\n }\r\n\r\n return timeline?.getBatchIdForFeature(feature) ?? 0;\r\n }\r\n\r\n /** @alpha */\r\n public get maxBatchId(): number {\r\n return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));\r\n }\r\n\r\n /**\r\n * Replaces all elementIds in a ScriptProps object with an empty string. Returns modified ScriptProps.\r\n * @param scheduleScript The script props to modify.\r\n * @internal */\r\n public static removeScheduleScriptElementIds(scheduleScript: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\r\n scheduleScript.forEach((modelTimeline) => {\r\n modelTimeline.elementTimelines.forEach((elementTimeline) => {\r\n if (elementTimeline.elementIds) {\r\n elementTimeline.elementIds = \"\";\r\n }\r\n });\r\n });\r\n return scheduleScript;\r\n }\r\n }\r\n\r\n /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.\r\n * @see [DisplayStyle.loadScheduleScript]($backend) to obtain the script reference for a display style.\r\n * @see [DisplayStyleState.scheduleScript]($frontend) or [DisplayStyleState.changeRenderTimeline]($frontend) to change a display style's script on the frontend.\r\n */\r\n export class ScriptReference {\r\n /** The Id of the element - if any - from which the script originated.\r\n * A schedule script may originate from one of the following sources:\r\n * - A [RenderTimeline]($backend) element stored in the iModel; or\r\n * - The `scheduleScript` JSON property of a [DisplayStyle]($backend) element stored in the iModel; or\r\n * - Any other source outside of the iModel, such as code that generates the script on the frontend, a script obtained from some server, etc.\r\n *\r\n * The [[sourceId]] property identifies the Id of the element from which the script originated; an empty or invalid [Id64String]($bentley) indicates the script did not\r\n * originate from any persistent element. If the Id is valid, the contents of [[script]] are assumed to match those stored on the source element.\r\n */\r\n public readonly sourceId: Id64String;\r\n /** The script defining the rendering timelines to be applied. */\r\n public readonly script: Script;\r\n\r\n /** Create a reference to a [[script]] with no [[sourceId]]. */\r\n public constructor(script: Script);\r\n\r\n /** Create a reference to a [[script]] with the specified [[sourceId]]. */\r\n public constructor(sourceId: Id64String, script: Script);\r\n\r\n /** @internal Use one of the public constructor overloads which forward to this one. */\r\n public constructor(sourceIdOrScript: Id64String | Script, scriptIfSourceId?: Script);\r\n\r\n /** @internal Use one of the public constructor overloads which forward to this one. */\r\n public constructor(sourceIdOrScript: Id64String | Script, scriptIfSourceId?: Script) {\r\n if (typeof sourceIdOrScript === \"string\") {\r\n assert(scriptIfSourceId instanceof Script);\r\n this.sourceId = sourceIdOrScript;\r\n this.script = scriptIfSourceId;\r\n } else {\r\n assert(undefined === scriptIfSourceId);\r\n this.script = sourceIdOrScript;\r\n this.sourceId = Id64.invalid;\r\n }\r\n }\r\n }\r\n\r\n /** Used as part of a [[RenderSchedule.ScriptBuilder]] to define a [[RenderSchedule.Timeline]]. Functions that append\r\n * to the timeline expect entries to be appended in chronological order - i.e., you cannot append an entry that is earlier\r\n * than a previously appended entry.\r\n * @see [[RenderSchedule.ElementTimelineBuilder]] and [[RenderSchedule.ModelTimelineBuilder]].\r\n */\r\n export class TimelineBuilder {\r\n /** Timeline controlling visibility. */\r\n public visibility?: VisibilityEntryProps[];\r\n /** Timeline controlling color. */\r\n public color?: ColorEntryProps[];\r\n /** Timeline controlling position and orientation. */\r\n public transform?: TransformEntryProps[];\r\n /** Timeline controlling clipping. */\r\n public cuttingPlane?: CuttingPlaneEntryProps[];\r\n\r\n /** Append a new [[RenderSchedule.VisibilityEntry]] to the timeline. `time` must be more recent than any previously-appended visibility entries. */\r\n public addVisibility(time: number, visibility: number | undefined, interpolation = Interpolation.Linear): void {\r\n if (!this.visibility)\r\n this.visibility = [];\r\n\r\n this.visibility.push({ time, value: visibility, interpolation });\r\n }\r\n\r\n /** Append a new [[RenderSchedule.ColorEntry]] to the timeline. `time` must be more recent than any previously-appended color entries. */\r\n public addColor(time: number, color: RgbColor | { red: number, green: number, blue: number } | undefined, interpolation = Interpolation.Linear): void {\r\n if (!this.color)\r\n this.color = [];\r\n\r\n const value = color instanceof RgbColor ? { red: color.r, green: color.g, blue: color.b } : color;\r\n this.color.push({ time, value, interpolation });\r\n }\r\n\r\n /** Append a new [[RenderSchedule.CuttingPlaneEntry]] to the timeline. `time` must be more recent than any previously-appended cutting plane entries. */\r\n public addCuttingPlane(time: number, plane: { position: XYAndZ, direction: XYAndZ, visible?: boolean, hidden?: boolean } | undefined, interpolation = Interpolation.Linear): void {\r\n if (!this.cuttingPlane)\r\n this.cuttingPlane = [];\r\n\r\n let value: CuttingPlaneProps | undefined;\r\n if (plane) {\r\n value = {\r\n position: [plane.position.x, plane.position.y, plane.position.z],\r\n direction: [plane.direction.x, plane.direction.y, plane.direction.z],\r\n };\r\n\r\n if (plane.visible)\r\n value.visible = true;\r\n\r\n if (plane.hidden)\r\n value.hidden = true;\r\n }\r\n\r\n this.cuttingPlane.push({ time, value, interpolation });\r\n }\r\n\r\n /** Append a new [[RenderSchedule.TransformEntry]] to the timeline. `time` must be more recent than any previously-appended transform entries. */\r\n public addTransform(time: number, transform: Readonly<Transform> | undefined, components?: { pivot: XYAndZ, orientation: Point4d, position: XYAndZ }, interpolation = Interpolation.Linear): void {\r\n if (!this.transform)\r\n this.transform = [];\r\n\r\n const value: TransformProps = { transform: transform?.toRows() };\r\n if (components) {\r\n value.pivot = [components.pivot.x, components.pivot.y, components.pivot.z];\r\n value.orientation = components.orientation.toJSON();\r\n value.position = [components.position.x, components.position.y, components.position.z];\r\n }\r\n\r\n this.transform.push({ time, value, interpolation });\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.Timeline]] produced by this builder.\r\n * @see [[RenderSchedule.ScriptBuilder.finish]] to obtain the JSON for the entire [[RenderSchedule.Script]].\r\n */\r\n public finish(): TimelineProps {\r\n const props: TimelineProps = {};\r\n if (this.visibility?.length)\r\n props.visibilityTimeline = this.visibility;\r\n\r\n if (this.color?.length)\r\n props.colorTimeline = this.color;\r\n\r\n if (this.transform?.length)\r\n props.transformTimeline = this.transform;\r\n\r\n if (this.cuttingPlane?.length)\r\n props.cuttingPlaneTimeline = this.cuttingPlane;\r\n\r\n return props;\r\n }\r\n }\r\n\r\n /** As part of a [[RenderSchedule.ScriptBuilder]], assembles a [[RenderSchedule.ElementTimeline]].\r\n * @see [[RenderSchedule.ModelTimelineBuilder.addElementTimeline]].\r\n */\r\n export class ElementTimelineBuilder extends TimelineBuilder {\r\n /** A positive integer that uniquely identifies this timeline among all element timelines in the [[RenderSchedule.Script]].\r\n * [[RenderSchedule.ScriptBuilder]] ensures each ElementTimelineBuilder receives a unique batch Id.\r\n */\r\n public readonly batchId: number;\r\n /** The compressed set of Ids of the elements affected by this timeline. */\r\n public readonly elementIds: CompressedId64Set;\r\n\r\n /** Constructor - typically not used directly.\r\n * @see [[RenderSchedule.ModelTimelineBuilder.addElementTimeline]] to create an ElementTimelineBuilder.\r\n */\r\n public constructor(batchId: number, elementIds: CompressedId64Set) {\r\n super();\r\n this.batchId = batchId;\r\n this.elementIds = elementIds;\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.ElementTimeline]] produced by this builder.\r\n * @see [[RenderSchedule.ScriptBuilder.finish]] to obtain the JSON for the entire [[RenderSchedule.Script]].\r\n */\r\n public override finish(): ElementTimelineProps {\r\n const props = super.finish() as ElementTimelineProps;\r\n props.batchId = this.batchId;\r\n props.elementIds = this.elementIds;\r\n return props;\r\n }\r\n }\r\n\r\n /** As part of a [[RenderSchedule.ScriptBuilder, assembles a [[RenderSchedule.ModelTimeline]].\r\n * @see [[RenderSchedule.ScriptBuilder.addModelTimeline]].\r\n */\r\n export class ModelTimelineBuilder extends TimelineBuilder {\r\n /** The Id of the model affected by this timeline. */\r\n public readonly modelId: Id64String;\r\n /** @internal */\r\n public realityModelUrl?: string;\r\n private readonly _obtainNextBatchId: () => number;\r\n private readonly _elements: ElementTimelineBuilder[] = [];\r\n\r\n /** Constructor - typically not used directly.\r\n * @see [[RenderSchedule.ScriptBuilder.addModelTimeline]] to create a ModelTimelineBuilder.\r\n */\r\n public constructor(modelId: Id64String, obtainNextBatchId: () => number) {\r\n super();\r\n this.modelId = modelId;\r\n this._obtainNextBatchId = obtainNextBatchId;\r\n }\r\n\r\n /** Add a new [[RenderSchedule.ElementTimeline]] to be applied to the specified elements.\r\n * This function will sort and compress the Ids if they are not already compressed.\r\n *\r\n */\r\n public addElementTimeline(elementIds: CompressedId64Set | Iterable<Id64String>): ElementTimelineBuilder {\r\n const batchId = this._obtainNextBatchId();\r\n let ids: CompressedId64Set;\r\n\r\n // It's far too easy to accidentally pass a single Id (compiler can't help).\r\n if (typeof elementIds === \"string\" && Id64.isValidId64(elementIds))\r\n elementIds = [elementIds];\r\n\r\n if (typeof elementIds === \"string\") {\r\n // Already compressed.\r\n ids = elementIds;\r\n } else {\r\n const sorted = Array.from(elementIds);\r\n OrderedId64Iterable.sortArray(sorted);\r\n ids = CompressedId64Set.compressIds(sorted);\r\n }\r\n\r\n const builder = new ElementTimelineBuilder(batchId, ids);\r\n this._elements.push(builder);\r\n return builder;\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.ModelTimeline]] produced by this builder.\r\n * @see [[RenderSchedule.ScriptBuilder.finish]] to obtain the JSON for the entire [[RenderSchedule.Script]].\r\n */\r\n public override finish(): ModelTimelineProps {\r\n const props = super.finish() as ModelTimelineProps;\r\n props.modelId = this.modelId;\r\n if (undefined !== this.realityModelUrl)\r\n props.realityModelUrl = this.realityModelUrl;\r\n\r\n props.elementTimelines = this._elements.map((x) => x.finish());\r\n return props;\r\n }\r\n }\r\n\r\n /** Assembles the JSON representation for a new [[RenderSchedule.Script]]. Ensure that entries on any given element timeline are added chronologically. As an extremely simple example, the following code produces a script that changes the color of a single element:\r\n * ```ts\r\n * const script = new ScriptBuilder();\r\n * const model = script.addModelTimeline(\"0x123\");\r\n * const element = model.addElementTimeline([ \"0x456\" ]);\r\n * element.addColor(Date.now(), new RgbColor(0xff, 0x7f, 0));\r\n * const scriptProps = script.finish();\r\n * ```\r\n */\r\n export class ScriptBuilder {\r\n private _nextBatchId = 1;\r\n private readonly _models: ModelTimelineBuilder[] = [];\r\n\r\n /** Add a new [[RenderSchedule.ModelTimeline]] to be applied to the specified model. */\r\n public addModelTimeline(modelId: Id64String): ModelTimelineBuilder {\r\n const builder = new ModelTimelineBuilder(modelId, () => this._nextBatchId++);\r\n this._models.push(builder);\r\n return builder;\r\n }\r\n\r\n /** Obtain the JSON representation of the [[RenderSchedule.Script]] produced by this builder.\r\n * @see [RenderTimeline.scriptProps]($backend) to assign the new script to a RenderTimeline element.\r\n */\r\n public finish(): ScriptProps {\r\n return this._models.map((x) => x.finish());\r\n }\r\n }\r\n}\r\n"]}