@itwin/core-common 5.2.0-dev.5 → 5.2.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.
Files changed (153) hide show
  1. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  2. package/lib/cjs/AnalysisStyle.js +2 -0
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/BlobReader.d.ts.map +1 -1
  5. package/lib/cjs/BlobReader.js +10 -2
  6. package/lib/cjs/BlobReader.js.map +1 -1
  7. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  8. package/lib/cjs/DisplayStyleSettings.js +1 -1
  9. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  10. package/lib/cjs/ECSqlTypes.js +1 -1
  11. package/lib/cjs/ECSqlTypes.js.map +1 -1
  12. package/lib/cjs/FeatureIndex.d.ts.map +1 -1
  13. package/lib/cjs/FeatureIndex.js +2 -1
  14. package/lib/cjs/FeatureIndex.js.map +1 -1
  15. package/lib/cjs/GeometryParams.d.ts.map +1 -1
  16. package/lib/cjs/GeometryParams.js +6 -0
  17. package/lib/cjs/GeometryParams.js.map +1 -1
  18. package/lib/cjs/Gradient.d.ts.map +1 -1
  19. package/lib/cjs/Gradient.js +5 -0
  20. package/lib/cjs/Gradient.js.map +1 -1
  21. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  22. package/lib/cjs/HiddenLine.js +4 -1
  23. package/lib/cjs/HiddenLine.js.map +1 -1
  24. package/lib/cjs/IModel.d.ts.map +1 -1
  25. package/lib/cjs/IModel.js +7 -7
  26. package/lib/cjs/IModel.js.map +1 -1
  27. package/lib/cjs/Localization.d.ts.map +1 -1
  28. package/lib/cjs/Localization.js +3 -0
  29. package/lib/cjs/Localization.js.map +1 -1
  30. package/lib/cjs/TextureMapping.js +2 -2
  31. package/lib/cjs/TextureMapping.js.map +1 -1
  32. package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
  33. package/lib/cjs/ThematicDisplay.js +3 -1
  34. package/lib/cjs/ThematicDisplay.js.map +1 -1
  35. package/lib/cjs/Tween.d.ts +1 -1
  36. package/lib/cjs/Tween.d.ts.map +1 -1
  37. package/lib/cjs/Tween.js +4 -2
  38. package/lib/cjs/Tween.js.map +1 -1
  39. package/lib/cjs/geometry/AdditionalTransform.d.ts.map +1 -1
  40. package/lib/cjs/geometry/AdditionalTransform.js +1 -0
  41. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  42. package/lib/cjs/geometry/AreaPattern.d.ts.map +1 -1
  43. package/lib/cjs/geometry/AreaPattern.js +13 -0
  44. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  45. package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
  46. package/lib/cjs/geometry/CoordinateReferenceSystem.js +7 -0
  47. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  48. package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
  49. package/lib/cjs/geometry/ElementGeometry.js +19 -10
  50. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  51. package/lib/cjs/geometry/ElementGeometryFB.d.ts.map +1 -1
  52. package/lib/cjs/geometry/ElementGeometryFB.js +1 -0
  53. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  54. package/lib/cjs/geometry/GeodeticDatum.d.ts.map +1 -1
  55. package/lib/cjs/geometry/GeodeticDatum.js +7 -0
  56. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  57. package/lib/cjs/geometry/GeometryStream.d.ts.map +1 -1
  58. package/lib/cjs/geometry/GeometryStream.js +2 -2
  59. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  60. package/lib/cjs/geometry/LineStyle.d.ts.map +1 -1
  61. package/lib/cjs/geometry/LineStyle.js +3 -0
  62. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  63. package/lib/cjs/geometry/Placement.d.ts.map +1 -1
  64. package/lib/cjs/geometry/Placement.js +1 -1
  65. package/lib/cjs/geometry/Placement.js.map +1 -1
  66. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -1
  67. package/lib/cjs/internal/PackedFeatureTable.js +1 -1
  68. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  69. package/lib/cjs/rpc/core/RpcConfiguration.d.ts +0 -3
  70. package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
  71. package/lib/cjs/rpc/core/RpcConfiguration.js +10 -2
  72. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  73. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -1
  74. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  75. package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
  76. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  77. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  78. package/lib/esm/AnalysisStyle.js +2 -0
  79. package/lib/esm/AnalysisStyle.js.map +1 -1
  80. package/lib/esm/BlobReader.d.ts.map +1 -1
  81. package/lib/esm/BlobReader.js +10 -2
  82. package/lib/esm/BlobReader.js.map +1 -1
  83. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  84. package/lib/esm/DisplayStyleSettings.js +2 -2
  85. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  86. package/lib/esm/ECSqlTypes.js +1 -1
  87. package/lib/esm/ECSqlTypes.js.map +1 -1
  88. package/lib/esm/FeatureIndex.d.ts.map +1 -1
  89. package/lib/esm/FeatureIndex.js +2 -1
  90. package/lib/esm/FeatureIndex.js.map +1 -1
  91. package/lib/esm/GeometryParams.d.ts.map +1 -1
  92. package/lib/esm/GeometryParams.js +6 -0
  93. package/lib/esm/GeometryParams.js.map +1 -1
  94. package/lib/esm/Gradient.d.ts.map +1 -1
  95. package/lib/esm/Gradient.js +5 -0
  96. package/lib/esm/Gradient.js.map +1 -1
  97. package/lib/esm/HiddenLine.d.ts.map +1 -1
  98. package/lib/esm/HiddenLine.js +4 -1
  99. package/lib/esm/HiddenLine.js.map +1 -1
  100. package/lib/esm/IModel.d.ts.map +1 -1
  101. package/lib/esm/IModel.js +8 -8
  102. package/lib/esm/IModel.js.map +1 -1
  103. package/lib/esm/Localization.d.ts.map +1 -1
  104. package/lib/esm/Localization.js +3 -0
  105. package/lib/esm/Localization.js.map +1 -1
  106. package/lib/esm/TextureMapping.js +3 -3
  107. package/lib/esm/TextureMapping.js.map +1 -1
  108. package/lib/esm/ThematicDisplay.d.ts.map +1 -1
  109. package/lib/esm/ThematicDisplay.js +3 -1
  110. package/lib/esm/ThematicDisplay.js.map +1 -1
  111. package/lib/esm/Tween.d.ts +1 -1
  112. package/lib/esm/Tween.d.ts.map +1 -1
  113. package/lib/esm/Tween.js +4 -2
  114. package/lib/esm/Tween.js.map +1 -1
  115. package/lib/esm/geometry/AdditionalTransform.d.ts.map +1 -1
  116. package/lib/esm/geometry/AdditionalTransform.js +1 -0
  117. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  118. package/lib/esm/geometry/AreaPattern.d.ts.map +1 -1
  119. package/lib/esm/geometry/AreaPattern.js +13 -0
  120. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  121. package/lib/esm/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
  122. package/lib/esm/geometry/CoordinateReferenceSystem.js +7 -0
  123. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  124. package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
  125. package/lib/esm/geometry/ElementGeometry.js +20 -11
  126. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  127. package/lib/esm/geometry/ElementGeometryFB.d.ts.map +1 -1
  128. package/lib/esm/geometry/ElementGeometryFB.js +1 -0
  129. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  130. package/lib/esm/geometry/GeodeticDatum.d.ts.map +1 -1
  131. package/lib/esm/geometry/GeodeticDatum.js +7 -0
  132. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  133. package/lib/esm/geometry/GeometryStream.d.ts.map +1 -1
  134. package/lib/esm/geometry/GeometryStream.js +3 -3
  135. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  136. package/lib/esm/geometry/LineStyle.d.ts.map +1 -1
  137. package/lib/esm/geometry/LineStyle.js +3 -0
  138. package/lib/esm/geometry/LineStyle.js.map +1 -1
  139. package/lib/esm/geometry/Placement.d.ts.map +1 -1
  140. package/lib/esm/geometry/Placement.js +2 -2
  141. package/lib/esm/geometry/Placement.js.map +1 -1
  142. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -1
  143. package/lib/esm/internal/PackedFeatureTable.js +2 -2
  144. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  145. package/lib/esm/rpc/core/RpcConfiguration.d.ts +0 -3
  146. package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
  147. package/lib/esm/rpc/core/RpcConfiguration.js +10 -2
  148. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  149. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -1
  150. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  151. package/lib/esm/rpc/web/WebAppRpcRequest.js +2 -2
  152. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  153. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ECSqlTypes.js","sourceRoot":"","sources":["../../src/ECSqlTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAN,IAAY,cAkBX;AAlBD,WAAY,cAAc;IACxB,qFAAqF;IACrF,mDAAQ,CAAA;IACR,yDAAW,CAAA;IACX,2DAAY,CAAA;IACZ,uDAAU,CAAA;IACV,2DAAY,CAAA;IACZ,+CAAM,CAAA;IACN,iDAAO,CAAA;IACP,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UAAU,CAAC;YACpB,KAAK,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,kBAAkB;gBACzC,OAAO,UAAU,CAAC;YACpB,KAAK,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,oBAAoB;gBAC3C,OAAO,cAAc,CAAC;YACxB,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb;gBACE,MAAM,IAAI,KAAK,CAAC,0CAA0C,kBAAkB,GAAG,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,IAAY,IAAY,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1G","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ECSQL\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\n\n/** Describes the different data types an ECSQL value can be of.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport enum ECSqlValueType {\n // do not change the values of the enum as it must match its counterpart in the addon\n Blob = 1,\n Boolean = 2,\n DateTime = 3,\n Double = 4,\n Geometry = 5,\n Id = 6,\n Int = 7,\n Int64 = 8,\n Point2d = 9,\n Point3d = 10,\n String = 11,\n Navigation = 12,\n Struct = 13,\n PrimitiveArray = 14,\n StructArray = 15,\n Guid = 16,\n}\n\n/** An ECSQL Navigation value.\n * It is returned from ECSQL SELECT statements for navigation properties.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport interface NavigationValue {\n /** ECInstanceId of the related instance */\n id: Id64String;\n /** Fully qualified class name of the relationship backing the Navigation property */\n relClassName?: string;\n}\n\n/** An ECSQL Navigation value which can be bound to a navigation property ECSQL parameter\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport interface NavigationBindingValue {\n /** ECInstanceId of the related instance */\n id: Id64String;\n /** Fully qualified class name of the relationship backing the Navigation property */\n relClassName?: string;\n /** Table space where the relationship's schema is persisted. This is only required\n * if other ECDb files are attached to the primary one. In case a schema exists in more than one of the files,\n * pass the table space to disambiguate.\n */\n relClassTableSpace?: string;\n}\n\n/** Equivalent of the ECEnumeration OpCode in the **ECDbChange** ECSchema.\n * The enum can be used when programmatically binding values to the InstanceChange.OpCode property of\n * the ECDbChange ECSchema.\n *\n * See also\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\n * @public\n * @extensions\n */\nexport enum ChangeOpCode {\n Insert = 1,\n Update = 2,\n Delete = 4,\n}\n\n/** The enum represents the values for the ChangedValueState argument of the ECSQL function **Changes**.\n * The enum can be used when programmatically binding values to the ChangedValueState argument\n * in an ECSQL using the **Changes** ECSQL function.\n *\n * See also\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\n * @public\n * @extensions\n */\nexport enum ChangedValueState {\n AfterInsert = 1,\n BeforeUpdate = 2,\n AfterUpdate = 3,\n BeforeDelete = 4,\n}\n\n/** Defines the ECSQL system properties.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport enum ECSqlSystemProperty {\n ECInstanceId,\n ECClassId,\n SourceECInstanceId,\n SourceECClassId,\n TargetECInstanceId,\n TargetECClassId,\n NavigationId,\n NavigationRelClassId,\n PointX,\n PointY,\n PointZ,\n}\n\n/** Utility to format ECProperty names according to the iTwin.js formatting rules.\n * See also [ECSQL Row Format]($docs/learning/ECSQLRowFormat).\n * @public\n */\nexport class ECJsNames {\n\n /** Formats the specified ECProperty name according to the iTwin.js formatting rules.\n *\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\n *\n * @param ecProperty Property name as defined in the ECSchema for regular ECProperties\n * or the name of an ECSQL system properties\n * @param isSystemProperty if omitted, the method will try to find out whether the given property\n * is a system property or not. If true is specified, the method will throw if the property name\n * is not a known system property. If false is specified, the method will not attempt to recognize\n * the property name as system property.\n */\n public static toJsName(propName: string, isSystemProperty?: boolean) {\n assert(propName !== undefined, \"propName must not be undefined\");\n\n const propTypeUnknown: boolean = isSystemProperty === undefined || isSystemProperty === null;\n\n const accessStringTokens: string[] = propName.split(\".\");\n const tokenCount: number = accessStringTokens.length;\n assert(tokenCount > 0);\n\n if (tokenCount === 1) {\n if (propTypeUnknown || isSystemProperty!) {\n if (propName === \"ECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECInstanceId);\n\n if (propName === \"ECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECClassId);\n\n if (propName === \"SourceECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECInstanceId);\n\n if (propName === \"TargetECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECInstanceId);\n\n if (propName === \"SourceECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECClassId);\n\n if (propName === \"TargetECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECClassId);\n\n return ECJsNames.lowerFirstChar(propName);\n }\n\n return ECJsNames.lowerFirstChar(propName);\n }\n\n // parse access string and convert the leaf tokens if they are system props\n // The first char of the access string is lowered.\n let jsName: string = ECJsNames.lowerFirstChar(`${accessStringTokens[0]}.`);\n for (let j = 1; j < tokenCount - 1; j++) {\n jsName += `${accessStringTokens[j]}.`;\n }\n\n const leafToken: string = accessStringTokens[tokenCount - 1];\n\n if (propTypeUnknown || isSystemProperty!) {\n if (leafToken === \"Id\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationId);\n else if (leafToken === \"RelECClassId\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationRelClassId);\n else if (leafToken === \"X\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointX);\n else if (leafToken === \"Y\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointY);\n else if (leafToken === \"Z\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointZ);\n else if (propTypeUnknown)\n jsName += ECJsNames.lowerFirstChar(leafToken);\n else\n throw new Error(`Property ${leafToken} of access string ${propName} is no ECSQL system property.`);\n } else\n jsName += leafToken;\n\n return jsName;\n }\n\n /** Returns the name of the specified ECSQL system property according to the\n * iTwin.js formatting rules.\n *\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\n * @param systemPropertyType System property type\n */\n public static systemPropertyToJsName(systemPropertyType: ECSqlSystemProperty): string {\n switch (systemPropertyType) {\n case ECSqlSystemProperty.ECInstanceId:\n case ECSqlSystemProperty.NavigationId:\n return \"id\";\n case ECSqlSystemProperty.ECClassId:\n return \"className\";\n case ECSqlSystemProperty.SourceECInstanceId:\n return \"sourceId\";\n case ECSqlSystemProperty.SourceECClassId:\n return \"sourceClassName\";\n case ECSqlSystemProperty.TargetECInstanceId:\n return \"targetId\";\n case ECSqlSystemProperty.TargetECClassId:\n return \"targetClassName\";\n case ECSqlSystemProperty.NavigationRelClassId:\n return \"relClassName\";\n case ECSqlSystemProperty.PointX:\n return \"x\";\n case ECSqlSystemProperty.PointY:\n return \"y\";\n case ECSqlSystemProperty.PointZ:\n return \"z\";\n default:\n throw new Error(`Unknown ECSqlSystemProperty enum value ${systemPropertyType}.`);\n }\n }\n\n private static lowerFirstChar(name: string): string { return name[0].toLowerCase() + name.substring(1); }\n}\n"]}
1
+ {"version":3,"file":"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;YACC,MAAM,IAAI,SAAS,CAAC;QAEtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,sBAAsB,CAAC,kBAAuC;QAC1E,QAAQ,kBAAkB,EAAE,CAAC;YAC3B,KAAK,mBAAmB,CAAC,YAAY,CAAC;YACtC,KAAK,mBAAmB,CAAC,YAAY;gBACnC,OAAO,IAAI,CAAC;YACd,KAAK,mBAAmB,CAAC,SAAS;gBAChC,OAAO,WAAW,CAAC;YACrB,KAAK,mBAAmB,CAAC,kBAAkB;gBACzC,OAAO,UAAU,CAAC;YACpB,KAAK,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,kBAAkB;gBACzC,OAAO,UAAU,CAAC;YACpB,KAAK,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,oBAAoB;gBAC3C,OAAO,cAAc,CAAC;YACxB,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb;gBACE,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,IAAY,IAAY,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1G","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ECSQL\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\n\n/** Describes the different data types an ECSQL value can be of.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport enum ECSqlValueType {\n // do not change the values of the enum as it must match its counterpart in the addon\n Blob = 1,\n Boolean = 2,\n DateTime = 3,\n Double = 4,\n Geometry = 5,\n Id = 6,\n Int = 7,\n Int64 = 8,\n Point2d = 9,\n Point3d = 10,\n String = 11,\n Navigation = 12,\n Struct = 13,\n PrimitiveArray = 14,\n StructArray = 15,\n Guid = 16,\n}\n\n/** An ECSQL Navigation value.\n * It is returned from ECSQL SELECT statements for navigation properties.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport interface NavigationValue {\n /** ECInstanceId of the related instance */\n id: Id64String;\n /** Fully qualified class name of the relationship backing the Navigation property */\n relClassName?: string;\n}\n\n/** An ECSQL Navigation value which can be bound to a navigation property ECSQL parameter\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport interface NavigationBindingValue {\n /** ECInstanceId of the related instance */\n id: Id64String;\n /** Fully qualified class name of the relationship backing the Navigation property */\n relClassName?: string;\n /** Table space where the relationship's schema is persisted. This is only required\n * if other ECDb files are attached to the primary one. In case a schema exists in more than one of the files,\n * pass the table space to disambiguate.\n */\n relClassTableSpace?: string;\n}\n\n/** Equivalent of the ECEnumeration OpCode in the **ECDbChange** ECSchema.\n * The enum can be used when programmatically binding values to the InstanceChange.OpCode property of\n * the ECDbChange ECSchema.\n *\n * See also\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\n * @public\n * @extensions\n */\nexport enum ChangeOpCode {\n Insert = 1,\n Update = 2,\n Delete = 4,\n}\n\n/** The enum represents the values for the ChangedValueState argument of the ECSQL function **Changes**.\n * The enum can be used when programmatically binding values to the ChangedValueState argument\n * in an ECSQL using the **Changes** ECSQL function.\n *\n * See also\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\n * @public\n * @extensions\n */\nexport enum ChangedValueState {\n AfterInsert = 1,\n BeforeUpdate = 2,\n AfterUpdate = 3,\n BeforeDelete = 4,\n}\n\n/** Defines the ECSQL system properties.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport enum ECSqlSystemProperty {\n ECInstanceId,\n ECClassId,\n SourceECInstanceId,\n SourceECClassId,\n TargetECInstanceId,\n TargetECClassId,\n NavigationId,\n NavigationRelClassId,\n PointX,\n PointY,\n PointZ,\n}\n\n/** Utility to format ECProperty names according to the iTwin.js formatting rules.\n * See also [ECSQL Row Format]($docs/learning/ECSQLRowFormat).\n * @public\n */\nexport class ECJsNames {\n\n /** Formats the specified ECProperty name according to the iTwin.js formatting rules.\n *\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\n *\n * @param ecProperty Property name as defined in the ECSchema for regular ECProperties\n * or the name of an ECSQL system properties\n * @param isSystemProperty if omitted, the method will try to find out whether the given property\n * is a system property or not. If true is specified, the method will throw if the property name\n * is not a known system property. If false is specified, the method will not attempt to recognize\n * the property name as system property.\n */\n public static toJsName(propName: string, isSystemProperty?: boolean) {\n assert(propName !== undefined, \"propName must not be undefined\");\n\n const propTypeUnknown: boolean = isSystemProperty === undefined || isSystemProperty === null;\n\n const accessStringTokens: string[] = propName.split(\".\");\n const tokenCount: number = accessStringTokens.length;\n assert(tokenCount > 0);\n\n if (tokenCount === 1) {\n if (propTypeUnknown || isSystemProperty) {\n if (propName === \"ECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECInstanceId);\n\n if (propName === \"ECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECClassId);\n\n if (propName === \"SourceECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECInstanceId);\n\n if (propName === \"TargetECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECInstanceId);\n\n if (propName === \"SourceECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECClassId);\n\n if (propName === \"TargetECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECClassId);\n\n return ECJsNames.lowerFirstChar(propName);\n }\n\n return ECJsNames.lowerFirstChar(propName);\n }\n\n // parse access string and convert the leaf tokens if they are system props\n // The first char of the access string is lowered.\n let jsName: string = ECJsNames.lowerFirstChar(`${accessStringTokens[0]}.`);\n for (let j = 1; j < tokenCount - 1; j++) {\n jsName += `${accessStringTokens[j]}.`;\n }\n\n const leafToken: string = accessStringTokens[tokenCount - 1];\n\n if (propTypeUnknown || isSystemProperty) {\n if (leafToken === \"Id\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationId);\n else if (leafToken === \"RelECClassId\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationRelClassId);\n else if (leafToken === \"X\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointX);\n else if (leafToken === \"Y\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointY);\n else if (leafToken === \"Z\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointZ);\n else if (propTypeUnknown)\n jsName += ECJsNames.lowerFirstChar(leafToken);\n else\n throw new Error(`Property ${leafToken} of access string ${propName} is no ECSQL system property.`);\n } else\n jsName += leafToken;\n\n return jsName;\n }\n\n /** Returns the name of the specified ECSQL system property according to the\n * iTwin.js formatting rules.\n *\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\n * @param systemPropertyType System property type\n */\n public static systemPropertyToJsName(systemPropertyType: ECSqlSystemProperty): string {\n switch (systemPropertyType) {\n case ECSqlSystemProperty.ECInstanceId:\n case ECSqlSystemProperty.NavigationId:\n return \"id\";\n case ECSqlSystemProperty.ECClassId:\n return \"className\";\n case ECSqlSystemProperty.SourceECInstanceId:\n return \"sourceId\";\n case ECSqlSystemProperty.SourceECClassId:\n return \"sourceClassName\";\n case ECSqlSystemProperty.TargetECInstanceId:\n return \"targetId\";\n case ECSqlSystemProperty.TargetECClassId:\n return \"targetClassName\";\n case ECSqlSystemProperty.NavigationRelClassId:\n return \"relClassName\";\n case ECSqlSystemProperty.PointX:\n return \"x\";\n case ECSqlSystemProperty.PointY:\n return \"y\";\n case ECSqlSystemProperty.PointZ:\n return \"z\";\n default:\n throw new Error(`Unknown ECSqlSystemProperty enum value ${String(systemPropertyType)}.`);\n }\n }\n\n private static lowerFirstChar(name: string): string { return name[0].toLowerCase() + name.substring(1); }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureIndex.d.ts","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,qBAAa,eAAe;IAC1B,uFAAuF;IACvF,SAAgB,MAAM,EAAE,WAAW,CAAC;IACpC,qFAAqF;IACrF,SAAgB,OAAO,EAAE,WAAW,CAAC;IACrC;;OAEG;IACH,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAElC;;;;OAIG;gBACgB,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO;CAK7E;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAA6B;IAE3C,4DAA4D;IAC5D,IAAW,QAAQ,YAAoC;IACvD,2FAA2F;IAC3F,IAAW,SAAS,YAA8C;IAClE,0CAA0C;IAC1C,IAAW,SAAS,IAAI,MAAM,CAAgE;IAE9F,kEAAkE;;IAGlE,yDAAyD;IAClD,KAAK;IAEZ,oHAAoH;IACpH,IAAW,OAAO,IAAI,QAAQ,GAAG,SAAS,CAEzC;IAED,6DAA6D;IACtD,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM;IAI3C,4FAA4F;IAC5F,IAAW,UAAU,IAAI,eAAe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M,CAAgE;IAE9F,kEAAkE;;IAGlE,yDAAyD;IAClD,KAAK;IAEZ,oHAAoH;IACpH,IAAW,OAAO,IAAI,QAAQ,GAAG,SAAS,CAEzC;IAED,6DAA6D;IACtD,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM;IAI3C,4FAA4F;IAC5F,IAAW,UAAU,IAAI,eAAe,GAAG,SAAS,CAEnD;IAED;;;;OAIG;IACI,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO;CAGhF;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,qDAAqD;IACrD,KAAK,IAAA;IACL,6DAA6D;IAC7D,OAAO,IAAA;IACP,+DAA+D;IAC/D,UAAU,IAAA;CACX;AAED;;;;GAIG;AACH,qBAAa,YAAY;IACvB,sFAAsF;IAC/E,IAAI,EAAE,gBAAgB,CAA0B;IAEvD,iFAAiF;IAC1E,SAAS,EAAE,MAAM,CAAK;IAC7B,oIAAoI;IAC7H,UAAU,CAAC,EAAE,WAAW,CAAC;IAEhC,wDAAwD;IACxD,IAAW,SAAS,IAAI,OAAO,CAAmD;IAElF,sDAAsD;IACtD,IAAW,OAAO,IAAI,OAAO,CAAiD;IAE9E,+BAA+B;IACxB,KAAK,IAAI,IAAI;CAKrB"}
@@ -42,8 +42,9 @@ export class ColorIndex {
42
42
  get hasAlpha() { return !this._color.isOpaque; }
43
43
  /** Whether this index specifies a single uniform color for the entire mesh or polyline. */
44
44
  get isUniform() { return this._color instanceof ColorDef; }
45
+ // Note: this.nonUniform will always return a value if this.isUniform is false.
45
46
  /** The number of colors in this index. */
46
- get numColors() { return this.isUniform ? 1 : this.nonUniform.colors.length; }
47
+ get numColors() { return this.isUniform ? 1 : this.nonUniform.colors.length; } // eslint-disable-line @typescript-eslint/no-non-null-assertion
47
48
  /** Construct a default index specifying a uniform white color. */
48
49
  constructor() { this._color = ColorDef.white; }
49
50
  /** Reset this index to specify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AC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,KAAK;QACV,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\n * than zero, all of them must have a transparency greater than zero.\n * @public\n */\nexport class NonUniformColor {\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\n public readonly colors: Uint32Array;\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\n public readonly indices: Uint16Array;\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\n * the colors have a transparency greater than zero.\n */\n public readonly isOpaque: boolean;\n\n /** Constructor.\n * @param colors See [[colors]].\n * @param indices See [[indices]]\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this.colors = new Uint32Array(colors.buffer);\n this.indices = Uint16Array.from(indices);\n this.isOpaque = !hasAlpha;\n }\n}\n\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\n * @public\n */\nexport class ColorIndex {\n private _color: ColorDef | NonUniformColor;\n\n /** Whether the color(s) in this index have transparency. */\n public get hasAlpha() { return !this._color.isOpaque; }\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\n public get isUniform() { return this._color instanceof ColorDef; }\n /** The number of colors in this index. */\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; }\n\n /** Construct a default index specifying a uniform white color. */\n public constructor() { this._color = ColorDef.white; }\n\n /** Reset this index to specify a uniform white color. */\n public reset() { this._color = ColorDef.white; }\n\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\n public get uniform(): ColorDef | undefined {\n return this.isUniform ? this._color as ColorDef : undefined;\n }\n\n /** Set the specified color to be applied to all vertices. */\n public initUniform(color: ColorDef | number) {\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\n }\n\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\n public get nonUniform(): NonUniformColor | undefined {\n return !this.isUniform ? this._color as NonUniformColor : undefined;\n }\n\n /** Set the per-vertex colors.\n * @param colors See [[NonUniformColor.colors]].\n * @param indices See [[NonUniformColor.indices]].\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this._color = new NonUniformColor(colors, indices, hasAlpha);\n }\n}\n\n/** Describes the type of a [[FeatureIndex]].\n * @public\n */\nexport enum FeatureIndexType {\n /** Indicates that the index contains no features. */\n Empty,\n /** Indicates that the index contains exactly one feature. */\n Uniform,\n /** Indicates that the index contains more than one feature. */\n NonUniform,\n}\n\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\n * @public\n */\nexport class FeatureIndex {\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\n public type: FeatureIndexType = FeatureIndexType.Empty;\n\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\n public featureID: number = 0;\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\n public featureIDs?: Uint32Array;\n\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\n\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\n\n /** Reset to an empty index. */\n public reset(): void {\n this.type = FeatureIndexType.Empty;\n this.featureID = 0;\n this.featureIDs = undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAC1B,uFAAuF;IACvE,MAAM,CAAc;IACpC,qFAAqF;IACrE,OAAO,CAAc;IACrC;;OAEG;IACa,QAAQ,CAAU;IAElC;;;;OAIG;IACH,YAAmB,MAAmB,EAAE,OAAiB,EAAE,QAAiB;QAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAA6B;IAE3C,4DAA4D;IAC5D,IAAW,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,2FAA2F;IAC3F,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,MAAM,YAAY,QAAQ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Z,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B;AAED;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACvB,sFAAsF;IAC/E,IAAI,GAAqB,gBAAgB,CAAC,KAAK,CAAC;IAEvD,iFAAiF;IAC1E,SAAS,GAAW,CAAC,CAAC;IAC7B,oIAAoI;IAC7H,UAAU,CAAe;IAEhC,wDAAwD;IACxD,IAAW,SAAS,KAAc,OAAO,gBAAgB,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAElF,sDAAsD;IACtD,IAAW,OAAO,KAAc,OAAO,gBAAgB,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,KAAK;QACV,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\n * than zero, all of them must have a transparency greater than zero.\n * @public\n */\nexport class NonUniformColor {\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\n public readonly colors: Uint32Array;\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\n public readonly indices: Uint16Array;\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\n * the colors have a transparency greater than zero.\n */\n public readonly isOpaque: boolean;\n\n /** Constructor.\n * @param colors See [[colors]].\n * @param indices See [[indices]]\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this.colors = new Uint32Array(colors.buffer);\n this.indices = Uint16Array.from(indices);\n this.isOpaque = !hasAlpha;\n }\n}\n\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\n * @public\n */\nexport class ColorIndex {\n private _color: ColorDef | NonUniformColor;\n\n /** Whether the color(s) in this index have transparency. */\n public get hasAlpha() { return !this._color.isOpaque; }\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\n public get isUniform() { return this._color instanceof ColorDef; }\n // Note: this.nonUniform will always return a value if this.isUniform is false.\n /** The number of colors in this index. */\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n /** Construct a default index specifying a uniform white color. */\n public constructor() { this._color = ColorDef.white; }\n\n /** Reset this index to specify a uniform white color. */\n public reset() { this._color = ColorDef.white; }\n\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\n public get uniform(): ColorDef | undefined {\n return this.isUniform ? this._color as ColorDef : undefined;\n }\n\n /** Set the specified color to be applied to all vertices. */\n public initUniform(color: ColorDef | number) {\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\n }\n\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\n public get nonUniform(): NonUniformColor | undefined {\n return !this.isUniform ? this._color as NonUniformColor : undefined;\n }\n\n /** Set the per-vertex colors.\n * @param colors See [[NonUniformColor.colors]].\n * @param indices See [[NonUniformColor.indices]].\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this._color = new NonUniformColor(colors, indices, hasAlpha);\n }\n}\n\n/** Describes the type of a [[FeatureIndex]].\n * @public\n */\nexport enum FeatureIndexType {\n /** Indicates that the index contains no features. */\n Empty,\n /** Indicates that the index contains exactly one feature. */\n Uniform,\n /** Indicates that the index contains more than one feature. */\n NonUniform,\n}\n\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\n * @public\n */\nexport class FeatureIndex {\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\n public type: FeatureIndexType = FeatureIndexType.Empty;\n\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\n public featureID: number = 0;\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\n public featureIDs?: Uint32Array;\n\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\n\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\n\n /** Reset to an empty index. */\n public reset(): void {\n this.type = FeatureIndexType.Empty;\n this.featureID = 0;\n this.featureIDs = undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryParams.d.ts","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO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aAAa;IA9D/D;;OAEG;IACI,UAAU,CAAC,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACI,WAAW,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACI,MAAM,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACI,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC5B;;;OAGG;IACI,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC5B;;OAEG;IACI,cAAc,CAAC,EAAE,cAAc,CAAC;IACvC;;;OAGG;IACI,WAAW,CAAC,EAAE,WAAW,CAAC;IACjC;;;OAGG;IACI,eAAe,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACI,aAAa,CAAC,EAAE,aAAa,CAAC;IACrC;;OAEG;IACI,SAAS,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAClC;;OAEG;IACI,QAAQ,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;IAChC;;OAEG;IACI,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAEpC;;;;OAIG;gBACgB,UAAU,EAAE,UAAU,EAAS,aAAa,SAAe;IAKvE,KAAK,IAAI,cAAc;IAkB9B,wGAAwG;IACjG,eAAe;IAgBtB,6JAA6J;IACtJ,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;IAoEnD,oLAAoL;IAC7K,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,wBAAwB,UAAO;IAO5E,gHAAgH;IACzG,gBAAgB,CAAC,aAAa,EAAE,UAAU,EAAE,wBAAwB,UAAO;CAKnF"}
@@ -180,16 +180,19 @@ export class GeometryParams {
180
180
  return false;
181
181
  if ((this.lineColor === undefined) !== (other.lineColor === undefined))
182
182
  return false;
183
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
183
184
  if (this.lineColor && !this.lineColor.equals(other.lineColor))
184
185
  return false;
185
186
  if (this.weight !== other.weight)
186
187
  return false;
187
188
  if ((this.materialId === undefined) !== (other.materialId === undefined))
188
189
  return false;
190
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
189
191
  if (this.materialId && this.materialId !== other.materialId)
190
192
  return false;
191
193
  if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))
192
194
  return false;
195
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
193
196
  if (this.styleInfo && !this.styleInfo.equals(other.styleInfo))
194
197
  return false;
195
198
  if (this.fillDisplay !== other.fillDisplay)
@@ -197,6 +200,7 @@ export class GeometryParams {
197
200
  if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {
198
201
  if ((this.gradient === undefined) !== (other.gradient === undefined))
199
202
  return false;
203
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
200
204
  if (this.gradient && !this.gradient.equals(other.gradient))
201
205
  return false;
202
206
  if (this.backgroundFill !== other.backgroundFill)
@@ -204,12 +208,14 @@ export class GeometryParams {
204
208
  if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {
205
209
  if ((this.fillColor === undefined) !== (other.fillColor === undefined))
206
210
  return false;
211
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
207
212
  if (this.fillColor && !this.fillColor.equals(other.fillColor))
208
213
  return false;
209
214
  }
210
215
  }
211
216
  if ((this.pattern === undefined) !== (other.pattern === undefined))
212
217
  return false;
218
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
213
219
  if (this.pattern && !this.pattern.equals(other.pattern))
214
220
  return false;
215
221
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryParams.js","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAKvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,WAWX;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AK,CAAC,cAAc;gBAC9C,OAAO,KAAK,CAAC;YACf,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,IAAI,EAAE,CAAC;gBACrF,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC;oBACpE,OAAO,KAAK,CAAC;gBACf,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAU,CAAC;oBAC5D,OAAO,KAAK,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAQ,CAAC;YACtD,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oLAAoL;IAC7K,aAAa,CAAC,UAAsB,EAAE,wBAAwB,GAAG,IAAI;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,gHAAgH;IACzG,gBAAgB,CAAC,aAAyB,EAAE,wBAAwB,GAAG,IAAI;QAChF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\nimport { AreaPattern } from \"./geometry/AreaPattern\";\nimport { LineStyle } from \"./geometry/LineStyle\";\nimport { Gradient } from \"./Gradient\";\nimport { IModel } from \"./IModel\";\n\n/** Whether a closed region should be drawn for wireframe display with its internal area filled or not.\n * @public\n * @extensions\n */\nexport enum FillDisplay {\n /** don't fill, even if fill attribute is on for the viewport */\n Never = 0,\n /** fill if the fill attribute is on for the viewport */\n ByView = 1,\n /** always fill, even if the fill attribute is off for the viewport */\n Always = 2,\n /** always fill, fill will always be behind other geometry belonging to the same element.\n * @note Edge geometry is not produced for shapes with this fill type. If you want an outline, add it as separate geometry.\n */\n Blanking = 3,\n}\n\n/** Describes how a view's background color affects the interior area of a closed region.\n * @public\n * @extensions\n */\nexport enum BackgroundFill {\n /** single color fill uses the fill color and line color to draw either a solid or outline fill */\n None = 0,\n /** single color fill uses the view's background color to draw a solid fill */\n Solid = 1,\n /** single color fill uses the view's background color and line color to draw an outline fill */\n Outline = 2,\n}\n\n/** Categorizes a piece of geometry within a GeometryStream. Visibility of classes of geometry can be toggled\n * within a view using [[ViewFlags]].\n * @see [[GeometryStreamProps]].\n * @see [[Feature]].\n * @public\n * @extensions\n */\nexport enum GeometryClass {\n /** Used to classify the \"real\" geometry within a model. Most geometry falls within this class. */\n Primary = 0,\n /** Used to classify geometry used as a drawing aid in constructing the Primary geometry. For example, grid lines. */\n Construction = 1,\n /** Used to classify annotations which dimension (measure) the Primary geometry. */\n Dimension = 2,\n /** Used to classify geometry used to fill planar regions with a 2d pattern (e.g., hatch lines). */\n Pattern = 3,\n}\n\n/** Describes the display properties of graphics in a persistent element's GeometryStream that aren't inherited from [[SubCategoryAppearance]].\n * @see [[GeometryStreamProps]].\n * @public\n */\nexport class GeometryParams {\n /** Optional render material to override [[SubCategoryAppearance.materialId]].\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.materialId]] with no material.\n */\n public materialId?: Id64String;\n /** Optional display priority added to [[SubCategoryAppearance.priority]].\n * The net display priority value is used to control z ordering when drawing to 2d views.\n */\n public elmPriority?: number;\n /** Optional line weight to override [[SubCategoryAppearance.weight]].\n * The weight is an integer in the range of [0,31] that by default corresponds to a pixel width of weight+1.\n */\n public weight?: number;\n /** Optional line color to override [[SubCategoryAppearance.color]].\n * The transparency component is ignored and should instead be specified using [[elmTransparency]].\n */\n public lineColor?: ColorDef;\n /** Optional fill color for region interiors. Set the same as [[lineColor]] for an opaque fill.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]], [[gradient]] is undefined, and [[backgroundFill]] is [[BackgroundFill.None]].\n * The transparency component is ignored and should instead be specified using [[fillTransparency]].\n */\n public fillColor?: ColorDef;\n /** Optional fill using the current view background color for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]] and [[gradient]] is undefined. Default is [[BackgroundFill.None]].\n */\n public backgroundFill?: BackgroundFill;\n /** Optional fill specification that determines when and if a region interior will display using [[gradient]], [[backgroundFill]], or [[fillColor]] in that order of preference.\n * Fill only applies to [[RenderMode.Wireframe]] views. In a [[RenderMode.SmoothShade]] or [[RenderMode.SolidFill]] view, regions will always display as surfaces preferring [[fillColor]] when present over [[lineColor]].\n * Default is [[FillDisplay.Never]].\n */\n public fillDisplay?: FillDisplay;\n /** Optional line color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent element on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque and 1.0 for completely transparent.\n */\n public elmTransparency?: number;\n /** Optional fill color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent fill on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque, 1.0 for completely transparent, or leave undefined to use [[elmTransparency]].\n */\n public fillTransparency?: number;\n /** Optional geometry classification that can be toggled off with a [[ViewFlags]] independent of [[SubCategoryAppearance.invisible]].\n * Default is [[GeometryClass.Primary]].\n */\n public geometryClass?: GeometryClass;\n /** Optional line style to override [[SubCategoryAppearance.styleId]] plus modifiers to override the line style definition.\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.styleId]] with a solid line.\n */\n public styleInfo?: LineStyle.Info;\n /** Optional gradient fill settings for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]].\n */\n public gradient?: Gradient.Symb;\n /** Optional area pattern settings for region interiors.\n * Independent of fill, a region can have both fill and pattern.\n */\n public pattern?: AreaPattern.Params;\n\n /** Create a GeometryParams given a [[Category]] Id for a [[GeometricElement]] and optional [[SubCategory]] Id. The [[SubCategory.appearance]] establishes the non-overriden display properties of\n * graphics in a GeometricElement's [[GeometryStreamProps]]. A GeometricElement refers to a single Category through [[GeometricElement.category]], while it's graphics can appear on multiple SubCategories\n * by adding a [[GeometryAppearanceProps]] with a SubCategory change to the GeometryStream.\n * @note If a valid SubCategory Id is not supplied, the default SubCategory for the parent Category is used. To be considered valid, [[SubCategory.getCategoryId]] must refer to the specified Category Id.\n */\n constructor(public categoryId: Id64String, public subCategoryId = Id64.invalid) {\n if (!Id64.isValid(subCategoryId))\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n }\n\n public clone(): GeometryParams {\n const retVal = new GeometryParams(this.categoryId, this.subCategoryId);\n retVal.materialId = this.materialId;\n retVal.elmPriority = this.elmPriority;\n retVal.weight = this.weight;\n retVal.lineColor = this.lineColor;\n retVal.fillColor = this.fillColor;\n retVal.backgroundFill = this.backgroundFill;\n retVal.fillDisplay = this.fillDisplay;\n retVal.elmTransparency = this.elmTransparency;\n retVal.fillTransparency = this.fillTransparency;\n retVal.geometryClass = this.geometryClass;\n retVal.styleInfo = this.styleInfo ? this.styleInfo.clone() : undefined;\n retVal.gradient = this.gradient ? this.gradient.clone() : undefined;\n retVal.pattern = this.pattern ? this.pattern.clone() : undefined;\n return retVal;\n }\n\n /** Clears [[SubCategoryAppearance]] overrides while preserving [[categoryId]] and [[subCategoryId]]. */\n public resetAppearance() {\n this.materialId = undefined;\n this.elmPriority = undefined;\n this.weight = undefined;\n this.lineColor = undefined;\n this.fillColor = undefined;\n this.backgroundFill = undefined;\n this.fillDisplay = undefined;\n this.elmTransparency = undefined;\n this.fillTransparency = undefined;\n this.geometryClass = undefined;\n this.styleInfo = undefined;\n this.gradient = undefined;\n this.pattern = undefined;\n }\n\n /** Compare two [[GeometryParams]] for equivalence, i.e. both values are undefined and inherited from [[SubCategoryAppearance]] or have the same override. */\n public isEquivalent(other: GeometryParams): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.categoryId !== other.categoryId)\n return false;\n if (this.subCategoryId !== other.subCategoryId)\n return false;\n if (this.geometryClass !== other.geometryClass)\n return false;\n\n if (this.elmPriority !== other.elmPriority)\n return false;\n if (this.elmTransparency !== other.elmTransparency)\n return false;\n if (this.fillTransparency !== other.fillTransparency)\n return false;\n\n if ((this.lineColor === undefined) !== (other.lineColor === undefined))\n return false;\n if (this.lineColor && !this.lineColor.equals(other.lineColor!))\n return false;\n\n if (this.weight !== other.weight)\n return false;\n\n if ((this.materialId === undefined) !== (other.materialId === undefined))\n return false;\n if (this.materialId && this.materialId !== other.materialId!)\n return false;\n\n if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))\n return false;\n if (this.styleInfo && !this.styleInfo.equals(other.styleInfo!))\n return false;\n\n if (this.fillDisplay !== other.fillDisplay)\n return false;\n\n if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {\n if ((this.gradient === undefined) !== (other.gradient === undefined))\n return false;\n if (this.gradient && !this.gradient.equals(other.gradient!))\n return false;\n if (this.backgroundFill !== other.backgroundFill)\n return false;\n if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {\n if ((this.fillColor === undefined) !== (other.fillColor === undefined))\n return false;\n if (this.fillColor && !this.fillColor.equals(other.fillColor!))\n return false;\n }\n }\n\n if ((this.pattern === undefined) !== (other.pattern === undefined))\n return false;\n if (this.pattern && !this.pattern.equals(other.pattern!))\n return false;\n\n return true;\n }\n\n /** Change [[categoryId]] to the supplied id, [[subCategoryId]] to the supplied category's the default subCategory, and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setCategoryId(categoryId: Id64String, clearAppearanceOverrides = true) {\n this.categoryId = categoryId;\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n\n /** Change [[subCategoryId]] to the supplied id and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setSubCategoryId(subCategoryId: Id64String, clearAppearanceOverrides = true) {\n this.subCategoryId = subCategoryId;\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n}\n"]}
1
+ {"version":3,"file":"GeometryParams.js","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAKvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,gEAAgE;IAChE,+CAAS,CAAA;IACT,wDAAwD;IACxD,iDAAU,CAAA;IACV,sEAAsE;IACtE,iDAAU,CAAA;IACV;;OAEG;IACH,qDAAY,CAAA;AACd,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,kGAAkG;IAClG,mDAAQ,CAAA;IACR,8EAA8E;IAC9E,qDAAS,CAAA;IACT,gGAAgG;IAChG,yDAAW,CAAA;AACb,CAAC,EAPW,cAAc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AS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAU,CAAC;oBAC5D,OAAO,KAAK,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,oEAAoE;QACpE,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAQ,CAAC;YACtD,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oLAAoL;IAC7K,aAAa,CAAC,UAAsB,EAAE,wBAAwB,GAAG,IAAI;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,gHAAgH;IACzG,gBAAgB,CAAC,aAAyB,EAAE,wBAAwB,GAAG,IAAI;QAChF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\nimport { AreaPattern } from \"./geometry/AreaPattern\";\nimport { LineStyle } from \"./geometry/LineStyle\";\nimport { Gradient } from \"./Gradient\";\nimport { IModel } from \"./IModel\";\n\n/** Whether a closed region should be drawn for wireframe display with its internal area filled or not.\n * @public\n * @extensions\n */\nexport enum FillDisplay {\n /** don't fill, even if fill attribute is on for the viewport */\n Never = 0,\n /** fill if the fill attribute is on for the viewport */\n ByView = 1,\n /** always fill, even if the fill attribute is off for the viewport */\n Always = 2,\n /** always fill, fill will always be behind other geometry belonging to the same element.\n * @note Edge geometry is not produced for shapes with this fill type. If you want an outline, add it as separate geometry.\n */\n Blanking = 3,\n}\n\n/** Describes how a view's background color affects the interior area of a closed region.\n * @public\n * @extensions\n */\nexport enum BackgroundFill {\n /** single color fill uses the fill color and line color to draw either a solid or outline fill */\n None = 0,\n /** single color fill uses the view's background color to draw a solid fill */\n Solid = 1,\n /** single color fill uses the view's background color and line color to draw an outline fill */\n Outline = 2,\n}\n\n/** Categorizes a piece of geometry within a GeometryStream. Visibility of classes of geometry can be toggled\n * within a view using [[ViewFlags]].\n * @see [[GeometryStreamProps]].\n * @see [[Feature]].\n * @public\n * @extensions\n */\nexport enum GeometryClass {\n /** Used to classify the \"real\" geometry within a model. Most geometry falls within this class. */\n Primary = 0,\n /** Used to classify geometry used as a drawing aid in constructing the Primary geometry. For example, grid lines. */\n Construction = 1,\n /** Used to classify annotations which dimension (measure) the Primary geometry. */\n Dimension = 2,\n /** Used to classify geometry used to fill planar regions with a 2d pattern (e.g., hatch lines). */\n Pattern = 3,\n}\n\n/** Describes the display properties of graphics in a persistent element's GeometryStream that aren't inherited from [[SubCategoryAppearance]].\n * @see [[GeometryStreamProps]].\n * @public\n */\nexport class GeometryParams {\n /** Optional render material to override [[SubCategoryAppearance.materialId]].\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.materialId]] with no material.\n */\n public materialId?: Id64String;\n /** Optional display priority added to [[SubCategoryAppearance.priority]].\n * The net display priority value is used to control z ordering when drawing to 2d views.\n */\n public elmPriority?: number;\n /** Optional line weight to override [[SubCategoryAppearance.weight]].\n * The weight is an integer in the range of [0,31] that by default corresponds to a pixel width of weight+1.\n */\n public weight?: number;\n /** Optional line color to override [[SubCategoryAppearance.color]].\n * The transparency component is ignored and should instead be specified using [[elmTransparency]].\n */\n public lineColor?: ColorDef;\n /** Optional fill color for region interiors. Set the same as [[lineColor]] for an opaque fill.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]], [[gradient]] is undefined, and [[backgroundFill]] is [[BackgroundFill.None]].\n * The transparency component is ignored and should instead be specified using [[fillTransparency]].\n */\n public fillColor?: ColorDef;\n /** Optional fill using the current view background color for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]] and [[gradient]] is undefined. Default is [[BackgroundFill.None]].\n */\n public backgroundFill?: BackgroundFill;\n /** Optional fill specification that determines when and if a region interior will display using [[gradient]], [[backgroundFill]], or [[fillColor]] in that order of preference.\n * Fill only applies to [[RenderMode.Wireframe]] views. In a [[RenderMode.SmoothShade]] or [[RenderMode.SolidFill]] view, regions will always display as surfaces preferring [[fillColor]] when present over [[lineColor]].\n * Default is [[FillDisplay.Never]].\n */\n public fillDisplay?: FillDisplay;\n /** Optional line color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent element on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque and 1.0 for completely transparent.\n */\n public elmTransparency?: number;\n /** Optional fill color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent fill on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque, 1.0 for completely transparent, or leave undefined to use [[elmTransparency]].\n */\n public fillTransparency?: number;\n /** Optional geometry classification that can be toggled off with a [[ViewFlags]] independent of [[SubCategoryAppearance.invisible]].\n * Default is [[GeometryClass.Primary]].\n */\n public geometryClass?: GeometryClass;\n /** Optional line style to override [[SubCategoryAppearance.styleId]] plus modifiers to override the line style definition.\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.styleId]] with a solid line.\n */\n public styleInfo?: LineStyle.Info;\n /** Optional gradient fill settings for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]].\n */\n public gradient?: Gradient.Symb;\n /** Optional area pattern settings for region interiors.\n * Independent of fill, a region can have both fill and pattern.\n */\n public pattern?: AreaPattern.Params;\n\n /** Create a GeometryParams given a [[Category]] Id for a [[GeometricElement]] and optional [[SubCategory]] Id. The [[SubCategory.appearance]] establishes the non-overriden display properties of\n * graphics in a GeometricElement's [[GeometryStreamProps]]. A GeometricElement refers to a single Category through [[GeometricElement.category]], while it's graphics can appear on multiple SubCategories\n * by adding a [[GeometryAppearanceProps]] with a SubCategory change to the GeometryStream.\n * @note If a valid SubCategory Id is not supplied, the default SubCategory for the parent Category is used. To be considered valid, [[SubCategory.getCategoryId]] must refer to the specified Category Id.\n */\n constructor(public categoryId: Id64String, public subCategoryId = Id64.invalid) {\n if (!Id64.isValid(subCategoryId))\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n }\n\n public clone(): GeometryParams {\n const retVal = new GeometryParams(this.categoryId, this.subCategoryId);\n retVal.materialId = this.materialId;\n retVal.elmPriority = this.elmPriority;\n retVal.weight = this.weight;\n retVal.lineColor = this.lineColor;\n retVal.fillColor = this.fillColor;\n retVal.backgroundFill = this.backgroundFill;\n retVal.fillDisplay = this.fillDisplay;\n retVal.elmTransparency = this.elmTransparency;\n retVal.fillTransparency = this.fillTransparency;\n retVal.geometryClass = this.geometryClass;\n retVal.styleInfo = this.styleInfo ? this.styleInfo.clone() : undefined;\n retVal.gradient = this.gradient ? this.gradient.clone() : undefined;\n retVal.pattern = this.pattern ? this.pattern.clone() : undefined;\n return retVal;\n }\n\n /** Clears [[SubCategoryAppearance]] overrides while preserving [[categoryId]] and [[subCategoryId]]. */\n public resetAppearance() {\n this.materialId = undefined;\n this.elmPriority = undefined;\n this.weight = undefined;\n this.lineColor = undefined;\n this.fillColor = undefined;\n this.backgroundFill = undefined;\n this.fillDisplay = undefined;\n this.elmTransparency = undefined;\n this.fillTransparency = undefined;\n this.geometryClass = undefined;\n this.styleInfo = undefined;\n this.gradient = undefined;\n this.pattern = undefined;\n }\n\n /** Compare two [[GeometryParams]] for equivalence, i.e. both values are undefined and inherited from [[SubCategoryAppearance]] or have the same override. */\n public isEquivalent(other: GeometryParams): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.categoryId !== other.categoryId)\n return false;\n if (this.subCategoryId !== other.subCategoryId)\n return false;\n if (this.geometryClass !== other.geometryClass)\n return false;\n\n if (this.elmPriority !== other.elmPriority)\n return false;\n if (this.elmTransparency !== other.elmTransparency)\n return false;\n if (this.fillTransparency !== other.fillTransparency)\n return false;\n\n if ((this.lineColor === undefined) !== (other.lineColor === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.lineColor && !this.lineColor.equals(other.lineColor!))\n return false;\n\n if (this.weight !== other.weight)\n return false;\n\n if ((this.materialId === undefined) !== (other.materialId === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.materialId && this.materialId !== other.materialId!)\n return false;\n\n if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.styleInfo && !this.styleInfo.equals(other.styleInfo!))\n return false;\n\n if (this.fillDisplay !== other.fillDisplay)\n return false;\n\n if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {\n if ((this.gradient === undefined) !== (other.gradient === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.gradient && !this.gradient.equals(other.gradient!))\n return false;\n if (this.backgroundFill !== other.backgroundFill)\n return false;\n if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {\n if ((this.fillColor === undefined) !== (other.fillColor === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.fillColor && !this.fillColor.equals(other.fillColor!))\n return false;\n }\n }\n\n if ((this.pattern === undefined) !== (other.pattern === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.pattern && !this.pattern.equals(other.pattern!))\n return false;\n\n return true;\n }\n\n /** Change [[categoryId]] to the supplied id, [[subCategoryId]] to the supplied category's the default subCategory, and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setCategoryId(categoryId: Id64String, clearAppearanceOverrides = true) {\n this.categoryId = categoryId;\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n\n /** Change [[subCategoryId]] to the supplied id and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setSubCategoryId(subCategoryId: Id64String, clearAppearanceOverrides = true) {\n this.subCategoryId = subCategoryId;\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n}\n"]}
@@ -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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164
  return 1;
165
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
165
166
  if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle))
167
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
166
168
  return lhs.angle.radians - rhs.angle.radians;
167
169
  if (lhs.keys.length !== rhs.keys.length)
168
170
  return lhs.keys.length - rhs.keys.length;
@@ -426,6 +428,9 @@ export var Gradient;
426
428
  const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
427
429
  color = this.mapColor(fStep);
428
430
  }
431
+ else {
432
+ throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);
433
+ }
429
434
  break;
430
435
  }
431
436
  case ThematicGradientMode.Smooth:
@@ -1 +1 @@
1
- {"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAiC,MAAM,mBAAmB,CAAC;AAE/I;;;;GAIG;AACH,MAAM,KAAW,QAAQ,CAufxB;AAvfD,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,m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AC,EAAE,CAAC;wCAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;wCACtF,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oCAC/B,CAAC;oCACD,MAAM;gCACR,CAAC;gCACD,KAAK,oBAAoB,CAAC,MAAM;oCAC9B,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oCACzB,MAAM;4BACV,CAAC;wBACH,CAAC;wBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;4BAC/B,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAM,CAAC,QAAQ,EAAE,CAAC;4BACxC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAM,CAAC,MAAM,CAAC,CAAC,CAAC;4BACtC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAM,CAAC,MAAM,CAAC,CAAC,CAAC;4BACtC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAM,CAAC,MAAM,CAAC,CAAC,CAAC;wBACxC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;YAC1B,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC7E,MAAM,CAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAjaU,aAAI,OAkahB,CAAA;AACH,CAAC,EAvfgB,QAAQ,KAAR,QAAQ,QAufxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\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.\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.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\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.\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.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient to compare\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.\n */\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** Produce an image suitable for use for thematic rendering.\n * This function is chiefly useful for the WebGL renderer.\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color!.getAlpha();\n image[currentIdx--] = color!.colors.b;\n image[currentIdx--] = color!.colors.g;\n image[currentIdx--] = color!.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAiC,MAAM,mBAAmB,CAAC;AAE/I;;;;GAIG;AACH,MAAM,KAAW,QAAQ,CA2fxB;AA3fD,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,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G,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;wCACtF,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oCAC/B,CAAC;yCAAM,CAAC;wCACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;oCAClG,CAAC;oCACD,MAAM;gCACR,CAAC;gCACD,KAAK,oBAAoB,CAAC,MAAM;oCAC9B,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oCACzB,MAAM;4BACV,CAAC;wBACH,CAAC;wBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;4BAC/B,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;4BACvC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;wBACvC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;YAC1B,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC7E,MAAM,CAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAraU,aAAI,OAsahB,CAAA;AACH,CAAC,EA3fgB,QAAQ,KAAR,QAAQ,QA2fxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\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.\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.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\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.\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.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient to compare\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.\n */\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** Produce an image suitable for use for thematic rendering.\n * This function is chiefly useful for the WebGL renderer.\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n } else {\n throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HiddenLine.d.ts","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,yBAAiB,UAAU,CAAC;IAC1B;;;;;;;;;;;;OAYG;IACH,UAAiB,UAAU;QACzB,4EAA4E;QAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,mJAAmJ;QACnJ,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,oKAAoK;QACpK,OAAO,CAAC,EAAE,UAAU,CAAC;QACrB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,IAAI,OAAO,CAAqC;QACnE,kHAAkH;QAClH,SAAgB,KAAK,CAAC,EAAE,QAAQ,CAAC;QACjC,4HAA4H;QAC5H,SAAgB,OAAO,CAAC,EAAE,UAAU,CAAC;QACrC;;WAEG;QACH,SAAgB,KAAK,CAAC,EAAE,MAAM,CAAC;QAE/B,OAAO;QA6BP,g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A4D;IAC5D,UAAiB,aAAa;QAC5B,2CAA2C;QAC3C,OAAO,CAAC,EAAE,UAAU,CAAC;QACrB,0CAA0C;QAC1C,MAAM,CAAC,EAAE,UAAU,CAAC;QACpB,uDAAuD;QACvD,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;IAED,4IAA4I;IAC5I,MAAa,QAAQ;QACnB,4FAA4F;QAC5F,SAAgB,OAAO,EAAE,KAAK,CAAC;QAC/B,yFAAyF;QACzF,SAAgB,MAAM,EAAE,KAAK,CAAC;QAC9B;;;;;;WAMG;QACH,SAAgB,qBAAqB,EAAE,MAAM,CAAC;QAE9C,8CAA8C;QAC9C,IAAW,cAAc,IAAI,MAAM,CAAuC;QAE1E,oCAAoC;QACpC,OAAc,QAAQ,WAAoB;QAE1C,6DAA6D;eAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,QAAQ;QAS/C,MAAM,IAAI,aAAa;QAU9B,oHAAoH;QAC7G,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ;QAWxC,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;QASvC,IAAW,eAAe,IAAI,OAAO,CAEpC;QAED,OAAO;KAKR;CACF"}
@@ -97,7 +97,10 @@ export var HiddenLine;
97
97
  return true;
98
98
  else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)
99
99
  return false;
100
+ else if ((undefined === this.color) !== (undefined === other.color))
101
+ return false;
100
102
  else
103
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
101
104
  return undefined === this.color || this.color.equals(other.color);
102
105
  }
103
106
  toJSON() {
@@ -130,7 +133,7 @@ export var HiddenLine;
130
133
  static defaults = new Settings({});
131
134
  /** Create a DisplaySettings from its JSON representation. */
132
135
  static fromJSON(json) {
133
- if (JsonUtils.isEmptyObjectOrUndefined(json))
136
+ if (!JsonUtils.isNonEmptyObject(json))
134
137
  return this.defaults;
135
138
  else if (json instanceof Settings)
136
139
  return json;