贝德斯
BedsJS是可在画布上绘制的开源库
语言:
英语
基本
BedJS通过这种方式写入变量
var Bed = new BedJS ( { } ) ;
现在,我们可以将画布添加到页面中。为此,请编写以下代码
document . body . appendChild ( Bed . domElement ) ;
要开始渲染,我们必须让图书馆知道准备阶段已经结束。为此,我们编写以下函数
Bed . start ( )
结果,我们应该获得此代码。
var Bed = new BedJS (
安装
$ npm install lesca-threejs-orbitcontrols --save
用法
import * as THREE from 'three' ;
import { OrbitControls } from 'lesca-threejs-orbitcontrols' ;
// create function
const Orb = new OrbitControls ( THREE ) ;
// then create controls object
const co