qse-core
v1.0.6
Published
基于 three.js 的可视化库,旨在简易,快速,高效的生成 3D 项目!为了获得最佳的使用体验,建议搭配 [qse-editer](https://www.npmjs.com/package/qse-editer) 一起使用!
Downloads
20
Readme
qse-core
基于 three.js 的可视化库,旨在简易,快速,高效的生成 3D 项目!为了获得最佳的使用体验,建议搭配 qse-editer 一起使用!
Project setup
npm install qse-core
Project example
import { World, Mesh, getMeshOptions, getBoxGeometryAttribute, getBasicMaterialAttribute, } from 'qse-core'
//创建一个世界
const world = new World()
world.start(document.body)
//生成Box
const geometry = getBoxGeometryAttribute()
const material = getBasicMaterialAttribute()
const mesh = new Mesh(getMeshOptions(geometry, material))
world.add(mesh)
//更新Box
geometry.width = 4
material.color = '#ff000'
mesh.needUpdate = true
mesh.needUpdateGeometry = true
//销毁Box
mesh.dispose()
Project document
更详细的文档正在准备中!