Threejs:安装及其环境
vue3框架
安装:
npm install three
导入:
// 方式 1: 导入整个 three.js核心库
import * as THREE from 'three'; const scene = new THREE.Scene();
// 方式 2: 仅导入你所需要的部分
import { Scene } from 'three'; const scene = new Scene();
vue3框架
npm install three
// 方式 1: 导入整个 three.js核心库
import * as THREE from 'three'; const scene = new THREE.Scene();
// 方式 2: 仅导入你所需要的部分
import { Scene } from 'three'; const scene = new Scene();