@itwin/core-common 3.4.0-dev.1 → 3.4.0-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log - @itwin/core-common
2
2
 
3
- This log was last generated on Mon, 01 Aug 2022 13:36:56 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 09 Aug 2022 15:52:41 GMT and should not be manually modified.
4
+
5
+ ## 3.2.8
6
+ Tue, 09 Aug 2022 15:52:41 GMT
7
+
8
+ _Version update only_
4
9
 
5
10
  ## 3.2.7
6
11
  Mon, 01 Aug 2022 13:36:56 GMT
@@ -11,11 +11,11 @@ export declare namespace AmbientOcclusion {
11
11
  readonly bias?: number;
12
12
  /** If defined, if the distance in linear depth from the current sample to first sample is greater than this value, sampling stops in the current direction. If undefined, the zLengthCap defaults to 0.0025. The full range of linear depth is 0 to 1. */
13
13
  readonly zLengthCap?: number;
14
- /** If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied. If undefined, the maximum distance defaults to 100. */
14
+ /** If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied. If undefined, the maximum distance defaults to 10000. */
15
15
  readonly maxDistance?: number;
16
16
  /** If defined, raise the final ambient occlusion to the power of this value. Larger values make the ambient shadows darker. If undefined, the intensity defaults to 2.0. */
17
17
  readonly intensity?: number;
18
- /** If defined, indicates the distance to step toward the next texel sample in the current direction. If undefined, texelStepSize defaults to 1.95. */
18
+ /** If defined, indicates the texel distance to step toward the next texel sample in the current direction. For portions of geometry close to the near plane, this value will be what is used. As portions of geometry extend away from the near plane, this value will gradually reduce until it reaches a minimum value of 1.0 at the far plane. If undefined, texelStepSize defaults to 1.95. */
19
19
  readonly texelStepSize?: number;
20
20
  /** If defined, blurDelta is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurDelta defaults to 1.0. */
21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AM,CAAC,iBAAiB,CAAe;QAC/C,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAa;QACjD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAe;QAC/C,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAe;QAC/C,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAe;QAEvD,SAAgB,IAAI,EAAE,MAAM,CAAC;QAC7B,SAAgB,UAAU,EAAE,MAAM,CAAC;QACnC,SAAgB,WAAW,EAAE,MAAM,CAAC;QACpC,SAAgB,SAAS,EAAE,MAAM,CAAC;QAClC,SAAgB,aAAa,EAAE,MAAM,CAAC;QACtC,SAAgB,SAAS,EAAE,MAAM,CAAC;QAClC,SAAgB,SAAS,EAAE,MAAM,CAAC;QAClC,SAAgB,iBAAiB,EAAE,MAAM,CAAC;QAE1C,OAAO;QAcP,OAAc,QAAQ,WAAoB;eAE5B,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ;QAEvC,MAAM,IAAI,KAAK;KAYvB;CACF"}
@@ -31,20 +31,20 @@ var AmbientOcclusion;
31
31
  static fromJSON(json) { return undefined !== json ? new Settings(json) : this.defaults; }
32
32
  toJSON() {
33
33
  return {
34
- bias: this.bias,
35
- zLengthCap: this.zLengthCap,
36
- maxDistance: this.maxDistance,
37
- intensity: this.intensity,
38
- texelStepSize: this.texelStepSize,
39
- blurDelta: this.blurDelta,
40
- blurSigma: this.blurSigma,
41
- blurTexelStepSize: this.blurTexelStepSize,
34
+ bias: this.bias !== Settings._defaultBias ? this.bias : undefined,
35
+ zLengthCap: this.zLengthCap !== Settings._defaultZLengthCap ? this.zLengthCap : undefined,
36
+ maxDistance: this.maxDistance !== Settings._defaultMaxDistance ? this.maxDistance : undefined,
37
+ intensity: this.intensity !== Settings._defaultIntensity ? this.intensity : undefined,
38
+ texelStepSize: this.texelStepSize !== Settings._defaultTexelStepSize ? this.texelStepSize : undefined,
39
+ blurDelta: this.blurDelta !== Settings._defaultBlurDelta ? this.blurDelta : undefined,
40
+ blurSigma: this.blurSigma !== Settings._defaultBlurSigma ? this.blurSigma : undefined,
41
+ blurTexelStepSize: this.blurTexelStepSize !== Settings._defaultBlurTexelStepSize ? this.blurTexelStepSize : undefined,
42
42
  };
43
43
  }
44
44
  }
45
45
  Settings._defaultBias = 0.25;
46
46
  Settings._defaultZLengthCap = 0.0025;
47
- Settings._defaultMaxDistance = 100.0;
47
+ Settings._defaultMaxDistance = 10000.0;
48
48
  Settings._defaultIntensity = 1.0;
49
49
  Settings._defaultTexelStepSize = 1;
50
50
  Settings._defaultBlurDelta = 1.0;
@@ -1 +1 @@
1
- {"version":3,"file":"AmbientOcclusion.js","sourceRoot":"","sources":["../../src/AmbientOcclusion.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;GAEG;AACH,IAAiB,gBAAgB,CAwEhC;AAxED,WAAiB,gBAAgB;IAqB/B,wJAAwJ;IACxJ,MAAa,QAAQ;QAmBnB,YAAoB,IAAY;YAC9B,IAAI,SAAS,KAAK,IAAI;gBACpB,IAAI,GAAG,EAAE,CAAC;YAEZ,IAAI,CAAC,IAAI,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;YACjE,IAAI,CAAC,UAAU,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;YACnF,IAAI,CAAC,WAAW,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;YACtF,IAAI,CAAC,SAAS,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YAChF,IAAI,CAAC,aAAa,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,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CAAC,EAAE,CAAC,CAAC;IAjC/B,yBAAQ,WAiDpB,CAAA;AACH,CAAC,EAxEgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAwEhC","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 { JsonUtils } from \"@itwin/core-bentley\";\r\n\r\n/** Namespace containing types controlling how ambient occlusion should be drawn.\r\n * @public\r\n */\r\nexport namespace AmbientOcclusion {\r\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\r\n export interface Props {\r\n /** If defined, represents an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value, sampling stops in the current direction. This is used to remove shadows from near planar edges. If undefined, the bias defaults to 0.25. */\r\n readonly bias?: number;\r\n /** If defined, if the distance in linear depth from the current sample to first sample is greater than this value, sampling stops in the current direction. If undefined, the zLengthCap defaults to 0.0025. The full range of linear depth is 0 to 1. */\r\n readonly zLengthCap?: number;\r\n /** If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied. If undefined, the maximum distance defaults to 100. */\r\n readonly maxDistance?: number;\r\n /** If defined, raise the final ambient occlusion to the power of this value. Larger values make the ambient shadows darker. If undefined, the intensity defaults to 2.0. */\r\n readonly intensity?: number;\r\n /** If defined, indicates the distance to step toward the next texel sample in the current direction. If undefined, texelStepSize defaults to 1.95. */\r\n readonly texelStepSize?: number;\r\n /** If defined, blurDelta is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurDelta defaults to 1.0. */\r\n readonly blurDelta?: number;\r\n /** If defined, blurSigma is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurSigma defaults to 2.0. */\r\n readonly blurSigma?: number;\r\n /* If defined, blurTexelStepSize indicates the distance to the next texel for blurring. If undefined, blurTexelStepSize defaults to 1.0. */\r\n readonly blurTexelStepSize?: number;\r\n }\r\n\r\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\r\n export class Settings implements Props {\r\n private static _defaultBias: number = 0.25;\r\n private static _defaultZLengthCap: number = 0.0025;\r\n private static _defaultMaxDistance: number = 100.0;\r\n private static _defaultIntensity: number = 1.0;\r\n private static _defaultTexelStepSize: number = 1;\r\n private static _defaultBlurDelta: number = 1.0;\r\n private static _defaultBlurSigma: number = 2.0;\r\n private static _defaultBlurTexelStepSize: number = 1.0;\r\n\r\n public readonly bias: number;\r\n public readonly zLengthCap: number;\r\n public readonly maxDistance: number;\r\n public readonly intensity: number;\r\n public readonly texelStepSize: number;\r\n public readonly blurDelta: number;\r\n public readonly blurSigma: number;\r\n public readonly blurTexelStepSize: number;\r\n\r\n private constructor(json?: Props) {\r\n if (undefined === json)\r\n json = {};\r\n\r\n this.bias = JsonUtils.asDouble(json.bias, Settings._defaultBias);\r\n this.zLengthCap = JsonUtils.asDouble(json.zLengthCap, Settings._defaultZLengthCap);\r\n this.maxDistance = JsonUtils.asDouble(json.maxDistance, Settings._defaultMaxDistance);\r\n this.intensity = JsonUtils.asDouble(json.intensity, Settings._defaultIntensity);\r\n this.texelStepSize = JsonUtils.asDouble(json.texelStepSize, Settings._defaultTexelStepSize);\r\n this.blurDelta = JsonUtils.asDouble(json.blurDelta, Settings._defaultBlurDelta);\r\n this.blurSigma = JsonUtils.asDouble(json.blurSigma, Settings._defaultBlurSigma);\r\n this.blurTexelStepSize = JsonUtils.asDouble(json.blurTexelStepSize, Settings._defaultBlurTexelStepSize);\r\n }\r\n\r\n public static defaults = new Settings({});\r\n\r\n public static fromJSON(json?: Props): Settings { return undefined !== json ? new Settings(json) : this.defaults; }\r\n\r\n public toJSON(): Props {\r\n return {\r\n bias: this.bias,\r\n zLengthCap: this.zLengthCap,\r\n maxDistance: this.maxDistance,\r\n intensity: this.intensity,\r\n texelStepSize: this.texelStepSize,\r\n blurDelta: this.blurDelta,\r\n blurSigma: this.blurSigma,\r\n blurTexelStepSize: this.blurTexelStepSize,\r\n };\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"AmbientOcclusion.js","sourceRoot":"","sources":["../../src/AmbientOcclusion.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;GAEG;AACH,IAAiB,gBAAgB,CAwEhC;AAxED,WAAiB,gBAAgB;IAqB/B,wJAAwJ;IACxJ,MAAa,QAAQ;QAmBnB,YAAoB,IAAY;YAC9B,IAAI,SAAS,KAAK,IAAI;gBACpB,IAAI,GAAG,EAAE,CAAC;YAEZ,IAAI,CAAC,IAAI,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;YACjE,IAAI,CAAC,UAAU,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;YACnF,IAAI,CAAC,WAAW,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;YACtF,IAAI,CAAC,SAAS,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YAChF,IAAI,CAAC,aAAa,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;YAC5F,IAAI,CAAC,SAAS,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YAChF,IAAI,CAAC,SAAS,GAAG,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CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;aACtH,CAAC;QACJ,CAAC;;IA/Cc,qBAAY,GAAW,IAAI,CAAC;IAC5B,2BAAkB,GAAW,MAAM,CAAC;IACpC,4BAAmB,GAAW,OAAO,CAAC;IACtC,0BAAiB,GAAW,GAAG,CAAC;IAChC,8BAAqB,GAAW,CAAC,CAAC;IAClC,0BAAiB,GAAW,GAAG,CAAC;IAChC,0BAAiB,GAAW,GAAG,CAAC;IAChC,kCAAyB,GAAW,GAAG,CAAC;IAyBzC,iBAAQ,GAAG,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC;IAjC/B,yBAAQ,WAiDpB,CAAA;AACH,CAAC,EAxEgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAwEhC","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 { JsonUtils } from \"@itwin/core-bentley\";\r\n\r\n/** Namespace containing types controlling how ambient occlusion should be drawn.\r\n * @public\r\n */\r\nexport namespace AmbientOcclusion {\r\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\r\n export interface Props {\r\n /** If defined, represents an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value, sampling stops in the current direction. This is used to remove shadows from near planar edges. If undefined, the bias defaults to 0.25. */\r\n readonly bias?: number;\r\n /** If defined, if the distance in linear depth from the current sample to first sample is greater than this value, sampling stops in the current direction. If undefined, the zLengthCap defaults to 0.0025. The full range of linear depth is 0 to 1. */\r\n readonly zLengthCap?: number;\r\n /** If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied. If undefined, the maximum distance defaults to 10000. */\r\n readonly maxDistance?: number;\r\n /** If defined, raise the final ambient occlusion to the power of this value. Larger values make the ambient shadows darker. If undefined, the intensity defaults to 2.0. */\r\n readonly intensity?: number;\r\n /** If defined, indicates the texel distance to step toward the next texel sample in the current direction. For portions of geometry close to the near plane, this value will be what is used. As portions of geometry extend away from the near plane, this value will gradually reduce until it reaches a minimum value of 1.0 at the far plane. If undefined, texelStepSize defaults to 1.95. */\r\n readonly texelStepSize?: number;\r\n /** If defined, blurDelta is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurDelta defaults to 1.0. */\r\n readonly blurDelta?: number;\r\n /** If defined, blurSigma is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurSigma defaults to 2.0. */\r\n readonly blurSigma?: number;\r\n /* If defined, blurTexelStepSize indicates the distance to the next texel for blurring. If undefined, blurTexelStepSize defaults to 1.0. */\r\n readonly blurTexelStepSize?: number;\r\n }\r\n\r\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\r\n export class Settings implements Props {\r\n private static _defaultBias: number = 0.25;\r\n private static _defaultZLengthCap: number = 0.0025;\r\n private static _defaultMaxDistance: number = 10000.0;\r\n private static _defaultIntensity: number = 1.0;\r\n private static _defaultTexelStepSize: number = 1;\r\n private static _defaultBlurDelta: number = 1.0;\r\n private static _defaultBlurSigma: number = 2.0;\r\n private static _defaultBlurTexelStepSize: number = 1.0;\r\n\r\n public readonly bias: number;\r\n public readonly zLengthCap: number;\r\n public readonly maxDistance: number;\r\n public readonly intensity: number;\r\n public readonly texelStepSize: number;\r\n public readonly blurDelta: number;\r\n public readonly blurSigma: number;\r\n public readonly blurTexelStepSize: number;\r\n\r\n private constructor(json?: Props) {\r\n if (undefined === json)\r\n json = {};\r\n\r\n this.bias = JsonUtils.asDouble(json.bias, Settings._defaultBias);\r\n this.zLengthCap = JsonUtils.asDouble(json.zLengthCap, Settings._defaultZLengthCap);\r\n this.maxDistance = JsonUtils.asDouble(json.maxDistance, Settings._defaultMaxDistance);\r\n this.intensity = JsonUtils.asDouble(json.intensity, Settings._defaultIntensity);\r\n this.texelStepSize = JsonUtils.asDouble(json.texelStepSize, Settings._defaultTexelStepSize);\r\n this.blurDelta = JsonUtils.asDouble(json.blurDelta, Settings._defaultBlurDelta);\r\n this.blurSigma = JsonUtils.asDouble(json.blurSigma, Settings._defaultBlurSigma);\r\n this.blurTexelStepSize = JsonUtils.asDouble(json.blurTexelStepSize, Settings._defaultBlurTexelStepSize);\r\n }\r\n\r\n public static defaults = new Settings({});\r\n\r\n public static fromJSON(json?: Props): Settings { return undefined !== json ? new Settings(json) : this.defaults; }\r\n\r\n public toJSON(): Props {\r\n return {\r\n bias: this.bias !== Settings._defaultBias ? this.bias : undefined,\r\n zLengthCap: this.zLengthCap !== Settings._defaultZLengthCap ? this.zLengthCap : undefined,\r\n maxDistance: this.maxDistance !== Settings._defaultMaxDistance ? this.maxDistance : undefined,\r\n intensity: this.intensity !== Settings._defaultIntensity ? this.intensity : undefined,\r\n texelStepSize: this.texelStepSize !== Settings._defaultTexelStepSize ? this.texelStepSize : undefined,\r\n blurDelta: this.blurDelta !== Settings._defaultBlurDelta ? this.blurDelta : undefined,\r\n blurSigma: this.blurSigma !== Settings._defaultBlurSigma ? this.blurSigma : undefined,\r\n blurTexelStepSize: this.blurTexelStepSize !== Settings._defaultBlurTexelStepSize ? this.blurTexelStepSize : undefined,\r\n };\r\n }\r\n }\r\n}\r\n"]}
@@ -113,7 +113,11 @@ export declare namespace Gradient {
113
113
  * @internal
114
114
  */
115
115
  getThematicImageForRenderer(maxDimension: number): ImageBuffer;
116
- /** Applies this gradient's settings to produce a bitmap image. */
116
+ /** Applies this gradient's settings to produce a bitmap image.
117
+ * @param width Width of the image
118
+ * @param height Height of the image
119
+ * @returns Bitmap image of the specified dimensions. For thematic gradients with a width > 1, pixels in each column will be identical.
120
+ */
117
121
  getImage(width: number, height: number): ImageBuffer;
118
122
  }
119
123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAqB,MAAM,SAAS,CAAC;AACzD,OAAO,EAAqD,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAE/I;;;;GAIG;AACH,yBAAiB,QAAQ,CAAC;IACxB,4CAA4C;IAC5C,KAAY,KAAK;QACf,gBAAgB;QAChB,IAAI,IAAI;QACR,8CAA8C;QAC9C,MAAM,IAAI;QACV,2EAA2E;QAC3E,OAAO,IAAI;KACZ;IAED,+FAA+F;IAC/F,KAAY,IAAI;QACd,IAAI,IAAI;QACR,MAAM,IAAI;QACV,MAAM,IAAI;QACV,WAAW,IAAI;QACf,SAAS,IAAI;QACb,aAAa,IAAI;QACjB,4DAA4D;QAC5D,QAAQ,IAAI;KACb;IAED,mDAAmD;IACnD,UAAiB,aAAa;QAC5B,iEAAiE;QACjE,KAAK,EAAE,MAAM,CAAC;QACd,qCAAqC;QACrC,KAAK,EAAE,aAAa,CAAC;KACtB;IAED;;OAEG;IACH,MAAa,QAAQ;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,QAAQ,CAAC;oBACJ,IAAI,EAAE,aAAa;KAIvC;IAED,wEAAwE;IACxE,SAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAEhE;IAED,+EAA+E;IAC/E,UAAiB,SAAS;QACxB,gGA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AC,KAAK,EAAE,MAAM;QAqC7B,IAAW,eAAe,IAAI,OAAO,CAOpC;QAED,kEAAkE;QAClE,IAAW,UAAU,IAAI,OAAO,CAA+C;QAE/E;;;;WAIG;QACI,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW;QAsDrE;;;;WAIG;QACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW;KAiJ5D;CACF"}
@@ -283,13 +283,12 @@ var Gradient;
283
283
  (0, core_bentley_1.assert)(undefined !== imageBuffer);
284
284
  return imageBuffer;
285
285
  }
286
- /** Applies this gradient's settings to produce a bitmap image. */
286
+ /** Applies this gradient's settings to produce a bitmap image.
287
+ * @param width Width of the image
288
+ * @param height Height of the image
289
+ * @returns Bitmap image of the specified dimensions. For thematic gradients with a width > 1, pixels in each column will be identical.
290
+ */
287
291
  getImage(width, height) {
288
- if (this.mode === Mode.Thematic) {
289
- // Allow caller to pass in height but not width. Thematic gradients are always one-dimensional.
290
- // NB: The height used to be hardcoded to 8192 here. Now we will let the render system decide.
291
- width = 1; // Force width to 1 for thematic gradients.
292
- }
293
292
  const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;
294
293
  const cosA = Math.cos(thisAngle);
295
294
  const sinA = Math.sin(thisAngle);
@@ -402,25 +401,20 @@ var Gradient;
402
401
  for (let j = 0; j < height; j++) {
403
402
  let f = 1 - j / height;
404
403
  let color;
405
- if (f < ThematicDisplay_1.ThematicGradientSettings.margin || f > ThematicDisplay_1.ThematicGradientSettings.contentMax) {
406
- color = settings.marginColor;
407
- }
408
- else {
409
- f = (f - ThematicDisplay_1.ThematicGradientSettings.margin) / (ThematicDisplay_1.ThematicGradientSettings.contentRange);
410
- switch (settings.mode) {
411
- case ThematicDisplay_1.ThematicGradientMode.SteppedWithDelimiter:
412
- case ThematicDisplay_1.ThematicGradientMode.IsoLines:
413
- case ThematicDisplay_1.ThematicGradientMode.Stepped: {
414
- if (settings.stepCount > 1) {
415
- const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
416
- color = this.mapColor(fStep);
417
- }
418
- break;
404
+ f = (f - ThematicDisplay_1.ThematicGradientSettings.margin) / (ThematicDisplay_1.ThematicGradientSettings.contentRange);
405
+ switch (settings.mode) {
406
+ case ThematicDisplay_1.ThematicGradientMode.SteppedWithDelimiter:
407
+ case ThematicDisplay_1.ThematicGradientMode.IsoLines:
408
+ case ThematicDisplay_1.ThematicGradientMode.Stepped: {
409
+ if (settings.stepCount > 1) {
410
+ const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
411
+ color = this.mapColor(fStep);
419
412
  }
420
- case ThematicDisplay_1.ThematicGradientMode.Smooth:
421
- color = this.mapColor(f);
422
- break;
413
+ break;
423
414
  }
415
+ case ThematicDisplay_1.ThematicGradientMode.Smooth:
416
+ color = this.mapColor(f);
417
+ break;
424
418
  }
425
419
  for (let i = 0; i < width; i++) {
426
420
  image[currentIdx--] = color.getAlpha();
@@ -1 +1 @@
1
- {"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,IAAiB,QAAQ,CAmexB;AAneD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ,CAAA;QACR,mCAAU,CAAA;QACV,mCAAU,CAAA;QACV,6CAAe,CAAA;QACf,yCAAa,CAAA;QACb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,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,0DAA0D;KACzL,CAAC;IACa,qBAAgB,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAjC5D,aAAI,OA4ZhB,CAAA;AACH,CAAC,EAnegB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAmexB","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 Symbology\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\r\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\r\n\r\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\r\n * @see [[GeometryParams]]\r\n * @see [[GraphicParams]]\r\n * @public\r\n */\r\nexport namespace Gradient {\r\n /** Flags applied to a [[Gradient.Symb]]. */\r\n export enum Flags {\r\n /** No flags. */\r\n None = 0,\r\n /** Reverse the order of the gradient keys. */\r\n Invert = 1,\r\n /** Draw an outline around the surface to which the gradient is applied. */\r\n Outline = 2,\r\n }\r\n\r\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\r\n export enum Mode {\r\n None = 0,\r\n Linear = 1,\r\n Curved = 2,\r\n Cylindrical = 3,\r\n Spherical = 4,\r\n Hemispherical = 5,\r\n /** For a gradient created based for [[ThematicDisplay]]. */\r\n Thematic = 6,\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair */\r\n export interface KeyColorProps {\r\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\r\n value: number;\r\n /** Color value for given fraction */\r\n color: ColorDefProps;\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair\r\n * @see [[Gradient.KeyColorProps]]\r\n */\r\n export class KeyColor {\r\n public value: number;\r\n public color: ColorDef;\r\n public constructor(json: KeyColorProps) {\r\n this.value = json.value;\r\n this.color = ColorDef.fromJSON(json.color);\r\n }\r\n }\r\n\r\n /** Compare two KeyColor objects for equality. Returns true if equal. */\r\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\r\n return (a.value === b.value) && a.color.equals(b.color);\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position */\r\n export interface SymbProps {\r\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\r\n mode: Mode;\r\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\r\n flags?: Flags;\r\n /** Gradient rotation angle, 0.0 if undefined */\r\n angle?: AngleProps;\r\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\r\n tint?: number;\r\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\r\n shift?: number;\r\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\r\n keys: KeyColorProps[];\r\n /** Settings applicable to [[ThematicDisplay]]. */\r\n thematicSettings?: ThematicGradientSettingsProps;\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position.\r\n * Gradient fill can be applied to planar regions.\r\n * @see [[Gradient.SymbProps]]\r\n */\r\n export class Symb {\r\n public mode = Mode.None;\r\n public flags: Flags = Flags.None;\r\n public angle?: Angle;\r\n public tint?: number;\r\n public shift: number = 0;\r\n public thematicSettings?: ThematicGradientSettings;\r\n public keys: KeyColor[] = [];\r\n\r\n /** create a GradientSymb from a json object. */\r\n public static fromJSON(json?: SymbProps) {\r\n const result = new Symb();\r\n if (!json)\r\n return result;\r\n result.mode = json.mode;\r\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\r\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\r\n result.tint = json.tint;\r\n result.shift = json.shift ? json.shift : 0;\r\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\r\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\r\n\r\n return result;\r\n }\r\n\r\n private static _fixedSchemeKeys = [\r\n // NB: these color values are ordered as rbg. Note how the components are applied below.\r\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\r\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\r\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\r\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\r\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\r\n ];\r\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\r\n\r\n /** Create for [[ThematicDisplay]]. */\r\n public static createThematic(settings: ThematicGradientSettings) {\r\n const result = new Symb();\r\n result.mode = Mode.Thematic;\r\n result.thematicSettings = settings;\r\n\r\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\r\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\r\n } else { // custom color scheme; must use custom keys\r\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\r\n if (settings.customKeys.length > 1) {\r\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\r\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\r\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n public toJSON(): SymbProps {\r\n return {\r\n ...this,\r\n thematicSettings: this.thematicSettings?.toJSON(),\r\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\r\n };\r\n }\r\n\r\n public clone(): Symb {\r\n return Symb.fromJSON(this.toJSON());\r\n }\r\n\r\n /** Returns true if this symbology is equal to another, false otherwise. */\r\n public equals(other: Symb): boolean {\r\n return Symb.compareSymb(this, other) === 0;\r\n }\r\n\r\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\r\n * @param lhs First gradient to compare\r\n * @param rhs Second gradient to compare\r\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\r\n */\r\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\r\n if (lhs === rhs)\r\n return 0; // Same pointer\r\n if (lhs.mode !== rhs.mode)\r\n return lhs.mode - rhs.mode;\r\n if (lhs.flags !== rhs.flags)\r\n if (lhs.flags === undefined)\r\n return -1;\r\n else if (rhs.flags === undefined)\r\n return 1;\r\n else\r\n return lhs.flags - rhs.flags;\r\n if (lhs.tint !== rhs.tint)\r\n if (lhs.tint === undefined)\r\n return -1;\r\n else if (rhs.tint === undefined)\r\n return 1;\r\n else\r\n return lhs.tint - rhs.tint;\r\n if (lhs.shift !== rhs.shift)\r\n if (lhs.shift === undefined)\r\n return -1;\r\n else if (rhs.shift === undefined)\r\n return 1;\r\n else\r\n return lhs.shift - rhs.shift;\r\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\r\n if (lhs.angle === undefined)\r\n return -1;\r\n else\r\n return 1;\r\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\r\n return lhs.angle.radians - rhs.angle!.radians;\r\n if (lhs.keys.length !== rhs.keys.length)\r\n return lhs.keys.length - rhs.keys.length;\r\n for (let i = 0; i < lhs.keys.length; i++) {\r\n if (lhs.keys[i].value !== rhs.keys[i].value)\r\n return lhs.keys[i].value - rhs.keys[i].value;\r\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\r\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\r\n }\r\n if (lhs.thematicSettings !== rhs.thematicSettings)\r\n if (undefined === lhs.thematicSettings)\r\n return -1;\r\n else if (undefined === rhs.thematicSettings)\r\n return 1;\r\n else {\r\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\r\n if (0 !== thematicCompareResult)\r\n return thematicCompareResult;\r\n }\r\n return 0;\r\n }\r\n\r\n /** Compare this symbology to another.\r\n * @see [[Gradient.Symb.compareSymb]]\r\n */\r\n public compare(other: Symb): number {\r\n return Gradient.Symb.compareSymb(this, other);\r\n }\r\n\r\n /**\r\n * Ensure the value given is within the range of 0 to 255,\r\n * and truncate the value to only the 8 least significant bits.\r\n */\r\n private roundToByte(num: number): number {\r\n return Math.min(num + .5, 255.0) & 0xFF;\r\n }\r\n\r\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\r\n public mapColor(value: number) {\r\n if (value < 0)\r\n value = 0;\r\n else if (value > 1)\r\n value = 1;\r\n\r\n if ((this.flags & Flags.Invert) !== 0)\r\n value = 1 - value;\r\n\r\n let idx = 0;\r\n let d;\r\n let w0;\r\n let w1;\r\n if (this.keys.length <= 2) {\r\n w0 = 1.0 - value;\r\n w1 = value;\r\n } else { // locate value in map, blend corresponding colors\r\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\r\n idx++;\r\n\r\n d = this.keys[idx + 1].value - this.keys[idx].value;\r\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\r\n w0 = 1.0 - w1;\r\n }\r\n\r\n const color0 = this.keys[idx].color;\r\n const color1 = this.keys[idx + 1].color;\r\n const colors0 = color0.colors;\r\n const colors1 = color1.colors;\r\n const red = w0 * colors0.r + w1 * colors1.r;\r\n const green = w0 * colors0.g + w1 * colors1.g;\r\n const blue = w0 * colors0.b + w1 * colors1.b;\r\n const transparency = w0 * colors0.t + w1 * colors1.t;\r\n\r\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\r\n }\r\n\r\n public get hasTranslucency(): boolean {\r\n for (const key of this.keys) {\r\n if (!key.color.isOpaque)\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\r\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\r\n\r\n /** This function (for internal use only) provides the WebGL renderer with a thematic image that its shaders\r\n * can use properly with various thematic rendering techniques.\r\n * If you want a regular gradient image, use the method [[Gradient.Symb.getImage]].\r\n * @internal\r\n */\r\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\r\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\r\n\r\n let settings = this.thematicSettings;\r\n if (settings === undefined) {\r\n settings = ThematicGradientSettings.defaults;\r\n }\r\n\r\n const stepCount = Math.min(settings.stepCount, maxDimension);\r\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\r\n const image = new Uint8Array(1 * dimension * 4);\r\n let currentIdx = image.length - 1;\r\n\r\n function addColor(color: ColorDef) {\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n\r\n switch (settings.mode) {\r\n case ThematicGradientMode.Smooth: {\r\n for (let j = 0; j < dimension; j++) {\r\n const f = (1 - j / (dimension));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n // The work to generate the delimiter lines and isolines is done completely in the shader.\r\n // Therefore, we just fall through here and use a regular stepped gradient.\r\n case ThematicGradientMode.Stepped: {\r\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\r\n for (let j = 0; j < dimension; j++) {\r\n // If we use Smooth's approach to generate the gradient...\r\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\r\n // We really want these values: 0 .25 .5 .75 1\r\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\r\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\r\n const f = (1 - j / (dimension - 1));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n\r\n /** Applies this gradient's settings to produce a bitmap image. */\r\n public getImage(width: number, height: number): ImageBuffer {\r\n if (this.mode === Mode.Thematic) {\r\n // Allow caller to pass in height but not width. Thematic gradients are always one-dimensional.\r\n // NB: The height used to be hardcoded to 8192 here. Now we will let the render system decide.\r\n width = 1; // Force width to 1 for thematic gradients.\r\n }\r\n\r\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\r\n const cosA = Math.cos(thisAngle);\r\n const sinA = Math.sin(thisAngle);\r\n const image = new Uint8Array(width * height * 4);\r\n let currentIdx = image.length - 1;\r\n const shift = Math.min(1.0, Math.abs(this.shift));\r\n\r\n switch (this.mode) {\r\n case Mode.Linear:\r\n case Mode.Cylindrical: {\r\n const xs = 0.5 - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.25 * shift * sinA;\r\n let dMax;\r\n let dMin = dMax = 0.0;\r\n let d;\r\n for (let j = 0; j < 2; j++) {\r\n for (let i = 0; i < 2; i++) {\r\n d = (i - xs) * cosA + (j - ys) * sinA;\r\n if (d < dMin)\r\n dMin = d;\r\n if (d > dMax)\r\n dMax = d;\r\n }\r\n }\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n d = x * cosA + y * sinA;\r\n let f;\r\n if (this.mode === Mode.Linear) {\r\n if (d > 0)\r\n f = 0.5 + 0.5 * d / dMax;\r\n else\r\n f = 0.5 - 0.5 * d / dMin;\r\n } else {\r\n if (d > 0)\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\r\n else\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\r\n }\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Curved: {\r\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const xr = 0.8 * (x * cosA + y * sinA);\r\n const yr = y * cosA - x * sinA;\r\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Spherical: {\r\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\r\n const xs = 0.5 * shift * (cosA + sinA) * r;\r\n const ys = 0.5 * shift * (sinA - cosA) * r;\r\n for (let j = 0; j < height; j++) {\r\n const y = ys + j / height - 0.5;\r\n for (let i = 0; i < width; i++) {\r\n const x = xs + i / width - 0.5;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Hemispherical: {\r\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Thematic: {\r\n let settings = this.thematicSettings;\r\n if (settings === undefined) {\r\n settings = ThematicGradientSettings.defaults;\r\n }\r\n\r\n for (let j = 0; j < height; j++) {\r\n let f = 1 - j / height;\r\n let color: ColorDef;\r\n\r\n if (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax) {\r\n color = settings.marginColor;\r\n } else {\r\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\r\n switch (settings.mode) {\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n case ThematicGradientMode.Stepped: {\r\n if (settings.stepCount > 1) {\r\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\r\n color = this.mapColor(fStep);\r\n }\r\n break;\r\n }\r\n case ThematicGradientMode.Smooth:\r\n color = this.mapColor(f);\r\n break;\r\n }\r\n }\r\n for (let i = 0; i < width; i++) {\r\n image[currentIdx--] = color!.getAlpha();\r\n image[currentIdx--] = color!.colors.b;\r\n image[currentIdx--] = color!.colors.g;\r\n image[currentIdx--] = color!.colors.r;\r\n }\r\n }\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,IAAiB,QAAQ,CA6dxB;AA7dD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ,CAAA;QACR,mCAAU,CAAA;QACV,mCAAU,CAAA;QACV,6CAAe,CAAA;QACf,yCAAa,CAAA;QACb,iDAAiB,CAAA;QACjB,4DAA4D;QAC5D,uCAAY,CAAA;IACd,CAAC,EATW,IAAI,GAAJ,aAAI,KAAJ,aAAI,QASf;IAUD;;OAEG;IACH,MAAa,QAAQ;QAGnB,YAAmB,IAAmB;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,CAAC,KAAK,GAAG,mBAAQ,CAAC,QA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CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QAChG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QACjE,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,0DAA0D;KACzL,CAAC;IACa,qBAAgB,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAjC5D,aAAI,OAsZhB,CAAA;AACH,CAAC,EA7dgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6dxB","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 Symbology\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\r\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\r\n\r\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\r\n * @see [[GeometryParams]]\r\n * @see [[GraphicParams]]\r\n * @public\r\n */\r\nexport namespace Gradient {\r\n /** Flags applied to a [[Gradient.Symb]]. */\r\n export enum Flags {\r\n /** No flags. */\r\n None = 0,\r\n /** Reverse the order of the gradient keys. */\r\n Invert = 1,\r\n /** Draw an outline around the surface to which the gradient is applied. */\r\n Outline = 2,\r\n }\r\n\r\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\r\n export enum Mode {\r\n None = 0,\r\n Linear = 1,\r\n Curved = 2,\r\n Cylindrical = 3,\r\n Spherical = 4,\r\n Hemispherical = 5,\r\n /** For a gradient created based for [[ThematicDisplay]]. */\r\n Thematic = 6,\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair */\r\n export interface KeyColorProps {\r\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\r\n value: number;\r\n /** Color value for given fraction */\r\n color: ColorDefProps;\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair\r\n * @see [[Gradient.KeyColorProps]]\r\n */\r\n export class KeyColor {\r\n public value: number;\r\n public color: ColorDef;\r\n public constructor(json: KeyColorProps) {\r\n this.value = json.value;\r\n this.color = ColorDef.fromJSON(json.color);\r\n }\r\n }\r\n\r\n /** Compare two KeyColor objects for equality. Returns true if equal. */\r\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\r\n return (a.value === b.value) && a.color.equals(b.color);\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position */\r\n export interface SymbProps {\r\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\r\n mode: Mode;\r\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\r\n flags?: Flags;\r\n /** Gradient rotation angle, 0.0 if undefined */\r\n angle?: AngleProps;\r\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\r\n tint?: number;\r\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\r\n shift?: number;\r\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\r\n keys: KeyColorProps[];\r\n /** Settings applicable to [[ThematicDisplay]]. */\r\n thematicSettings?: ThematicGradientSettingsProps;\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position.\r\n * Gradient fill can be applied to planar regions.\r\n * @see [[Gradient.SymbProps]]\r\n */\r\n export class Symb {\r\n public mode = Mode.None;\r\n public flags: Flags = Flags.None;\r\n public angle?: Angle;\r\n public tint?: number;\r\n public shift: number = 0;\r\n public thematicSettings?: ThematicGradientSettings;\r\n public keys: KeyColor[] = [];\r\n\r\n /** create a GradientSymb from a json object. */\r\n public static fromJSON(json?: SymbProps) {\r\n const result = new Symb();\r\n if (!json)\r\n return result;\r\n result.mode = json.mode;\r\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\r\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\r\n result.tint = json.tint;\r\n result.shift = json.shift ? json.shift : 0;\r\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\r\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\r\n\r\n return result;\r\n }\r\n\r\n private static _fixedSchemeKeys = [\r\n // NB: these color values are ordered as rbg. Note how the components are applied below.\r\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\r\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\r\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\r\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\r\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\r\n ];\r\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\r\n\r\n /** Create for [[ThematicDisplay]]. */\r\n public static createThematic(settings: ThematicGradientSettings) {\r\n const result = new Symb();\r\n result.mode = Mode.Thematic;\r\n result.thematicSettings = settings;\r\n\r\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\r\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\r\n } else { // custom color scheme; must use custom keys\r\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\r\n if (settings.customKeys.length > 1) {\r\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\r\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\r\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n public toJSON(): SymbProps {\r\n return {\r\n ...this,\r\n thematicSettings: this.thematicSettings?.toJSON(),\r\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\r\n };\r\n }\r\n\r\n public clone(): Symb {\r\n return Symb.fromJSON(this.toJSON());\r\n }\r\n\r\n /** Returns true if this symbology is equal to another, false otherwise. */\r\n public equals(other: Symb): boolean {\r\n return Symb.compareSymb(this, other) === 0;\r\n }\r\n\r\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\r\n * @param lhs First gradient to compare\r\n * @param rhs Second gradient to compare\r\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\r\n */\r\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\r\n if (lhs === rhs)\r\n return 0; // Same pointer\r\n if (lhs.mode !== rhs.mode)\r\n return lhs.mode - rhs.mode;\r\n if (lhs.flags !== rhs.flags)\r\n if (lhs.flags === undefined)\r\n return -1;\r\n else if (rhs.flags === undefined)\r\n return 1;\r\n else\r\n return lhs.flags - rhs.flags;\r\n if (lhs.tint !== rhs.tint)\r\n if (lhs.tint === undefined)\r\n return -1;\r\n else if (rhs.tint === undefined)\r\n return 1;\r\n else\r\n return lhs.tint - rhs.tint;\r\n if (lhs.shift !== rhs.shift)\r\n if (lhs.shift === undefined)\r\n return -1;\r\n else if (rhs.shift === undefined)\r\n return 1;\r\n else\r\n return lhs.shift - rhs.shift;\r\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\r\n if (lhs.angle === undefined)\r\n return -1;\r\n else\r\n return 1;\r\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\r\n return lhs.angle.radians - rhs.angle!.radians;\r\n if (lhs.keys.length !== rhs.keys.length)\r\n return lhs.keys.length - rhs.keys.length;\r\n for (let i = 0; i < lhs.keys.length; i++) {\r\n if (lhs.keys[i].value !== rhs.keys[i].value)\r\n return lhs.keys[i].value - rhs.keys[i].value;\r\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\r\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\r\n }\r\n if (lhs.thematicSettings !== rhs.thematicSettings)\r\n if (undefined === lhs.thematicSettings)\r\n return -1;\r\n else if (undefined === rhs.thematicSettings)\r\n return 1;\r\n else {\r\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\r\n if (0 !== thematicCompareResult)\r\n return thematicCompareResult;\r\n }\r\n return 0;\r\n }\r\n\r\n /** Compare this symbology to another.\r\n * @see [[Gradient.Symb.compareSymb]]\r\n */\r\n public compare(other: Symb): number {\r\n return Gradient.Symb.compareSymb(this, other);\r\n }\r\n\r\n /**\r\n * Ensure the value given is within the range of 0 to 255,\r\n * and truncate the value to only the 8 least significant bits.\r\n */\r\n private roundToByte(num: number): number {\r\n return Math.min(num + .5, 255.0) & 0xFF;\r\n }\r\n\r\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\r\n public mapColor(value: number) {\r\n if (value < 0)\r\n value = 0;\r\n else if (value > 1)\r\n value = 1;\r\n\r\n if ((this.flags & Flags.Invert) !== 0)\r\n value = 1 - value;\r\n\r\n let idx = 0;\r\n let d;\r\n let w0;\r\n let w1;\r\n if (this.keys.length <= 2) {\r\n w0 = 1.0 - value;\r\n w1 = value;\r\n } else { // locate value in map, blend corresponding colors\r\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\r\n idx++;\r\n\r\n d = this.keys[idx + 1].value - this.keys[idx].value;\r\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\r\n w0 = 1.0 - w1;\r\n }\r\n\r\n const color0 = this.keys[idx].color;\r\n const color1 = this.keys[idx + 1].color;\r\n const colors0 = color0.colors;\r\n const colors1 = color1.colors;\r\n const red = w0 * colors0.r + w1 * colors1.r;\r\n const green = w0 * colors0.g + w1 * colors1.g;\r\n const blue = w0 * colors0.b + w1 * colors1.b;\r\n const transparency = w0 * colors0.t + w1 * colors1.t;\r\n\r\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\r\n }\r\n\r\n public get hasTranslucency(): boolean {\r\n for (const key of this.keys) {\r\n if (!key.color.isOpaque)\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\r\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\r\n\r\n /** This function (for internal use only) provides the WebGL renderer with a thematic image that its shaders\r\n * can use properly with various thematic rendering techniques.\r\n * If you want a regular gradient image, use the method [[Gradient.Symb.getImage]].\r\n * @internal\r\n */\r\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\r\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\r\n\r\n let settings = this.thematicSettings;\r\n if (settings === undefined) {\r\n settings = ThematicGradientSettings.defaults;\r\n }\r\n\r\n const stepCount = Math.min(settings.stepCount, maxDimension);\r\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\r\n const image = new Uint8Array(1 * dimension * 4);\r\n let currentIdx = image.length - 1;\r\n\r\n function addColor(color: ColorDef) {\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n\r\n switch (settings.mode) {\r\n case ThematicGradientMode.Smooth: {\r\n for (let j = 0; j < dimension; j++) {\r\n const f = (1 - j / (dimension));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n // The work to generate the delimiter lines and isolines is done completely in the shader.\r\n // Therefore, we just fall through here and use a regular stepped gradient.\r\n case ThematicGradientMode.Stepped: {\r\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\r\n for (let j = 0; j < dimension; j++) {\r\n // If we use Smooth's approach to generate the gradient...\r\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\r\n // We really want these values: 0 .25 .5 .75 1\r\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\r\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\r\n const f = (1 - j / (dimension - 1));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n\r\n /** Applies this gradient's settings to produce a bitmap image.\r\n * @param width Width of the image\r\n * @param height Height of the image\r\n * @returns Bitmap image of the specified dimensions. For thematic gradients with a width > 1, pixels in each column will be identical.\r\n */\r\n public getImage(width: number, height: number): ImageBuffer {\r\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\r\n const cosA = Math.cos(thisAngle);\r\n const sinA = Math.sin(thisAngle);\r\n const image = new Uint8Array(width * height * 4);\r\n let currentIdx = image.length - 1;\r\n const shift = Math.min(1.0, Math.abs(this.shift));\r\n\r\n switch (this.mode) {\r\n case Mode.Linear:\r\n case Mode.Cylindrical: {\r\n const xs = 0.5 - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.25 * shift * sinA;\r\n let dMax;\r\n let dMin = dMax = 0.0;\r\n let d;\r\n for (let j = 0; j < 2; j++) {\r\n for (let i = 0; i < 2; i++) {\r\n d = (i - xs) * cosA + (j - ys) * sinA;\r\n if (d < dMin)\r\n dMin = d;\r\n if (d > dMax)\r\n dMax = d;\r\n }\r\n }\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n d = x * cosA + y * sinA;\r\n let f;\r\n if (this.mode === Mode.Linear) {\r\n if (d > 0)\r\n f = 0.5 + 0.5 * d / dMax;\r\n else\r\n f = 0.5 - 0.5 * d / dMin;\r\n } else {\r\n if (d > 0)\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\r\n else\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\r\n }\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Curved: {\r\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const xr = 0.8 * (x * cosA + y * sinA);\r\n const yr = y * cosA - x * sinA;\r\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Spherical: {\r\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\r\n const xs = 0.5 * shift * (cosA + sinA) * r;\r\n const ys = 0.5 * shift * (sinA - cosA) * r;\r\n for (let j = 0; j < height; j++) {\r\n const y = ys + j / height - 0.5;\r\n for (let i = 0; i < width; i++) {\r\n const x = xs + i / width - 0.5;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Hemispherical: {\r\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Thematic: {\r\n let settings = this.thematicSettings;\r\n if (settings === undefined) {\r\n settings = ThematicGradientSettings.defaults;\r\n }\r\n\r\n for (let j = 0; j < height; j++) {\r\n let f = 1 - j / height;\r\n let color: ColorDef;\r\n\r\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\r\n switch (settings.mode) {\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n case ThematicGradientMode.Stepped: {\r\n if (settings.stepCount > 1) {\r\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\r\n color = this.mapColor(fStep);\r\n }\r\n break;\r\n }\r\n case ThematicGradientMode.Smooth:\r\n color = this.mapColor(f);\r\n break;\r\n }\r\n for (let i = 0; i < width; i++) {\r\n image[currentIdx--] = color!.getAlpha();\r\n image[currentIdx--] = color!.colors.b;\r\n image[currentIdx--] = color!.colors.g;\r\n image[currentIdx--] = color!.colors.r;\r\n }\r\n }\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n }\r\n}\r\n"]}
@@ -39,7 +39,7 @@ export interface CustomViewState3dCreatorOptions {
39
39
  modelIds?: CompressedId64Set;
40
40
  }
41
41
  /**
42
- * A result row from querying for subcategories during hydrateViewState
42
+ * A result row from querying for subcategories
43
43
  * @internal
44
44
  */
45
45
  export interface SubCategoryResultRow {
@@ -54,6 +54,7 @@ export interface SubCategoryResultRow {
54
54
  export interface HydrateViewStateRequestProps {
55
55
  acsId?: string;
56
56
  notLoadedModelSelectorStateModels?: CompressedId64Set;
57
+ /** @deprecated If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/
57
58
  notLoadedCategoryIds?: CompressedId64Set;
58
59
  sheetViewAttachmentIds?: CompressedId64Set;
59
60
  viewStateLoadProps?: ViewStateLoadProps;
@@ -70,6 +71,7 @@ export interface HydrateViewStateResponseProps {
70
71
  sheetViewViews?: (ViewStateProps | undefined)[];
71
72
  baseModelProps?: ModelProps;
72
73
  spatialViewProps?: ViewStateProps;
74
+ /** @deprecated If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/
73
75
  categoryIdsResult?: SubCategoryResultRow[];
74
76
  }
75
77
  /** Returned from [IModelDb.Views.getViewStateData]($backend).
@@ -1 +1 @@
1
- {"version":3,"file":"ViewProps.d.ts","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC9H,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,8EAA8E;IAC9E,WAAW,EAAE,UAAU,CAAC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,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,qCAAqC;IACrC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,gBAAgB;IAChB,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,kBAAkB;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,iBAAiB;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories during hydrateViewState\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewattachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: Id64String;\r\n displayStyleId: Id64String;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: Id64String;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n"]}
1
+ {"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n /** @deprecated If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewattachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n /** @deprecated If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: Id64String;\r\n displayStyleId: Id64String;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: Id64String;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module RpcInterface
3
3
  */
4
- import { GuidString, Id64String } from "@itwin/core-bentley";
4
+ import { CompressedId64Set, GuidString, Id64String } from "@itwin/core-bentley";
5
5
  import { Range3dProps } from "@itwin/core-geometry";
6
6
  import { CodeProps } from "../Code";
7
7
  import { DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse } from "../ConcurrentQuery";
@@ -17,7 +17,7 @@ import { ModelProps } from "../ModelProps";
17
17
  import { RpcInterface } from "../RpcInterface";
18
18
  import { SnapRequestProps, SnapResponseProps } from "../Snapping";
19
19
  import { TextureData, TextureLoadProps } from "../TextureProps";
20
- import { CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ViewStateLoadProps, ViewStateProps } from "../ViewProps";
20
+ import { CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, SubCategoryResultRow, ViewStateLoadProps, ViewStateProps } from "../ViewProps";
21
21
  import { RpcNotFoundResponse } from "./core/RpcControl";
22
22
  import { RpcRoutingToken } from "./core/RpcRoutingToken";
23
23
  /** Response if the IModelDb was not found at the backend
@@ -44,6 +44,7 @@ export declare abstract class IModelReadRpcInterface extends RpcInterface {
44
44
  static interfaceVersion: string;
45
45
  getConnectionProps(_iModelToken: IModelRpcOpenProps): Promise<IModelConnectionProps>;
46
46
  queryRows(_iModelToken: IModelRpcProps, _request: DbQueryRequest): Promise<DbQueryResponse>;
47
+ querySubCategories(_iModelToken: IModelRpcProps, _categoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]>;
47
48
  queryBlob(_iModelToken: IModelRpcProps, _request: DbBlobRequest): Promise<DbBlobResponse>;
48
49
  getModelProps(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelProps[]>;
49
50
  queryModelRanges(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<Range3dProps[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelReadRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/rpc/IModelReadRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGpG,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,iBAAiB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kB,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;CAGvL"}
@@ -47,6 +47,7 @@ class IModelReadRpcInterface extends RpcInterface_1.RpcInterface {
47
47
  ===========================================================================================*/
48
48
  async getConnectionProps(_iModelToken) { return this.forward(arguments); }
49
49
  async queryRows(_iModelToken, _request) { return this.forward(arguments); }
50
+ async querySubCategories(_iModelToken, _categoryIds) { return this.forward(arguments); }
50
51
  async queryBlob(_iModelToken, _request) { return this.forward(arguments); }
51
52
  async getModelProps(_iModelToken, _modelIds) { return this.forward(arguments); }
52
53
  async queryModelRanges(_iModelToken, _modelIds) { return this.forward(arguments); }
@@ -84,6 +85,9 @@ IModelReadRpcInterface.interfaceVersion = "3.2.0";
84
85
  __decorate([
85
86
  RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
86
87
  ], IModelReadRpcInterface.prototype, "getConnectionProps", null);
88
+ __decorate([
89
+ RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
90
+ ], IModelReadRpcInterface.prototype, "querySubCategories", null);
87
91
  __decorate([
88
92
  RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
89
93
  ], IModelReadRpcInterface.prototype, "getModelProps", null);