Browse Source

编辑页面

master
邓宏 2 years ago
parent
commit
b52311fd90
  1. 14
      src/view/park/center.vue

14
src/view/park/center.vue

@ -206,7 +206,7 @@ import {SVGToBase64} from 'black-knight/lib/config/tools'
var mesh=new THREE.Mesh(geometry,material) var mesh=new THREE.Mesh(geometry,material)
mesh.renderOrder=1 mesh.renderOrder=1
mesh.position.set(115*(-101.863986+v.lan),1.2,115*(-25.776215+v.lng)) mesh.position.set(115*(-101.863986+v.lan),1.2,115*(-25.776215+v.lng))
mesh.rotation.x=-Math.PI/8 mesh.rotation.x=-Math.PI/6
// //
labelName.value=v.name; labelName.value=v.name;
await new Promise(result=>{ await new Promise(result=>{
@ -244,7 +244,17 @@ import {SVGToBase64} from 'black-knight/lib/config/tools'
scene.add(bgMesh) scene.add(bgMesh)
} }
function addBG2(){ function addBG2(){
var bgGeometry=new THREE.PlaneGeometry(316/9.1,599/9.1)
var bgMaterial=new THREE.MeshBasicMaterial({
transparent:true,
depthWrite:false,
side:THREE.DoubleSide,
map:new THREE.TextureLoader().load(require('@/assets/img/park-map-bg2.png'))
})
var bgMesh=new THREE.Mesh(bgGeometry,bgMaterial)
bgMesh.position.set(-0.4,0.2,7.1)
bgMesh.rotation.x=-Math.PI/2
scene.add(bgMesh)
} }
function render(){ function render(){
renderer.render(scene, camera); renderer.render(scene, camera);

Loading…
Cancel
Save