Compare commits
No commits in common. "c61eb163e061fb935e88a57641d1dc70e363d7b5" and "c7010a7ab355fc5c64526ad3d90527c9edba2aa9" have entirely different histories.
c61eb163e0
...
c7010a7ab3
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
"metadata": {
|
|
||||||
"version": 4.6,
|
|
||||||
"type": "Object",
|
|
||||||
"generator": "Object3D.toJSON"
|
|
||||||
},
|
|
||||||
"object": {
|
|
||||||
"uuid": "d5126c66-4d01-4921-a537-14d53e6f1e6b",
|
|
||||||
"type": "PerspectiveCamera",
|
|
||||||
"name": "Camera",
|
|
||||||
"layers": 1,
|
|
||||||
"matrix": [-0.06562201141132419,0,-0.9978445528329212,0,-0.7132741706287389,0.6993136887478822,0.04690759260199039,0,0.6978063550385712,0.7148149164153124,-0.04589037086310866,0,155.382,155.10629237063554,-56.571004917885546,1],
|
|
||||||
"up": [0,1,0],
|
|
||||||
"fov": 50,
|
|
||||||
"zoom": 1,
|
|
||||||
"near": 0.01,
|
|
||||||
"far": 1000,
|
|
||||||
"focus": 10,
|
|
||||||
"aspect": 1.7215727948990436,
|
|
||||||
"filmGauge": 35,
|
|
||||||
"filmOffset": 0
|
|
||||||
}
|
|
||||||
}
|
|
294152
public/jz/glb/scene.gltf
294152
public/jz/glb/scene.gltf
File diff suppressed because one or more lines are too long
|
@ -40,7 +40,7 @@ const props = defineProps({
|
||||||
default: '#fff',
|
default: '#fff',
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
sceneUrl: { // 模型路径
|
sceneUrl: { // 模型路径
|
||||||
default: '/jz/glb/scene.gltf',
|
default: '/jz/glb/scene.gltf',
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
@ -84,10 +84,10 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
const init = () => {
|
const init = () => {
|
||||||
scene = new THREE.Scene("#00ffff");
|
scene = new THREE.Scene("#00ffff");
|
||||||
// const texture = new THREE.TextureLoader().load(homeIcon);
|
const texture = new THREE.TextureLoader().load(homeIcon);
|
||||||
// texture.mapping = THREE.EquirectangularReflectionMapping;
|
texture.mapping = THREE.EquirectangularReflectionMapping;
|
||||||
// scene.background = texture
|
scene.background = texture
|
||||||
// scene.environment = texture
|
scene.environment = texture
|
||||||
|
|
||||||
const canvas = document.querySelector("#three");
|
const canvas = document.querySelector("#three");
|
||||||
var cubeLoader = new THREE.CubeTextureLoader();
|
var cubeLoader = new THREE.CubeTextureLoader();
|
||||||
|
@ -100,9 +100,9 @@ const init = () => {
|
||||||
|
|
||||||
camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.25, 2000)
|
camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.25, 2000)
|
||||||
// 将摄像机对准场景的中心
|
// 将摄像机对准场景的中心
|
||||||
camera.position.set(-192.936, 180.990, -28.179);
|
camera.position.set(0, 104.545, -21.637);
|
||||||
camera.lookAt(scene.position);
|
// camera.lookAt(scene.position);
|
||||||
|
|
||||||
// 创建控件对象
|
// 创建控件对象
|
||||||
orbit = new OrbitControls(camera, renderer.domElement);
|
orbit = new OrbitControls(camera, renderer.domElement);
|
||||||
orbit.autoRotate = true;
|
orbit.autoRotate = true;
|
||||||
|
|
Loading…
Reference in New Issue