Skip to content

nonlinearthink/browser-osg-serializer-js

 
 

Repository files navigation

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

About

Pure JavaScript module for reading (and writing, hopefully) .osgb & .osgt files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%