Browse Source

fix:12

feature/three
guoapeng 3 months ago
parent
commit
e705da6f3b
  1. 10
      src/views/dataModel/index.vue

10
src/views/dataModel/index.vue

@ -12,7 +12,7 @@ let renderer: THREE.WebGLRenderer
let controls: OrbitControls
let mesh: THREE.Mesh
//
const modelGroup = new THREE.Group()
// const modelGroup = new THREE.Group()
const initThree = () => {
scene = new THREE.Scene()
@ -122,11 +122,13 @@ const initThree = () => {
const box = new THREE.Box3().setFromObject(mesh)
const center = box.getCenter(new THREE.Vector3())
mesh.position.sub(center) //
// mesh.scale.set(0.5, 0.5, 0.5)
mesh.scale.set(0.5, 0.5, 0.5)
mesh.rotateX(Math.PI / 2)
// mesh.position.set(-100, 0, 0)
scene.add(mesh)
modelGroup.add(mesh)
// modelGroup.add(mesh)
})
modelGroup.position.set(0, 0, 0)
// modelGroup.position.set(0, 0, 0)
// AxesHelper
const axesHelper = new THREE.AxesHelper(100)

Loading…
Cancel
Save