|
@@ -169,7 +169,7 @@ export default class XSceneManager {
|
|
|
this._billboardManager = new XBillboardManager(this),
|
|
|
this.billboardComponent.loadBackGroundTexToIDB(),
|
|
|
this._lightManager = new XLightManager(this),
|
|
|
- this.readPointData(),
|
|
|
+ // this.readPointData(),
|
|
|
this.postprocessing(),
|
|
|
this.initSceneManager(),
|
|
|
this.engineRunTimeStats = new XEngineRunTimeStats,
|
|
@@ -459,44 +459,44 @@ export default class XSceneManager {
|
|
|
r
|
|
|
}
|
|
|
|
|
|
- // zeg
|
|
|
- readPointData() {
|
|
|
+ // // zeg
|
|
|
+ // readPointData() {
|
|
|
|
|
|
- return fetch("./assets/points.json", {
|
|
|
- headers: {
|
|
|
- 'content-type': 'application/json'
|
|
|
- },
|
|
|
- method: 'GET',
|
|
|
- })
|
|
|
- .then(response => response.json())
|
|
|
- .then(response => {
|
|
|
- this.texture = new BABYLON.Texture("https://4dkk.4dage.com/v3/img/marker.png", this.scene);
|
|
|
- response.forEach(data => {
|
|
|
- var plane = new BABYLON.Mesh.CreatePlane("TextPlane", 0.2, this.scene, true);
|
|
|
- plane.material = new BABYLON.StandardMaterial("TextPlaneMaterial", this.scene);
|
|
|
- plane.material.alpha = 1,
|
|
|
- plane.material.emissiveTexture = this.texture,
|
|
|
- plane.material.backFaceCulling = true,
|
|
|
- plane.material.diffuseTexture = this.texture,
|
|
|
- plane.material.diffuseTexture.hasAlpha = !0,
|
|
|
- plane.material.useAlphaFromDiffuseTexture = !0
|
|
|
+ // return fetch("./assets/points.json", {
|
|
|
+ // headers: {
|
|
|
+ // 'content-type': 'application/json'
|
|
|
+ // },
|
|
|
+ // method: 'GET',
|
|
|
+ // })
|
|
|
+ // .then(response => response.json())
|
|
|
+ // .then(response => {
|
|
|
+ // this.texture = new BABYLON.Texture("https://4dkk.4dage.com/v3/img/marker.png", this.scene);
|
|
|
+ // response.forEach(data => {
|
|
|
+ // var plane = new BABYLON.Mesh.CreatePlane("TextPlane", 0.2, this.scene, true);
|
|
|
+ // plane.material = new BABYLON.StandardMaterial("TextPlaneMaterial", this.scene);
|
|
|
+ // plane.material.alpha = 1,
|
|
|
+ // plane.material.emissiveTexture = this.texture,
|
|
|
+ // plane.material.backFaceCulling = true,
|
|
|
+ // plane.material.diffuseTexture = this.texture,
|
|
|
+ // plane.material.diffuseTexture.hasAlpha = !0,
|
|
|
+ // plane.material.useAlphaFromDiffuseTexture = !0
|
|
|
|
|
|
- plane.rotation.x = Math.PI / 2
|
|
|
- plane.position.x = -data.position.x;
|
|
|
- plane.position.y = data.position.y+0.01;
|
|
|
- plane.position.z = data.position.z;
|
|
|
+ // plane.rotation.x = Math.PI / 2
|
|
|
+ // plane.position.x = -data.position.x;
|
|
|
+ // plane.position.y = data.position.y+0.01;
|
|
|
+ // plane.position.z = data.position.z;
|
|
|
|
|
|
- // todo 矫正
|
|
|
- let ue4Pos = util.xversePosition2Ue4({x: -data.position.x, y: data.position.y, z: data.position.z})
|
|
|
- // console.error(data.position, ue4Pos)
|
|
|
- data.position0 = data.position
|
|
|
- data.position = new BABYLON.Vector3(ue4Pos.x, ue4Pos.y, ue4Pos.z)
|
|
|
+ // // todo 矫正
|
|
|
+ // let ue4Pos = util.xversePosition2Ue4({x: -data.position.x, y: data.position.y, z: data.position.z})
|
|
|
+ // // console.error(data.position, ue4Pos)
|
|
|
+ // data.position0 = data.position
|
|
|
+ // data.position = new BABYLON.Vector3(ue4Pos.x, ue4Pos.y, ue4Pos.z)
|
|
|
|
|
|
- })
|
|
|
- window.points = response
|
|
|
- })
|
|
|
+ // })
|
|
|
+ // window.points = response
|
|
|
+ // })
|
|
|
|
|
|
- }
|
|
|
+ // }
|
|
|
|
|
|
getClosestPointData(vec) {
|
|
|
vec = new BABYLON.Vector3(vec.x, vec.y, vec.z)
|