m-init-three3d
v1.0.7
Published
a init three.js scene plugin
Downloads
6
Readme
用法
- 你可通过import * as m3d from 'm-init-three3d' 也可以script引入,或者require
- 初始化:
let mdata = new m3d.Minit3D({
el:'el',//初始化节点为id号
width:500,//场景的宽度
height:500,//场景的高度
bgColor:0xffffff,//场景的背景色
bgOpacity:1,//场景的透明度
renderObj:null,//render渲染器的配置参数,null为默认
castShadow:false,//是否启用阴影
x:0,//相机的x坐标
y:0,//相机的y坐标
z:40//相机的z坐标
},function(){ //回调函数代表重复渲染render
},THREE) //mdata为返回相关数据的对象如scene,camera等。