Files
three.js/utils/exporters/utf8
alteredq d5a54e0a4e Added UTF8 format loader and example.
Included corresponding compressor in "utils/exporters/utf8" (prebuilt exe for Windows plus slightly modified C++ source code).

Use UTF8 format with caution, it is very neat but has quite a few limitations:

 - number of vertices < 65536 (this is after optimizations in compressor, input OBJ may have even less)
 - models must have normals and texture coordinates
 - texture coordinates must be only from <0,1>
 - no materials support yet
 - models are scaled and offset (copy numbers from compressor and use them as parameters in UTF8Loader.load() )
2011-08-13 02:00:25 +02:00
..
2011-08-13 02:00:25 +02:00
2011-08-13 02:00:25 +02:00

-------------------------
---- three.js README ----
-------------------------

Slightly modified "mesh.h" so that compressor:

- compiles with latest MinGW on Windows 64-bit
  (had to replace %z size_t formatting option)

- dumps to stderr scaling and offset parameters


Also for convenience added pre-build executable for Windows.

Latest version of compressor can be downloaded at webgl-loader repository:

http://code.google.com/p/webgl-loader/

--------------------------------------------
---- Original README from webgl-loader -----
--------------------------------------------

Usage: ./objcompress in.obj [out.utf8]

        If 'out' is specified, then attempt to write out a compressed,
        UTF-8 version to 'out.'

        If not, write a JSON version to STDOUT.


Building:

Since there are no external dependences outside of the C/C++ standard
libraries, you can pretty much build this however you please. I've
included a cheeky way to do this on POSIX-like systems by including a
build shell script at the top of the file itself. You can build by
making the .cc file executable, and running it on the command line.