browser-osg-serializer-js

0.0.3 • Public • Published

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

Package Sidebar

Install

npm i browser-osg-serializer-js

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

2.5 MB

Total Files

7

Last publish

Collaborators

  • jayceechow