🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@goodboydigital/gb-model-tools

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goodboydigital/gb-model-tools

A collection of GB model tools. gltf => gb and fbx => gb

latest
npmnpm
Version
4.3.0
Version published
Maintainers
4
Created
Source

GB model tools README

What is this repository for?

GB model tools is a set of functions for working with the GB 3d model format. The main reason for having our own format is really about control! Most 3D formats are generally designed for 3D editor tools rather than to be used directly from a runtime 3D engine. They are overly large and come with too many ways of doing things (FBX!). Though its useful to get the various formats from designers, in the end they all need to be normalized for optimum efficiency during runtime. However

For example even if you smash a bunch of FBX models into unity, by the time you publish and run the game, the models will have all been formatted to a specific internal format designed to be optimally loaded by the unity run time.

GB format is just that, but for Odie. A 3D format designed to be passed super quickly by its runtime. Also it is full typescript format making it easier to work with

It has two main parts to it.

  • Node functions that let us convert common 3D formats to the GB format tools.
  • FBX -> GB conversion
  • GLTF -> GB conversion
  • OBJ -> GB conversion
  • GB functions for optimizing a model or scene. They can be run in both the browser and node

    • merging models into a single giant model still letting them be rendered individually (This is what a GBPrimitiveFrag is)
    • flattening a model merges all models into a single mesh from a scene.
    • deduping models by removing geometry that exactly the same and using a single instance.
  • Compression and decompression of a GBObject. We use quantization and a pako compression to squish a GB model format down to a binary format. Both work on browser and node.

FBX are converted to Gltf using fbx2gltf an awesome lib created by facebook. We then convert the gltf to the gb format

How do I get set up?

Install: npm i @goodboydigital/gb-model-tools Develop: npm start Build: npm run prod Build Docs: npm run docs Run Tests: npm run test

Contribution guidelines

  • Any new features added to this project should be accompanied by relevant tests to ensure the new feature is working correctly or the fixed bug is actually.. fixed!
  • Tests are using jest

Who do I talk to?

  • Talk to mat groves - mat@goodboydigital.com if you get stuck working with this!

FAQs

Package last updated on 06 Oct 2021

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