wd-3d-sdk-web
v0.0.6
Published
wd 3d meta sdk by threejs
Downloads
7
Readme
wd-3d-sdk-web
对 threejs 简单封装,实现 3D 预览
快速接入
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>网达3D预览SDK</title>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
background-color: #1e1919;
}
</style>
</head>
<body>
<canvas id="zCanvas" style="width:100%;height:100%;"></canvas>
</body>
</html>
import 'wd-3d-sdk-web'
window.onload = () => {
const _canvas = document.getElementById('zCanvas')
console.log('W3d', window.W3DJS)
window.w3d = window.W3DJS.createW3D(_canvas, {
debug: true
})
// 加载模型,默认geile moxing
window.w3d.load()
}