1.1.2 • Published 11 months ago

@xhymf1992/3dtiles-sdk v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

3dtiles-sdk

介绍

基于node.js编写的3dtiles相关的开发工具包,可用于生成b3dmi3dm等文件

安装教程

yarn add 3dtiles-sdk

使用说明

导出b3dmglbBuffer可借助gltf-pipeline生成

import { Batched3DModel } from "@xhymf1992/3dtiles-sdk";

const batchLength = 3; // bactch 长度
const propertyData = new Int32Array(batchLength).fill(0); // batch table 属性

// 构建Batched3DModel类,需传入batch长度和glb数据
const b3dm = new Batched3DModel({
    batchLength,
    gltf: Buffer.from("")
});

// 添加属性,传入属性名和属性数组
b3dm.addProperty("propertyName", propertyData);

// 导出b3dm buffer
const b3dmBuffer = b3dm.exportBuffer();

// 异步导出文件
let b3dmPath = `./fileName.b3dm`;
await b3dm.exportFile(b3dmPath);
1.1.2

11 months ago

1.1.1

12 months ago

1.1.0

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago