@itwin/core-backend 3.4.0-dev.29 → 3.4.0-dev.32

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.
@@ -69,7 +69,9 @@ export declare class RenderMaterialElement extends DefinitionElement {
69
69
  */
70
70
  static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): Id64String;
71
71
  }
72
- /** @public */
72
+ /** @public
73
+ * @note color, specularColor and reflectColor are stored as [R,G,B] where each value is between 0 and 1
74
+ */
73
75
  export declare namespace RenderMaterialElement {
74
76
  /** Parameters used to construct a [[RenderMaterial]]. */
75
77
  class Params {
@@ -1 +1 @@
1
- {"version":3,"file":"Material.d.ts","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAe,IAAI,EAAE,cAAc,EAAoC,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC/I,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC;;;GAGG;AACH,8BAAsB,gBAAiB,SAAQ,iBAAiB;IAC9D,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA+B;IAC7E;;;;OAIG;WACW,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjG;;;;;;OAMG;WACW,MAAM,CAAC,CAAC,SAAS,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;CAQzH;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA6B;I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E,MAAM,GAAG,IAAI;IAI5F;;;;;;;;OAQG;WACW,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,CAAC,MAAM,GAAG,qBAAqB;IAmC1J;;;;;;;;OAQG;WACW,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,CAAC,MAAM,GAAG,UAAU;CAIhJ;AAED;;EAEE;AACF,yBAAiB,qBAAqB,CAAC;IACrC,yDAAyD;IACzD,MAAa,MAAM;QACjB,6DAA6D;QACtD,WAAW,EAAE,MAAM,CAAC;QAC3B,uDAAuD;QAChD,WAAW,CAAC,EAAE,MAAM,CAAC;QAC5B,2GAA2G;QACpG,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,oGAAoG;QAC7F,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QAChC,4HAA4H;QACrH,MAAM,CAAC,EAAE,MAAM,CAAC;QACvB,iFAAiF;QAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;QACzB,yFAAyF;QAClF,OAAO,CAAC,EAAE,MAAM,CAAC;QACxB,mRAAmR;QAC5Q,QAAQ,CAAC,EAAE,MAAM,CAAC;QACzB,uJAAuJ;QAChJ,OAAO,CAAC,EAAE,MAAM,CAAC;QACxB,gHAAgH;QACzG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QAC/B,iDAAiD;QAC1C,UAAU,CAAC,EAAE,eAAe,CAAC;QAEpC,iJAAiJ;oBAC9H,WAAW,EAAE,MAAM;KAGvC;CACF"}
@@ -132,7 +132,9 @@ class RenderMaterialElement extends Element_1.DefinitionElement {
132
132
  }
133
133
  }
134
134
  exports.RenderMaterialElement = RenderMaterialElement;
135
- /** @public */
135
+ /** @public
136
+ * @note color, specularColor and reflectColor are stored as [R,G,B] where each value is between 0 and 1
137
+ */
136
138
  (function (RenderMaterialElement) {
137
139
  /** Parameters used to construct a [[RenderMaterial]]. */
138
140
  class Params {
@@ -1 +1 @@
1
- {"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAA+I;AAC/I,uCAA8C;AAG9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,2BAAiB;IAC9D,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC7E;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,iBAAiC,EAAE,IAAY;QACxF,MAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAA6B,QAAkB,EAAE,iBAAiC,EAAE,IAAY;QAClH,MAAM,YAAY,GAA2B;YAC3C,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,CAAC;SACzD,CAAC;QACF,OAAO,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC;CACF;AA3BD,4CA2BC;AAED;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,2BAAiB;IAQ1D,gBAAgB;IAChB,YAAY,KAA0B,EAAE,MAAgB;QACtD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,WAAW,GA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AC,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAvFD,sDAuFC;AAED,cAAc;AACd,WAAiB,qBAAqB;IACpC,yDAAyD;IACzD,MAAa,MAAM;QAwBjB,iJAAiJ;QACjJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IA5BY,4BAAM,SA4BlB,CAAA;AACH,CAAC,EA/BgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA+BrC","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 Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, RenderMaterialProps, TextureMapProps } from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n /** @internal */\r\n constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n /** @internal */\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.texture);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): RenderMaterialElement {\r\n const map = undefined !== params.patternMap ? { Pattern: params.patternMap } : undefined;\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: map,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): Id64String {\r\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\r\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterialElement { // eslint-disable-line no-redeclare\r\n /** Parameters used to construct a [[RenderMaterial]]. */\r\n export class Params {\r\n /** The palette name which categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** The optional description for this RenderMaterial */\r\n public description?: string;\r\n /** If defined, use this color for surface fill or diffuse illumination; if undefined, defaults to black */\r\n public color?: number[];\r\n /** If defined, use this color for surface specular illumination; if undefined, defaults to black */\r\n public specularColor?: number[];\r\n /** If defined, apply this specular exponent(surface shininess); range is 0 to 128; if undefined, defaults to 15.0 * 0.9 */\r\n public finish?: number;\r\n /** If defined, apply this surface transparency; if undefined, defaults to 0.0 */\r\n public transmit?: number;\r\n /** If defined, apply this surface diffuse reflectivity; if undefined, defaults to 0.6 */\r\n public diffuse?: number;\r\n /** If defined, apply this surface specular reflectivity; if undefined, defaults to 0.0. NOTE: The actual JSON allows a HasSpecular property to be true and the specular value itself undefined, in which case the value 0.4 would be used. This API does not allow this case. */\r\n public specular?: number;\r\n /** If defined, apply this surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined, defaults to 0.0 */\r\n public reflect?: number;\r\n /** If defined, apply this surface reflectance color; if undefined, defaults to whatever the specularColor is */\r\n public reflectColor?: number[];\r\n /** If defined, specifies the pattern mapping. */\r\n public patternMap?: TextureMapProps;\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAA+I;AAC/I,uCAA8C;AAG9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,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BAAqB,KAArB,6BAAqB,QA+BrC","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 Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, RenderMaterialProps, TextureMapProps } from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n /** @internal */\r\n constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n /** @internal */\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.texture);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): RenderMaterialElement {\r\n const map = undefined !== params.patternMap ? { Pattern: params.patternMap } : undefined;\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: map,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): Id64String {\r\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\r\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\r\n }\r\n}\r\n\r\n/** @public\r\n * @note color, specularColor and reflectColor are stored as [R,G,B] where each value is between 0 and 1\r\n*/\r\nexport namespace RenderMaterialElement { // eslint-disable-line no-redeclare\r\n /** Parameters used to construct a [[RenderMaterial]]. */\r\n export class Params {\r\n /** The palette name which categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** The optional description for this RenderMaterial */\r\n public description?: string;\r\n /** If defined, use this color for surface fill or diffuse illumination; if undefined, defaults to black */\r\n public color?: number[];\r\n /** If defined, use this color for surface specular illumination; if undefined, defaults to black */\r\n public specularColor?: number[];\r\n /** If defined, apply this specular exponent(surface shininess); range is 0 to 128; if undefined, defaults to 15.0 * 0.9 */\r\n public finish?: number;\r\n /** If defined, apply this surface transparency; if undefined, defaults to 0.0 */\r\n public transmit?: number;\r\n /** If defined, apply this surface diffuse reflectivity; if undefined, defaults to 0.6 */\r\n public diffuse?: number;\r\n /** If defined, apply this surface specular reflectivity; if undefined, defaults to 0.0. NOTE: The actual JSON allows a HasSpecular property to be true and the specular value itself undefined, in which case the value 0.4 would be used. This API does not allow this case. */\r\n public specular?: number;\r\n /** If defined, apply this surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined, defaults to 0.0 */\r\n public reflect?: number;\r\n /** If defined, apply this surface reflectance color; if undefined, defaults to whatever the specularColor is */\r\n public reflectColor?: number[];\r\n /** If defined, specifies the pattern mapping. */\r\n public patternMap?: TextureMapProps;\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n"]}
@@ -42,7 +42,6 @@ export * from "./domains/GenericElements";
42
42
  export { CloudSqlite, IModelJsNative, NativeLoggerCategory } from "@bentley/imodeljs-native";
43
43
  export * from "./IModelCloneContext";
44
44
  export * from "./IModelHost";
45
- export * from "./IModelSchemaLoader";
46
45
  export * from "./IpcHost";
47
46
  export * from "./NativeAppStorage";
48
47
  export * from "./NativeHost";
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CA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cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;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H;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -62,7 +62,6 @@ Object.defineProperty(exports, "IModelJsNative", { enumerable: true, get: functi
62
62
  Object.defineProperty(exports, "NativeLoggerCategory", { enumerable: true, get: function () { return imodeljs_native_1.NativeLoggerCategory; } });
63
63
  __exportStar(require("./IModelCloneContext"), exports);
64
64
  __exportStar(require("./IModelHost"), exports);
65
- __exportStar(require("./IModelSchemaLoader"), exports);
66
65
  __exportStar(require("./IpcHost"), exports);
67
66
  __exportStar(require("./NativeAppStorage"), exports);
68
67
  __exportStar(require("./NativeHost"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,kDAAgC;AAChC,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,kDAAgC;AAChC,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-backend",
3
- "version": "3.4.0-dev.29",
3
+ "version": "3.4.0-dev.32",
4
4
  "description": "iTwin.js backend components",
5
5
  "main": "lib/cjs/core-backend.js",
6
6
  "typings": "lib/cjs/core-backend",
@@ -24,16 +24,12 @@
24
24
  "url": "http://www.bentley.com"
25
25
  },
26
26
  "peerDependencies": {
27
- "@itwin/core-bentley": "^3.4.0-dev.29",
28
- "@itwin/core-common": "^3.4.0-dev.29",
29
- "@itwin/core-geometry": "^3.4.0-dev.29",
30
- "@itwin/ecschema-metadata": "^3.4.0-dev.29",
27
+ "@itwin/core-bentley": "^3.4.0-dev.32",
28
+ "@itwin/core-common": "^3.4.0-dev.32",
29
+ "@itwin/core-geometry": "^3.4.0-dev.32",
31
30
  "@opentelemetry/api": "^1.0.4"
32
31
  },
33
32
  "peerDependenciesMeta": {
34
- "@itwin/ecschema-metadata": {
35
- "optional": true
36
- },
37
33
  "@opentelemetry/api": {
38
34
  "optional": true
39
35
  }
@@ -43,13 +39,12 @@
43
39
  "NOTE: All tools used by scripts in this package must be listed as devDependencies"
44
40
  ],
45
41
  "devDependencies": {
46
- "@itwin/build-tools": "3.4.0-dev.29",
47
- "@itwin/core-bentley": "3.4.0-dev.29",
48
- "@itwin/core-common": "3.4.0-dev.29",
49
- "@itwin/core-geometry": "3.4.0-dev.29",
50
- "@itwin/core-webpack-tools": "3.4.0-dev.29",
51
- "@itwin/ecschema-metadata": "3.4.0-dev.29",
52
- "@itwin/eslint-plugin": "3.4.0-dev.29",
42
+ "@itwin/build-tools": "3.4.0-dev.32",
43
+ "@itwin/core-bentley": "3.4.0-dev.32",
44
+ "@itwin/core-common": "3.4.0-dev.32",
45
+ "@itwin/core-geometry": "3.4.0-dev.32",
46
+ "@itwin/core-webpack-tools": "3.4.0-dev.32",
47
+ "@itwin/eslint-plugin": "3.4.0-dev.32",
53
48
  "@opentelemetry/api": "^1.0.4",
54
49
  "@types/chai": "4.3.1",
55
50
  "@types/chai-as-promised": "^7",
@@ -80,7 +75,7 @@
80
75
  "dependencies": {
81
76
  "@azure/storage-blob": "^12.7.0",
82
77
  "@bentley/imodeljs-native": "3.4.9",
83
- "@itwin/core-telemetry": "3.4.0-dev.29",
78
+ "@itwin/core-telemetry": "3.4.0-dev.32",
84
79
  "form-data": "^2.3.2",
85
80
  "fs-extra": "^8.1.0",
86
81
  "json5": "^2.2.0",
@@ -1,26 +0,0 @@
1
- import { IModelDb } from "./IModelDb";
2
- import type { Schema as SchemaType } from "@itwin/ecschema-metadata";
3
- /**
4
- * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within
5
- * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if
6
- * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema
7
- * retrievals from an iModel.
8
- * @alpha
9
- */
10
- export declare class IModelSchemaLoader {
11
- private _iModel;
12
- private _context;
13
- /** @internal */
14
- constructor(_iModel: IModelDb);
15
- /** Get a schema by name
16
- * @param schemaName a string with the name of the schema to load.
17
- * @throws [IModelError]($common) if the schema is not found or cannot be loaded.
18
- */
19
- getSchema<T extends SchemaType>(schemaName: string): T;
20
- /** Attempts to get a schema by name
21
- * @param schemaName a string with the name of the schema to load.
22
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
23
- */
24
- tryGetSchema<T extends SchemaType>(schemaName: string): T | undefined;
25
- }
26
- //# sourceMappingURL=IModelSchemaLoader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelSchemaLoader.d.ts","sourceRoot":"","sources":["../../src/IModelSchemaLoader.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAwC,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAC;AA6B3G;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAIV,OAAO,CAAC,OAAO;IAHlC,OAAO,CAAC,QAAQ,CAAuB;IAEvC,gBAAgB;gBACW,OAAO,EAAE,QAAQ;IAU5C;;;OAGG;IACI,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;IAQ7D;;;OAGG;IACI,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;CAM7E"}
@@ -1,114 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.IModelSchemaLoader = void 0;
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const core_common_1 = require("@itwin/core-common");
10
- /* eslint-disable @typescript-eslint/naming-convention */
11
- /* eslint-disable @typescript-eslint/no-var-requires */
12
- let Schema;
13
- let SchemaContext;
14
- let SchemaKey;
15
- let SchemaMatchType;
16
- let ECVersion;
17
- /** The ecschema-metadata package is now an optional dependency. If the package
18
- * has not been installed, the exception is caught below. All the types will be
19
- * undefined, and an exception is throw in the IModelSchemaLoader constructor.
20
- */
21
- function loadMetadata() {
22
- try {
23
- const metadata = require("@itwin/ecschema-metadata");
24
- Schema = metadata.Schema;
25
- SchemaContext = metadata.SchemaContext;
26
- SchemaKey = metadata.SchemaKey;
27
- SchemaMatchType = metadata.SchemaMatchType;
28
- ECVersion = metadata.ECVersion;
29
- return true;
30
- }
31
- catch {
32
- return false;
33
- }
34
- }
35
- /**
36
- * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within
37
- * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if
38
- * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema
39
- * retrievals from an iModel.
40
- * @alpha
41
- */
42
- class IModelSchemaLoader {
43
- /** @internal */
44
- constructor(_iModel) {
45
- this._iModel = _iModel;
46
- // If the ecschema-metadata package was not installed inform the caller.
47
- if (!loadMetadata())
48
- throw new core_common_1.IModelError(core_bentley_1.IModelStatus.NotFound, "IModelSchemaLoader requires that @bentley/ecschema-metadata be installed.");
49
- this._context = new SchemaContext();
50
- const locater = new IModelSchemaLocater(this._iModel);
51
- this._context.addLocater(locater);
52
- }
53
- /** Get a schema by name
54
- * @param schemaName a string with the name of the schema to load.
55
- * @throws [IModelError]($common) if the schema is not found or cannot be loaded.
56
- */
57
- getSchema(schemaName) {
58
- const schema = this.tryGetSchema(schemaName);
59
- if (!schema)
60
- throw new core_common_1.IModelError(core_bentley_1.IModelStatus.NotFound, `reading schema=${schemaName}`);
61
- return schema;
62
- }
63
- /** Attempts to get a schema by name
64
- * @param schemaName a string with the name of the schema to load.
65
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
66
- */
67
- tryGetSchema(schemaName) {
68
- // SchemaKey version is not used when locating schema in an iModel, so the version is arbitrary.
69
- const key = new SchemaKey(schemaName, new ECVersion(1, 0, 0));
70
- const schema = this._context.getSchemaSync(key, SchemaMatchType.Latest);
71
- return schema;
72
- }
73
- }
74
- exports.IModelSchemaLoader = IModelSchemaLoader;
75
- /**
76
- * A private ISchemaLocater implementation for locating and retrieving EC Schema objects from an iModel
77
- * @alpha
78
- */
79
- class IModelSchemaLocater {
80
- /** @internal */
81
- constructor(_iModel) {
82
- this._iModel = _iModel;
83
- }
84
- /** Get a schema by [SchemaKey]
85
- * @param schemaKey The [SchemaKey] that identifies the schema.
86
- * @param matchType The [SchemaMatchType] to used for comparing schema versions.
87
- * @param context The [SchemaContext] used to facilitate schema location.
88
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
89
- */
90
- async getSchema(schemaKey, matchType, context) {
91
- return this.getSchemaSync(schemaKey, matchType, context);
92
- }
93
- /** Get a schema by [SchemaKey] synchronously.
94
- * @param schemaKey The [SchemaKey] that identifies the schema.
95
- * * @param matchType The [SchemaMatchType] to used for comparing schema versions.
96
- * @param context The [SchemaContext] used to facilitate schema location.
97
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
98
- */
99
- getSchemaSync(schemaKey, _matchType, context) {
100
- const schemaProps = this._iModel.nativeDb.getSchemaProps(schemaKey.name);
101
- return Schema.fromJsonSync(schemaProps, context !== null && context !== void 0 ? context : new SchemaContext());
102
- }
103
- /** Get a schema by [SchemaKey] asynchronously.
104
- * @param schemaKey The [SchemaKey] that identifies the schema.
105
- * * @param matchType The [SchemaMatchType] to used for comparing schema versions.
106
- * @param context The [SchemaContext] used to facilitate schema location.
107
- * @throws [Error] if the schema is not found or if the schema exists, but cannot be loaded.
108
- */
109
- async getSchemaAsync(schemaKey, _matchType, context) {
110
- const schemaProps = await this._iModel.nativeDb.getSchemaPropsAsync(schemaKey.name);
111
- return Schema.fromJsonSync(schemaProps, context !== null && context !== void 0 ? context : new SchemaContext());
112
- }
113
- }
114
- //# sourceMappingURL=IModelSchemaLoader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelSchemaLoader.js","sourceRoot":"","sources":["../../src/IModelSchemaLoader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAmD;AACnD,oDAAiD;AAIjD,yDAAyD;AACzD,wDAAwD;AAExD,IAAI,MAAW,CAAC;AAChB,IAAI,aAAkB,CAAC;AACvB,IAAI,SAAc,CAAC;AACnB,IAAI,eAAoB,CAAC;AACzB,IAAI,SAAc,CAAC;AAEnB;;;GAGG;AACH,SAAS,YAAY;IACnB,IAAI;QACF,MAAM,QAAQ,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACrD,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzB,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;QACvC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;QAC/B,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;QAC3C,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;QAC/B,OAAO,IAAI,CAAC;KACb;IAAC,MAAM;QACN,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAa,kBAAkB;IAG7B,gBAAgB;IAChB,YA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C;IAChE,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAuB,SAA2B,EAAE,UAAkC,EAAE,OAA0C;QACpJ,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzE,OAAO,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,aAAa,EAAE,CAAM,CAAC;IAC/E,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,cAAc,CAAuB,SAA2B,EAAE,UAAkC,EAAE,OAA0C;QAC3J,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpF,OAAO,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,aAAa,EAAE,CAAM,CAAC;IAC/E,CAAC;CACF","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\r\nimport { IModelStatus } from \"@itwin/core-bentley\";\r\nimport { IModelError } from \"@itwin/core-common\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport type { ISchemaLocater as ISchemaLocaterType, Schema as SchemaType } from \"@itwin/ecschema-metadata\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @typescript-eslint/no-var-requires */\r\n\r\nlet Schema: any;\r\nlet SchemaContext: any;\r\nlet SchemaKey: any;\r\nlet SchemaMatchType: any;\r\nlet ECVersion: any;\r\n\r\n/** The ecschema-metadata package is now an optional dependency. If the package\r\n * has not been installed, the exception is caught below. All the types will be\r\n * undefined, and an exception is throw in the IModelSchemaLoader constructor.\r\n */\r\nfunction loadMetadata(): boolean {\r\n try {\r\n const metadata = require(\"@itwin/ecschema-metadata\");\r\n Schema = metadata.Schema;\r\n SchemaContext = metadata.SchemaContext;\r\n SchemaKey = metadata.SchemaKey;\r\n SchemaMatchType = metadata.SchemaMatchType;\r\n ECVersion = metadata.ECVersion;\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within\r\n * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if\r\n * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema\r\n * retrievals from an iModel.\r\n * @alpha\r\n */\r\nexport class IModelSchemaLoader {\r\n private _context: typeof SchemaContext;\r\n\r\n /** @internal */\r\n public constructor(private _iModel: IModelDb) {\r\n // If the ecschema-metadata package was not installed inform the caller.\r\n if (!loadMetadata())\r\n throw new IModelError(IModelStatus.NotFound, \"IModelSchemaLoader requires that @bentley/ecschema-metadata be installed.\");\r\n\r\n this._context = new SchemaContext();\r\n const locater = new IModelSchemaLocater(this._iModel);\r\n this._context.addLocater(locater);\r\n }\r\n\r\n /** Get a schema by name\r\n * @param schemaName a string with the name of the schema to load.\r\n * @throws [IModelError]($common) if the schema is not found or cannot be loaded.\r\n */\r\n public getSchema<T extends SchemaType>(schemaName: string): T {\r\n const schema = this.tryGetSchema(schemaName);\r\n if (!schema)\r\n throw new IModelError(IModelStatus.NotFound, `reading schema=${schemaName}`);\r\n\r\n return schema as T;\r\n }\r\n\r\n /** Attempts to get a schema by name\r\n * @param schemaName a string with the name of the schema to load.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public tryGetSchema<T extends SchemaType>(schemaName: string): T | undefined {\r\n // SchemaKey version is not used when locating schema in an iModel, so the version is arbitrary.\r\n const key = new SchemaKey(schemaName, new ECVersion(1, 0, 0));\r\n const schema = this._context.getSchemaSync(key, SchemaMatchType.Latest);\r\n return schema as T;\r\n }\r\n}\r\n\r\n/**\r\n * A private ISchemaLocater implementation for locating and retrieving EC Schema objects from an iModel\r\n * @alpha\r\n */\r\nclass IModelSchemaLocater implements ISchemaLocaterType {\r\n /** @internal */\r\n public constructor(private _iModel: IModelDb) { }\r\n\r\n /** Get a schema by [SchemaKey]\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public async getSchema<T extends SchemaType>(schemaKey: typeof SchemaKey, matchType: typeof SchemaMatchType, context?: typeof SchemaContext | undefined): Promise<T | undefined> {\r\n return this.getSchemaSync(schemaKey, matchType, context) as T;\r\n }\r\n\r\n /** Get a schema by [SchemaKey] synchronously.\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public getSchemaSync<T extends SchemaType>(schemaKey: typeof SchemaKey, _matchType: typeof SchemaMatchType, context?: typeof SchemaContext | undefined): T | undefined {\r\n const schemaProps = this._iModel.nativeDb.getSchemaProps(schemaKey.name);\r\n return Schema.fromJsonSync(schemaProps, context ?? new SchemaContext()) as T;\r\n }\r\n\r\n /** Get a schema by [SchemaKey] asynchronously.\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [Error] if the schema is not found or if the schema exists, but cannot be loaded.\r\n */\r\n public async getSchemaAsync<T extends SchemaType>(schemaKey: typeof SchemaKey, _matchType: typeof SchemaMatchType, context?: typeof SchemaContext | undefined): Promise<T | undefined> {\r\n const schemaProps = await this._iModel.nativeDb.getSchemaPropsAsync(schemaKey.name);\r\n return Schema.fromJsonSync(schemaProps, context ?? new SchemaContext()) as T;\r\n }\r\n}\r\n"]}