|
@@ -172,7 +172,7 @@ export default class App {
|
|
|
console.log("[3D] getSocketVideo: ", data)
|
|
|
|
|
|
if(this.getWalkVideo) {
|
|
|
-
|
|
|
+
|
|
|
const blob = new Blob( [data], { type: 'application/video' })
|
|
|
|
|
|
const url = URL.createObjectURL(blob)
|
|
@@ -184,7 +184,7 @@ export default class App {
|
|
|
let path = this.currentPoints.map( (point, index) => {
|
|
|
return {
|
|
|
point: new BABYLON.Vector3(-point.location.x, 0, point.location.z),
|
|
|
- video: index == 1 && common.createVideoElement0(url)
|
|
|
+ video: index == 1 ? common.createVideoElement0(url) : null
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -230,16 +230,19 @@ export default class App {
|
|
|
|
|
|
// this.cameraController.rotateCamera(this.cameraController.alphaOffset)
|
|
|
|
|
|
+ let video
|
|
|
if(this.isReverse) {
|
|
|
- document.getElementById("houseTextureReverse").src = url
|
|
|
+ video = document.getElementById("houseTextureReverse")
|
|
|
} else {
|
|
|
- document.getElementById("houseTexture").src = url
|
|
|
+ video = document.getElementById("houseTexture")
|
|
|
}
|
|
|
+ video.src = url
|
|
|
|
|
|
this.isReverse = !this.isReverse
|
|
|
|
|
|
if(this.initVideo) {
|
|
|
- this.updateHouseVideoBlob(url, true)
|
|
|
+ // this.updateHouseVideoBlob(url, true)
|
|
|
+ this.updateHouseVideo(video, true)
|
|
|
this.initVideo = false
|
|
|
this.cameraController.camera.minZ = 0.001
|
|
|
}
|
|
@@ -280,14 +283,14 @@ export default class App {
|
|
|
|
|
|
let dir = this.charactorManager.getVideoDirecNum()
|
|
|
|
|
|
- let videos = []
|
|
|
+ this.walkVideoNames = []
|
|
|
for(let i = 0; i < data.length - 1; i++) {
|
|
|
- videos.push(data[i].id + "/" + data[i].id + "_" + data[i+1].id + "_" + dir)
|
|
|
+ this.walkVideoNames.push(data[i].id + "/" + data[i].id + "_" + data[i+1].id + "_" + dir)
|
|
|
}
|
|
|
|
|
|
this.getWalkVideo = true
|
|
|
let sendData = {
|
|
|
- videoList: videos,
|
|
|
+ videoList: this.walkVideoNames, //[0],
|
|
|
sceneCode: settings.sceneCode,
|
|
|
roomId: settings.roomId,
|
|
|
userId: settings.userId,
|