一、 1.Please download and install the glut library. 2.Write a complete program using the following codes to draw a Sierpinski gasket. void myinit() { // attributes glClearColor(1.0,1.0,1.0,1.0); glColor3f(1.0,0.0,0.0); // set up viewing glMatrixMode(
一。安装three.js
1.npm `npm install three0.106.2` vscode
2.下载three.js文件拖入项目
3.在需要定义three对象的js文件头写入import * as THREE from '../js/three.module.js';路径为自己的three.module.js文件的路径,这样就可以自动提示three.js中的函数和方法
二。基本组件
1.场景var scene = new THREE.Scene()
2.相机
(1)正交相机