deeptwins-engine-3d 0.1.60 → 0.1.61

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.
@@ -423,7 +423,8 @@ export var DEFAULT_BASE_LAYER = {
423
423
  name: '高德影像',
424
424
  type: 'raster',
425
425
  layers: [{
426
- url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
426
+ url: 'https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
427
+ subdomains: ['1', '2', '3', '4'],
427
428
  minimumLevel: 1,
428
429
  maximumLevel: 18,
429
430
  credit: 'gd_img'
@@ -433,7 +434,8 @@ export var DEFAULT_BASE_LAYER = {
433
434
  name: '高德影像注记',
434
435
  type: 'raster',
435
436
  layers: [{
436
- url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
437
+ url: 'https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
438
+ subdomains: ['1', '2', '3', '4'],
437
439
  minimumLevel: 1,
438
440
  maximumLevel: 18,
439
441
  credit: 'gd_img'
@@ -448,7 +450,8 @@ export var DEFAULT_BASE_LAYER = {
448
450
  name: '高德电子',
449
451
  type: 'raster',
450
452
  layers: [{
451
- url: 'https://wprd02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=2&style=7',
453
+ url: 'https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=2&style=7',
454
+ subdomains: ['1', '2', '3', '4'],
452
455
  minimumLevel: 1,
453
456
  maximumLevel: 18,
454
457
  credit: 'gd_vec'
@@ -468,7 +471,8 @@ export var DEFAULT_BASE_LAYER = {
468
471
  name: '腾讯影像',
469
472
  type: 'raster',
470
473
  layers: [{
471
- url: 'https://p2.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400',
474
+ url: 'https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400',
475
+ subdomains: ['0', '1', '2', '3'],
472
476
  minimumLevel: 1,
473
477
  maximumLevel: 18,
474
478
  customTags: {
@@ -481,7 +485,8 @@ export var DEFAULT_BASE_LAYER = {
481
485
  },
482
486
  credit: 'tx_img_d'
483
487
  }, {
484
- url: 'https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=2&version=297',
488
+ url: 'https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=2&version=297',
489
+ subdomains: ['0', '1', '2', '3'],
485
490
  minimumLevel: 1,
486
491
  maximumLevel: 18,
487
492
  credit: 'tx_img_z'
@@ -491,7 +496,8 @@ export var DEFAULT_BASE_LAYER = {
491
496
  name: '腾讯电子',
492
497
  type: 'raster',
493
498
  layers: [{
494
- url: 'https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=1&version=297',
499
+ url: 'https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=1&version=297',
500
+ subdomains: ['0', '1', '2', '3'],
495
501
  minimumLevel: 1,
496
502
  maximumLevel: 18,
497
503
  credit: 'tx_vec'
@@ -501,7 +507,8 @@ export var DEFAULT_BASE_LAYER = {
501
507
  name: '腾讯电子黑色风格',
502
508
  type: 'raster',
503
509
  layers: [{
504
- url: 'https://rt3.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=4&scene=0',
510
+ url: 'https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=4&scene=0',
511
+ subdomains: ['0', '1', '2', '3'],
505
512
  minimumLevel: 1,
506
513
  maximumLevel: 18,
507
514
  credit: 'tx_vec'
@@ -654,6 +661,7 @@ export var DEFAULT_IMAGE_MATERIAL_STYLE = function DEFAULT_IMAGE_MATERIAL_STYLE(
654
661
  export var DEFAULT_GLOW_MATERIAL_STYLE = function DEFAULT_GLOW_MATERIAL_STYLE() {
655
662
  return {
656
663
  color: Cesium.Color.WHITE,
664
+ repeat: [1, 1],
657
665
  glowStrength: 2,
658
666
  mixRatio: 0.5
659
667
  };
@@ -15,7 +15,7 @@ export default class BaseSource {
15
15
  remove(): void;
16
16
  setData(data: any): this | undefined;
17
17
  _toDestroy(): void;
18
- static analysisSourceType(data: any): "other" | "wkt" | "sourceId" | "sourceInstance" | "geoJson" | "clampedPolygonGrid";
18
+ static analysisSourceType(data: any): "wkt" | "sourceId" | "sourceInstance" | "geoJson" | "clampedPolygonGrid" | "other";
19
19
  static wktToGeoJon(wkt: string): any;
20
20
  static geoJsonToGeoCartesian3Array(geoJson: any): any[];
21
21
  static handleFeaturePoint(feature: any): any;
package/dist/esm/index.js CHANGED
@@ -62,11 +62,11 @@ DEEP_TWINS_BASE_URL && (window.CESIUM_BASE_URL = DEEP_TWINS_BASE_URL);
62
62
  // 全局加载css
63
63
  loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
64
64
  // 打印版本信息
65
- console.log('DeepTwinsEngine3D Version:', "0.1.60");
65
+ console.log('DeepTwinsEngine3D Version:', "0.1.61");
66
66
  export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
67
67
  _classCallCheck(this, DeepTwinsEngine3D);
68
68
  });
69
- _defineProperty(DeepTwinsEngine3D, "Version", "0.1.60");
69
+ _defineProperty(DeepTwinsEngine3D, "Version", "0.1.61");
70
70
  _defineProperty(DeepTwinsEngine3D, "Map", Map);
71
71
  _defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
72
72
  _defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
@@ -1,4 +1,4 @@
1
- var _excluded = ["color"];
1
+ var _excluded = ["color", "repeat"];
2
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -22,7 +22,7 @@ import { cloneDeep, isEqual, merge } from 'lodash';
22
22
  import { DEFAULT_GLOW_MATERIAL_STYLE } from "../../constant";
23
23
  import * as utils from "../../tool/utils";
24
24
  /* babel-plugin-inline-import '../shader/ImageGlowingShader.glsl' */
25
- var ImageGlowingShader = "uniform sampler2D image;\nuniform float glowStrength;\nuniform vec4 color;\nuniform float mixRatio;\n\nczm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n\n // \u91C7\u6837\u56FE\u7247\n vec4 texColor = texture(image, st);\n\n // \u989C\u8272\u6DF7\u5408\uFF1Amix(\u539F\u59CB\u989C\u8272, \u76EE\u6807\u989C\u8272, mixRatio)\n vec3 mixedColor = mix(texColor.rgb, texColor.rgb * color.rgb, mixRatio);\n\n // \u53D1\u5149\u589E\u5F3A\n material.diffuse = mixedColor * glowStrength;\n\n // \u900F\u660E\u5EA6\u968F\u989C\u8272\u53D8\u5316\n material.alpha = texColor.a * mix(color.a, 1.0, 1.0 - mixRatio);\n\n return material;\n}\n";
25
+ var ImageGlowingShader = "uniform sampler2D image;\nuniform float glowStrength;\nuniform vec4 color;\nuniform float mixRatio;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = fract(materialInput.st * repeat);\n\n // \u91C7\u6837\u56FE\u7247\n vec4 texColor = texture(image, st);\n\n // \u989C\u8272\u6DF7\u5408\uFF1Amix(\u539F\u59CB\u989C\u8272, \u76EE\u6807\u989C\u8272, mixRatio)\n vec3 mixedColor = mix(texColor.rgb, texColor.rgb * color.rgb, mixRatio);\n\n // \u53D1\u5149\u589E\u5F3A\n material.diffuse = mixedColor * glowStrength;\n\n // \u900F\u660E\u5EA6\u968F\u989C\u8272\u53D8\u5316\n material.alpha = texColor.a * mix(color.a, 1.0, 1.0 - mixRatio);\n\n return material;\n}\n";
26
26
  import BaseMaterialProperty from "./BaseMaterialProperty";
27
27
  var ImageGlowingMaterialProperty = /*#__PURE__*/function (_BaseMaterialProperty) {
28
28
  _inherits(ImageGlowingMaterialProperty, _BaseMaterialProperty);
@@ -76,9 +76,11 @@ var ImageGlowingMaterialProperty = /*#__PURE__*/function (_BaseMaterialProperty)
76
76
  key: "handleStyle",
77
77
  value: function handleStyle(style) {
78
78
  var color = style.color,
79
+ repeat = style.repeat,
79
80
  options = _objectWithoutProperties(style, _excluded);
80
81
  var backStyle = _objectSpread({}, options);
81
82
  backStyle.color = utils.colorString(color);
83
+ backStyle.repeat = utils.arrCartesian2(repeat);
82
84
  return backStyle;
83
85
  }
84
86
  }]);
@@ -1,4 +1,4 @@
1
- var _excluded = ["color"];
1
+ var _excluded = ["color", "repeat"];
2
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -22,7 +22,7 @@ import { cloneDeep, merge } from 'lodash';
22
22
  import { DEFAULT_GLOW_MATERIAL_STYLE, DEFAULT_MATERIAL_APPEARANCE } from "../../constant";
23
23
  import * as utils from "../../tool/utils";
24
24
  /* babel-plugin-inline-import '../shader/ImageGlowingShader.glsl' */
25
- var ImageGlowingShader = "uniform sampler2D image;\nuniform float glowStrength;\nuniform vec4 color;\nuniform float mixRatio;\n\nczm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n\n // \u91C7\u6837\u56FE\u7247\n vec4 texColor = texture(image, st);\n\n // \u989C\u8272\u6DF7\u5408\uFF1Amix(\u539F\u59CB\u989C\u8272, \u76EE\u6807\u989C\u8272, mixRatio)\n vec3 mixedColor = mix(texColor.rgb, texColor.rgb * color.rgb, mixRatio);\n\n // \u53D1\u5149\u589E\u5F3A\n material.diffuse = mixedColor * glowStrength;\n\n // \u900F\u660E\u5EA6\u968F\u989C\u8272\u53D8\u5316\n material.alpha = texColor.a * mix(color.a, 1.0, 1.0 - mixRatio);\n\n return material;\n}\n";
25
+ var ImageGlowingShader = "uniform sampler2D image;\nuniform float glowStrength;\nuniform vec4 color;\nuniform float mixRatio;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = fract(materialInput.st * repeat);\n\n // \u91C7\u6837\u56FE\u7247\n vec4 texColor = texture(image, st);\n\n // \u989C\u8272\u6DF7\u5408\uFF1Amix(\u539F\u59CB\u989C\u8272, \u76EE\u6807\u989C\u8272, mixRatio)\n vec3 mixedColor = mix(texColor.rgb, texColor.rgb * color.rgb, mixRatio);\n\n // \u53D1\u5149\u589E\u5F3A\n material.diffuse = mixedColor * glowStrength;\n\n // \u900F\u660E\u5EA6\u968F\u989C\u8272\u53D8\u5316\n material.alpha = texColor.a * mix(color.a, 1.0, 1.0 - mixRatio);\n\n return material;\n}\n";
26
26
  import BaseMaterialAppearance from "./BaseMaterialAppearance";
27
27
  var ImageGlowingMaterialAppearance = /*#__PURE__*/function (_BaseMaterialAppearan) {
28
28
  _inherits(ImageGlowingMaterialAppearance, _BaseMaterialAppearan);
@@ -64,9 +64,11 @@ var ImageGlowingMaterialAppearance = /*#__PURE__*/function (_BaseMaterialAppeara
64
64
  key: "handleMaterial",
65
65
  value: function handleMaterial(style) {
66
66
  var color = style.color,
67
+ repeat = style.repeat,
67
68
  options = _objectWithoutProperties(style, _excluded);
68
69
  var backStyle = _objectSpread({}, options);
69
70
  backStyle.color = utils.colorString(color);
71
+ backStyle.repeat = utils.arrCartesian2(repeat);
70
72
  return backStyle;
71
73
  }
72
74
  }]);
@@ -2,10 +2,11 @@ uniform sampler2D image;
2
2
  uniform float glowStrength;
3
3
  uniform vec4 color;
4
4
  uniform float mixRatio;
5
+ uniform vec2 repeat;
5
6
 
6
7
  czm_material czm_getMaterial(czm_materialInput materialInput) {
7
8
  czm_material material = czm_getDefaultMaterial(materialInput);
8
- vec2 st = materialInput.st;
9
+ vec2 st = fract(materialInput.st * repeat);
9
10
 
10
11
  // 采样图片
11
12
  vec4 texColor = texture(image, st);