Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

gbo-reader

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gbo-reader

A reader for goodboys gbo file format.

latest
Source
npmnpm
Version
1.0.6
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

GBO Reader and Converter

How to use:

To convert a file in a node js enviroment:

import {convertObjToGbo} from 'gbo-reader';

convertObjToGbo('./myObj.obj', './myGbo.gbo');

To read a file a js enviroment:

import {readGbo} from 'gbo-reader';

var oReq = new XMLHttpRequest();
oReq.open("GET", './myGbo.gbo', true);
oReq.responseType = "arraybuffer";

oReq.onload = oEvent => {

    var arrayBuffer = oReq.response;

    readGbo(arrayBuffer).then(o=>{

        var geometry = new PIXI.mesh.Geometry()
        .addAttribute('uv', o.uv, 2 )
        .addAttribute('position',  o.position, 3 )
        .addAttribute('normals',  o.normals, 3 )
        .addIndex(new Uint16Array(o.indices) );

    })
};

oReq.send()

FAQs

Package last updated on 23 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts