@itwin/core-common 3.0.0-dev.76 → 3.0.0-dev.77

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.
@@ -9,32 +9,25 @@ import { IDisposable } from "@itwin/core-bentley";
9
9
  * @public
10
10
  */
11
11
  export declare abstract class RenderTexture implements IDisposable {
12
- /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend).
13
- * Textures created on the front-end generally have no key.
14
- */
15
- readonly key: string | undefined;
16
12
  /** Indicates the type of texture. */
17
13
  readonly type: RenderTexture.Type;
18
- /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.
19
- * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.
20
- */
21
- readonly isOwned: boolean;
22
14
  get isTileSection(): boolean;
23
15
  get isGlyph(): boolean;
24
16
  get isSkyBox(): boolean;
25
17
  abstract get bytesUsed(): number;
26
- protected constructor(params: RenderTexture.Params);
18
+ protected constructor(type: RenderTexture.Type);
27
19
  /** Releases any WebGL resources owned by this texture.
28
- * If [[RenderTexture.isOwned]] is true, then whatever object claims ownership of the texture is responsible for disposing of it when it is no longer needed.
29
- * Otherwise, the [RenderSystem]($frontend) will handle its disposal.
20
+ * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as "external",
21
+ * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle
22
+ * its disposal.
30
23
  */
31
24
  abstract dispose(): void;
32
25
  }
33
26
  /** @public */
34
27
  export declare namespace RenderTexture {
35
- /** Enumerates the types of [[RenderTexture]]s. */
28
+ /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */
36
29
  enum Type {
37
- /** An image applied to a surface, with support for mip-mapping and repeating. */
30
+ /** An image applied to a surface, with support for mip-mapping and repetition. */
38
31
  Normal = 0,
39
32
  /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */
40
33
  Glyph = 1,
@@ -44,27 +37,28 @@ export declare namespace RenderTexture {
44
37
  SkyBox = 3,
45
38
  /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */
46
39
  FilteredTileSection = 4,
47
- /** A thematic gradient image used for thematic display. */
40
+ /** A gradient image used for thematic display. */
48
41
  ThematicGradient = 5
49
42
  }
50
- /** Parameters used to construct a [[RenderTexture]]. */
43
+ /** Parameters used to construct a [[RenderTexture]].
44
+ * @deprecated use RenderSystem.createTexture and TextureCreateArgs.
45
+ * @public
46
+ */
51
47
  class Params {
52
48
  /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.
53
49
  * Textures created on the front-end generally have no key.
54
50
  */
55
51
  readonly key?: string;
56
52
  /** Indicates the type of texture. */
57
- readonly type: Type;
53
+ readonly type: RenderTexture.Type;
58
54
  /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.
59
55
  * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.
60
56
  */
61
57
  readonly isOwned: boolean;
62
- constructor(key?: string, type?: Type, isOwned?: boolean);
58
+ constructor(key?: string, type?: RenderTexture.Type, isOwned?: boolean);
63
59
  get isTileSection(): boolean;
64
60
  get isGlyph(): boolean;
65
61
  get isSkyBox(): boolean;
66
- /** Obtain a RenderTexture params object with default values. */
67
- static readonly defaults: Params;
68
62
  }
69
63
  }
70
64
  //# sourceMappingURL=RenderTexture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RenderTexture.d.ts","sourceRoot":"","sources":["../src/RenderTexture.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;GAKG;AACH,8BAAsB,aAAc,YAAW,WAAW;IACxD;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,qCAAqC;IACrC,SAAgB,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;IACzC;;OAEG;IACH,SAAgB,OAAO,EAAE,OAAO,CAAC;IAEjC,IAAW,aAAa,IAAI,OAAO,CAAyD;IAC5F,IAAW,OAAO,IAAI,OAAO,CAAmD;IAChF,IAAW,QAAQ,IAAI,OAAO,CAAoD;IAClF,aAAoB,SAAS,IAAI,MAAM,CAAC;IAExC,SAAS,aAAa,MAAM,EAAE,aAAa,CAAC,MAAM;IAMlD;;;OAGG;aACa,OAAO,IAAI,IAAI;CAChC;AAED,cAAc;AACd,yBAAiB,aAAa,CAAC;IAC7B,kDAAkD;IAClD,KAAY,IAAI;QACd,iFAAiF;QACjF,MAAM,IAAA;QACN,yGAAyG;QACzG,KAAK,IAAA;QACL,mFAAmF;QACnF,WAAW,IAAA;QACX,+DAA+D;QAC/D,MAAM,IAAA;QACN,oHAAoH;QACpH,mBAAmB,IAAA;QACnB,2DAA2D;QAC3D,gBAAgB,IAAA;KACjB;IAED,wDAAwD;IACxD,MAAa,MAAM;QACjB;;WAEG;QACH,SAAgB,GAAG,CAAC,EAAE,MAAM,CAAC;QAC7B,qCAAqC;QACrC,SAAgB,IAAI,EAAE,IAAI,CAAC;QAC3B;;WAEG;QACH,SAAgB,OAAO,EAAE,OAAO,CAAC;oBAEd,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,IAAkB,EAAE,OAAO,GAAE,OAAe;QAMnF,IAAW,aAAa,IAAI,OAAO,CAA2C;QAC9E,IAAW,OAAO,IAAI,OAAO,CAAqC;QAClE,IAAW,QAAQ,IAAI,OAAO,CAAsC;QAEpE,gEAAgE;QAChE,gBAAuB,QAAQ,SAAgB;KAChD;CACF"}
1
+ {"version":3,"file":"RenderTexture.d.ts","sourceRoot":"","sources":["../src/RenderTexture.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;GAKG;AACH,8BAAsB,aAAc,YAAW,WAAW;IACxD,qCAAqC;IACrC,SAAgB,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;IAEzC,IAAW,aAAa,IAAI,OAAO,CAAyD;IAC5F,IAAW,OAAO,IAAI,OAAO,CAAmD;IAChF,IAAW,QAAQ,IAAI,OAAO,CAAoD;IAClF,aAAoB,SAAS,IAAI,MAAM,CAAC;IAExC,SAAS,aAAa,IAAI,EAAE,aAAa,CAAC,IAAI;IAI9C;;;;OAIG;aACa,OAAO,IAAI,IAAI;CAChC;AAED,cAAc;AACd,yBAAiB,aAAa,CAAC;IAC7B,0FAA0F;IAC1F,KAAY,IAAI;QACd,kFAAkF;QAClF,MAAM,IAAA;QACN,yGAAyG;QACzG,KAAK,IAAA;QACL,mFAAmF;QACnF,WAAW,IAAA;QACX,+DAA+D;QAC/D,MAAM,IAAA;QACN,oHAAoH;QACpH,mBAAmB,IAAA;QACnB,kDAAkD;QAClD,gBAAgB,IAAA;KACjB;IAED;;;OAGG;IACH,MAAa,MAAM;QACjB;;WAEG;QACH,SAAgB,GAAG,CAAC,EAAE,MAAM,CAAC;QAC7B,qCAAqC;QACrC,SAAgB,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;QACzC;;WAEG;QACH,SAAgB,OAAO,EAAE,OAAO,CAAC;oBAEd,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,aAAa,CAAC,IAAgC,EAAE,OAAO,GAAE,OAAe;QAM/G,IAAW,aAAa,IAAI,OAAO,CAAyD;QAC5F,IAAW,OAAO,IAAI,OAAO,CAAmD;QAChF,IAAW,QAAQ,IAAI,OAAO,CAAoD;KACnF;CACF"}
@@ -15,10 +15,8 @@ exports.RenderTexture = void 0;
15
15
  * @public
16
16
  */
17
17
  class RenderTexture {
18
- constructor(params) {
19
- this.key = params.key;
20
- this.type = params.type;
21
- this.isOwned = params.isOwned;
18
+ constructor(type) {
19
+ this.type = type;
22
20
  }
23
21
  get isTileSection() { return RenderTexture.Type.TileSection === this.type; }
24
22
  get isGlyph() { return RenderTexture.Type.Glyph === this.type; }
@@ -27,10 +25,10 @@ class RenderTexture {
27
25
  exports.RenderTexture = RenderTexture;
28
26
  /** @public */
29
27
  (function (RenderTexture) {
30
- /** Enumerates the types of [[RenderTexture]]s. */
28
+ /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */
31
29
  let Type;
32
30
  (function (Type) {
33
- /** An image applied to a surface, with support for mip-mapping and repeating. */
31
+ /** An image applied to a surface, with support for mip-mapping and repetition. */
34
32
  Type[Type["Normal"] = 0] = "Normal";
35
33
  /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */
36
34
  Type[Type["Glyph"] = 1] = "Glyph";
@@ -40,22 +38,23 @@ exports.RenderTexture = RenderTexture;
40
38
  Type[Type["SkyBox"] = 3] = "SkyBox";
41
39
  /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */
42
40
  Type[Type["FilteredTileSection"] = 4] = "FilteredTileSection";
43
- /** A thematic gradient image used for thematic display. */
41
+ /** A gradient image used for thematic display. */
44
42
  Type[Type["ThematicGradient"] = 5] = "ThematicGradient";
45
43
  })(Type = RenderTexture.Type || (RenderTexture.Type = {}));
46
- /** Parameters used to construct a [[RenderTexture]]. */
44
+ /** Parameters used to construct a [[RenderTexture]].
45
+ * @deprecated use RenderSystem.createTexture and TextureCreateArgs.
46
+ * @public
47
+ */
47
48
  class Params {
48
- constructor(key, type = Type.Normal, isOwned = false) {
49
+ constructor(key, type = RenderTexture.Type.Normal, isOwned = false) {
49
50
  this.key = key;
50
51
  this.type = type;
51
52
  this.isOwned = isOwned;
52
53
  }
53
- get isTileSection() { return Type.TileSection === this.type; }
54
- get isGlyph() { return Type.Glyph === this.type; }
55
- get isSkyBox() { return Type.SkyBox === this.type; }
54
+ get isTileSection() { return RenderTexture.Type.TileSection === this.type; }
55
+ get isGlyph() { return RenderTexture.Type.Glyph === this.type; }
56
+ get isSkyBox() { return RenderTexture.Type.SkyBox === this.type; }
56
57
  }
57
- /** Obtain a RenderTexture params object with default values. */
58
- Params.defaults = new Params();
59
58
  RenderTexture.Params = Params;
60
59
  })(RenderTexture = exports.RenderTexture || (exports.RenderTexture = {}));
61
60
  //# sourceMappingURL=RenderTexture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../src/RenderTexture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;GAKG;AACH,MAAsB,aAAa;IAiBjC,YAAsB,MAA4B;QAChD,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IATD,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAcnF;AA5BD,sCA4BC;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,kDAAkD;IAClD,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,iFAAiF;QACjF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,2DAA2D;QAC3D,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;IAED,wDAAwD;IACxD,MAAa,MAAM;QAYjB,YAAmB,GAAY,EAAE,OAAa,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;YACjF,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAED,IAAW,aAAa,KAAc,OAAO,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,IAAW,OAAO,KAAc,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAClE,IAAW,QAAQ,KAAc,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;;IAEpE,gEAAgE;IACzC,eAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;IAvBpC,oBAAM,SAwBlB,CAAA;AACH,CAAC,EA3CgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA2C7B","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 Rendering\r\n */\r\n\r\nimport { IDisposable } from \"@itwin/core-bentley\";\r\n\r\n/** Represents a texture image applied to a surface during rendering.\r\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\r\n * @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image.\r\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport abstract class RenderTexture implements IDisposable {\r\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend).\r\n * Textures created on the front-end generally have no key.\r\n */\r\n public readonly key: string | undefined;\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\r\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\r\n */\r\n public readonly isOwned: boolean;\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n public abstract get bytesUsed(): number;\r\n\r\n protected constructor(params: RenderTexture.Params) {\r\n this.key = params.key;\r\n this.type = params.type;\r\n this.isOwned = params.isOwned;\r\n }\r\n\r\n /** Releases any WebGL resources owned by this texture.\r\n * If [[RenderTexture.isOwned]] is true, then whatever object claims ownership of the texture is responsible for disposing of it when it is no longer needed.\r\n * Otherwise, the [RenderSystem]($frontend) will handle its disposal.\r\n */\r\n public abstract dispose(): void;\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderTexture { // eslint-disable-line no-redeclare\r\n /** Enumerates the types of [[RenderTexture]]s. */\r\n export enum Type {\r\n /** An image applied to a surface, with support for mip-mapping and repeating. */\r\n Normal,\r\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\r\n Glyph,\r\n /** A non-repeating image with no mip-maps, used for example for reality models. */\r\n TileSection,\r\n /** A three-dimensional texture used for rendering a skybox. */\r\n SkyBox,\r\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\r\n FilteredTileSection,\r\n /** A thematic gradient image used for thematic display. */\r\n ThematicGradient,\r\n }\r\n\r\n /** Parameters used to construct a [[RenderTexture]]. */\r\n export class Params {\r\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\r\n * Textures created on the front-end generally have no key.\r\n */\r\n public readonly key?: string;\r\n /** Indicates the type of texture. */\r\n public readonly type: Type;\r\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\r\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\r\n */\r\n public readonly isOwned: boolean;\r\n\r\n public constructor(key?: string, type: Type = Type.Normal, isOwned: boolean = false) {\r\n this.key = key;\r\n this.type = type;\r\n this.isOwned = isOwned;\r\n }\r\n\r\n public get isTileSection(): boolean { return Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return Type.SkyBox === this.type; }\r\n\r\n /** Obtain a RenderTexture params object with default values. */\r\n public static readonly defaults = new Params();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../src/RenderTexture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;GAKG;AACH,MAAsB,aAAa;IASjC,YAAsB,IAAwB;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAPD,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAanF;AAnBD,sCAmBC;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;IAED;;;OAGG;IACH,MAAa,MAAM;QAYjB,YAAmB,GAAY,EAAE,OAA2B,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;YAC7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAED,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACnF;IArBY,oBAAM,SAqBlB,CAAA;AACH,CAAC,EA3CgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA2C7B","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 Rendering\r\n */\r\n\r\nimport { IDisposable } from \"@itwin/core-bentley\";\r\n\r\n/** Represents a texture image applied to a surface during rendering.\r\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\r\n * @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image.\r\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport abstract class RenderTexture implements IDisposable {\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n public abstract get bytesUsed(): number;\r\n\r\n protected constructor(type: RenderTexture.Type) {\r\n this.type = type;\r\n }\r\n\r\n /** Releases any WebGL resources owned by this texture.\r\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\r\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\r\n * its disposal.\r\n */\r\n public abstract dispose(): void;\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderTexture { // eslint-disable-line no-redeclare\r\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\r\n export enum Type {\r\n /** An image applied to a surface, with support for mip-mapping and repetition. */\r\n Normal,\r\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\r\n Glyph,\r\n /** A non-repeating image with no mip-maps, used for example for reality models. */\r\n TileSection,\r\n /** A three-dimensional texture used for rendering a skybox. */\r\n SkyBox,\r\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\r\n FilteredTileSection,\r\n /** A gradient image used for thematic display. */\r\n ThematicGradient,\r\n }\r\n\r\n /** Parameters used to construct a [[RenderTexture]].\r\n * @deprecated use RenderSystem.createTexture and TextureCreateArgs.\r\n * @public\r\n */\r\n export class Params {\r\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\r\n * Textures created on the front-end generally have no key.\r\n */\r\n public readonly key?: string;\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\r\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\r\n */\r\n public readonly isOwned: boolean;\r\n\r\n public constructor(key?: string, type: RenderTexture.Type = RenderTexture.Type.Normal, isOwned: boolean = false) {\r\n this.key = key;\r\n this.type = type;\r\n this.isOwned = isOwned;\r\n }\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n }\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.76",
3
+ "version": "3.0.0-dev.77",
4
4
  "description": "iTwin.js components common to frontend and backend",
5
5
  "main": "lib/core-common.js",
6
6
  "typings": "lib/core-common",
@@ -27,16 +27,16 @@
27
27
  "semver": "^5.5.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "@itwin/core-bentley": "^3.0.0-dev.76",
31
- "@itwin/core-geometry": "^3.0.0-dev.76",
32
- "@bentley/itwin-client": "^3.0.0-dev.76"
30
+ "@itwin/core-bentley": "^3.0.0-dev.77",
31
+ "@itwin/core-geometry": "^3.0.0-dev.77",
32
+ "@bentley/itwin-client": "^3.0.0-dev.77"
33
33
  },
34
34
  "devDependencies": {
35
- "@itwin/core-bentley": "3.0.0-dev.76",
36
- "@itwin/build-tools": "3.0.0-dev.76",
37
- "@itwin/eslint-plugin": "3.0.0-dev.76",
38
- "@itwin/core-geometry": "3.0.0-dev.76",
39
- "@bentley/itwin-client": "3.0.0-dev.76",
35
+ "@itwin/core-bentley": "3.0.0-dev.77",
36
+ "@itwin/build-tools": "3.0.0-dev.77",
37
+ "@itwin/eslint-plugin": "3.0.0-dev.77",
38
+ "@itwin/core-geometry": "3.0.0-dev.77",
39
+ "@bentley/itwin-client": "3.0.0-dev.77",
40
40
  "@types/chai": "^4.1.4",
41
41
  "@types/flatbuffers": "~1.10.0",
42
42
  "@types/mocha": "^8.2.2",