@dcl/ sdk (英语)
主SDK包 为建筑 德克萨斯州场景.
概览
Decentrand SDK为在Decentrand metaverse创建交互式3D场景提供了一个完整的框架. 它包括:
- 用于现场开发的实体构成部分系统
- UI 组件和布局工具
- 资产管理公用事业
- 场景联网能力
- 投入处理和互动
安装
npm install @dcl/sdk
快速启动
- 创建新场景 :
npx @dcl/sdk-commands init
- 启动开发服务器 :
npm start
使用量
import { engine, Entity, Transform, GltfContainer } from '@dcl/sdk/ecs'
// Create an entity
const entity = engine.addEntity()
// Add components
Transform.create(entity, {
position: { x: 8, y: 0, z: 8 },
scale: { x: 1, y: 1, z: 1 }
})
GltfContainer.create(entity, {
src: 'models/myModel.glb'
})
特征
构成部分
- 变形
- 格来夫容器
- 材料
- 变形
- 音频来源
- 还有...
系统
- 输入处理
- 物理学
- 动画
- 联网
UI 框架
- 弹性盒布局
- 类似反应的组件
- 事件处理
发展
构建软件包
make build
测试
# Run all tests
make test
发展指挥部
本地开发时,您也可使用:
# Clean all build artifacts and reinstall dependencies
make clean && make install
# Format and fix linting issues
make lint-fix
# Update dependencies across packages
make sync-deps
文档
结构决定
为了加深对SDK架构的理解: