browser-osg-serializer-js
v0.0.3
Published
Module for reading and writing OpenSceneGraph 3D models. file type supported: .osgb .osgt
Downloads
4
Readme
browser-osg-serializer-js
browser-osg-serializier-js is PureJS module for serializing .osgt
and .osgb
files.
The tool is still in development but I will be happy to your issues and contributions
UPDATE: Consider using wasm
using OpenSceneGraph's most updated code (osg-wasm, openscenegraph-cross-platform-guide).
installation and usage
In terminal: npm install --save browser-osg-serializer-js
for browser users:
import osg from "browser-osg-serializer-js";
const buffer = await fetch("http://127.0.0.1/MyAwesome3DModel.osgb").then(res=> res.arrayBuffer());
const osgObj = osg.readBuffer(buffer, filePath);
// start workin with 3d data
and still work for nodejs users:
const osg = require('browser-osg-serializer-js');
file = osg.readFile("MyAwesome3DModel.osgb");
// start workin with 3d data