|
@@ -182,6 +182,50 @@ export function initSceneDemo() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+export function renderBreakIntoArea(status) {
|
|
|
+ renderShapes({
|
|
|
+ id: '1348278598334676992',
|
|
|
+ data: status
|
|
|
+ ? {
|
|
|
+ type: 'polygon',
|
|
|
+ shape: {
|
|
|
+ height: 600,
|
|
|
+ rings: [
|
|
|
+ [
|
|
|
+ [6255.4622802734375, 7704.974487304695, 0],
|
|
|
+ [6267.506103515632, 7673.706115722649, 0],
|
|
|
+ [6247.277526855476, 7673.754882812493, 0],
|
|
|
+ [6235.2258911132885, 7673.784118652351, 0],
|
|
|
+ [6186.266906738281, 7655.02990722657, 0],
|
|
|
+ [6132.686096191406, 7634.504882812493, 0],
|
|
|
+ [6091.714904785156, 7618.8101196289135, 0],
|
|
|
+ [6076.5078735351635, 7612.985107421882, 0],
|
|
|
+ [6076.344299316406, 7613.0551147460865, 0],
|
|
|
+ [6075.8609008789135, 7614.1817016601635, 0],
|
|
|
+ [6074.783691406257, 7613.724121093743, 0],
|
|
|
+ [6074.054504394531, 7614.03649902343, 0],
|
|
|
+ [6068.8914794921875, 7611.220275878899, 0],
|
|
|
+ [6064.956298828125, 7609.5482788085865, 0],
|
|
|
+ [6046.9129028320385, 7645.6340942382885, 0],
|
|
|
+ [6034.35510253907, 7670.749877929695, 0],
|
|
|
+ [5994.250671386726, 7754.604125976555, 0],
|
|
|
+ [5985.743896484382, 7774.858886718757, 0],
|
|
|
+ [5988.1746826171875, 7780.935302734382, 0],
|
|
|
+ [5991.415283203132, 7787.416687011726, 0],
|
|
|
+ [6108.8927001953125, 7828.3311157226635, 0],
|
|
|
+ [6194.772277832031, 7859.1187133789135, 0],
|
|
|
+ [6241.358276367195, 7740.020874023445, 0],
|
|
|
+ [6255.4622802734375, 7704.974487304695, 0],
|
|
|
+ ],
|
|
|
+ ],
|
|
|
+ color: [255, 0, 0, 0.2],
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : null,
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
* 场景演示
|
|
|
* @param {'Near' | 'Yaw' | 'Electricity' | 'BreakInto' | 'Weather'} type
|
|
@@ -233,6 +277,7 @@ export function startSceneDemo(type) {
|
|
|
setUav('bdb8859e-b366-4c1a-a964-1e16ba15237a')
|
|
|
await wait(1000)
|
|
|
followUav('bdb8859e-b366-4c1a-a964-1e16ba15237a')
|
|
|
+ renderBreakIntoArea(true)
|
|
|
break
|
|
|
}
|
|
|
case 'Weather': {
|
|
@@ -250,3 +295,20 @@ export function startSceneDemo(type) {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+export function resetCamera() {
|
|
|
+ sendMessage({
|
|
|
+ ModuleName: 'Roam',
|
|
|
+ ActionName: 'Goto',
|
|
|
+ Params: {
|
|
|
+ X: 399013.707493,
|
|
|
+ Y: -755350.361878,
|
|
|
+ Z: 23204.545816,
|
|
|
+ Pitch: -28.285303,
|
|
|
+ Yaw: 35.710186,
|
|
|
+ Roll: 0.0,
|
|
|
+ Duration: 0.1,
|
|
|
+ },
|
|
|
+ })
|
|
|
+}
|