当前位置:网站首页>Three.JS VR看房

Three.JS VR看房

2022-07-05 22:46:00 yzhSWJ

 

 代码

<template>
  <div class="container" ref="container"></div>
</template>

<script setup>
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader";
import { ref, onMounted } from "vue";
// 初始化场景
const scene = new THREE.Scene();
// 初始化相机
const camera = new THREE.PerspectiveCamera(
  75,
  window.innerWidth / window.innerHeight,
  0.1,
  1000
);
// 设置相机位置
camera.position.z = 0.1;
// 初始化渲染器
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.inn
原网站

版权声明
本文为[yzhSWJ]所创,转载请带上原文链接,感谢
https://blog.csdn.net/yuzheh521/article/details/125613261