An open API service indexing awesome lists of open source software.

https://github.com/patricevignola/dot-model-2-obj

Transcode .model 3D files to .obj in JavaScript.
https://github.com/patricevignola/dot-model-2-obj

3d model obj opengl transcoder webgl

Last synced: 3 months ago
JSON representation

Transcode .model 3D files to .obj in JavaScript.

Awesome Lists containing this project

README

          

# dot-model-2-obj

[![Circle CI Status](https://circleci.com/gh/PatriceVignola/dot-model-2-obj.svg?style=shield)](https://circleci.com/gh/PatriceVignola/dot-model-2-obj) [![Coverage Status](https://coveralls.io/repos/github/PatriceVignola/dot-model-2-obj/badge.svg?branch=master)](https://coveralls.io/github/PatriceVignola/dot-model-2-obj?branch=master) [![npm version](https://badge.fury.io/js/dot-model-2-obj.svg)](https://badge.fury.io/js/dot-model-2-obj) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) [![jest](https://facebook.github.io/jest/img/jest-badge.svg)](https://github.com/facebook/jest)

Transcode .model 3D files to .obj in JavaScript.

`model` is a binary format used by Apple in WWDC 2010's [GLEssentials sample](https://developer.apple.com/library/content/samplecode/GLEssentials/Introduction/Intro.html).

dot-model-2-obj can be used in pure JavaScript applications runnable directly in the browser, as well as any ES5 and ES6 applications ([Node.js](https://nodejs.org/), [React](https://reactjs.org/), [React Native](https://facebook.github.io/react-native/), [React Native Web](https://github.com/necolas/react-native-web), etc).

## Getting Started

You can install the library with `yarn`:
```sh
yarn add dot-model-2-obj
```
You can also use npm:
```sh
npm install dot-model-2-obj --save
```

## Usage

### Pure JavaScript

Coming soon...

### ES5/ES6

Coming soon...

## Examples

To run the examples, follow the following steps depending on your platform:

### Pure JavaScript

First, make sure to run `yarn build` or `npm run build`. This will generate the `dist/dot-model-2-obj.min.js` file used in the example.

Then, simply drag and drop `examples/pure-javascript-example/example.html` in your favorite browser, select `models/demon.model` and press the `Transcode` button. The transcoder will transcode the .model file and save `demon.obj` in your downloads folder.

### React

Coming soon...

### React Native

Coming soon...

### Node.js

Coming soon...

### Babylon.js

Coming soon...

## License

dot-model-2-obj is [MIT licensed](https://github.com/PatriceVignola/dot-model-2-obj/blob/master/LICENSE).