deeptwins-engine-3d 0.1.26 → 0.1.27

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.
@@ -32,9 +32,16 @@ var PolygonPrimitive = /*#__PURE__*/function (_BasePrimitive) {
32
32
  var primitiveInstance = arguments.length > 1 ? arguments[1] : undefined;
33
33
  var style = merge(DEFAULT_POLYGON_PRIMITIVE_OPTIONS(), cloneDeep(options.style || {}));
34
34
  var primitiveOptions = merge(DEFAULT_PRIMITIVE_OPTIONS(), cloneDeep(options.primitive || {}));
35
- var appearance = new Cesium.PerInstanceColorAppearance({
36
- translucent: !!(style !== null && style !== void 0 && style.translucent)
37
- });
35
+ var appearance = {};
36
+ if (options.appearance) {
37
+ appearance = new Cesium.MaterialAppearance(_objectSpread({
38
+ translucent: !!(style !== null && style !== void 0 && style.translucent)
39
+ }, options.appearance || {}));
40
+ } else {
41
+ appearance = new Cesium.PerInstanceColorAppearance({
42
+ translucent: !!(style !== null && style !== void 0 && style.translucent)
43
+ });
44
+ }
38
45
  this.primitive = new Cesium.Primitive(_objectSpread({
39
46
  geometryInstances: primitiveInstance,
40
47
  appearance: appearance
@@ -57,13 +57,12 @@ var PolygonPrimitiveInstance = /*#__PURE__*/function (_BasePrimitiveInstanc) {
57
57
  primitiveInstance = options.primitiveInstance;
58
58
  var instance = new Cesium.GeometryInstance({
59
59
  id: this.id,
60
- geometry: new Cesium.PolygonGeometry(_objectSpread(_objectSpread({
60
+ geometry: new Cesium.PolygonGeometry(_objectSpread({
61
61
  polygonHierarchy: new Cesium.PolygonHierarchy(positions, holes.map(function (t) {
62
62
  return new Cesium.PolygonHierarchy(t);
63
- }))
64
- }, style), {}, {
63
+ })),
65
64
  vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
66
- })),
65
+ }, style)),
67
66
  attributes: {
68
67
  color: color
69
68
  }
package/dist/esm/index.js CHANGED
@@ -50,7 +50,7 @@ loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
50
50
  export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
51
51
  _classCallCheck(this, DeepTwinsEngine3D);
52
52
  });
53
- _defineProperty(DeepTwinsEngine3D, "Version", "0.1.26");
53
+ _defineProperty(DeepTwinsEngine3D, "Version", "0.1.27");
54
54
  _defineProperty(DeepTwinsEngine3D, "Map", Map);
55
55
  _defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
56
56
  _defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);