peterqliu / threebox

A three.js plugin for Mapbox GL JS, with support for basic animation and advanced 3D rendering.
MIT License
528 stars 320 forks source link

Exporter for correct JSON format #32

Open MannyMeadows opened 6 years ago

MannyMeadows commented 6 years ago

Kudos on this handy plugin. However, I'm having trouble loading a custom JSON, is there a particular exporter/converter compatable with threebox? I've tried the Threejs Blender exporter and command line converter from mrdoob without success. I receive the following error...

THREE.JSONLoader: x should be loaded with THREE.ObjectLoader instead.

and upon switching loaders I get...

Uncaught TypeError: Cannot read property 'type' of undefined

Please see demo.

Would there be scope to add gltf support? Since gltf with draco can result in very small file sizes.

Many thanks

peterqliu commented 6 years ago

@MannyMeadows hmm, we've never run into this before. Threebox is a very thin wrapper around Three.js itself-- there are no exporters/converters unique to it. I would dig into Three.js forums for help here.