12-19
This commit is contained in:
@ -78,7 +78,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
let obj = leftClickCallbackMap.get(key)
|
let obj = leftClickCallbackMap.get(key)
|
||||||
if (obj) {
|
if (obj) {
|
||||||
|
|
||||||
if (obj.that) {
|
if (obj.that && obj.that.show) {
|
||||||
// 是否为多边形
|
// 是否为多边形
|
||||||
if (obj.that.type === 'PolygonObject') {
|
if (obj.that.type === 'PolygonObject') {
|
||||||
// 是否可点击y
|
// 是否可点击y
|
||||||
@ -242,7 +242,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
// 矢量
|
// 矢量
|
||||||
if (pick.id.type && pick.id.type === 'vector' && pick.id.parentId) {
|
if (pick.id.type && pick.id.type === 'vector' && pick.id.parentId) {
|
||||||
let obj = leftClickCallbackMap.get(pick.id.parentId)
|
let obj = leftClickCallbackMap.get(pick.id.parentId)
|
||||||
if (obj.that.picking && obj.that.geojson) {
|
if (obj && obj.that && obj.that.picking && obj.that.geojson && obj.that.show) {
|
||||||
for (let i = 0; i < obj.that.geojson.features.length; i++) {
|
for (let i = 0; i < obj.that.geojson.features.length; i++) {
|
||||||
if (obj.that.geojson.features[i].id === pick.id._id) {
|
if (obj.that.geojson.features[i].id === pick.id._id) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
@ -261,7 +261,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
|
|
||||||
if (pick.id.properties && pick.id.properties.id && leftClickCallbackMap.has(pick.id.properties.id._value)) {
|
if (pick.id.properties && pick.id.properties.id && leftClickCallbackMap.has(pick.id.properties.id._value)) {
|
||||||
let obj = leftClickCallbackMap.get(pick.id.properties.id._value)
|
let obj = leftClickCallbackMap.get(pick.id.properties.id._value)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
movement,
|
movement,
|
||||||
pick.id.properties.id._value,
|
pick.id.properties.id._value,
|
||||||
@ -270,7 +270,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
}
|
}
|
||||||
else if (leftClickCallbackMap.has(pick.id.id)) {
|
else if (leftClickCallbackMap.has(pick.id.id)) {
|
||||||
let obj = leftClickCallbackMap.get(pick.id.id)
|
let obj = leftClickCallbackMap.get(pick.id.id)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
movement,
|
movement,
|
||||||
pick.id.id,
|
pick.id.id,
|
||||||
@ -279,7 +279,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
}
|
}
|
||||||
else if (entityId && leftClickCallbackMap.has(entityId)) {
|
else if (entityId && leftClickCallbackMap.has(entityId)) {
|
||||||
let obj = leftClickCallbackMap.get(entityId)
|
let obj = leftClickCallbackMap.get(entityId)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
movement,
|
movement,
|
||||||
entityId,
|
entityId,
|
||||||
@ -289,10 +289,12 @@ function openLeftClick(sdk, cb) {
|
|||||||
else if (pick.primitive) {
|
else if (pick.primitive) {
|
||||||
if (typeof pick.id == 'string' && leftClickCallbackMap.has(pick.id)) {
|
if (typeof pick.id == 'string' && leftClickCallbackMap.has(pick.id)) {
|
||||||
let obj = leftClickCallbackMap.get(pick.id)
|
let obj = leftClickCallbackMap.get(pick.id)
|
||||||
obj.callback(
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
movement,
|
obj.callback(
|
||||||
pick.id,
|
movement,
|
||||||
cartesian3Towgs84(getcartesian(sdk, movement), sdk.viewer), obj.that)
|
pick.id,
|
||||||
|
cartesian3Towgs84(getcartesian(sdk, movement), sdk.viewer), obj.that)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,7 +302,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
if (pick.primitive && pick.primitive.id) {
|
if (pick.primitive && pick.primitive.id) {
|
||||||
if (leftClickCallbackMap.has(pick.primitive.id)) {
|
if (leftClickCallbackMap.has(pick.primitive.id)) {
|
||||||
let obj = leftClickCallbackMap.get(pick.primitive.id)
|
let obj = leftClickCallbackMap.get(pick.primitive.id)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
if (obj.that.type === 'bim') {
|
if (obj.that.type === 'bim') {
|
||||||
if (YJ.Global.getBimPickStatus(sdk)) {
|
if (YJ.Global.getBimPickStatus(sdk)) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
@ -322,7 +324,7 @@ function openLeftClick(sdk, cb) {
|
|||||||
if (pick.content && (!pick.primitive || !pick.primitive.id)) {
|
if (pick.content && (!pick.primitive || !pick.primitive.id)) {
|
||||||
if (leftClickCallbackMap.has(pick.content.tileset.id)) {
|
if (leftClickCallbackMap.has(pick.content.tileset.id)) {
|
||||||
let obj = leftClickCallbackMap.get(pick.content.tileset.id)
|
let obj = leftClickCallbackMap.get(pick.content.tileset.id)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
if (obj.that.type === 'bim') {
|
if (obj.that.type === 'bim') {
|
||||||
if (YJ.Global.getBimPickStatus(sdk)) {
|
if (YJ.Global.getBimPickStatus(sdk)) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
@ -390,7 +392,7 @@ function openRightClick(sdk) {
|
|||||||
let id
|
let id
|
||||||
if (pick.id.type && pick.id.type === 'vector' && pick.id.parentId) {
|
if (pick.id.type && pick.id.type === 'vector' && pick.id.parentId) {
|
||||||
let obj = rightClickCallbackMap.get(pick.id.parentId)
|
let obj = rightClickCallbackMap.get(pick.id.parentId)
|
||||||
if (obj.that.picking && obj.that.geojson) {
|
if (obj && obj.that && obj.that.picking && obj.that.geojson && obj.that.show) {
|
||||||
for (let i = 0; i < obj.that.geojson.features.length; i++) {
|
for (let i = 0; i < obj.that.geojson.features.length; i++) {
|
||||||
if (obj.that.geojson.features[i].id === pick.id._id) {
|
if (obj.that.geojson.features[i].id === pick.id._id) {
|
||||||
obj.callback(
|
obj.callback(
|
||||||
@ -410,7 +412,7 @@ function openRightClick(sdk) {
|
|||||||
}
|
}
|
||||||
if (rightClickCallbackMap.has(id)) {
|
if (rightClickCallbackMap.has(id)) {
|
||||||
let obj = rightClickCallbackMap.get(id)
|
let obj = rightClickCallbackMap.get(id)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
let cartesian = getcartesian(sdk, movement)
|
let cartesian = getcartesian(sdk, movement)
|
||||||
if (!cartesian) {
|
if (!cartesian) {
|
||||||
return
|
return
|
||||||
@ -426,7 +428,7 @@ function openRightClick(sdk) {
|
|||||||
if (pick && pick.content) {
|
if (pick && pick.content) {
|
||||||
if (rightClickCallbackMap.has(pick.content.tileset.id)) {
|
if (rightClickCallbackMap.has(pick.content.tileset.id)) {
|
||||||
let obj = rightClickCallbackMap.get(pick.content.tileset.id)
|
let obj = rightClickCallbackMap.get(pick.content.tileset.id)
|
||||||
if (obj.that.picking) {
|
if (obj && obj.that && obj.that.picking && obj.that.show) {
|
||||||
if (obj.that.type === 'bim') {
|
if (obj.that.type === 'bim') {
|
||||||
if (YJ.Global.getBimPickStatus(sdk)) {
|
if (YJ.Global.getBimPickStatus(sdk)) {
|
||||||
let cartesian = getcartesian(sdk, movement)
|
let cartesian = getcartesian(sdk, movement)
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import { FlwStatusSwitch, JwwStatusSwitch, getFlwStatus, getJwwStatus } from "..
|
|||||||
import { SheetIndexStatusSwitch, getStatus } from '../SheetIndex'
|
import { SheetIndexStatusSwitch, getStatus } from '../SheetIndex'
|
||||||
import { getLeftClickState, getRightClickState, getMoveState } from "../../Global/ClickCallback"
|
import { getLeftClickState, getRightClickState, getMoveState } from "../../Global/ClickCallback"
|
||||||
import { openLeftClick, openRightClick, openMove } from "./ClickCallback"
|
import { openLeftClick, openRightClick, openMove } from "./ClickCallback"
|
||||||
|
import { rain, snow, fog, nightVision, skyStarry, illumination } from '../efflect'
|
||||||
|
|
||||||
|
|
||||||
let sdk2D = null
|
let sdk2D = null
|
||||||
@ -45,7 +46,7 @@ async function init(sdk) {
|
|||||||
openMove(sdk2D)
|
openMove(sdk2D)
|
||||||
}
|
}
|
||||||
|
|
||||||
// window.sdk2D = sdk2D
|
window.sdk2D = sdk2D
|
||||||
solveBug()
|
solveBug()
|
||||||
syncObject = { sdks: [sdk, sdk2], tools }
|
syncObject = { sdks: [sdk, sdk2], tools }
|
||||||
await eventBind(sdk, 0, syncObject)
|
await eventBind(sdk, 0, syncObject)
|
||||||
@ -82,6 +83,26 @@ async function init(sdk) {
|
|||||||
if (getJwwStatus(sdk)) {
|
if (getJwwStatus(sdk)) {
|
||||||
JwwStatusSwitch(sdk2, true)
|
JwwStatusSwitch(sdk2, true)
|
||||||
}
|
}
|
||||||
|
// 雨雪雾夜视星空光照
|
||||||
|
let stages = sdk.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
switch (stages[i].name) {
|
||||||
|
case 'rain':
|
||||||
|
rain(sdk2, true)
|
||||||
|
break
|
||||||
|
case 'snow':
|
||||||
|
snow(sdk2, true)
|
||||||
|
break
|
||||||
|
case 'fog':
|
||||||
|
fog(sdk2, true)
|
||||||
|
break
|
||||||
|
case 'czm_night_vision':
|
||||||
|
nightVision(sdk2, true)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
skyStarry(sdk2, !sdk.viewer.scene.skyAtmosphere.show)
|
||||||
|
illumination(sdk2, sdk.viewer.shadows)
|
||||||
|
|
||||||
sdk.entityMap.forEach((item, key) => {
|
sdk.entityMap.forEach((item, key) => {
|
||||||
if (item.showView == 2) {
|
if (item.showView == 2) {
|
||||||
@ -162,6 +183,7 @@ async function syncData2(sdk, id, entityId) {
|
|||||||
callback = that.callback
|
callback = that.callback
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let newObject = await new that.constructor(sdk2D, options, callback)
|
let newObject = await new that.constructor(sdk2D, options, callback)
|
||||||
newObject.onClick = that.onClick
|
newObject.onClick = that.onClick
|
||||||
newObject.onRightClick = that.onRightClick
|
newObject.onRightClick = that.onRightClick
|
||||||
@ -208,6 +230,9 @@ async function syncData2(sdk, id, entityId) {
|
|||||||
newObject.setSpreadProgressByTime(that.TweenAnimate._object.distance1 / that.TweenAnimate._valuesEnd.distance1 * that.spreadTime)
|
newObject.setSpreadProgressByTime(that.TweenAnimate._object.distance1 / that.TweenAnimate._valuesEnd.distance1 * that.spreadTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (that.type === 'Explosion') {
|
||||||
|
newObject.entity.imgIndex = that.entity.imgIndex
|
||||||
|
}
|
||||||
if (newObject.on && newObject.type !== 'glb') {
|
if (newObject.on && newObject.type !== 'glb') {
|
||||||
if (newObject.type === 'vector') {
|
if (newObject.type === 'vector') {
|
||||||
newObject.data = that.data
|
newObject.data = that.data
|
||||||
@ -310,6 +335,9 @@ async function syncData2(sdk, id, entityId) {
|
|||||||
target.setSpreadProgressByTime(obj.TweenAnimate._object.distance1 / obj.TweenAnimate._valuesEnd.distance1 * obj.spreadTime)
|
target.setSpreadProgressByTime(obj.TweenAnimate._object.distance1 / obj.TweenAnimate._valuesEnd.distance1 * obj.spreadTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (obj.type === 'Explosion') {
|
||||||
|
target.entity.imgIndex = obj.entity.imgIndex
|
||||||
|
}
|
||||||
if (target.on && obj.type !== 'glb') {
|
if (target.on && obj.type !== 'glb') {
|
||||||
if (target.type === 'vector') {
|
if (target.type === 'vector') {
|
||||||
target.data = obj.data
|
target.data = obj.data
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import { MouseRightMenu, getMouseRightMenuStatus } from '../mouseRightMenu';
|
|||||||
import { getLeftClickState, getRightClickState, getMoveState } from '../ClickCallback'
|
import { getLeftClickState, getRightClickState, getMoveState } from '../ClickCallback'
|
||||||
import { openLeftClick, openRightClick, openMove } from './ClickCallback'
|
import { openLeftClick, openRightClick, openMove } from './ClickCallback'
|
||||||
import { SheetIndexStatusSwitch, getStatus } from '../SheetIndex'
|
import { SheetIndexStatusSwitch, getStatus } from '../SheetIndex'
|
||||||
|
import { rain, snow, fog, nightVision, skyStarry, illumination } from '../efflect'
|
||||||
|
|
||||||
|
|
||||||
let state = false
|
let state = false
|
||||||
@ -304,6 +305,26 @@ async function init(sdk) {
|
|||||||
if (getStatus()) {
|
if (getStatus()) {
|
||||||
SheetIndexStatusSwitch(sdkD, true)
|
SheetIndexStatusSwitch(sdkD, true)
|
||||||
}
|
}
|
||||||
|
// 雨雪雾夜视星空光照
|
||||||
|
let stages = sdk.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
switch (stages[i].name) {
|
||||||
|
case 'rain':
|
||||||
|
rain(sdkD, true)
|
||||||
|
break
|
||||||
|
case 'snow':
|
||||||
|
snow(sdkD, true)
|
||||||
|
break
|
||||||
|
case 'fog':
|
||||||
|
fog(sdkD, true)
|
||||||
|
break
|
||||||
|
case 'czm_night_vision':
|
||||||
|
nightVision(sdkD, true)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
skyStarry(sdkD, !sdk.viewer.scene.skyAtmosphere.show)
|
||||||
|
illumination(sdkD, sdk.viewer.shadows)
|
||||||
|
|
||||||
function changeEntitySplitStatus(v) {
|
function changeEntitySplitStatus(v) {
|
||||||
let value
|
let value
|
||||||
|
|||||||
@ -87,7 +87,13 @@ const FS_Fog = `
|
|||||||
|
|
||||||
/*雨天*/
|
/*雨天*/
|
||||||
function rain(sdk, status = false) {
|
function rain(sdk, status = false) {
|
||||||
rainStages && sdk.viewer.scene.postProcessStages.remove(rainStages)
|
let stages = sdk.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'rain') {
|
||||||
|
sdk.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
if (status) {
|
if (status) {
|
||||||
rainStages = new Cesium.PostProcessStage({
|
rainStages = new Cesium.PostProcessStage({
|
||||||
name: "rain",
|
name: "rain",
|
||||||
@ -101,11 +107,46 @@ function rain(sdk, status = false) {
|
|||||||
});
|
});
|
||||||
sdk.viewer.scene.postProcessStages.add(rainStages);
|
sdk.viewer.scene.postProcessStages.add(rainStages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let { getSdk } = require('../SplitScreen')
|
||||||
|
let { getSdk: getSdk2 } = require('../MultiViewportMode')
|
||||||
|
let sdkD = getSdk().sdkD
|
||||||
|
if(!sdkD) {
|
||||||
|
sdkD = getSdk2().sdkD
|
||||||
|
}
|
||||||
|
if(sdkD && sdk !== sdkD) {
|
||||||
|
let stages = sdkD.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'rain') {
|
||||||
|
sdkD.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status) {
|
||||||
|
rainStages = new Cesium.PostProcessStage({
|
||||||
|
name: "rain",
|
||||||
|
fragmentShader: FS_Rain,
|
||||||
|
uniforms: {
|
||||||
|
tiltAngle: -0.4, // 倾斜角度
|
||||||
|
rainSize: 0.3, // 雨大小
|
||||||
|
rainWidth: 40, //雨长度
|
||||||
|
rainSpeed: 100, //雨速
|
||||||
|
},
|
||||||
|
});
|
||||||
|
sdkD.viewer.scene.postProcessStages.add(rainStages);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 雪
|
// 雪
|
||||||
function snow(sdk, status = false) {
|
function snow(sdk, status = false) {
|
||||||
snowStages && sdk.viewer.scene.postProcessStages.remove(snowStages)
|
let stages = sdk.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'snow') {
|
||||||
|
sdk.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
if (status) {
|
if (status) {
|
||||||
snowStages = new Cesium.PostProcessStage({
|
snowStages = new Cesium.PostProcessStage({
|
||||||
name: "snow",
|
name: "snow",
|
||||||
@ -117,11 +158,44 @@ function snow(sdk, status = false) {
|
|||||||
});
|
});
|
||||||
sdk.viewer.scene.postProcessStages.add(snowStages);
|
sdk.viewer.scene.postProcessStages.add(snowStages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let { getSdk } = require('../SplitScreen')
|
||||||
|
let { getSdk: getSdk2 } = require('../MultiViewportMode')
|
||||||
|
let sdkD = getSdk().sdkD
|
||||||
|
if(!sdkD) {
|
||||||
|
sdkD = getSdk2().sdkD
|
||||||
|
}
|
||||||
|
if(sdkD && sdk !== sdkD) {
|
||||||
|
let stages = sdkD.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'snow') {
|
||||||
|
sdkD.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status) {
|
||||||
|
snowStages = new Cesium.PostProcessStage({
|
||||||
|
name: "snow",
|
||||||
|
fragmentShader: FS_Snow,
|
||||||
|
uniforms: {
|
||||||
|
snowSize: 2, // 大小
|
||||||
|
snowSpeed: 60, //速度
|
||||||
|
},
|
||||||
|
});
|
||||||
|
sdkD.viewer.scene.postProcessStages.add(snowStages);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 雾天
|
// 雾天
|
||||||
function fog(sdk, status = false) {
|
function fog(sdk, status = false) {
|
||||||
fogStages && sdk.viewer.scene.postProcessStages.remove(fogStages)
|
let stages = sdk.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'fog') {
|
||||||
|
sdk.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
if (status) {
|
if (status) {
|
||||||
fogStages = new Cesium.PostProcessStage({
|
fogStages = new Cesium.PostProcessStage({
|
||||||
name: "fog",
|
name: "fog",
|
||||||
@ -133,26 +207,90 @@ function fog(sdk, status = false) {
|
|||||||
});
|
});
|
||||||
sdk.viewer.scene.postProcessStages.add(fogStages);
|
sdk.viewer.scene.postProcessStages.add(fogStages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let { getSdk } = require('../SplitScreen')
|
||||||
|
let { getSdk: getSdk2 } = require('../MultiViewportMode')
|
||||||
|
let sdkD = getSdk().sdkD
|
||||||
|
if(!sdkD) {
|
||||||
|
sdkD = getSdk2().sdkD
|
||||||
|
}
|
||||||
|
if(sdkD && sdk !== sdkD) {
|
||||||
|
let stages = sdkD.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'fog') {
|
||||||
|
sdkD.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status) {
|
||||||
|
fogStages = new Cesium.PostProcessStage({
|
||||||
|
name: "fog",
|
||||||
|
fragmentShader: FS_Fog,
|
||||||
|
uniforms: {
|
||||||
|
visibility: 0.2, //
|
||||||
|
fogColor: Cesium.Color.WHITE,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
sdkD.viewer.scene.postProcessStages.add(fogStages);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 夜视
|
// 夜视
|
||||||
function nightVision(sdk, status = false) {
|
function nightVision(sdk, status = false) {
|
||||||
nightVisionStages && sdk.viewer.scene.postProcessStages.remove(nightVisionStages)
|
let stages = sdk.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'czm_night_vision') {
|
||||||
|
sdk.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
if (status) {
|
if (status) {
|
||||||
nightVisionStages = Cesium.PostProcessStageLibrary.createNightVisionStage();
|
nightVisionStages = Cesium.PostProcessStageLibrary.createNightVisionStage();
|
||||||
sdk.viewer.scene.postProcessStages.add(nightVisionStages);
|
sdk.viewer.scene.postProcessStages.add(nightVisionStages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let { getSdk } = require('../SplitScreen')
|
||||||
|
let { getSdk: getSdk2 } = require('../MultiViewportMode')
|
||||||
|
let sdkD = getSdk().sdkD
|
||||||
|
if(!sdkD) {
|
||||||
|
sdkD = getSdk2().sdkD
|
||||||
|
}
|
||||||
|
if(sdkD && sdk !== sdkD) {
|
||||||
|
let stages = sdkD.viewer.scene.postProcessStages._stages
|
||||||
|
for (let i = 0; i < stages.length; i++) {
|
||||||
|
if (stages[i].name && stages[i].name === 'czm_night_vision') {
|
||||||
|
sdkD.viewer.scene.postProcessStages.remove(stages[i])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status) {
|
||||||
|
nightVisionStages = Cesium.PostProcessStageLibrary.createNightVisionStage();
|
||||||
|
sdkD.viewer.scene.postProcessStages.add(nightVisionStages);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 星空
|
// 星空
|
||||||
function skyStarry(sdk, status = false) {
|
function skyStarry(sdk, status = false) {
|
||||||
sdk.viewer.scene.skyAtmosphere.show = !status
|
sdk.viewer.scene.skyAtmosphere.show = !status
|
||||||
|
let { getSdk } = require('../SplitScreen')
|
||||||
|
let sdkD = getSdk().sdkD
|
||||||
|
if(sdkD && sdk !== sdkD) {
|
||||||
|
sdkD.viewer.scene.skyAtmosphere.show = !status
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 光照
|
// 光照
|
||||||
function illumination(sdk, status = false) {
|
function illumination(sdk, status = false) {
|
||||||
sdk.viewer.shadows = status
|
sdk.viewer.shadows = status
|
||||||
sdk.viewer._shadows = status
|
sdk.viewer._shadows = status
|
||||||
|
let { getSdk } = require('../SplitScreen')
|
||||||
|
let sdkD = getSdk().sdkD
|
||||||
|
if(sdkD && sdk !== sdkD) {
|
||||||
|
sdkD.viewer.shadows = status
|
||||||
|
sdkD.viewer._shadows = status
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -154,7 +154,9 @@ class TerrainExcavation extends Tools {
|
|||||||
startCreate() {
|
startCreate() {
|
||||||
this.Draw.start((e, positions) => {
|
this.Draw.start((e, positions) => {
|
||||||
if (!positions || positions.length <= 2) {
|
if (!positions || positions.length <= 2) {
|
||||||
this.tools.message({ type: 'warning', text: '至少拥有三个坐标位置!' })
|
if(!e && e!=0) {
|
||||||
|
this.tools.message({ type: 'warning', text: '至少拥有三个坐标位置!' })
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.isConvex(positions)) {
|
if (!this.isConvex(positions)) {
|
||||||
|
|||||||
@ -1179,6 +1179,9 @@ class AssembleObject extends Base {
|
|||||||
YJ.Measure.SetMeasureStatus(false)
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
|
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -1714,6 +1714,8 @@ class Model extends BaseModel {
|
|||||||
this.attributeISC = this.options.attribute.ISC.content
|
this.attributeISC = this.options.attribute.ISC.content
|
||||||
this.cameraSelect && this.cameraSelect()
|
this.cameraSelect && this.cameraSelect()
|
||||||
this.goodsSelect && this.goodsSelect()
|
this.goodsSelect && this.goodsSelect()
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2338,6 +2338,8 @@ class BillboardObject extends Base {
|
|||||||
this.attributeISC = this.options.attribute.isc.content
|
this.attributeISC = this.options.attribute.isc.content
|
||||||
this.cameraSelect && this.cameraSelect()
|
this.cameraSelect && this.cameraSelect()
|
||||||
this.goodsSelect && this.goodsSelect()
|
this.goodsSelect && this.goodsSelect()
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -175,6 +175,8 @@ class CircleDiffuse extends Base {
|
|||||||
zIndex: zIndex
|
zIndex: zIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
syncData(that.sdk, that.options.id)
|
||||||
|
syncSplitData(that.sdk, that.options.id)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
that.entity = that.sdk.viewer.entities.add({
|
that.entity = that.sdk.viewer.entities.add({
|
||||||
|
|||||||
@ -1163,6 +1163,8 @@ class CircleObject extends Base {
|
|||||||
YJ.Measure.SetMeasureStatus(false)
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -2240,6 +2240,9 @@ class CurvelineObject extends Base {
|
|||||||
|
|
||||||
this.heightMode = this.options.heightMode
|
this.heightMode = this.options.heightMode
|
||||||
|
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
|
|
||||||
// let height
|
// let height
|
||||||
// if (this.ground) {
|
// if (this.ground) {
|
||||||
// height = await that.getClampToHeight({
|
// height = await that.getClampToHeight({
|
||||||
|
|||||||
@ -1167,6 +1167,8 @@ class EllipseObject extends Base {
|
|||||||
YJ.Measure.SetMeasureStatus(false)
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -219,6 +219,8 @@ class Explosion extends Base {
|
|||||||
this.scaleByDistance = this.originalOptions.scaleByDistance
|
this.scaleByDistance = this.originalOptions.scaleByDistance
|
||||||
this.lng = this.options.position.lng
|
this.lng = this.options.position.lng
|
||||||
this.lat = this.options.position.lat
|
this.lat = this.options.position.lat
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
get scaleByDistance() {
|
get scaleByDistance() {
|
||||||
|
|||||||
@ -379,6 +379,8 @@ class FlowLine extends Base {
|
|||||||
this.duration = this.originalOptions.duration
|
this.duration = this.originalOptions.duration
|
||||||
this.color = this.originalOptions.color
|
this.color = this.originalOptions.color
|
||||||
this.lineBackAlpha = this.originalOptions.lineBackAlpha
|
this.lineBackAlpha = this.originalOptions.lineBackAlpha
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1234,6 +1234,8 @@ class GroundSvg extends Base {
|
|||||||
this.textScaleByDistance = this.originalOptions.text.scaleByDistance
|
this.textScaleByDistance = this.originalOptions.text.scaleByDistance
|
||||||
this.textNear = this.originalOptions.text.near
|
this.textNear = this.originalOptions.text.near
|
||||||
this.textFar = this.originalOptions.text.far
|
this.textFar = this.originalOptions.text.far
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -585,6 +585,8 @@ class Flame extends Base {
|
|||||||
this.lng = this.originalOptions.lng
|
this.lng = this.originalOptions.lng
|
||||||
this.lat = this.originalOptions.lat
|
this.lat = this.originalOptions.lat
|
||||||
this.alt = this.originalOptions.alt
|
this.alt = this.originalOptions.alt
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
// syncPrimitives(this.entity)
|
// syncPrimitives(this.entity)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,7 +601,10 @@ class Flame extends Base {
|
|||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
await this.sdk.removeIncetance(this.options.id)
|
await this.sdk.removeIncetance(this.options.id)
|
||||||
await syncData(this.sdk, this.options.id)
|
let sdkD = get2DSdk().sdkD
|
||||||
|
if(this.sdk !== sdkD) {
|
||||||
|
await syncData(this.sdk, this.options.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@desc 打开平移功能
|
/**@desc 打开平移功能
|
||||||
|
|||||||
@ -606,6 +606,8 @@ class Fountain extends Base {
|
|||||||
this.lng = this.originalOptions.lng
|
this.lng = this.originalOptions.lng
|
||||||
this.lat = this.originalOptions.lat
|
this.lat = this.originalOptions.lat
|
||||||
this.alt = this.originalOptions.alt
|
this.alt = this.originalOptions.alt
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
@ -619,7 +621,10 @@ class Fountain extends Base {
|
|||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
await this.sdk.removeIncetance(this.options.id)
|
await this.sdk.removeIncetance(this.options.id)
|
||||||
await syncData(this.sdk, this.options.id)
|
let sdkD = get2DSdk().sdkD
|
||||||
|
if(this.sdk !== sdkD) {
|
||||||
|
await syncData(this.sdk, this.options.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@desc 打开平移功能
|
/**@desc 打开平移功能
|
||||||
|
|||||||
@ -581,6 +581,8 @@ class Smoke extends Base {
|
|||||||
this.lng = this.originalOptions.lng
|
this.lng = this.originalOptions.lng
|
||||||
this.lat = this.originalOptions.lat
|
this.lat = this.originalOptions.lat
|
||||||
this.alt = this.originalOptions.alt
|
this.alt = this.originalOptions.alt
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
@ -594,7 +596,10 @@ class Smoke extends Base {
|
|||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
await this.sdk.removeIncetance(this.options.id)
|
await this.sdk.removeIncetance(this.options.id)
|
||||||
await syncData(this.sdk, this.options.id)
|
let sdkD = get2DSdk().sdkD
|
||||||
|
if(this.sdk !== sdkD) {
|
||||||
|
await syncData(this.sdk, this.options.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@desc 打开平移功能
|
/**@desc 打开平移功能
|
||||||
|
|||||||
@ -718,6 +718,8 @@ class Spout extends Base {
|
|||||||
this.lng = this.originalOptions.start.lng
|
this.lng = this.originalOptions.start.lng
|
||||||
this.lat = this.originalOptions.start.lat
|
this.lat = this.originalOptions.start.lat
|
||||||
this.alt = this.originalOptions.start.alt
|
this.alt = this.originalOptions.start.alt
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
@ -731,7 +733,10 @@ class Spout extends Base {
|
|||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
await this.sdk.removeIncetance(this.options.id)
|
await this.sdk.removeIncetance(this.options.id)
|
||||||
await syncData(this.sdk, this.options.id)
|
let sdkD = get2DSdk().sdkD
|
||||||
|
if(this.sdk !== sdkD) {
|
||||||
|
await syncData(this.sdk, this.options.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@desc 打开平移功能
|
/**@desc 打开平移功能
|
||||||
|
|||||||
@ -1295,6 +1295,8 @@ class PolygonObject extends Base {
|
|||||||
this.positions[0],
|
this.positions[0],
|
||||||
this.positions[1]
|
this.positions[1]
|
||||||
]
|
]
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1858,6 +1860,21 @@ class PolygonObject extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let rightEvent = (movement, cartesian) => {
|
let rightEvent = (movement, cartesian) => {
|
||||||
|
this.closeNodeEdit = () => {
|
||||||
|
if (!this.sdk || !this.sdk.viewer) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
|
this.event && this.event.destroy()
|
||||||
|
this.tip && this.tip.destroy()
|
||||||
|
this.tip = null
|
||||||
|
|
||||||
|
for (let i = 0; i < this.nodePoints.length; i++) {
|
||||||
|
this.sdk.viewer.entities.remove(this.nodePoints[i])
|
||||||
|
}
|
||||||
|
this.nodePoints = []
|
||||||
|
this.picking = true
|
||||||
|
}
|
||||||
if (selectPoint) {
|
if (selectPoint) {
|
||||||
this.options.positions[selectPoint.index] = originalPosition
|
this.options.positions[selectPoint.index] = originalPosition
|
||||||
// this.options.positions.splice(selectPoint.index, 1)
|
// this.options.positions.splice(selectPoint.index, 1)
|
||||||
@ -1918,6 +1935,8 @@ class PolygonObject extends Base {
|
|||||||
this.heightMode = this.heightMode
|
this.heightMode = this.heightMode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.closeNodeEdit = rightEvent
|
||||||
|
|
||||||
|
|
||||||
this.entity.polyline.clampToGround = true
|
this.entity.polyline.clampToGround = true
|
||||||
this.entity.polyline.arcType = Cesium.ArcType.GEODESIC
|
this.entity.polyline.arcType = Cesium.ArcType.GEODESIC
|
||||||
@ -1968,17 +1987,17 @@ class PolygonObject extends Base {
|
|||||||
let centroid = turf.centroid(polygon)
|
let centroid = turf.centroid(polygon)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this
|
this
|
||||||
.getClampToHeight({
|
.getClampToHeight({
|
||||||
lng: centroid.geometry.coordinates[0],
|
lng: centroid.geometry.coordinates[0],
|
||||||
lat: centroid.geometry.coordinates[1]
|
lat: centroid.geometry.coordinates[1]
|
||||||
}, objectsToExclude)
|
}, objectsToExclude)
|
||||||
.then(height => {
|
.then(height => {
|
||||||
this.label.position = [
|
this.label.position = [
|
||||||
centroid.geometry.coordinates[0],
|
centroid.geometry.coordinates[0],
|
||||||
centroid.geometry.coordinates[1],
|
centroid.geometry.coordinates[1],
|
||||||
height
|
height
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2066,7 +2085,7 @@ class PolygonObject extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.nodePoints.pop()
|
this.nodePoints.pop()
|
||||||
if(this.options.positions.length < 3) {
|
if (this.options.positions.length < 3) {
|
||||||
this.tip.set_text('左键单击确定控制点位置,右键单击取消编辑! CTRL+右键单击撤销上一个控制点')
|
this.tip.set_text('左键单击确定控制点位置,右键单击取消编辑! CTRL+右键单击撤销上一个控制点')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1027,6 +1027,8 @@ class PolyhedronObject extends Base {
|
|||||||
let centroid = turf.pointOnFeature(polygon);
|
let centroid = turf.pointOnFeature(polygon);
|
||||||
let height = await this.getClampToHeight({ lng: centroid.geometry.coordinates[0], lat: centroid.geometry.coordinates[1] })
|
let height = await this.getClampToHeight({ lng: centroid.geometry.coordinates[0], lat: centroid.geometry.coordinates[1] })
|
||||||
this.label.position = [centroid.geometry.coordinates[0], centroid.geometry.coordinates[1], this.extrudedHeight + this.height]
|
this.label.position = [centroid.geometry.coordinates[0], centroid.geometry.coordinates[1], this.extrudedHeight + this.height]
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -2251,6 +2251,9 @@ class PolylineObject extends Base {
|
|||||||
|
|
||||||
this.heightMode = this.options.heightMode
|
this.heightMode = this.options.heightMode
|
||||||
|
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
|
|
||||||
// let height
|
// let height
|
||||||
// if (this.ground) {
|
// if (this.ground) {
|
||||||
// height = await that.getClampToHeight({
|
// height = await that.getClampToHeight({
|
||||||
|
|||||||
@ -1061,6 +1061,8 @@ class RadarScan extends Base {
|
|||||||
this.labelLineColor = this.originalOptions.label.lineColor
|
this.labelLineColor = this.originalOptions.label.lineColor
|
||||||
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
||||||
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -1045,6 +1045,8 @@ class RadarScanStereoscopic extends Base {
|
|||||||
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
||||||
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
||||||
this.positionEditing = false
|
this.positionEditing = false
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -1174,6 +1174,8 @@ class SectorObject extends Base {
|
|||||||
YJ.Measure.SetMeasureStatus(false)
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
this.event && this.event.destroy()
|
this.event && this.event.destroy()
|
||||||
this.tip && this.tip.destroy()
|
this.tip && this.tip.destroy()
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -634,6 +634,8 @@ class GroundText extends Base {
|
|||||||
this.angle = this.originalOptions.angle
|
this.angle = this.originalOptions.angle
|
||||||
this.scale = this.originalOptions.scale
|
this.scale = this.originalOptions.scale
|
||||||
this.color = this.originalOptions.color
|
this.color = this.originalOptions.color
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -452,6 +452,8 @@ class StandText extends Base {
|
|||||||
maximumHeights.push(positions[i].alt + extrudedHeight)
|
maximumHeights.push(positions[i].alt + extrudedHeight)
|
||||||
}
|
}
|
||||||
this.entity.wall.positions = Cesium.Cartesian3.fromDegreesArray(fromDegreesArray)
|
this.entity.wall.positions = Cesium.Cartesian3.fromDegreesArray(fromDegreesArray)
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
|
|||||||
@ -2276,6 +2276,8 @@ class TrajectoryMotion extends Base {
|
|||||||
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
||||||
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
||||||
this.options = this.deepCopyObj(this.originalOptions);
|
this.options = this.deepCopyObj(this.originalOptions);
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// viewFollow(e) {
|
// viewFollow(e) {
|
||||||
|
|||||||
@ -143,6 +143,7 @@ class TrajectoryMotionObject extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let positions_smooth = this._renewLine(this.options.line.positions)
|
let positions_smooth = this._renewLine(this.options.line.positions)
|
||||||
|
this.line.polyline.positions = positions_smooth
|
||||||
this._elms.height && this._elms.height.forEach((item) => {
|
this._elms.height && this._elms.height.forEach((item) => {
|
||||||
item.value = v
|
item.value = v
|
||||||
})
|
})
|
||||||
@ -210,6 +211,7 @@ class TrajectoryMotionObject extends Base {
|
|||||||
this.lineEdit = false
|
this.lineEdit = false
|
||||||
this.options.line.smooth = v
|
this.options.line.smooth = v
|
||||||
let positions = this._renewLine(this.options.line.positions)
|
let positions = this._renewLine(this.options.line.positions)
|
||||||
|
this.line.polyline.positions = positions
|
||||||
this.modelMove(positions)
|
this.modelMove(positions)
|
||||||
this._elms.smooth && this._elms.smooth.forEach((item) => {
|
this._elms.smooth && this._elms.smooth.forEach((item) => {
|
||||||
item.checked = v
|
item.checked = v
|
||||||
@ -271,6 +273,7 @@ class TrajectoryMotionObject extends Base {
|
|||||||
let nosmooth = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArrayHeights)
|
let nosmooth = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArrayHeights)
|
||||||
if (this.line) {
|
if (this.line) {
|
||||||
let positions_smooth = this._renewLine(this.options.line.positions)
|
let positions_smooth = this._renewLine(this.options.line.positions)
|
||||||
|
this.line.polyline.positions = positions_smooth
|
||||||
this.modelMove(positions_smooth)
|
this.modelMove(positions_smooth)
|
||||||
}
|
}
|
||||||
this._elms.noseToTail && this._elms.noseToTail.forEach((item) => {
|
this._elms.noseToTail && this._elms.noseToTail.forEach((item) => {
|
||||||
|
|||||||
@ -1274,15 +1274,8 @@ class WallRealStereoscopic extends Base {
|
|||||||
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
this.labelBackgroundColorStart = this.originalOptions.label.backgroundColor[0]
|
||||||
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
this.labelBackgroundColorEnd = this.originalOptions.label.backgroundColor[1]
|
||||||
|
|
||||||
let positions = this.options.positions
|
syncData(this.sdk, this.options.id)
|
||||||
let fromDegreesArray = []
|
syncSplitData(this.sdk, this.options.id)
|
||||||
let minimumHeights = []
|
|
||||||
let maximumHeights = []
|
|
||||||
for (let i = 0; i < positions.length; i++) {
|
|
||||||
fromDegreesArray.push(positions[i].lng, positions[i].lat, positions[i].alt)
|
|
||||||
minimumHeights.push(positions[i].alt)
|
|
||||||
maximumHeights.push(positions[i].alt + this.options.extrudedHeight)
|
|
||||||
}
|
|
||||||
// this.entity.polylineVolume.positions = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray)
|
// this.entity.polylineVolume.positions = Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1469,6 +1462,7 @@ class WallRealStereoscopic extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let rightEvent = (movement, cartesian) => {
|
let rightEvent = (movement, cartesian) => {
|
||||||
|
that.closeNodeEdit = ()=>{}
|
||||||
if (selectPoint) {
|
if (selectPoint) {
|
||||||
that.options.positions[selectPoint.index] = originalPosition
|
that.options.positions[selectPoint.index] = originalPosition
|
||||||
if (isAdd) {
|
if (isAdd) {
|
||||||
@ -1489,6 +1483,7 @@ class WallRealStereoscopic extends Base {
|
|||||||
that.tip.destroy()
|
that.tip.destroy()
|
||||||
that.material = that.material
|
that.material = that.material
|
||||||
}
|
}
|
||||||
|
that.closeNodeEdit = rightEvent
|
||||||
|
|
||||||
function update(isCallback = false) {
|
function update(isCallback = false) {
|
||||||
if (that.entity) {
|
if (that.entity) {
|
||||||
@ -1632,6 +1627,8 @@ class WallRealStereoscopic extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeNodeEdit() {}
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
if (this.entity) {
|
if (this.entity) {
|
||||||
let positions = this.calculatePositions()
|
let positions = this.calculatePositions()
|
||||||
|
|||||||
@ -803,6 +803,15 @@ class WallStereoscopic extends Base {
|
|||||||
item.checked = this.noseToTail
|
item.checked = this.noseToTail
|
||||||
})
|
})
|
||||||
|
|
||||||
|
for (let i = 0; i < this.nodePoints.length; i++) {
|
||||||
|
this.sdk.viewer.entities.remove(this.nodePoints[i])
|
||||||
|
}
|
||||||
|
this.nodePoints = []
|
||||||
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
|
this.event && this.event.destroy()
|
||||||
|
this.event && this.tip.destroy()
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove() {
|
async remove() {
|
||||||
@ -995,6 +1004,7 @@ class WallStereoscopic extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let rightEvent = (movement, cartesian) => {
|
let rightEvent = (movement, cartesian) => {
|
||||||
|
that.closeNodeEdit = ()=>{}
|
||||||
if (selectPoint) {
|
if (selectPoint) {
|
||||||
that.options.positions[selectPoint.index] = originalPosition
|
that.options.positions[selectPoint.index] = originalPosition
|
||||||
if (isAdd) {
|
if (isAdd) {
|
||||||
@ -1023,6 +1033,8 @@ class WallStereoscopic extends Base {
|
|||||||
that.material = that.material
|
that.material = that.material
|
||||||
}
|
}
|
||||||
|
|
||||||
|
that.closeNodeEdit = rightEvent
|
||||||
|
|
||||||
that.event.mouse_left(leftEvent)
|
that.event.mouse_left(leftEvent)
|
||||||
|
|
||||||
that.event.mouse_right(rightEvent)
|
that.event.mouse_right(rightEvent)
|
||||||
@ -1109,6 +1121,8 @@ class WallStereoscopic extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeNodeEdit() {}
|
||||||
|
|
||||||
setDIV(options = { domid: "", x: 10, y: 10 }) {
|
setDIV(options = { domid: "", x: 10, y: 10 }) {
|
||||||
options.x = (options.x || options.x === 0) ? options.x : 10
|
options.x = (options.x || options.x === 0) ? options.x : 10
|
||||||
options.y = (options.y || options.y === 0) ? options.y : 10
|
options.y = (options.y || options.y === 0) ? options.y : 10
|
||||||
|
|||||||
@ -276,6 +276,8 @@ class WaterSurface extends Base {
|
|||||||
this.animationSpeed = this.originalOptions.animationSpeed
|
this.animationSpeed = this.originalOptions.animationSpeed
|
||||||
this.amplitude = this.originalOptions.amplitude
|
this.amplitude = this.originalOptions.amplitude
|
||||||
this.height = this.originalOptions.height
|
this.height = this.originalOptions.height
|
||||||
|
syncData(this.sdk, this.options.id)
|
||||||
|
syncSplitData(this.sdk, this.options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user