vue中使用Three.js

2023-06-15-11-25-56

1.安装

npm install three

2.引入

// 方式 1: 导入整个 three.js核心库
import * as THREE from 'three';

const scene = new THREE.Scene();


// 方式 2: 仅导入你所需要的部分
import { Scene } from 'three';

const scene = new Scene();

3.vue中使用




你可能感兴趣的:(javascript,vue.js,ecmascript)