@itwin/core-frontend 3.5.0-dev.5 → 3.5.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/render/RenderMaterial.d.ts +57 -30
- package/lib/cjs/render/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/render/RenderMaterial.js.map +1 -1
- package/lib/esm/render/RenderMaterial.d.ts +57 -30
- package/lib/esm/render/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/render/RenderMaterial.js.map +1 -1
- package/package.json +20 -20
|
@@ -12,6 +12,59 @@ export interface RenderMaterialSource {
|
|
|
12
12
|
iModel: IModelConnection;
|
|
13
13
|
id: Id64String;
|
|
14
14
|
}
|
|
15
|
+
/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).
|
|
16
|
+
* @see [[CreateRenderMaterialArgs.diffuse]].
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface MaterialDiffuseProps {
|
|
20
|
+
/** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */
|
|
21
|
+
color?: ColorDef | RgbColorProps;
|
|
22
|
+
/** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.
|
|
23
|
+
* Default: 0.6
|
|
24
|
+
*/
|
|
25
|
+
weight?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.
|
|
28
|
+
* @see [[CreateRenderMaterialArgs.specular]].
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface MaterialSpecularProps {
|
|
32
|
+
/** The color of the specular reflections.
|
|
33
|
+
* Default: white.
|
|
34
|
+
*/
|
|
35
|
+
color?: ColorDef | RgbColorProps;
|
|
36
|
+
/** A multiplier in [0..1] specifying the strength of the specular reflections.
|
|
37
|
+
* Default: 0.4
|
|
38
|
+
*/
|
|
39
|
+
weight?: number;
|
|
40
|
+
/** An exponent in [0..infinity] describing the shininess of the surface.
|
|
41
|
+
* Default: 13.5
|
|
42
|
+
*/
|
|
43
|
+
exponent?: number;
|
|
44
|
+
}
|
|
45
|
+
/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.
|
|
46
|
+
* @see [[CreateRenderMaterialArgs.textureMapping]].
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export interface MaterialTextureMappingProps {
|
|
50
|
+
/** The texture from which the image is obtained. */
|
|
51
|
+
texture: RenderTexture;
|
|
52
|
+
/** The mode controlling how the image is mapped onto the surface.
|
|
53
|
+
* Default: [TextureMapping.Mode.Parametric]($common).
|
|
54
|
+
*/
|
|
55
|
+
mode?: TextureMapping.Mode;
|
|
56
|
+
/** A 2x3 matrix for computing the UV coordinates.
|
|
57
|
+
* Default: [TextureMapping.Trans2x3.identity]($common).
|
|
58
|
+
*/
|
|
59
|
+
transform?: TextureMapping.Trans2x3;
|
|
60
|
+
/** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.
|
|
61
|
+
* A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.
|
|
62
|
+
* Default: 1.
|
|
63
|
+
*/
|
|
64
|
+
weight?: number;
|
|
65
|
+
/** @internal */
|
|
66
|
+
worldMapping?: boolean;
|
|
67
|
+
}
|
|
15
68
|
/** Arguments supplied to [[RenderSystem.createRenderMaterial]].
|
|
16
69
|
* @public
|
|
17
70
|
*/
|
|
@@ -25,37 +78,11 @@ export interface CreateRenderMaterialArgs {
|
|
|
25
78
|
* transparency of the material's [[textureMapping]] when sampling the texture.
|
|
26
79
|
*/
|
|
27
80
|
alpha?: number;
|
|
28
|
-
/** The diffuse properties of the material. */
|
|
29
|
-
diffuse?:
|
|
30
|
-
/** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */
|
|
31
|
-
color?: ColorDef | RgbColorProps;
|
|
32
|
-
/** A multiplier in [0..1] specifying how strongly the diffuse color reflects light. */
|
|
33
|
-
weight?: number;
|
|
34
|
-
};
|
|
81
|
+
/** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */
|
|
82
|
+
diffuse?: MaterialDiffuseProps;
|
|
35
83
|
/** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */
|
|
36
|
-
specular?:
|
|
37
|
-
/** The color of the specular reflections. Default: white. */
|
|
38
|
-
color?: ColorDef | RgbColorProps;
|
|
39
|
-
/** A multiplier in [0..1] specifying the strength of the specular reflections. */
|
|
40
|
-
weight?: number;
|
|
41
|
-
/** An exponent in [0..infinity] describing the shininess of the surface. */
|
|
42
|
-
exponent?: number;
|
|
43
|
-
};
|
|
84
|
+
specular?: MaterialSpecularProps;
|
|
44
85
|
/** Maps a [RenderTexture]($common) image to the surfaces to which the material is applied. */
|
|
45
|
-
textureMapping?:
|
|
46
|
-
/** The texture from which the image is obtained. */
|
|
47
|
-
texture: RenderTexture;
|
|
48
|
-
/** Describes how the texture image is mapped to the surface. Default: [TextureMapping.Mode.Parametric]($common). */
|
|
49
|
-
mode?: TextureMapping.Mode;
|
|
50
|
-
/** A 2x3 matrix for computing the UV coordinates. Default: [TextureMapping.Trans2x3.identity]($common). */
|
|
51
|
-
transform?: TextureMapping.Trans2x3;
|
|
52
|
-
/** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.
|
|
53
|
-
* A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.
|
|
54
|
-
* Default: 1.
|
|
55
|
-
*/
|
|
56
|
-
weight?: number;
|
|
57
|
-
/** @internal */
|
|
58
|
-
worldMapping?: boolean;
|
|
59
|
-
};
|
|
86
|
+
textureMapping?: MaterialTextureMappingProps;
|
|
60
87
|
}
|
|
61
88
|
//# sourceMappingURL=RenderMaterial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED
|
|
1
|
+
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,+GAA+G;IAC/G,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC;IAEpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gBAAgB;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,kGAAkG;IAClG,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,8FAA8F;IAC9F,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.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 Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/**
|
|
1
|
+
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.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 Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs.diffuse]].\r\n * @public\r\n */\r\nexport interface MaterialDiffuseProps {\r\n /** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.\r\n * Default: 0.6\r\n */\r\n weight?: number;\r\n}\r\n\r\n/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.\r\n * @see [[CreateRenderMaterialArgs.specular]].\r\n * @public\r\n */\r\nexport interface MaterialSpecularProps {\r\n /** The color of the specular reflections.\r\n * Default: white.\r\n */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying the strength of the specular reflections.\r\n * Default: 0.4\r\n */\r\n weight?: number;\r\n\r\n /** An exponent in [0..infinity] describing the shininess of the surface.\r\n * Default: 13.5\r\n */\r\n exponent?: number;\r\n}\r\n\r\n/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.\r\n * @see [[CreateRenderMaterialArgs.textureMapping]].\r\n * @public\r\n */\r\nexport interface MaterialTextureMappingProps {\r\n /** The texture from which the image is obtained. */\r\n texture: RenderTexture;\r\n\r\n /** The mode controlling how the image is mapped onto the surface.\r\n * Default: [TextureMapping.Mode.Parametric]($common).\r\n */\r\n mode?: TextureMapping.Mode;\r\n\r\n /** A 2x3 matrix for computing the UV coordinates.\r\n * Default: [TextureMapping.Trans2x3.identity]($common).\r\n */\r\n transform?: TextureMapping.Trans2x3;\r\n\r\n /** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.\r\n * A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.\r\n * Default: 1.\r\n */\r\n weight?: number;\r\n\r\n /** @internal */\r\n worldMapping?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n\r\n /** Specifies the transparency of the material from 0.0 (fully transparent) to 1.0 (fully opaque).\r\n * If defined, this overrides the transparency of any surface to which the material is applied, and is multiplied with the\r\n * transparency of the material's [[textureMapping]] when sampling the texture.\r\n */\r\n alpha?: number;\r\n\r\n /** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */\r\n diffuse?: MaterialDiffuseProps;\r\n\r\n /** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */\r\n specular?: MaterialSpecularProps;\r\n\r\n /** Maps a [RenderTexture]($common) image to the surfaces to which the material is applied. */\r\n textureMapping?: MaterialTextureMappingProps;\r\n}\r\n"]}
|
|
@@ -12,6 +12,59 @@ export interface RenderMaterialSource {
|
|
|
12
12
|
iModel: IModelConnection;
|
|
13
13
|
id: Id64String;
|
|
14
14
|
}
|
|
15
|
+
/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).
|
|
16
|
+
* @see [[CreateRenderMaterialArgs.diffuse]].
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface MaterialDiffuseProps {
|
|
20
|
+
/** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */
|
|
21
|
+
color?: ColorDef | RgbColorProps;
|
|
22
|
+
/** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.
|
|
23
|
+
* Default: 0.6
|
|
24
|
+
*/
|
|
25
|
+
weight?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.
|
|
28
|
+
* @see [[CreateRenderMaterialArgs.specular]].
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface MaterialSpecularProps {
|
|
32
|
+
/** The color of the specular reflections.
|
|
33
|
+
* Default: white.
|
|
34
|
+
*/
|
|
35
|
+
color?: ColorDef | RgbColorProps;
|
|
36
|
+
/** A multiplier in [0..1] specifying the strength of the specular reflections.
|
|
37
|
+
* Default: 0.4
|
|
38
|
+
*/
|
|
39
|
+
weight?: number;
|
|
40
|
+
/** An exponent in [0..infinity] describing the shininess of the surface.
|
|
41
|
+
* Default: 13.5
|
|
42
|
+
*/
|
|
43
|
+
exponent?: number;
|
|
44
|
+
}
|
|
45
|
+
/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.
|
|
46
|
+
* @see [[CreateRenderMaterialArgs.textureMapping]].
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export interface MaterialTextureMappingProps {
|
|
50
|
+
/** The texture from which the image is obtained. */
|
|
51
|
+
texture: RenderTexture;
|
|
52
|
+
/** The mode controlling how the image is mapped onto the surface.
|
|
53
|
+
* Default: [TextureMapping.Mode.Parametric]($common).
|
|
54
|
+
*/
|
|
55
|
+
mode?: TextureMapping.Mode;
|
|
56
|
+
/** A 2x3 matrix for computing the UV coordinates.
|
|
57
|
+
* Default: [TextureMapping.Trans2x3.identity]($common).
|
|
58
|
+
*/
|
|
59
|
+
transform?: TextureMapping.Trans2x3;
|
|
60
|
+
/** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.
|
|
61
|
+
* A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.
|
|
62
|
+
* Default: 1.
|
|
63
|
+
*/
|
|
64
|
+
weight?: number;
|
|
65
|
+
/** @internal */
|
|
66
|
+
worldMapping?: boolean;
|
|
67
|
+
}
|
|
15
68
|
/** Arguments supplied to [[RenderSystem.createRenderMaterial]].
|
|
16
69
|
* @public
|
|
17
70
|
*/
|
|
@@ -25,37 +78,11 @@ export interface CreateRenderMaterialArgs {
|
|
|
25
78
|
* transparency of the material's [[textureMapping]] when sampling the texture.
|
|
26
79
|
*/
|
|
27
80
|
alpha?: number;
|
|
28
|
-
/** The diffuse properties of the material. */
|
|
29
|
-
diffuse?:
|
|
30
|
-
/** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */
|
|
31
|
-
color?: ColorDef | RgbColorProps;
|
|
32
|
-
/** A multiplier in [0..1] specifying how strongly the diffuse color reflects light. */
|
|
33
|
-
weight?: number;
|
|
34
|
-
};
|
|
81
|
+
/** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */
|
|
82
|
+
diffuse?: MaterialDiffuseProps;
|
|
35
83
|
/** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */
|
|
36
|
-
specular?:
|
|
37
|
-
/** The color of the specular reflections. Default: white. */
|
|
38
|
-
color?: ColorDef | RgbColorProps;
|
|
39
|
-
/** A multiplier in [0..1] specifying the strength of the specular reflections. */
|
|
40
|
-
weight?: number;
|
|
41
|
-
/** An exponent in [0..infinity] describing the shininess of the surface. */
|
|
42
|
-
exponent?: number;
|
|
43
|
-
};
|
|
84
|
+
specular?: MaterialSpecularProps;
|
|
44
85
|
/** Maps a [RenderTexture]($common) image to the surfaces to which the material is applied. */
|
|
45
|
-
textureMapping?:
|
|
46
|
-
/** The texture from which the image is obtained. */
|
|
47
|
-
texture: RenderTexture;
|
|
48
|
-
/** Describes how the texture image is mapped to the surface. Default: [TextureMapping.Mode.Parametric]($common). */
|
|
49
|
-
mode?: TextureMapping.Mode;
|
|
50
|
-
/** A 2x3 matrix for computing the UV coordinates. Default: [TextureMapping.Trans2x3.identity]($common). */
|
|
51
|
-
transform?: TextureMapping.Trans2x3;
|
|
52
|
-
/** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.
|
|
53
|
-
* A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.
|
|
54
|
-
* Default: 1.
|
|
55
|
-
*/
|
|
56
|
-
weight?: number;
|
|
57
|
-
/** @internal */
|
|
58
|
-
worldMapping?: boolean;
|
|
59
|
-
};
|
|
86
|
+
textureMapping?: MaterialTextureMappingProps;
|
|
60
87
|
}
|
|
61
88
|
//# sourceMappingURL=RenderMaterial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED
|
|
1
|
+
{"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../../src/render/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,+GAA+G;IAC/G,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC;IAEpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gBAAgB;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,kGAAkG;IAClG,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,8FAA8F;IAC9F,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.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 Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/**
|
|
1
|
+
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../../src/render/RenderMaterial.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 Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderTexture, RgbColorProps, TextureMapping } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Describes the [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs.diffuse]].\r\n * @public\r\n */\r\nexport interface MaterialDiffuseProps {\r\n /** The diffuse color. If defined, this overrides the color of any surface to which the material is applied. */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying how strongly the diffuse color reflects light.\r\n * Default: 0.6\r\n */\r\n weight?: number;\r\n}\r\n\r\n/** Describes the [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of a material.\r\n * @see [[CreateRenderMaterialArgs.specular]].\r\n * @public\r\n */\r\nexport interface MaterialSpecularProps {\r\n /** The color of the specular reflections.\r\n * Default: white.\r\n */\r\n color?: ColorDef | RgbColorProps;\r\n\r\n /** A multiplier in [0..1] specifying the strength of the specular reflections.\r\n * Default: 0.4\r\n */\r\n weight?: number;\r\n\r\n /** An exponent in [0..infinity] describing the shininess of the surface.\r\n * Default: 13.5\r\n */\r\n exponent?: number;\r\n}\r\n\r\n/** Describes how to map a [RenderTexture]($common)'s image to the surfaces to which a [RenderMaterial]($common) is applied.\r\n * @see [[CreateRenderMaterialArgs.textureMapping]].\r\n * @public\r\n */\r\nexport interface MaterialTextureMappingProps {\r\n /** The texture from which the image is obtained. */\r\n texture: RenderTexture;\r\n\r\n /** The mode controlling how the image is mapped onto the surface.\r\n * Default: [TextureMapping.Mode.Parametric]($common).\r\n */\r\n mode?: TextureMapping.Mode;\r\n\r\n /** A 2x3 matrix for computing the UV coordinates.\r\n * Default: [TextureMapping.Trans2x3.identity]($common).\r\n */\r\n transform?: TextureMapping.Trans2x3;\r\n\r\n /** The ratio by which the color sampled from the texture image is mixed with the surface's or material's diffuse color.\r\n * A ratio of 1 selects only the texture sample; a ratio of 0 selects only the diffuse color; a ratio of 0.5 mixes them evenly.\r\n * Default: 1.\r\n */\r\n weight?: number;\r\n\r\n /** @internal */\r\n worldMapping?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n\r\n /** Specifies the transparency of the material from 0.0 (fully transparent) to 1.0 (fully opaque).\r\n * If defined, this overrides the transparency of any surface to which the material is applied, and is multiplied with the\r\n * transparency of the material's [[textureMapping]] when sampling the texture.\r\n */\r\n alpha?: number;\r\n\r\n /** The [diffuse](https://en.wikipedia.org/wiki/Diffuse_reflection) properties of the material. */\r\n diffuse?: MaterialDiffuseProps;\r\n\r\n /** The [specular](https://en.wikipedia.org/wiki/Specular_highlight) properties of the material. */\r\n specular?: MaterialSpecularProps;\r\n\r\n /** Maps a [RenderTexture]($common) image to the surfaces to which the material is applied. */\r\n textureMapping?: MaterialTextureMappingProps;\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-frontend",
|
|
3
|
-
"version": "3.5.0-dev.
|
|
3
|
+
"version": "3.5.0-dev.7",
|
|
4
4
|
"description": "iTwin.js frontend components",
|
|
5
5
|
"main": "lib/cjs/core-frontend.js",
|
|
6
6
|
"module": "lib/esm/core-frontend.js",
|
|
@@ -22,29 +22,29 @@
|
|
|
22
22
|
"url": "http://www.bentley.com"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@itwin/appui-abstract": "^3.5.0-dev.
|
|
26
|
-
"@itwin/core-bentley": "^3.5.0-dev.
|
|
27
|
-
"@itwin/core-common": "^3.5.0-dev.
|
|
28
|
-
"@itwin/core-geometry": "^3.5.0-dev.
|
|
29
|
-
"@itwin/core-orbitgt": "^3.5.0-dev.
|
|
30
|
-
"@itwin/core-quantity": "^3.5.0-dev.
|
|
31
|
-
"@itwin/webgl-compatibility": "^3.5.0-dev.
|
|
25
|
+
"@itwin/appui-abstract": "^3.5.0-dev.7",
|
|
26
|
+
"@itwin/core-bentley": "^3.5.0-dev.7",
|
|
27
|
+
"@itwin/core-common": "^3.5.0-dev.7",
|
|
28
|
+
"@itwin/core-geometry": "^3.5.0-dev.7",
|
|
29
|
+
"@itwin/core-orbitgt": "^3.5.0-dev.7",
|
|
30
|
+
"@itwin/core-quantity": "^3.5.0-dev.7",
|
|
31
|
+
"@itwin/webgl-compatibility": "^3.5.0-dev.7"
|
|
32
32
|
},
|
|
33
33
|
"//devDependencies": [
|
|
34
34
|
"NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
|
|
35
35
|
"NOTE: All tools used by scripts in this package must be listed as devDependencies"
|
|
36
36
|
],
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@itwin/appui-abstract": "3.5.0-dev.
|
|
39
|
-
"@itwin/build-tools": "3.5.0-dev.
|
|
40
|
-
"@itwin/core-bentley": "3.5.0-dev.
|
|
41
|
-
"@itwin/core-common": "3.5.0-dev.
|
|
42
|
-
"@itwin/core-geometry": "3.5.0-dev.
|
|
43
|
-
"@itwin/core-orbitgt": "3.5.0-dev.
|
|
44
|
-
"@itwin/core-quantity": "3.5.0-dev.
|
|
45
|
-
"@itwin/certa": "3.5.0-dev.
|
|
46
|
-
"@itwin/eslint-plugin": "3.5.0-dev.
|
|
47
|
-
"@itwin/webgl-compatibility": "3.5.0-dev.
|
|
38
|
+
"@itwin/appui-abstract": "3.5.0-dev.7",
|
|
39
|
+
"@itwin/build-tools": "3.5.0-dev.7",
|
|
40
|
+
"@itwin/core-bentley": "3.5.0-dev.7",
|
|
41
|
+
"@itwin/core-common": "3.5.0-dev.7",
|
|
42
|
+
"@itwin/core-geometry": "3.5.0-dev.7",
|
|
43
|
+
"@itwin/core-orbitgt": "3.5.0-dev.7",
|
|
44
|
+
"@itwin/core-quantity": "3.5.0-dev.7",
|
|
45
|
+
"@itwin/certa": "3.5.0-dev.7",
|
|
46
|
+
"@itwin/eslint-plugin": "3.5.0-dev.7",
|
|
47
|
+
"@itwin/webgl-compatibility": "3.5.0-dev.7",
|
|
48
48
|
"@types/chai": "4.3.1",
|
|
49
49
|
"@types/chai-as-promised": "^7",
|
|
50
50
|
"@types/deep-assign": "^0.1.0",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@itwin/object-storage-azure": "~1.4.0",
|
|
77
77
|
"@itwin/cloud-agnostic-core": "~1.4.0",
|
|
78
78
|
"@itwin/object-storage-core": "~1.4.0",
|
|
79
|
-
"@itwin/core-i18n": "3.5.0-dev.
|
|
80
|
-
"@itwin/core-telemetry": "3.5.0-dev.
|
|
79
|
+
"@itwin/core-i18n": "3.5.0-dev.7",
|
|
80
|
+
"@itwin/core-telemetry": "3.5.0-dev.7",
|
|
81
81
|
"@loaders.gl/core": "^3.1.6",
|
|
82
82
|
"@loaders.gl/draco": "^3.1.6",
|
|
83
83
|
"deep-assign": "^2.0.0",
|