@itwin/core-common 3.4.0-dev.9 → 3.5.0-dev.11

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 (266) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/lib/cjs/Camera.d.ts.map +1 -1
  3. package/lib/cjs/Camera.js +7 -3
  4. package/lib/cjs/Camera.js.map +1 -1
  5. package/lib/cjs/CloudStorage.d.ts +20 -5
  6. package/lib/cjs/CloudStorage.d.ts.map +1 -1
  7. package/lib/cjs/CloudStorage.js +13 -3
  8. package/lib/cjs/CloudStorage.js.map +1 -1
  9. package/lib/cjs/CloudStorageTileCache.d.ts +4 -1
  10. package/lib/cjs/CloudStorageTileCache.d.ts.map +1 -1
  11. package/lib/cjs/CloudStorageTileCache.js +5 -1
  12. package/lib/cjs/CloudStorageTileCache.js.map +1 -1
  13. package/lib/cjs/Code.d.ts +10 -4
  14. package/lib/cjs/Code.d.ts.map +1 -1
  15. package/lib/cjs/Code.js +6 -2
  16. package/lib/cjs/Code.js.map +1 -1
  17. package/lib/cjs/ColorDef.d.ts.map +1 -1
  18. package/lib/cjs/ColorDef.js +2 -0
  19. package/lib/cjs/ColorDef.js.map +1 -1
  20. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  21. package/lib/cjs/ConcurrentQuery.js +56 -14
  22. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  23. package/lib/cjs/ContextRealityModel.d.ts +21 -0
  24. package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
  25. package/lib/cjs/ContextRealityModel.js +33 -0
  26. package/lib/cjs/ContextRealityModel.js.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.d.ts +32 -0
  28. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  29. package/lib/cjs/DisplayStyleSettings.js +30 -0
  30. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  31. package/lib/cjs/ECSchemaProps.d.ts +40 -0
  32. package/lib/cjs/ECSchemaProps.d.ts.map +1 -0
  33. package/lib/cjs/ECSchemaProps.js +10 -0
  34. package/lib/cjs/ECSchemaProps.js.map +1 -0
  35. package/lib/cjs/ElementProps.d.ts +6 -0
  36. package/lib/cjs/ElementProps.d.ts.map +1 -1
  37. package/lib/cjs/ElementProps.js.map +1 -1
  38. package/lib/cjs/FeatureGates.d.ts.map +1 -1
  39. package/lib/cjs/FeatureGates.js +6 -2
  40. package/lib/cjs/FeatureGates.js.map +1 -1
  41. package/lib/cjs/FeatureIndex.d.ts.map +1 -1
  42. package/lib/cjs/FeatureIndex.js +5 -1
  43. package/lib/cjs/FeatureIndex.js.map +1 -1
  44. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  45. package/lib/cjs/FeatureSymbology.js.map +1 -1
  46. package/lib/cjs/Fonts.d.ts.map +1 -1
  47. package/lib/cjs/Fonts.js.map +1 -1
  48. package/lib/cjs/Frustum.d.ts.map +1 -1
  49. package/lib/cjs/Frustum.js +55 -21
  50. package/lib/cjs/Frustum.js.map +1 -1
  51. package/lib/cjs/Gradient.d.ts +18 -2
  52. package/lib/cjs/Gradient.d.ts.map +1 -1
  53. package/lib/cjs/Gradient.js +29 -18
  54. package/lib/cjs/Gradient.js.map +1 -1
  55. package/lib/cjs/IModel.d.ts +4 -0
  56. package/lib/cjs/IModel.d.ts.map +1 -1
  57. package/lib/cjs/IModel.js +8 -1
  58. package/lib/cjs/IModel.js.map +1 -1
  59. package/lib/cjs/Image.d.ts.map +1 -1
  60. package/lib/cjs/Image.js +3 -1
  61. package/lib/cjs/Image.js.map +1 -1
  62. package/lib/cjs/Localization.d.ts +4 -5
  63. package/lib/cjs/Localization.d.ts.map +1 -1
  64. package/lib/cjs/Localization.js.map +1 -1
  65. package/lib/cjs/QPoint.d.ts +185 -5
  66. package/lib/cjs/QPoint.d.ts.map +1 -1
  67. package/lib/cjs/QPoint.js +204 -4
  68. package/lib/cjs/QPoint.js.map +1 -1
  69. package/lib/cjs/RealityModelDisplaySettings.d.ts +119 -0
  70. package/lib/cjs/RealityModelDisplaySettings.d.ts.map +1 -0
  71. package/lib/cjs/RealityModelDisplaySettings.js +115 -0
  72. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -0
  73. package/lib/cjs/Render.d.ts.map +1 -1
  74. package/lib/cjs/Render.js +11 -3
  75. package/lib/cjs/Render.js.map +1 -1
  76. package/lib/cjs/RgbColor.d.ts +9 -1
  77. package/lib/cjs/RgbColor.d.ts.map +1 -1
  78. package/lib/cjs/RgbColor.js +12 -2
  79. package/lib/cjs/RgbColor.js.map +1 -1
  80. package/lib/cjs/SubCategoryOverride.d.ts.map +1 -1
  81. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  82. package/lib/cjs/TerrainSettings.d.ts +12 -7
  83. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  84. package/lib/cjs/TerrainSettings.js +2 -1
  85. package/lib/cjs/TerrainSettings.js.map +1 -1
  86. package/lib/cjs/ThematicDisplay.d.ts +6 -10
  87. package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
  88. package/lib/cjs/ThematicDisplay.js.map +1 -1
  89. package/lib/cjs/TileProps.d.ts +5 -0
  90. package/lib/cjs/TileProps.d.ts.map +1 -1
  91. package/lib/cjs/TileProps.js +12 -1
  92. package/lib/cjs/TileProps.js.map +1 -1
  93. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  94. package/lib/cjs/ViewFlags.js.map +1 -1
  95. package/lib/cjs/core-common.d.ts +2 -0
  96. package/lib/cjs/core-common.d.ts.map +1 -1
  97. package/lib/cjs/core-common.js +2 -0
  98. package/lib/cjs/core-common.js.map +1 -1
  99. package/lib/cjs/geometry/BoundingSphere.d.ts.map +1 -1
  100. package/lib/cjs/geometry/BoundingSphere.js +8 -2
  101. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  102. package/lib/cjs/geometry/TextString.d.ts.map +1 -1
  103. package/lib/cjs/geometry/TextString.js.map +1 -1
  104. package/lib/cjs/ipc/IpcWebSocketTransport.js +10 -3
  105. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  106. package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
  107. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  108. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts +9 -1
  109. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts.map +1 -1
  110. package/lib/cjs/rpc/IModelTileRpcInterface.js +12 -2
  111. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcConfiguration.js +1 -1
  113. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  114. package/lib/cjs/rpc/core/RpcConstants.d.ts +3 -1
  115. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  116. package/lib/cjs/rpc/core/RpcConstants.js +4 -1
  117. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  118. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  119. package/lib/cjs/rpc/core/RpcRequest.js +8 -2
  120. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  121. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  122. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +3 -0
  123. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  124. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  125. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  126. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +17 -1
  127. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  128. package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
  129. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  130. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  131. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  132. package/lib/cjs/tile/I3dmTileIO.d.ts.map +1 -1
  133. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  134. package/lib/esm/Camera.d.ts.map +1 -1
  135. package/lib/esm/Camera.js +7 -3
  136. package/lib/esm/Camera.js.map +1 -1
  137. package/lib/esm/CloudStorage.d.ts +20 -5
  138. package/lib/esm/CloudStorage.d.ts.map +1 -1
  139. package/lib/esm/CloudStorage.js +13 -3
  140. package/lib/esm/CloudStorage.js.map +1 -1
  141. package/lib/esm/CloudStorageTileCache.d.ts +4 -1
  142. package/lib/esm/CloudStorageTileCache.d.ts.map +1 -1
  143. package/lib/esm/CloudStorageTileCache.js +5 -1
  144. package/lib/esm/CloudStorageTileCache.js.map +1 -1
  145. package/lib/esm/Code.d.ts +10 -4
  146. package/lib/esm/Code.d.ts.map +1 -1
  147. package/lib/esm/Code.js +6 -2
  148. package/lib/esm/Code.js.map +1 -1
  149. package/lib/esm/ColorDef.d.ts.map +1 -1
  150. package/lib/esm/ColorDef.js +2 -0
  151. package/lib/esm/ColorDef.js.map +1 -1
  152. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  153. package/lib/esm/ConcurrentQuery.js +56 -14
  154. package/lib/esm/ConcurrentQuery.js.map +1 -1
  155. package/lib/esm/ContextRealityModel.d.ts +21 -0
  156. package/lib/esm/ContextRealityModel.d.ts.map +1 -1
  157. package/lib/esm/ContextRealityModel.js +33 -0
  158. package/lib/esm/ContextRealityModel.js.map +1 -1
  159. package/lib/esm/DisplayStyleSettings.d.ts +32 -0
  160. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  161. package/lib/esm/DisplayStyleSettings.js +30 -0
  162. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  163. package/lib/esm/ECSchemaProps.d.ts +40 -0
  164. package/lib/esm/ECSchemaProps.d.ts.map +1 -0
  165. package/lib/esm/ECSchemaProps.js +9 -0
  166. package/lib/esm/ECSchemaProps.js.map +1 -0
  167. package/lib/esm/ElementProps.d.ts +6 -0
  168. package/lib/esm/ElementProps.d.ts.map +1 -1
  169. package/lib/esm/ElementProps.js.map +1 -1
  170. package/lib/esm/FeatureGates.d.ts.map +1 -1
  171. package/lib/esm/FeatureGates.js +6 -2
  172. package/lib/esm/FeatureGates.js.map +1 -1
  173. package/lib/esm/FeatureIndex.d.ts.map +1 -1
  174. package/lib/esm/FeatureIndex.js +5 -1
  175. package/lib/esm/FeatureIndex.js.map +1 -1
  176. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  177. package/lib/esm/FeatureSymbology.js.map +1 -1
  178. package/lib/esm/Fonts.d.ts.map +1 -1
  179. package/lib/esm/Fonts.js.map +1 -1
  180. package/lib/esm/Frustum.d.ts.map +1 -1
  181. package/lib/esm/Frustum.js +55 -21
  182. package/lib/esm/Frustum.js.map +1 -1
  183. package/lib/esm/Gradient.d.ts +18 -2
  184. package/lib/esm/Gradient.d.ts.map +1 -1
  185. package/lib/esm/Gradient.js +29 -18
  186. package/lib/esm/Gradient.js.map +1 -1
  187. package/lib/esm/IModel.d.ts +4 -0
  188. package/lib/esm/IModel.d.ts.map +1 -1
  189. package/lib/esm/IModel.js +8 -1
  190. package/lib/esm/IModel.js.map +1 -1
  191. package/lib/esm/Image.d.ts.map +1 -1
  192. package/lib/esm/Image.js +3 -1
  193. package/lib/esm/Image.js.map +1 -1
  194. package/lib/esm/Localization.d.ts +4 -5
  195. package/lib/esm/Localization.d.ts.map +1 -1
  196. package/lib/esm/Localization.js.map +1 -1
  197. package/lib/esm/QPoint.d.ts +185 -5
  198. package/lib/esm/QPoint.d.ts.map +1 -1
  199. package/lib/esm/QPoint.js +203 -5
  200. package/lib/esm/QPoint.js.map +1 -1
  201. package/lib/esm/RealityModelDisplaySettings.d.ts +119 -0
  202. package/lib/esm/RealityModelDisplaySettings.d.ts.map +1 -0
  203. package/lib/esm/RealityModelDisplaySettings.js +110 -0
  204. package/lib/esm/RealityModelDisplaySettings.js.map +1 -0
  205. package/lib/esm/Render.d.ts.map +1 -1
  206. package/lib/esm/Render.js +11 -3
  207. package/lib/esm/Render.js.map +1 -1
  208. package/lib/esm/RgbColor.d.ts +9 -1
  209. package/lib/esm/RgbColor.d.ts.map +1 -1
  210. package/lib/esm/RgbColor.js +12 -2
  211. package/lib/esm/RgbColor.js.map +1 -1
  212. package/lib/esm/SubCategoryOverride.d.ts.map +1 -1
  213. package/lib/esm/SubCategoryOverride.js.map +1 -1
  214. package/lib/esm/TerrainSettings.d.ts +12 -7
  215. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  216. package/lib/esm/TerrainSettings.js +2 -1
  217. package/lib/esm/TerrainSettings.js.map +1 -1
  218. package/lib/esm/ThematicDisplay.d.ts +6 -10
  219. package/lib/esm/ThematicDisplay.d.ts.map +1 -1
  220. package/lib/esm/ThematicDisplay.js.map +1 -1
  221. package/lib/esm/TileProps.d.ts +5 -0
  222. package/lib/esm/TileProps.d.ts.map +1 -1
  223. package/lib/esm/TileProps.js +10 -0
  224. package/lib/esm/TileProps.js.map +1 -1
  225. package/lib/esm/ViewFlags.d.ts.map +1 -1
  226. package/lib/esm/ViewFlags.js.map +1 -1
  227. package/lib/esm/core-common.d.ts +2 -0
  228. package/lib/esm/core-common.d.ts.map +1 -1
  229. package/lib/esm/core-common.js +2 -0
  230. package/lib/esm/core-common.js.map +1 -1
  231. package/lib/esm/geometry/BoundingSphere.d.ts.map +1 -1
  232. package/lib/esm/geometry/BoundingSphere.js +8 -2
  233. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  234. package/lib/esm/geometry/TextString.d.ts.map +1 -1
  235. package/lib/esm/geometry/TextString.js.map +1 -1
  236. package/lib/esm/ipc/IpcWebSocketTransport.js +10 -3
  237. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  238. package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
  239. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  240. package/lib/esm/rpc/IModelTileRpcInterface.d.ts +9 -1
  241. package/lib/esm/rpc/IModelTileRpcInterface.d.ts.map +1 -1
  242. package/lib/esm/rpc/IModelTileRpcInterface.js +12 -2
  243. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  244. package/lib/esm/rpc/core/RpcConfiguration.js +1 -1
  245. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  246. package/lib/esm/rpc/core/RpcConstants.d.ts +3 -1
  247. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  248. package/lib/esm/rpc/core/RpcConstants.js +4 -1
  249. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  250. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  251. package/lib/esm/rpc/core/RpcRequest.js +8 -2
  252. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  253. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  254. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +3 -0
  255. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  256. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  257. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  258. package/lib/esm/rpc/web/WebAppRpcProtocol.js +17 -1
  259. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  260. package/lib/esm/rpc/web/WebAppRpcRequest.js +1 -1
  261. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  262. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  263. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  264. package/lib/esm/tile/I3dmTileIO.d.ts.map +1 -1
  265. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  266. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmGH;;GAEG;AACH,MAAa,iBAAiB;IACrB,KAAK,CAAC,UAAU,KAAoB,CAAC;IACrC,kBAAkB,CAAC,GAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,+BAA+B,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5H,gBAAgB,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,gBAAgB,CAAC,WAAmB,IAAY,OAAO,WAAW,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,iBAAiB,KAAoB,CAAC;IAC5C,mBAAmB,KAAW,CAAC;IAC/B,mBAAmB,KAAgC,OAAO,SAAS,CAAC,CAAC,CAAC;IACtE,eAAe,KAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,cAAc,KAAK,CAAC;CAClC;AAXD,8CAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\n/** Options for Localization\r\n * @public\r\n */\r\ninterface LocalizationOptions {\r\n /** for interpolation values */\r\n [key: string]: any;\r\n /**\r\n * defaultValue to return if a translation was not found\r\n */\r\n defaultValue?: any;\r\n /**\r\n * count value used for plurals\r\n */\r\n count?: number;\r\n /**\r\n * used for contexts (eg. male\\female)\r\n */\r\n context?: any;\r\n /**\r\n * override languages to use\r\n */\r\n lngs?: string[];\r\n /**\r\n * override language to lookup key if not found see fallbacks for details\r\n */\r\n fallbackLng?: string;\r\n}\r\n\r\n/** The interface defining the localization requirements of [IModelApp]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Localization {\r\n /** This method must be called and awaited before using an instance of Localization.\r\n * @param namespaces an array of namespaces to load. There must be at least one namespace, and it\r\n * becomes the default namespace.\r\n * @note IModelApp.startup calls this internally, so you should not call this method directly\r\n * except for Localization instances outside of IModelApp (e.g., for tests.)\r\n */\r\n initialize(namespaces: string[]): Promise<void>;\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedString(key: string | string[], options?: LocalizationOptions): string;\r\n /** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: LocalizationOptions): string;\r\n /** get the English string for a key. */\r\n getEnglishString(namespace: string, key: string | string[], options?: LocalizationOptions): string;\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * getLocalizedKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n */\r\n getLocalizedKeys(inputString: string): string;\r\n\r\n /** Register a new Namespace and return a Promise that is fulfilled when the content is loaded.\r\n * If the namespace is already registered, its Promise will be returned.\r\n * @param name - the name of the namespace.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of returned Promise.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n */\r\n registerNamespace(namespace: string): Promise<void>;\r\n /** @internal */\r\n unregisterNamespace(namespace: string): void;\r\n /** @internal */\r\n getNamespacePromise(name: string): Promise<void> | undefined;\r\n /** Get the list of available languages for translations */\r\n getLanguageList(): readonly string[];\r\n /** Change the language for translations. This overrides the language from the browser, for tests. */\r\n changeLanguage(language: string): Promise<void>;\r\n}\r\n\r\n/** An empty [[Localization]] used if one is not provided to [IModelApp]($frontend). Does not perform localizations (merely returns the key.)\r\n * @public\r\n */\r\nexport class EmptyLocalization implements Localization {\r\n public async initialize(): Promise<void> { }\r\n public getLocalizedString(key: string | string[]): string { return typeof (key) == \"string\" ? key : key[0]; }\r\n public getLocalizedStringWithNamespace(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getEnglishString(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getLocalizedKeys(inputString: string): string { return inputString; }\r\n public async registerNamespace(): Promise<void> { }\r\n public unregisterNamespace(): void { }\r\n public getNamespacePromise(): Promise<void> | undefined { return undefined; }\r\n public getLanguageList(): readonly string[] { return []; }\r\n public async changeLanguage() { }\r\n}\r\n"]}
1
+ {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmGH;;GAEG;AACH,MAAa,iBAAiB;IACrB,KAAK,CAAC,UAAU,KAAoB,CAAC;IACrC,kBAAkB,CAAC,GAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,+BAA+B,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5H,gBAAgB,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,gBAAgB,CAAC,WAAmB,IAAY,OAAO,WAAW,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,iBAAiB,KAAoB,CAAC;IAC5C,mBAAmB,KAAW,CAAC;IAC/B,mBAAmB,KAAgC,OAAO,SAAS,CAAC,CAAC,CAAC;IACtE,eAAe,KAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,cAAc,KAAK,CAAC;CAClC;AAXD,8CAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\n/** Options for Localization\r\n * @public\r\n */\r\nexport interface TranslationOptions {\r\n /** for interpolation values */\r\n [key: string]: any;\r\n /**\r\n * defaultValue to return if a translation was not found\r\n */\r\n defaultValue?: any;\r\n /**\r\n * count value used for plurals\r\n */\r\n count?: number;\r\n /**\r\n * used for contexts (eg. male\\female)\r\n */\r\n context?: any;\r\n /**\r\n * override languages to use\r\n */\r\n lngs?: string[];\r\n /**\r\n * override language to lookup key if not found see fallbacks for details\r\n */\r\n fallbackLng?: string;\r\n}\r\n\r\n/** The interface defining the localization requirements of [IModelApp]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Localization {\r\n /** This method must be called and awaited before using an instance of Localization.\r\n * @param namespaces an array of namespaces to load. There must be at least one namespace, and it\r\n * becomes the default namespace.\r\n * @note IModelApp.startup calls this internally, so you should not call this method directly\r\n * except for Localization instances outside of IModelApp (e.g., for tests.)\r\n */\r\n initialize(namespaces: string[]): Promise<void>;\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedString(key: string | string[], options?: TranslationOptions): string;\r\n /** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** get the English string for a key. */\r\n getEnglishString(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * getLocalizedKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n */\r\n getLocalizedKeys(inputString: string): string;\r\n\r\n /** Register a new Namespace and return a Promise that is fulfilled when the content is loaded.\r\n * If the namespace is already registered, its Promise will be returned.\r\n * @param name - the name of the namespace.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of returned Promise.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n */\r\n registerNamespace(namespace: string): Promise<void>;\r\n /** @internal */\r\n unregisterNamespace(namespace: string): void;\r\n /** @internal */\r\n getNamespacePromise(name: string): Promise<void> | undefined;\r\n /** Get the list of available languages for translations */\r\n getLanguageList(): readonly string[];\r\n /** Change the language for translations. This overrides the language from the browser, for tests. */\r\n changeLanguage(language: string): Promise<void>;\r\n}\r\n\r\n/** An empty [[Localization]] used if one is not provided to [IModelApp]($frontend). Does not perform localizations (merely returns the key.)\r\n * @public\r\n */\r\nexport class EmptyLocalization implements Localization {\r\n public async initialize(): Promise<void> { }\r\n public getLocalizedString(key: string | string[]): string { return typeof (key) == \"string\" ? key : key[0]; }\r\n public getLocalizedStringWithNamespace(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getEnglishString(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getLocalizedKeys(inputString: string): string { return inputString; }\r\n public async registerNamespace(): Promise<void> { }\r\n public unregisterNamespace(): void { }\r\n public getNamespacePromise(): Promise<void> | undefined { return undefined; }\r\n public getLanguageList(): readonly string[] { return []; }\r\n public async changeLanguage() { }\r\n}\r\n"]}
@@ -1,7 +1,8 @@
1
1
  /** @packageDocumentation
2
2
  * @module Geometry
3
3
  */
4
- import { Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d } from "@itwin/core-geometry";
4
+ import { Uint16ArrayBuilder } from "@itwin/core-bentley";
5
+ import { Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d, XAndY, XYAndZ } from "@itwin/core-geometry";
5
6
  /**
6
7
  * Provides facilities for quantizing floating point values within a specified range into 16-bit unsigned integers.
7
8
  * This is a lossy compression technique.
@@ -11,6 +12,7 @@ import { Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d } from "@itwin/c
11
12
  * These routines are chiefly used by classes like [[QPoint2d]] and [[QPoint3d]] to reduce the space required to store
12
13
  * coordinate values for [RenderGraphic]($frontend)s.
13
14
  * @public
15
+ * @extensions
14
16
  */
15
17
  export declare namespace Quantization {
16
18
  const rangeScale16 = 65535;
@@ -36,6 +38,7 @@ export declare namespace Quantization {
36
38
  * @see [[QPoint2d]] for the quantized representation of a [Point2d]($core-geometry).
37
39
  * @see [[QPoint2dList]] for a list of [[QPoint2d]]s quantized using a [[QParams2d]].
38
40
  * @public
41
+ * @extensions
39
42
  */
40
43
  export declare class QParams2d {
41
44
  /** The origin of the quantization range. */
@@ -72,6 +75,7 @@ export declare class QParams2d {
72
75
  * @see [[QParams2d]] to define quantization parameters for a range of points.
73
76
  * @see [[QPoint2dList]] for a list of points all quantized to the same range.
74
77
  * @public
78
+ * @extensions
75
79
  */
76
80
  export declare class QPoint2d {
77
81
  private _x;
@@ -84,8 +88,8 @@ export declare class QPoint2d {
84
88
  set y(y: number);
85
89
  /** Construct with `x` and `y` initialized to zero. */
86
90
  constructor();
87
- /** Initialize this point by quantizing the supplied Point2d using the specified params */
88
- init(pos: Point2d, params: QParams2d): void;
91
+ /** Initialize this point by quantizing the supplied { x, y } using the specified params */
92
+ init(pos: XAndY, params: QParams2d): void;
89
93
  /** Create a quantized point from the supplied Point2d using the specified params */
90
94
  static create(pos: Point2d, params: QParams2d): QPoint2d;
91
95
  /** Initialize `x` and `y` from `src`. */
@@ -109,8 +113,44 @@ export declare class QPoint2d {
109
113
  /** Return a Point2d unquantized according to the supplied `params`. If `out` is supplied, it will be modified in-place and returned. */
110
114
  unquantize(params: QParams2d, out?: Point2d): Point2d;
111
115
  }
116
+ /** A compact representation of a list of [[QPoint2d]]s stored in a `Uint16Array`
117
+ * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.uvs]($frontend).
118
+ * @see [[QPoint3dBuffer]] for 3d points.
119
+ * @public
120
+ * @extensions
121
+ */
122
+ export interface QPoint2dBuffer {
123
+ /** The parameters used to quantize the [[points]]. */
124
+ params: QParams2d;
125
+ /** The [[QPoint2d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 2; the number of points in the array is half the array's length.
126
+ * To obtain the `n`th point, use `QPoint2d.fromScalars(buffer.points[n * 2], buffer.points[n * 2 + 1])`.
127
+ */
128
+ points: Uint16Array;
129
+ }
130
+ /** @public
131
+ * @extensions
132
+ */
133
+ export declare namespace QPoint2dBuffer {
134
+ /** Extracts the point at the specified index from a buffer.
135
+ * @param points The buffer in which each consecutive pair of integers is a 2d quantized point.
136
+ * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
137
+ * @param result If supplied, a preallocated [[QPoint2d]] to initialize with the result and return.
138
+ * @returns The point at `pointIndex`.
139
+ * @throws Error if `pointIndex` is out of bounds.
140
+ */
141
+ function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint2d): QPoint2d;
142
+ /** Extracts and unquantizes the point at the specified index from a buffer.
143
+ * @param buffer The array of points and the quantization parameters.
144
+ * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
145
+ * @param result If supplied, a preallocated [Point2d]($core-geometry) to initialize with the result and return.
146
+ * @returns The point at `pointIndex`.
147
+ * @throws Error if `pointIndex` is out of bounds.
148
+ */
149
+ function unquantizePoint(buffer: QPoint2dBuffer, pointIndex: number, result?: Point2d): Point2d;
150
+ }
112
151
  /** A list of [[QPoint2d]]s all quantized to the same range.
113
152
  * @public
153
+ * @extensions
114
154
  */
115
155
  export declare class QPoint2dList {
116
156
  /** Parameters used to quantize the points. */
@@ -149,6 +189,7 @@ export declare class QPoint2dList {
149
189
  * @see [[QPoint3d]] for the quantized representation of a [Point3d]($core-geometry).
150
190
  * @see [[QPoint3dList]] for a list of [[QPoint3d]]s quantized using a [[QParams3d]].
151
191
  * @public
192
+ * @extensions
152
193
  */
153
194
  export declare class QParams3d {
154
195
  /** The origin of the quantization range. */
@@ -195,6 +236,7 @@ export declare class QParams3d {
195
236
  * @see [[QParams3d]] to define quantization parameters for a range of points.
196
237
  * @see [[QPoint3dList]] for a list of points all quantized to the same range.
197
238
  * @public
239
+ * @extensions
198
240
  */
199
241
  export declare class QPoint3d {
200
242
  private _x;
@@ -211,8 +253,8 @@ export declare class QPoint3d {
211
253
  set z(z: number);
212
254
  /** Construct with all components initialized to zero. */
213
255
  constructor();
214
- /** Initialize this point by quantizing the supplied Point3d using the specified params */
215
- init(pos: Point3d, params: QParams3d): void;
256
+ /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */
257
+ init(pos: XYAndZ, params: QParams3d): void;
216
258
  /** Creates a quantized point from the supplied Point3d using the specified params */
217
259
  static create(pos: Point3d, params: QParams3d): QPoint3d;
218
260
  /** Set this points components from `src`. */
@@ -250,8 +292,43 @@ export declare class QPoint3d {
250
292
  */
251
293
  compare(rhs: QPoint3d): number;
252
294
  }
295
+ /** A compact representation of a list of [[QPoint3d]]s stored in a `Uint16Array`.
296
+ * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.positions]($frontend).
297
+ * @public
298
+ * @extensions
299
+ */
300
+ export interface QPoint3dBuffer {
301
+ /** The parameters used to quantize the [[points]]. */
302
+ params: QParams3d;
303
+ /** The [[QPoint3d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 3; the number of points in the array is half the array's length.
304
+ * To obtain the `n`th point, use `QPoint3d.fromScalars(buffer.points[n * 3], buffer.points[n * 3 + 1], buffer.points[n * 3 + 2])`.
305
+ */
306
+ points: Uint16Array;
307
+ }
308
+ /** @public
309
+ * @extensions
310
+ */
311
+ export declare namespace QPoint3dBuffer {
312
+ /** Extracts the point at the specified index from a buffer.
313
+ * @param points The buffer in which each consecutive pair of integers is a 3d quantized point.
314
+ * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
315
+ * @param result If supplied, a preallocated [[QPoint3d]] to initialize with the result and return.
316
+ * @returns The point at `pointIndex`.
317
+ * @throws Error if `pointIndex` is out of bounds.
318
+ */
319
+ function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint3d): QPoint3d;
320
+ /** Extracts and unquantizes the point at the specified index from a buffer.
321
+ * @param buffer The array of points and the quantization parameters.
322
+ * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
323
+ * @param result If supplied, a preallocated [Point3d]($core-geometry) to initialize with the result and return.
324
+ * @returns The point at `pointIndex`.
325
+ * @throws Error if `pointIndex` is out of bounds.
326
+ */
327
+ function unquantizePoint(buffer: QPoint3dBuffer, pointIndex: number, result?: Point3d): Point3d;
328
+ }
253
329
  /** A list of [[QPoint3d]]s all quantized to the same range.
254
330
  * @public
331
+ * @extensions
255
332
  */
256
333
  export declare class QPoint3dList {
257
334
  /** Parameters used to quantize the points. */
@@ -297,4 +374,107 @@ export declare class QPoint3dList {
297
374
  /** An iterator over the points in the list. */
298
375
  [Symbol.iterator](): IterableIterator<QPoint3d>;
299
376
  }
377
+ /** Options used to construct a [[QPoint2dBufferBuilder]].
378
+ * @beta
379
+ * @extensions
380
+ */
381
+ interface QPoint2dBufferBuilderOptions {
382
+ /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */
383
+ range: Range2d;
384
+ /** The number of points for which to allocate space.
385
+ * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).
386
+ */
387
+ initialCapacity?: number;
388
+ /** Multiplier used to compute new capacity when resizing the buffer.
389
+ * @see [TypedArrayBuilderOptions.growthFactor]($bentley).
390
+ */
391
+ growthFactor?: number;
392
+ }
393
+ /** Constructs a [[QPoint2dBuffer]] using a [Uint16ArrayBuilder]($bentley).
394
+ * @public
395
+ * @extensions
396
+ */
397
+ export declare class QPoint2dBufferBuilder {
398
+ private readonly _scratchQPoint2d;
399
+ /** The parameters used to quantize the points in the [[buffer]]. */
400
+ readonly params: QParams2d;
401
+ /** The buffer that holds the points. */
402
+ readonly buffer: Uint16ArrayBuilder;
403
+ /** Construct a new buffer with a [[length]] of zero. */
404
+ constructor(options: QPoint2dBufferBuilderOptions);
405
+ /** Append a point with the specified quantized coordinates. */
406
+ pushXY(x: number, y: number): void;
407
+ /** Append a point with the specified quantized coordinates. */
408
+ push(pt: XAndY): void;
409
+ /** The number of points currently in the [[buffer]]. */
410
+ get length(): number;
411
+ /** Returns the quantized point at the specified index in [[buffer]].
412
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
413
+ * @param result If supplied, a [[QPoint2d]] to initialize with the result and return.
414
+ * @returns The quantized point at the specified index in [[buffer]].
415
+ * @throws Error if `pointIndex` is out of bounds.
416
+ */
417
+ get(pointIndex: number, result?: QPoint2d): QPoint2d;
418
+ /** Returns the unquantized point at the specified index in [[buffer]].
419
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
420
+ * @param result If supplied, a [Point2d]($core-geometry) to initialize with the result and return.
421
+ * @returns The unquantized point at the specified index in [[buffer]].
422
+ * @throws Error if `pointIndex` is out of bounds.
423
+ */
424
+ unquantize(pointIndex: number, result?: Point2d): Point2d;
425
+ /** Obtain a [[QPoint2dBuffer]] containing all of the points that have been appended by this builder. */
426
+ finish(): QPoint2dBuffer;
427
+ }
428
+ /** Options used to construct a [[QPoint3dBufferBuilder]].
429
+ * @beta
430
+ * @extensions
431
+ */
432
+ interface QPoint3dBufferBuilderOptions {
433
+ /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */
434
+ range: Range3d;
435
+ /** The number of points for which to allocate space.
436
+ * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).
437
+ */
438
+ initialCapacity?: number;
439
+ /** Multiplier used to compute new capacity when resizing the buffer.
440
+ * @see [TypedArrayBuilderOptions.growthFactor]($bentley).
441
+ */
442
+ growthFactor?: number;
443
+ }
444
+ /** Constructs a [[QPoint3dBuffer]] using a [Uint16ArrayBuilder]($bentley).
445
+ * @public
446
+ * @extensions
447
+ */
448
+ export declare class QPoint3dBufferBuilder {
449
+ private readonly _scratchQPoint3d;
450
+ /** The parameters used to quantize the points in the [[buffer]]. */
451
+ readonly params: QParams3d;
452
+ /** The buffer that holds the points. */
453
+ readonly buffer: Uint16ArrayBuilder;
454
+ /** Construct a new buffer with a [[length]] of zero. */
455
+ constructor(options: QPoint3dBufferBuilderOptions);
456
+ /** Append a point with the specified quantized coordinates. */
457
+ pushXYZ(x: number, y: number, z: number): void;
458
+ /** Append a point with the specified quantized coordinates. */
459
+ push(pt: XYAndZ): void;
460
+ /** The number of points currently in the [[buffer]]. */
461
+ get length(): number;
462
+ /** Returns the quantized point at the specified index in [[buffer]].
463
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
464
+ * @param result If supplied, a [[QPoint3d]] to initialize with the result and return.
465
+ * @returns The quantized point at the specified index in [[buffer]].
466
+ * @throws Error if `pointIndex` is out of bounds.
467
+ */
468
+ get(pointIndex: number, result?: QPoint3d): QPoint3d;
469
+ /** Returns the unquantized point at the specified index in [[buffer]].
470
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
471
+ * @param result If supplied, a [Point3d]($core-geometry) to initialize with the result and return.
472
+ * @returns The unquantized point at the specified index in [[buffer]].
473
+ * @throws Error if `pointIndex` is out of bounds.
474
+ */
475
+ unquantize(pointIndex: number, result?: Point3d): Point3d;
476
+ /** Obtain a [[QPoint3dBuffer]] containing all of the points that have been appended by this builder. */
477
+ finish(): QPoint3dBuffer;
478
+ }
479
+ export {};
300
480
  //# sourceMappingURL=QPoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QPoint.d.ts","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE9F;;;;;;;;;GASG;AACH,yBAAiB,YAAY,CAAC;IACrB,MAAM,YAAY,QAAS,CAAC;IAC5B,MAAM,WAAW,MAAO,CAAC;IAEhC,8FAA8F;IAC9F,SAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,SAAe,GAAG,MAAM,C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});
10
- exports.QPoint3dList = exports.QPoint3d = exports.QParams3d = exports.QPoint2dList = exports.QPoint2d = exports.QParams2d = exports.Quantization = void 0;
10
+ exports.QPoint3dBufferBuilder = exports.QPoint2dBufferBuilder = exports.QPoint3dList = exports.QPoint3dBuffer = exports.QPoint3d = exports.QParams3d = exports.QPoint2dList = exports.QPoint2dBuffer = exports.QPoint2d = exports.QParams2d = exports.Quantization = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_geometry_1 = require("@itwin/core-geometry");
13
13
  /**
@@ -19,6 +19,7 @@ const core_geometry_1 = require("@itwin/core-geometry");
19
19
  * These routines are chiefly used by classes like [[QPoint2d]] and [[QPoint3d]] to reduce the space required to store
20
20
  * coordinate values for [RenderGraphic]($frontend)s.
21
21
  * @public
22
+ * @extensions
22
23
  */
23
24
  var Quantization;
24
25
  (function (Quantization) {
@@ -63,6 +64,7 @@ var Quantization;
63
64
  * @see [[QPoint2d]] for the quantized representation of a [Point2d]($core-geometry).
64
65
  * @see [[QPoint2dList]] for a list of [[QPoint2d]]s quantized using a [[QParams2d]].
65
66
  * @public
67
+ * @extensions
66
68
  */
67
69
  class QParams2d {
68
70
  constructor(ox = 0, oy = 0, sx = 0, sy = 0) {
@@ -139,6 +141,7 @@ exports.QParams2d = QParams2d;
139
141
  * @see [[QParams2d]] to define quantization parameters for a range of points.
140
142
  * @see [[QPoint2dList]] for a list of points all quantized to the same range.
141
143
  * @public
144
+ * @extensions
142
145
  */
143
146
  class QPoint2d {
144
147
  /** Construct with `x` and `y` initialized to zero. */
@@ -158,7 +161,7 @@ class QPoint2d {
158
161
  (0, core_bentley_1.assert)(Quantization.isQuantized(y));
159
162
  this._y = y;
160
163
  }
161
- /** Initialize this point by quantizing the supplied Point2d using the specified params */
164
+ /** Initialize this point by quantizing the supplied { x, y } using the specified params */
162
165
  init(pos, params) {
163
166
  this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);
164
167
  this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);
@@ -210,8 +213,46 @@ class QPoint2d {
210
213
  }
211
214
  }
212
215
  exports.QPoint2d = QPoint2d;
216
+ /** @public
217
+ * @extensions
218
+ */
219
+ var QPoint2dBuffer;
220
+ (function (QPoint2dBuffer) {
221
+ const scratchQPoint2d = new QPoint2d();
222
+ /** Extracts the point at the specified index from a buffer.
223
+ * @param points The buffer in which each consecutive pair of integers is a 2d quantized point.
224
+ * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
225
+ * @param result If supplied, a preallocated [[QPoint2d]] to initialize with the result and return.
226
+ * @returns The point at `pointIndex`.
227
+ * @throws Error if `pointIndex` is out of bounds.
228
+ */
229
+ function getQPoint(points, pointIndex, result) {
230
+ const index = pointIndex * 2;
231
+ const x = points[index + 0];
232
+ const y = points[index + 1];
233
+ if (undefined === x || undefined === y)
234
+ throw new Error("Index out of range");
235
+ result = result !== null && result !== void 0 ? result : new QPoint2d();
236
+ result.setFromScalars(x, y);
237
+ return result;
238
+ }
239
+ QPoint2dBuffer.getQPoint = getQPoint;
240
+ /** Extracts and unquantizes the point at the specified index from a buffer.
241
+ * @param buffer The array of points and the quantization parameters.
242
+ * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
243
+ * @param result If supplied, a preallocated [Point2d]($core-geometry) to initialize with the result and return.
244
+ * @returns The point at `pointIndex`.
245
+ * @throws Error if `pointIndex` is out of bounds.
246
+ */
247
+ function unquantizePoint(buffer, pointIndex, result) {
248
+ const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint2d);
249
+ return qpt.unquantize(buffer.params, result);
250
+ }
251
+ QPoint2dBuffer.unquantizePoint = unquantizePoint;
252
+ })(QPoint2dBuffer = exports.QPoint2dBuffer || (exports.QPoint2dBuffer = {}));
213
253
  /** A list of [[QPoint2d]]s all quantized to the same range.
214
254
  * @public
255
+ * @extensions
215
256
  */
216
257
  class QPoint2dList {
217
258
  /** Construct an empty list set up to use the supplied quantization parameters. */
@@ -292,8 +333,9 @@ class QPoint2dList {
292
333
  qPoints = out;
293
334
  qPoints.reset(qParams);
294
335
  }
295
- else
336
+ else {
296
337
  qPoints = new QPoint2dList(qParams);
338
+ }
297
339
  for (const point of points)
298
340
  qPoints.add(point);
299
341
  return qPoints;
@@ -304,6 +346,7 @@ exports.QPoint2dList = QPoint2dList;
304
346
  * @see [[QPoint3d]] for the quantized representation of a [Point3d]($core-geometry).
305
347
  * @see [[QPoint3dList]] for a list of [[QPoint3d]]s quantized using a [[QParams3d]].
306
348
  * @public
349
+ * @extensions
307
350
  */
308
351
  class QParams3d {
309
352
  constructor(ox = 0, oy = 0, oz = 0, sx = 0, sy = 0, sz = 0) {
@@ -407,6 +450,7 @@ exports.QParams3d = QParams3d;
407
450
  * @see [[QParams3d]] to define quantization parameters for a range of points.
408
451
  * @see [[QPoint3dList]] for a list of points all quantized to the same range.
409
452
  * @public
453
+ * @extensions
410
454
  */
411
455
  class QPoint3d {
412
456
  /** Construct with all components initialized to zero. */
@@ -433,7 +477,7 @@ class QPoint3d {
433
477
  (0, core_bentley_1.assert)(Quantization.isQuantized(z));
434
478
  this._z = z;
435
479
  }
436
- /** Initialize this point by quantizing the supplied Point3d using the specified params */
480
+ /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */
437
481
  init(pos, params) {
438
482
  this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);
439
483
  this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);
@@ -514,8 +558,47 @@ class QPoint3d {
514
558
  }
515
559
  }
516
560
  exports.QPoint3d = QPoint3d;
561
+ /** @public
562
+ * @extensions
563
+ */
564
+ var QPoint3dBuffer;
565
+ (function (QPoint3dBuffer) {
566
+ const scratchQPoint3d = new QPoint3d();
567
+ /** Extracts the point at the specified index from a buffer.
568
+ * @param points The buffer in which each consecutive pair of integers is a 3d quantized point.
569
+ * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
570
+ * @param result If supplied, a preallocated [[QPoint3d]] to initialize with the result and return.
571
+ * @returns The point at `pointIndex`.
572
+ * @throws Error if `pointIndex` is out of bounds.
573
+ */
574
+ function getQPoint(points, pointIndex, result) {
575
+ const index = pointIndex * 3;
576
+ const x = points[index + 0];
577
+ const y = points[index + 1];
578
+ const z = points[index + 2];
579
+ if (undefined === x || undefined === y || undefined === z)
580
+ throw new Error("Index out of range");
581
+ result = result !== null && result !== void 0 ? result : new QPoint3d();
582
+ result.setFromScalars(x, y, z);
583
+ return result;
584
+ }
585
+ QPoint3dBuffer.getQPoint = getQPoint;
586
+ /** Extracts and unquantizes the point at the specified index from a buffer.
587
+ * @param buffer The array of points and the quantization parameters.
588
+ * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
589
+ * @param result If supplied, a preallocated [Point3d]($core-geometry) to initialize with the result and return.
590
+ * @returns The point at `pointIndex`.
591
+ * @throws Error if `pointIndex` is out of bounds.
592
+ */
593
+ function unquantizePoint(buffer, pointIndex, result) {
594
+ const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint3d);
595
+ return qpt.unquantize(buffer.params, result);
596
+ }
597
+ QPoint3dBuffer.unquantizePoint = unquantizePoint;
598
+ })(QPoint3dBuffer = exports.QPoint3dBuffer || (exports.QPoint3dBuffer = {}));
517
599
  /** A list of [[QPoint3d]]s all quantized to the same range.
518
600
  * @public
601
+ * @extensions
519
602
  */
520
603
  class QPoint3dList {
521
604
  /** Construct an empty list set up to quantize to the supplied range.
@@ -624,4 +707,121 @@ class QPoint3dList {
624
707
  }
625
708
  }
626
709
  exports.QPoint3dList = QPoint3dList;
710
+ /** Constructs a [[QPoint2dBuffer]] using a [Uint16ArrayBuilder]($bentley).
711
+ * @public
712
+ * @extensions
713
+ */
714
+ class QPoint2dBufferBuilder {
715
+ /** Construct a new buffer with a [[length]] of zero. */
716
+ constructor(options) {
717
+ var _a;
718
+ this._scratchQPoint2d = new QPoint2d();
719
+ this.params = QParams2d.fromRange(options.range);
720
+ const initialCapacity = (_a = options.initialCapacity) !== null && _a !== void 0 ? _a : 0;
721
+ this.buffer = new core_bentley_1.Uint16ArrayBuilder({
722
+ growthFactor: options.growthFactor,
723
+ initialCapacity: 2 * initialCapacity,
724
+ });
725
+ }
726
+ /** Append a point with the specified quantized coordinates. */
727
+ pushXY(x, y) {
728
+ this.buffer.push(x);
729
+ this.buffer.push(y);
730
+ }
731
+ /** Append a point with the specified quantized coordinates. */
732
+ push(pt) {
733
+ this.pushXY(pt.x, pt.y);
734
+ }
735
+ /** The number of points currently in the [[buffer]]. */
736
+ get length() {
737
+ const len = this.buffer.length;
738
+ (0, core_bentley_1.assert)(len % 2 === 0);
739
+ return len / 2;
740
+ }
741
+ /** Returns the quantized point at the specified index in [[buffer]].
742
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
743
+ * @param result If supplied, a [[QPoint2d]] to initialize with the result and return.
744
+ * @returns The quantized point at the specified index in [[buffer]].
745
+ * @throws Error if `pointIndex` is out of bounds.
746
+ */
747
+ get(pointIndex, result) {
748
+ return QPoint2dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);
749
+ }
750
+ /** Returns the unquantized point at the specified index in [[buffer]].
751
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
752
+ * @param result If supplied, a [Point2d]($core-geometry) to initialize with the result and return.
753
+ * @returns The unquantized point at the specified index in [[buffer]].
754
+ * @throws Error if `pointIndex` is out of bounds.
755
+ */
756
+ unquantize(pointIndex, result) {
757
+ return this.get(pointIndex, this._scratchQPoint2d).unquantize(this.params, result);
758
+ }
759
+ /** Obtain a [[QPoint2dBuffer]] containing all of the points that have been appended by this builder. */
760
+ finish() {
761
+ return {
762
+ params: this.params,
763
+ points: this.buffer.toTypedArray(),
764
+ };
765
+ }
766
+ }
767
+ exports.QPoint2dBufferBuilder = QPoint2dBufferBuilder;
768
+ /** Constructs a [[QPoint3dBuffer]] using a [Uint16ArrayBuilder]($bentley).
769
+ * @public
770
+ * @extensions
771
+ */
772
+ class QPoint3dBufferBuilder {
773
+ /** Construct a new buffer with a [[length]] of zero. */
774
+ constructor(options) {
775
+ var _a;
776
+ this._scratchQPoint3d = new QPoint3d();
777
+ this.params = QParams3d.fromRange(options.range);
778
+ const initialCapacity = (_a = options.initialCapacity) !== null && _a !== void 0 ? _a : 0;
779
+ this.buffer = new core_bentley_1.Uint16ArrayBuilder({
780
+ growthFactor: options.growthFactor,
781
+ initialCapacity: 3 * initialCapacity,
782
+ });
783
+ }
784
+ /** Append a point with the specified quantized coordinates. */
785
+ pushXYZ(x, y, z) {
786
+ this.buffer.push(x);
787
+ this.buffer.push(y);
788
+ this.buffer.push(z);
789
+ }
790
+ /** Append a point with the specified quantized coordinates. */
791
+ push(pt) {
792
+ this.pushXYZ(pt.x, pt.y, pt.z);
793
+ }
794
+ /** The number of points currently in the [[buffer]]. */
795
+ get length() {
796
+ const len = this.buffer.length;
797
+ (0, core_bentley_1.assert)(len % 3 === 0);
798
+ return len / 3;
799
+ }
800
+ /** Returns the quantized point at the specified index in [[buffer]].
801
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
802
+ * @param result If supplied, a [[QPoint3d]] to initialize with the result and return.
803
+ * @returns The quantized point at the specified index in [[buffer]].
804
+ * @throws Error if `pointIndex` is out of bounds.
805
+ */
806
+ get(pointIndex, result) {
807
+ return QPoint3dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);
808
+ }
809
+ /** Returns the unquantized point at the specified index in [[buffer]].
810
+ * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].
811
+ * @param result If supplied, a [Point3d]($core-geometry) to initialize with the result and return.
812
+ * @returns The unquantized point at the specified index in [[buffer]].
813
+ * @throws Error if `pointIndex` is out of bounds.
814
+ */
815
+ unquantize(pointIndex, result) {
816
+ return this.get(pointIndex, this._scratchQPoint3d).unquantize(this.params, result);
817
+ }
818
+ /** Obtain a [[QPoint3dBuffer]] containing all of the points that have been appended by this builder. */
819
+ finish() {
820
+ return {
821
+ params: this.params,
822
+ points: this.buffer.toTypedArray(),
823
+ };
824
+ }
825
+ }
826
+ exports.QPoint3dBufferBuilder = QPoint3dBufferBuilder;
627
827
  //# sourceMappingURL=QPoint.js.map