@itwin/ecschema-rpcinterface-tests 3.4.0-dev.10 → 3.4.0-dev.12
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/dist/bundled-tests.js +39 -20
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -68931,12 +68931,21 @@ var Gradient;
|
|
|
68931
68931
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== imageBuffer);
|
|
68932
68932
|
return imageBuffer;
|
|
68933
68933
|
}
|
|
68934
|
-
/**
|
|
68934
|
+
/** Produces a bitmap image from this gradient.
|
|
68935
68935
|
* @param width Width of the image
|
|
68936
68936
|
* @param height Height of the image
|
|
68937
|
-
* @
|
|
68937
|
+
* @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.
|
|
68938
|
+
* @see [[produceImage]] for more customization.
|
|
68938
68939
|
*/
|
|
68939
68940
|
getImage(width, height) {
|
|
68941
|
+
if (this.mode === Mode.Thematic)
|
|
68942
|
+
width = 1;
|
|
68943
|
+
return this.produceImage({ width, height, includeThematicMargin: true });
|
|
68944
|
+
}
|
|
68945
|
+
/** Produces a bitmap image from this gradient. */
|
|
68946
|
+
produceImage(args) {
|
|
68947
|
+
var _a;
|
|
68948
|
+
const { width, height, includeThematicMargin } = { ...args };
|
|
68940
68949
|
const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;
|
|
68941
68950
|
const cosA = Math.cos(thisAngle);
|
|
68942
68951
|
const sinA = Math.sin(thisAngle);
|
|
@@ -69042,27 +69051,29 @@ var Gradient;
|
|
|
69042
69051
|
break;
|
|
69043
69052
|
}
|
|
69044
69053
|
case Mode.Thematic: {
|
|
69045
|
-
|
|
69046
|
-
if (settings === undefined) {
|
|
69047
|
-
settings = _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.defaults;
|
|
69048
|
-
}
|
|
69054
|
+
const settings = (_a = this.thematicSettings) !== null && _a !== void 0 ? _a : _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.defaults;
|
|
69049
69055
|
for (let j = 0; j < height; j++) {
|
|
69050
69056
|
let f = 1 - j / height;
|
|
69051
69057
|
let color;
|
|
69052
|
-
|
|
69053
|
-
|
|
69054
|
-
|
|
69055
|
-
|
|
69056
|
-
|
|
69057
|
-
|
|
69058
|
-
|
|
69059
|
-
|
|
69058
|
+
if (includeThematicMargin && (f < _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.margin || f > _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.contentMax)) {
|
|
69059
|
+
color = settings.marginColor;
|
|
69060
|
+
}
|
|
69061
|
+
else {
|
|
69062
|
+
f = (f - _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.margin) / (_ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.contentRange);
|
|
69063
|
+
switch (settings.mode) {
|
|
69064
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.SteppedWithDelimiter:
|
|
69065
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.IsoLines:
|
|
69066
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.Stepped: {
|
|
69067
|
+
if (settings.stepCount > 1) {
|
|
69068
|
+
const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
|
|
69069
|
+
color = this.mapColor(fStep);
|
|
69070
|
+
}
|
|
69071
|
+
break;
|
|
69060
69072
|
}
|
|
69061
|
-
|
|
69073
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.Smooth:
|
|
69074
|
+
color = this.mapColor(f);
|
|
69075
|
+
break;
|
|
69062
69076
|
}
|
|
69063
|
-
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.Smooth:
|
|
69064
|
-
color = this.mapColor(f);
|
|
69065
|
-
break;
|
|
69066
69077
|
}
|
|
69067
69078
|
for (let i = 0; i < width; i++) {
|
|
69068
69079
|
image[currentIdx--] = color.getAlpha();
|
|
@@ -153080,7 +153091,15 @@ class System extends _RenderSystem__WEBPACK_IMPORTED_MODULE_7__.RenderSystem {
|
|
|
153080
153091
|
}
|
|
153081
153092
|
/** Attempt to create a texture using gradient symbology. */
|
|
153082
153093
|
getGradientTexture(symb, iModel) {
|
|
153083
|
-
|
|
153094
|
+
let width = 0x100;
|
|
153095
|
+
let height = 0x100;
|
|
153096
|
+
if (symb.mode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Gradient.Mode.Thematic) {
|
|
153097
|
+
// Pixels in each row are identical, no point in having width > 1.
|
|
153098
|
+
width = 1;
|
|
153099
|
+
// We want maximum height to minimize bleeding of margin color.
|
|
153100
|
+
height = this.maxTextureSize;
|
|
153101
|
+
}
|
|
153102
|
+
const source = symb.produceImage({ width, height, includeThematicMargin: true });
|
|
153084
153103
|
return this.createTexture({
|
|
153085
153104
|
image: {
|
|
153086
153105
|
source,
|
|
@@ -306076,7 +306095,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
306076
306095
|
/***/ ((module) => {
|
|
306077
306096
|
|
|
306078
306097
|
"use strict";
|
|
306079
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.
|
|
306098
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.12","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"tsc 1>&2 --outDir lib/cjs","build:esm":"tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.4.0-dev.12","@itwin/core-bentley":"workspace:^3.4.0-dev.12","@itwin/core-common":"workspace:^3.4.0-dev.12","@itwin/core-geometry":"workspace:^3.4.0-dev.12","@itwin/core-orbitgt":"workspace:^3.4.0-dev.12","@itwin/core-quantity":"workspace:^3.4.0-dev.12","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.12"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"16.11.7","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
306080
306099
|
|
|
306081
306100
|
/***/ })
|
|
306082
306101
|
|