Commit 31dff322 authored by 李苏's avatar 李苏 💬

three相关调整

parent de5247b2
public/images/skybox/night/negx.jpg

46.8 KB | W: | H:

public/images/skybox/night/negx.jpg

48.3 KB | W: | H:

public/images/skybox/night/negx.jpg
public/images/skybox/night/negx.jpg
public/images/skybox/night/negx.jpg
public/images/skybox/night/negx.jpg
  • 2-up
  • Swipe
  • Onion skin
public/images/skybox/night/negy.jpg

15.3 KB | W: | H:

public/images/skybox/night/negy.jpg

66.6 KB | W: | H:

public/images/skybox/night/negy.jpg
public/images/skybox/night/negy.jpg
public/images/skybox/night/negy.jpg
public/images/skybox/night/negy.jpg
  • 2-up
  • Swipe
  • Onion skin
public/images/skybox/night/negz.jpg

179 KB | W: | H:

public/images/skybox/night/negz.jpg

48.3 KB | W: | H:

public/images/skybox/night/negz.jpg
public/images/skybox/night/negz.jpg
public/images/skybox/night/negz.jpg
public/images/skybox/night/negz.jpg
  • 2-up
  • Swipe
  • Onion skin
public/images/skybox/night/posx.jpg

44.9 KB | W: | H:

public/images/skybox/night/posx.jpg

48.3 KB | W: | H:

public/images/skybox/night/posx.jpg
public/images/skybox/night/posx.jpg
public/images/skybox/night/posx.jpg
public/images/skybox/night/posx.jpg
  • 2-up
  • Swipe
  • Onion skin
public/images/skybox/night/posy.jpg

63.7 KB | W: | H:

public/images/skybox/night/posy.jpg

39.2 KB | W: | H:

public/images/skybox/night/posy.jpg
public/images/skybox/night/posy.jpg
public/images/skybox/night/posy.jpg
public/images/skybox/night/posy.jpg
  • 2-up
  • Swipe
  • Onion skin
public/images/skybox/night/posz.jpg

54.8 KB | W: | H:

public/images/skybox/night/posz.jpg

48.3 KB | W: | H:

public/images/skybox/night/posz.jpg
public/images/skybox/night/posz.jpg
public/images/skybox/night/posz.jpg
public/images/skybox/night/posz.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -17,12 +17,12 @@ export default class SkyBoxs {
setSkybox(type = skyboxType.night) {
const loaderbox = new THREE.CubeTextureLoader() // 加载贴图
const cubeTexture = loaderbox.load([
`/images/skybox/${type}/posx.jpg`,
`/images/skybox/${type}/negx.jpg`,
`/images/skybox/${type}/posy.jpg`,
`/images/skybox/${type}/negy.jpg`,
`/images/skybox/${type}/posz.jpg`,
`/images/skybox/${type}/negz.jpg`
`/images/skybox/${type}/posx.jpg?${new Date().getTime()}`,
`/images/skybox/${type}/negx.jpg?${new Date().getTime()}`,
`/images/skybox/${type}/posy.jpg?${new Date().getTime()}`,
`/images/skybox/${type}/negy.jpg?${new Date().getTime()}`,
`/images/skybox/${type}/posz.jpg?${new Date().getTime()}`,
`/images/skybox/${type}/negz.jpg?${new Date().getTime()}`
])
this.viewer.scene.background = cubeTexture
}
......
......@@ -103,7 +103,7 @@
label: '检修时间',
startProp: "start",
endProp: "end",
span: 8,
span: 12,
type: 'RelDatetimerangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
......
......@@ -88,7 +88,21 @@
"label": "name"
}
}
}
},
{
label: '上游节点',
prop: 'syjd',
span: 6,
type: 'input',
value: ''
},
{
label: '当前节点',
prop: 'dqjd',
span: 6,
type: 'input',
value: ''
},
]
],
......
......@@ -107,7 +107,7 @@
methods: {
init() {
this.viewer = new Viewer('container',this)
this.viewer.camera.position.set(0, 40, -82)
this.viewer.camera.position.set(0, 32, -82)
const manager = new THREE.LoadingManager();
manager.onProgress = (item, loaded, total) =>{
......@@ -133,7 +133,9 @@
intensity: 3,
castShadow: true // 是否投射阴影
})
this.viewer.addAxis()
// this.viewer.addAxis()
/* 添加地面*/
this.loadDm()
},
loadAll() {
......@@ -143,13 +145,13 @@
})
},
loadDm(){
const geometry = new THREE.PlaneBufferGeometry(100000, 100000); // 创建一个10x10的平面
const material = new THREE.MeshBasicMaterial({color: 0x708090, side: THREE.DoubleSide}); //
const plane = new THREE.Mesh(geometry, material);
plane.rotation.x = -Math.PI / 2; // 将平面旋转90度,使其水平
plane.position.y = -700
plane.name='地面'
this.viewer.scene.add(plane);
const geometry = new THREE.PlaneGeometry(1000, 1000, 500, 500); // 创建一个100x100的平面,水平和垂直各10条线
const material = new THREE.LineBasicMaterial({ color: 0x63625b, linewidth: 0.5 });
const grid = new THREE.LineSegments(geometry, material);
grid.rotation.x = -Math.PI / 2; // 旋转网格,使其平铺在x-z平面上
grid.position.y = -18; // 将网格向下移动一点,使其位于底部
grid.name='地面'
this.viewer.scene.add(grid);
},
/* 点击*/
tdClick() {
......@@ -164,7 +166,7 @@
// TODO: 第一个参数是否需要指定模型
const intersects = rayCaster.intersectObject(this.viewer.scene, true) // 计算物体和射线的焦点
if (intersects[0]) {
console.log(intersects[0])
if(intersects[0].object.name=='地面'){
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment