|
@@ -20076,7 +20076,7 @@ function o(a, s, l) {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- ,
|
|
|
+ /* ,
|
|
|
t.prototype.getSnapAngleInfo = function() {
|
|
|
var e = {}
|
|
|
, t = '"metadata":{'
|
|
@@ -20105,7 +20105,57 @@ function o(a, s, l) {
|
|
|
e.zoom = this.zoomLevel,
|
|
|
t += '"camera_position":[' + e.camera_position + '],"camera_quaternion":[' + e.camera_quaternion + '], "zoom":' + e.zoom + "}"
|
|
|
}
|
|
|
- ,
|
|
|
+ , */
|
|
|
+
|
|
|
+ t.prototype.getSnapAngleInfo = function(){
|
|
|
+ var info = {};
|
|
|
+ var str = '"metadata":{';
|
|
|
+ var q = this.camera.quaternion.clone();
|
|
|
+ switch (this.mode) {
|
|
|
+ case "panorama":
|
|
|
+ info.scan_id = this.currentPano.id;
|
|
|
+ str += ('"scan_id":"'+this.currentPano.id+'",');
|
|
|
+ break;
|
|
|
+ case "floorplan":
|
|
|
+ info.camera_mode = 1;
|
|
|
+ q = (new B.Quaternion).setFromAxisAngle(new B.Vector3(0,1,0), B.Math.degToRad(90))
|
|
|
+ q.multiply(this.camera.quaternion);
|
|
|
+ str += ('"camera_mode":1,');
|
|
|
+ //str += ('"ortho_zoom":'+m.toPrecision(this.cameraControls.activeControl.currentScale * $("#player").height() / $("#player").width() * D.workshopApsect * 16, 4)+",");
|
|
|
+ str += ('"ortho_zoom":'+ U.toPrecision(this.cameraControls.activeControl.currentScale, 4 )+",");
|
|
|
+ break;
|
|
|
+ case "dollhouse":
|
|
|
+ info.camera_mode = 2;
|
|
|
+ str += ('"camera_mode":2,');
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ info.camera_position = U.toPrecision(this.camera.position.toArray(),4);
|
|
|
+ console.log(info.camera_position)
|
|
|
+ if(window.screenSta === 'tour'){ // fyz 导览截屏需要做额外的
|
|
|
+ /**fyz 对相机截屏的角度进行校对 */
|
|
|
+ var out = new B.Quaternion(q.x, q.y, q.z, q.w)
|
|
|
+ out.multiply(new B.Quaternion(Math.sqrt(2) / 2, Math.sqrt(2) / 2, 0, 0).conjugate())
|
|
|
+ out.x *= -1;
|
|
|
+ out.w *= -1;
|
|
|
+ info.camera_quaternion = U.toPrecision(out.toArray(),4);
|
|
|
+ }else{
|
|
|
+ info.camera_quaternion = U.toPrecision(q.toArray(),4);;
|
|
|
+ }
|
|
|
+ info.zoom = this.zoomLevel;
|
|
|
+ console.log(info.camera_quaternion)
|
|
|
+ // str += ( '"camera_position":['+ info.camera_position + '],"camera_quaternion":['+info.camera_quaternion+"]}");
|
|
|
+ // fyz 扩展编辑页面, 加上导览点缩放值
|
|
|
+ str += ( '"camera_position":['+ info.camera_position + '],"camera_quaternion":['+info.camera_quaternion+'], "zoom":' + info.zoom + '}');
|
|
|
+ return str;
|
|
|
+ }
|
|
|
+ //------end
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
t.prototype.closePopup = function() {
|
|
|
if (g_currentHot) {
|
|
|
g_currentHot = null,
|
|
@@ -28074,14 +28124,15 @@ function o(a, s, l) {
|
|
|
var n = e.data.camera_start;
|
|
|
try {
|
|
|
0 < Object.keys(n).length && !a.isEmptyQuaternion(n.camera.quaternion) && (i.mode = l.convertWorkshopModeInt(n.mode),
|
|
|
- i.position = n.camera.position,
|
|
|
+ i.position = (new c.Vector3).fromArray(n.camera.position),
|
|
|
i.quaternion = (new c.Quaternion).fromArray(n.camera.quaternion),
|
|
|
i.zoom = a.convertWorkshopOrthoZoom(n.camera.zoom),
|
|
|
n.pano && (i.pano = t.get(n.pano.uuid) || t.findClosest(i.position),
|
|
|
h.debug("Using camera_start"),
|
|
|
h.debug("Modeldata pano: ", i.pano.quaternion),
|
|
|
h.debug("Camera start pano: ", n.pano.quaternion)),
|
|
|
- i.mode !== l.PANORAMA && (i.floorVisibility = e.heroImage.metadata.floor_visibility))
|
|
|
+ i.mode !== l.PANORAMA && (i.floorVisibility = e.heroImage.metadata.floor_visibility));
|
|
|
+
|
|
|
} catch (e) {
|
|
|
h.warn(e.message)
|
|
|
}
|