This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

osg-serializer-browser

0.0.3 • Public • Published

osg-serializer-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 osg-serializer-browser

In code(node.js):

var filePath = './Samples/cessna.osgb'
osg.readFile(filePath, (err, osgObj) => {
    if (err) console.error(err);
    else console.log(osgObj);
    // start workin with 3d data
})

In code(browser):

<script src='./dist/osg.js'></script>
var buffer = require('buffer')
var filePath = './Samples/cessna.osgb'
fetch(filePath).then(res => { return res.arrayBuffer() }).then(abuf => {
    var buf = buffer.Buffer.from(abuf)
    var osgObj = osg.readBuffer(buf, filePath)
    console.log(osgObj);
})

// start workin with 3d data

Package Sidebar

Install

npm i osg-serializer-browser

Weekly Downloads

1

Version

0.0.3

License

ISC

Unpacked Size

5.46 kB

Total Files

5

Last publish

Collaborators

  • weixiuyong