|
@@ -260,24 +260,11 @@ export const enter = (dom) => {
|
|
|
position: {x,y,z}
|
|
|
target: {x,y,z}
|
|
|
time: number
|
|
|
- speed: number
|
|
|
- }
|
|
|
- sceneGuide = enterSceneGuide(sceneGuidePaths)
|
|
|
-
|
|
|
- let posTran = function (position, target) {
|
|
|
- position = Potree.Utils.datasetPosTransform({ fromDataset: true, position: position, datasetId: Potree.settings.originDatasetId })
|
|
|
- target = Potree.Utils.datasetPosTransform({ fromDataset: true, position: target, datasetId: Potree.settings.originDatasetId })
|
|
|
- return { position, target }
|
|
|
+ speed: number //没用到
|
|
|
}
|
|
|
- if (data) {
|
|
|
- data.points.forEach(e => {
|
|
|
- //let { position, target } = posTran(e.position, e.target)
|
|
|
- e.position = position
|
|
|
- e.target = target
|
|
|
- })
|
|
|
- }*/
|
|
|
+ */
|
|
|
let data = {
|
|
|
- duration: pathArr.reduce(function(total, currentValue ){return total+currentValue.time}, 0),
|
|
|
+ duration: pathArr.reduce(function(total, currentValue ){return total+currentValue.time}, 0), //总时长
|
|
|
points: pathArr
|
|
|
}
|
|
|
let animation = editor.createAnimation(data)
|
|
@@ -297,27 +284,15 @@ export const enter = (dom) => {
|
|
|
})
|
|
|
|
|
|
return {
|
|
|
- bus,
|
|
|
- /* addPoint(index, position_, target_) {
|
|
|
- let { position, target } = posTran(position_, target_)
|
|
|
- animation.createControlPoint(index, { position, target })
|
|
|
- animation.changeCallback()
|
|
|
- },
|
|
|
- deletePoint(index) {
|
|
|
- animation.removeControlPoint(index)
|
|
|
- animation.changeCallback()
|
|
|
- }, */
|
|
|
- play() {
|
|
|
- /* var modeOld = Potree.settings.displayMode;
|
|
|
- Potree.settings.displayMode = 'showPointCloud' */
|
|
|
+ bus,
|
|
|
+ play() {
|
|
|
+ MergeEditor.selectModel(null)
|
|
|
animation.play()
|
|
|
},
|
|
|
pause() {
|
|
|
animation.pause()
|
|
|
},
|
|
|
- /*setDuration(dur) {
|
|
|
- animation.setDuration(dur)
|
|
|
- }, */
|
|
|
+
|
|
|
clear() {
|
|
|
//删除
|
|
|
editor.removeAnimation(animation)
|