|
@@ -55607,11 +55607,11 @@
|
|
|
var texLoader$7 = new TextureLoader();
|
|
|
var lineMat;
|
|
|
var defaultLineLength = 1;
|
|
|
- var defaultSpotScale = 0.4;
|
|
|
+ var defaultSpotScale = 0.35;
|
|
|
var titleHeight = {
|
|
|
- uponSpot: 0.1,
|
|
|
- uponLine: 0
|
|
|
- };
|
|
|
+ uponSpot: 0.1
|
|
|
+ }; //title底部和spot顶端间隔
|
|
|
+
|
|
|
var Vectors$2 = {
|
|
|
UP: new Vector3(0, 1, 0),
|
|
|
ZERO: new Vector3()
|
|
@@ -55815,7 +55815,7 @@
|
|
|
setTitle() {
|
|
|
var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
|
this.titleLabel.setText(title);
|
|
|
- this.setTitleVisi(title.trim() != '', 'noText');
|
|
|
+ this.setTitleVisi(title instanceof Array || title.trim() != '', 'noText');
|
|
|
viewer.dispatchEvent('content_changed');
|
|
|
}
|
|
|
setTitleVisi(v) {
|
|
@@ -55825,6 +55825,21 @@
|
|
|
//line的可见性比较复杂,所以干脆跟随title的,reason不记录那么多
|
|
|
this.onMesh && Potree.Utils.updateVisible(this.line, 'hideTitle', this.titleLabel.visible);
|
|
|
}
|
|
|
+ setFontSize(fontsize) {
|
|
|
+ this.titleLabel.fontsize = this.fontsize = fontsize;
|
|
|
+ this.titleLabel.updateTexture();
|
|
|
+ this.updateTitlePos();
|
|
|
+ viewer.dispatchEvent('content_changed');
|
|
|
+ }
|
|
|
+ changeSpotScale(s) {
|
|
|
+ s *= defaultSpotScale;
|
|
|
+ this.spot.scale.set(s, s, s);
|
|
|
+ this.updateTitlePos();
|
|
|
+ viewer.dispatchEvent('content_changed');
|
|
|
+ }
|
|
|
+ updateTitlePos() {
|
|
|
+ this.onMesh || (this.titleLabel.position.y = titleHeight.uponSpot + (this.spot.scale.x + this.titleLabel.sprite.scale.y) / 2);
|
|
|
+ }
|
|
|
changeMap(url) {
|
|
|
var map = texLoader$7.load(url, () => {
|
|
|
viewer.dispatchEvent('content_changed');
|
|
@@ -55842,13 +55857,6 @@
|
|
|
this.faceAngle = faceAngle;
|
|
|
viewer.dispatchEvent('content_changed');
|
|
|
}
|
|
|
- changeSpotScale(s) {
|
|
|
- this.spot.scale.set(s, s, s);
|
|
|
- viewer.dispatchEvent('content_changed');
|
|
|
- }
|
|
|
- updateTitlePos() {
|
|
|
- this.onMesh || (this.titleLabel.position.y = titleHeight.uponSpot + this.spot.scale.x);
|
|
|
- }
|
|
|
setNorQua() {
|
|
|
if (!this.onMesh) return;
|
|
|
this.spot.quaternion.setFromRotationMatrix(new Matrix4().lookAt(this.normal, Vectors$2.ZERO, Vectors$2.UP));
|
|
@@ -55889,6 +55897,7 @@
|
|
|
var _this$titleLabel;
|
|
|
this.parent.remove(this);
|
|
|
(_this$titleLabel = this.titleLabel) === null || _this$titleLabel === void 0 || _this$titleLabel.dispose();
|
|
|
+ viewer.dispatchEvent('content_changed');
|
|
|
}
|
|
|
}
|
|
|
|