@itwin/core-common 3.0.0-dev.172 → 3.0.0-dev.176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright © 2017-2021 Bentley Systems, Incorporated. All rights reserved.
3
+ Copyright © 2017-2022 Bentley Systems, Incorporated. All rights reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -28,6 +28,23 @@ export interface TextureLoadProps {
28
28
  /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */
29
29
  maxTextureSize?: number;
30
30
  }
31
+ /** Describes the type of transparency in the pixels of a [TextureImage]($frontend).
32
+ * Each pixel can be classified as either opaque or translucent.
33
+ * The transparency of the image as a whole is based on the combination of pixel transparencies.
34
+ * If this information is known, it should be supplied when creating a texture for more efficient rendering.
35
+ * @see [TextureImage.transparency]($frontend).
36
+ * @public
37
+ */
38
+ export declare enum TextureTransparency {
39
+ /** The image contains only opaque pixels. It should not blend with other objects in the scene. */
40
+ Opaque = 0,
41
+ /** The image contains only translucent pixels. It should blend with other objects in the scene. */
42
+ Translucent = 1,
43
+ /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while
44
+ * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.
45
+ */
46
+ Mixed = 2
47
+ }
31
48
  /** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].
32
49
  * @public
33
50
  */
@@ -36,9 +53,11 @@ export interface TextureData {
36
53
  width: number;
37
54
  /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */
38
55
  height: number;
39
- /** The format of the returned data, Jpeg or Png. */
56
+ /** The format of the image (Jpeg or Png). */
40
57
  format: ImageSourceFormat;
41
- /** returned byte data */
58
+ /** The encoded image bytes. */
42
59
  bytes: Uint8Array;
60
+ /** Information about the transparency of the texture image. Default: [[TextureTransparency.Mixed]]. */
61
+ transparency?: TextureTransparency;
43
62
  }
44
63
  //# sourceMappingURL=TextureProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextureProps.d.ts","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,sBAAsB;IAC1D,gCAAgC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,CAAC;IACd,uHAAuH;IACvH,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,yBAAyB;IACzB,KAAK,EAAE,UAAU,CAAC;CACnB"}
1
+ {"version":3,"file":"TextureProps.d.ts","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,sBAAsB;IAC1D,gCAAgC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,oBAAY,mBAAmB;IAC7B,kGAAkG;IAClG,MAAM,IAAA;IACN,mGAAmG;IACnG,WAAW,IAAA;IACX;;OAEG;IACH,KAAK,IAAA;CACN;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,CAAC;IACd,uHAAuH;IACvH,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,+BAA+B;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,uGAAuG;IACvG,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC"}
@@ -7,4 +7,23 @@
7
7
  * @module Entities
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.TextureTransparency = void 0;
11
+ /** Describes the type of transparency in the pixels of a [TextureImage]($frontend).
12
+ * Each pixel can be classified as either opaque or translucent.
13
+ * The transparency of the image as a whole is based on the combination of pixel transparencies.
14
+ * If this information is known, it should be supplied when creating a texture for more efficient rendering.
15
+ * @see [TextureImage.transparency]($frontend).
16
+ * @public
17
+ */
18
+ var TextureTransparency;
19
+ (function (TextureTransparency) {
20
+ /** The image contains only opaque pixels. It should not blend with other objects in the scene. */
21
+ TextureTransparency[TextureTransparency["Opaque"] = 0] = "Opaque";
22
+ /** The image contains only translucent pixels. It should blend with other objects in the scene. */
23
+ TextureTransparency[TextureTransparency["Translucent"] = 1] = "Translucent";
24
+ /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while
25
+ * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.
26
+ */
27
+ TextureTransparency[TextureTransparency["Mixed"] = 2] = "Mixed";
28
+ })(TextureTransparency = exports.TextureTransparency || (exports.TextureTransparency = {}));
10
29
  //# sourceMappingURL=TextureProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextureProps.js","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { ImageSourceFormat } from \"./Image\";\r\nimport { Base64EncodedString } from \"./Base64EncodedString\";\r\n\r\n/** Properties that define a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport interface TextureProps extends DefinitionElementProps {\r\n /** Format of the image data. */\r\n format: ImageSourceFormat;\r\n /** The image data stored in a Base64-encoded string according to the specified format.\r\n * @see [[Base64EncodedString.fromUint8Array]] to produce a well-formed base-64-encoded string.\r\n * @see [[Base64EncodedString.toUint8Array]] to decode the bytes.\r\n */\r\n data: Base64EncodedString;\r\n /** An optional description of the texture. */\r\n description?: string;\r\n}\r\n\r\n/** Properties that specify what texture should be loaded and how it should be loaded.\r\n * @public\r\n */\r\nexport interface TextureLoadProps {\r\n /** A valid Id64 string identifying the texture */\r\n name: Id64String;\r\n /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */\r\n maxTextureSize?: number;\r\n}\r\n\r\n/** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].\r\n * @public\r\n */\r\nexport interface TextureData {\r\n /** The width of the image, possibly reduced from the original width based on [[TextureLoadProps.maxTextureSize]]. */\r\n width: number;\r\n /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */\r\n height: number;\r\n /** The format of the returned data, Jpeg or Png. */\r\n format: ImageSourceFormat;\r\n /** returned byte data */\r\n bytes: Uint8Array;\r\n}\r\n"]}
1
+ {"version":3,"file":"TextureProps.js","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAgCH;;;;;;GAMG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,kGAAkG;IAClG,iEAAM,CAAA;IACN,mGAAmG;IACnG,2EAAW,CAAA;IACX;;OAEG;IACH,+DAAK,CAAA;AACP,CAAC,EATW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAS9B","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 Entities\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { ImageSourceFormat } from \"./Image\";\r\nimport { Base64EncodedString } from \"./Base64EncodedString\";\r\n\r\n/** Properties that define a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport interface TextureProps extends DefinitionElementProps {\r\n /** Format of the image data. */\r\n format: ImageSourceFormat;\r\n /** The image data stored in a Base64-encoded string according to the specified format.\r\n * @see [[Base64EncodedString.fromUint8Array]] to produce a well-formed base-64-encoded string.\r\n * @see [[Base64EncodedString.toUint8Array]] to decode the bytes.\r\n */\r\n data: Base64EncodedString;\r\n /** An optional description of the texture. */\r\n description?: string;\r\n}\r\n\r\n/** Properties that specify what texture should be loaded and how it should be loaded.\r\n * @public\r\n */\r\nexport interface TextureLoadProps {\r\n /** A valid Id64 string identifying the texture */\r\n name: Id64String;\r\n /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */\r\n maxTextureSize?: number;\r\n}\r\n\r\n/** Describes the type of transparency in the pixels of a [TextureImage]($frontend).\r\n * Each pixel can be classified as either opaque or translucent.\r\n * The transparency of the image as a whole is based on the combination of pixel transparencies.\r\n * If this information is known, it should be supplied when creating a texture for more efficient rendering.\r\n * @see [TextureImage.transparency]($frontend).\r\n * @public\r\n */\r\nexport enum TextureTransparency {\r\n /** The image contains only opaque pixels. It should not blend with other objects in the scene. */\r\n Opaque,\r\n /** The image contains only translucent pixels. It should blend with other objects in the scene. */\r\n Translucent,\r\n /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while\r\n * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.\r\n */\r\n Mixed,\r\n}\r\n\r\n/** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].\r\n * @public\r\n */\r\nexport interface TextureData {\r\n /** The width of the image, possibly reduced from the original width based on [[TextureLoadProps.maxTextureSize]]. */\r\n width: number;\r\n /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */\r\n height: number;\r\n /** The format of the image (Jpeg or Png). */\r\n format: ImageSourceFormat;\r\n /** The encoded image bytes. */\r\n bytes: Uint8Array;\r\n /** Information about the transparency of the texture image. Default: [[TextureTransparency.Mixed]]. */\r\n transparency?: TextureTransparency;\r\n}\r\n"]}
@@ -28,6 +28,23 @@ export interface TextureLoadProps {
28
28
  /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */
29
29
  maxTextureSize?: number;
30
30
  }
31
+ /** Describes the type of transparency in the pixels of a [TextureImage]($frontend).
32
+ * Each pixel can be classified as either opaque or translucent.
33
+ * The transparency of the image as a whole is based on the combination of pixel transparencies.
34
+ * If this information is known, it should be supplied when creating a texture for more efficient rendering.
35
+ * @see [TextureImage.transparency]($frontend).
36
+ * @public
37
+ */
38
+ export declare enum TextureTransparency {
39
+ /** The image contains only opaque pixels. It should not blend with other objects in the scene. */
40
+ Opaque = 0,
41
+ /** The image contains only translucent pixels. It should blend with other objects in the scene. */
42
+ Translucent = 1,
43
+ /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while
44
+ * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.
45
+ */
46
+ Mixed = 2
47
+ }
31
48
  /** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].
32
49
  * @public
33
50
  */
@@ -36,9 +53,11 @@ export interface TextureData {
36
53
  width: number;
37
54
  /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */
38
55
  height: number;
39
- /** The format of the returned data, Jpeg or Png. */
56
+ /** The format of the image (Jpeg or Png). */
40
57
  format: ImageSourceFormat;
41
- /** returned byte data */
58
+ /** The encoded image bytes. */
42
59
  bytes: Uint8Array;
60
+ /** Information about the transparency of the texture image. Default: [[TextureTransparency.Mixed]]. */
61
+ transparency?: TextureTransparency;
43
62
  }
44
63
  //# sourceMappingURL=TextureProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextureProps.d.ts","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,sBAAsB;IAC1D,gCAAgC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,CAAC;IACd,uHAAuH;IACvH,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,yBAAyB;IACzB,KAAK,EAAE,UAAU,CAAC;CACnB"}
1
+ {"version":3,"file":"TextureProps.d.ts","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,sBAAsB;IAC1D,gCAAgC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,oBAAY,mBAAmB;IAC7B,kGAAkG;IAClG,MAAM,IAAA;IACN,mGAAmG;IACnG,WAAW,IAAA;IACX;;OAEG;IACH,KAAK,IAAA;CACN;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qHAAqH;IACrH,KAAK,EAAE,MAAM,CAAC;IACd,uHAAuH;IACvH,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,+BAA+B;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,uGAAuG;IACvG,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC"}
@@ -5,5 +5,22 @@
5
5
  /** @packageDocumentation
6
6
  * @module Entities
7
7
  */
8
- export {};
8
+ /** Describes the type of transparency in the pixels of a [TextureImage]($frontend).
9
+ * Each pixel can be classified as either opaque or translucent.
10
+ * The transparency of the image as a whole is based on the combination of pixel transparencies.
11
+ * If this information is known, it should be supplied when creating a texture for more efficient rendering.
12
+ * @see [TextureImage.transparency]($frontend).
13
+ * @public
14
+ */
15
+ export var TextureTransparency;
16
+ (function (TextureTransparency) {
17
+ /** The image contains only opaque pixels. It should not blend with other objects in the scene. */
18
+ TextureTransparency[TextureTransparency["Opaque"] = 0] = "Opaque";
19
+ /** The image contains only translucent pixels. It should blend with other objects in the scene. */
20
+ TextureTransparency[TextureTransparency["Translucent"] = 1] = "Translucent";
21
+ /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while
22
+ * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.
23
+ */
24
+ TextureTransparency[TextureTransparency["Mixed"] = 2] = "Mixed";
25
+ })(TextureTransparency || (TextureTransparency = {}));
9
26
  //# sourceMappingURL=TextureProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextureProps.js","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { ImageSourceFormat } from \"./Image\";\r\nimport { Base64EncodedString } from \"./Base64EncodedString\";\r\n\r\n/** Properties that define a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport interface TextureProps extends DefinitionElementProps {\r\n /** Format of the image data. */\r\n format: ImageSourceFormat;\r\n /** The image data stored in a Base64-encoded string according to the specified format.\r\n * @see [[Base64EncodedString.fromUint8Array]] to produce a well-formed base-64-encoded string.\r\n * @see [[Base64EncodedString.toUint8Array]] to decode the bytes.\r\n */\r\n data: Base64EncodedString;\r\n /** An optional description of the texture. */\r\n description?: string;\r\n}\r\n\r\n/** Properties that specify what texture should be loaded and how it should be loaded.\r\n * @public\r\n */\r\nexport interface TextureLoadProps {\r\n /** A valid Id64 string identifying the texture */\r\n name: Id64String;\r\n /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */\r\n maxTextureSize?: number;\r\n}\r\n\r\n/** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].\r\n * @public\r\n */\r\nexport interface TextureData {\r\n /** The width of the image, possibly reduced from the original width based on [[TextureLoadProps.maxTextureSize]]. */\r\n width: number;\r\n /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */\r\n height: number;\r\n /** The format of the returned data, Jpeg or Png. */\r\n format: ImageSourceFormat;\r\n /** returned byte data */\r\n bytes: Uint8Array;\r\n}\r\n"]}
1
+ {"version":3,"file":"TextureProps.js","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAgCH;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,kGAAkG;IAClG,iEAAM,CAAA;IACN,mGAAmG;IACnG,2EAAW,CAAA;IACX;;OAEG;IACH,+DAAK,CAAA;AACP,CAAC,EATW,mBAAmB,KAAnB,mBAAmB,QAS9B","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 Entities\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { ImageSourceFormat } from \"./Image\";\r\nimport { Base64EncodedString } from \"./Base64EncodedString\";\r\n\r\n/** Properties that define a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport interface TextureProps extends DefinitionElementProps {\r\n /** Format of the image data. */\r\n format: ImageSourceFormat;\r\n /** The image data stored in a Base64-encoded string according to the specified format.\r\n * @see [[Base64EncodedString.fromUint8Array]] to produce a well-formed base-64-encoded string.\r\n * @see [[Base64EncodedString.toUint8Array]] to decode the bytes.\r\n */\r\n data: Base64EncodedString;\r\n /** An optional description of the texture. */\r\n description?: string;\r\n}\r\n\r\n/** Properties that specify what texture should be loaded and how it should be loaded.\r\n * @public\r\n */\r\nexport interface TextureLoadProps {\r\n /** A valid Id64 string identifying the texture */\r\n name: Id64String;\r\n /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */\r\n maxTextureSize?: number;\r\n}\r\n\r\n/** Describes the type of transparency in the pixels of a [TextureImage]($frontend).\r\n * Each pixel can be classified as either opaque or translucent.\r\n * The transparency of the image as a whole is based on the combination of pixel transparencies.\r\n * If this information is known, it should be supplied when creating a texture for more efficient rendering.\r\n * @see [TextureImage.transparency]($frontend).\r\n * @public\r\n */\r\nexport enum TextureTransparency {\r\n /** The image contains only opaque pixels. It should not blend with other objects in the scene. */\r\n Opaque,\r\n /** The image contains only translucent pixels. It should blend with other objects in the scene. */\r\n Translucent,\r\n /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while\r\n * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.\r\n */\r\n Mixed,\r\n}\r\n\r\n/** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].\r\n * @public\r\n */\r\nexport interface TextureData {\r\n /** The width of the image, possibly reduced from the original width based on [[TextureLoadProps.maxTextureSize]]. */\r\n width: number;\r\n /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */\r\n height: number;\r\n /** The format of the image (Jpeg or Png). */\r\n format: ImageSourceFormat;\r\n /** The encoded image bytes. */\r\n bytes: Uint8Array;\r\n /** Information about the transparency of the texture image. Default: [[TextureTransparency.Mixed]]. */\r\n transparency?: TextureTransparency;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-common",
3
- "version": "3.0.0-dev.172",
3
+ "version": "3.0.0-dev.176",
4
4
  "description": "iTwin.js components common to frontend and backend",
5
5
  "main": "lib/cjs/core-common.js",
6
6
  "module": "lib/esm/core-common.js",
@@ -29,14 +29,14 @@
29
29
  "js-base64": "^3.6.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@itwin/core-bentley": "^3.0.0-dev.172",
33
- "@itwin/core-geometry": "^3.0.0-dev.172"
32
+ "@itwin/core-bentley": "^3.0.0-dev.176",
33
+ "@itwin/core-geometry": "^3.0.0-dev.176"
34
34
  },
35
35
  "devDependencies": {
36
- "@itwin/build-tools": "3.0.0-dev.172",
37
- "@itwin/core-bentley": "3.0.0-dev.172",
38
- "@itwin/core-geometry": "3.0.0-dev.172",
39
- "@itwin/eslint-plugin": "3.0.0-dev.172",
36
+ "@itwin/build-tools": "3.0.0-dev.176",
37
+ "@itwin/core-bentley": "3.0.0-dev.176",
38
+ "@itwin/core-geometry": "3.0.0-dev.176",
39
+ "@itwin/eslint-plugin": "3.0.0-dev.176",
40
40
  "@types/chai": "^4.1.4",
41
41
  "@types/flatbuffers": "~1.10.0",
42
42
  "@types/mocha": "^8.2.2",