@aibee/crc-bmap 0.0.87 → 0.0.89
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/bmap.cjs.min.js +2 -2
- package/lib/bmap.cjs.min.js.map +2 -2
- package/lib/bmap.esm.js +15 -11
- package/lib/bmap.esm.js.map +3 -3
- package/lib/bmap.esm.min.js +2 -2
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +2 -2
- package/lib/bmap.min.js.map +2 -2
- package/lib/src/types/index.d.ts +1 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -424,9 +424,9 @@ function darkenColor(hexColor, factor = 0.85) {
|
|
|
424
424
|
g = parseInt(numbers[1].trim());
|
|
425
425
|
b = parseInt(numbers[2].trim());
|
|
426
426
|
}
|
|
427
|
-
r = Math.floor(r * factor);
|
|
428
|
-
g = Math.floor(g * factor);
|
|
429
|
-
b = Math.floor(b * factor);
|
|
427
|
+
r = Math.min(Math.floor(r * factor), 255);
|
|
428
|
+
g = Math.min(Math.floor(g * factor), 255);
|
|
429
|
+
b = Math.min(Math.floor(b * factor), 255);
|
|
430
430
|
let darkHexColor = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
431
431
|
return darkHexColor;
|
|
432
432
|
}
|
|
@@ -540,7 +540,8 @@ var defaultOptions = {
|
|
|
540
540
|
deltaHeight: 0,
|
|
541
541
|
userData: {},
|
|
542
542
|
gradualColor: [],
|
|
543
|
-
renderType: "single"
|
|
543
|
+
renderType: "single",
|
|
544
|
+
colorFactor: 0.9
|
|
544
545
|
};
|
|
545
546
|
var Graphic = class extends Object3D {
|
|
546
547
|
constructor(context, options) {
|
|
@@ -614,6 +615,10 @@ var Graphic = class extends Object3D {
|
|
|
614
615
|
this.initMaterial();
|
|
615
616
|
this.initMesh();
|
|
616
617
|
});
|
|
618
|
+
this.addEventListener("change-gradualColor", () => {
|
|
619
|
+
this.initMaterial();
|
|
620
|
+
this.initMesh();
|
|
621
|
+
});
|
|
617
622
|
}
|
|
618
623
|
getCenter() {
|
|
619
624
|
if (this.options.geometry.type === "point") {
|
|
@@ -689,7 +694,7 @@ var Graphic = class extends Object3D {
|
|
|
689
694
|
center: this.getPosition(),
|
|
690
695
|
maxValue,
|
|
691
696
|
opacity: this.options.fillOpacity,
|
|
692
|
-
direction: new Vector32(-1,
|
|
697
|
+
direction: new Vector32(-1, 0.2, 0),
|
|
693
698
|
max,
|
|
694
699
|
min
|
|
695
700
|
});
|
|
@@ -698,11 +703,11 @@ var Graphic = class extends Object3D {
|
|
|
698
703
|
return material;
|
|
699
704
|
}
|
|
700
705
|
const material1 = this.context.materialFactory.createShaderMaterial({
|
|
701
|
-
gradualColor: [darkenColor(this.options.gradualColor[0],
|
|
702
|
-
center: this.
|
|
706
|
+
gradualColor: [darkenColor(this.options.gradualColor[0], this.options.colorFactor), darkenColor(this.options.gradualColor[1], this.options.colorFactor)],
|
|
707
|
+
center: this.getCenter(),
|
|
703
708
|
maxValue,
|
|
704
709
|
opacity: this.options.fillOpacity,
|
|
705
|
-
direction: new Vector32(-1,
|
|
710
|
+
direction: new Vector32(-1, 0.2, 1),
|
|
706
711
|
max,
|
|
707
712
|
min
|
|
708
713
|
});
|
|
@@ -2435,7 +2440,7 @@ var MaterialFactory = class {
|
|
|
2435
2440
|
return this.lineMaterialMap.get(key);
|
|
2436
2441
|
}
|
|
2437
2442
|
const lineMaterial = new LineBasicMaterial2({
|
|
2438
|
-
color,
|
|
2443
|
+
color: new Color4(color).convertLinearToSRGB(),
|
|
2439
2444
|
transparent: true,
|
|
2440
2445
|
opacity
|
|
2441
2446
|
});
|
|
@@ -3083,7 +3088,7 @@ var defaultConfig = {
|
|
|
3083
3088
|
time: 100
|
|
3084
3089
|
},
|
|
3085
3090
|
ground: {
|
|
3086
|
-
color: "#
|
|
3091
|
+
color: "#F6F6F6",
|
|
3087
3092
|
opacity: 1,
|
|
3088
3093
|
height: 1e-3,
|
|
3089
3094
|
stroke: false,
|
|
@@ -3313,7 +3318,6 @@ var BMap = class extends EventDispatcher7 {
|
|
|
3313
3318
|
graphics.push(graphic);
|
|
3314
3319
|
}
|
|
3315
3320
|
}
|
|
3316
|
-
curFloor.addShadow();
|
|
3317
3321
|
curFloor.userData.legacyToGraphicMap = legacyToGraphicMap;
|
|
3318
3322
|
return { curFloor, graphics };
|
|
3319
3323
|
}
|