It was quite a pain - ArrayBuffers / Typed Arrays are fussy about byte alignment - but seems to be worth it.
Parsing times are down (modest gains for small objects / Firefox, bigger gains for large objects / Chrome, performance gains from 10% - 200%).
Also as a positive side effect, changing interleaved face arrays into uniform arrays seems to have helped a bit with gzip compression (about 6% smaller size for gzipped 526K Lucy).
Fixed Blender importer to work with Blender 2.60, add option for importing workers or non-worker models.
Fixed more examples to use worker-less format. All examples should work now.
Only Max exporter should be left to change.
Work-in-progress => do not merge yet.
OBJ converter, JSONLoader, BinaryLoader and some examples are done. Still need to do Blender exporter, SceneLoader and more examples.
Advantages:
- faster parse times
- bypass array initializer size limit in Firefox
- no more crashes in Chrome 15 (caused by too many concurrently active workers)
Disadvantages:
- more browser UI freezing
- multiple models tend to appear all at once with the last one (instead of popping up progressively)
* Camera is now a base object. PerspectiveCamera should be used instead. Figured out a way to show a warning when misused.
* OrthoCamera is now OrthographicCamera.
* Removed `target` from Camera.
Misc
* Renamed Trident to Axes.
* Added support to texture.offset in CanvasRenderer
* Removed ShadowVolume, ShadowVolumeDynamicMaterial and LensFlare classes.
* Removed Stencil Shadows and LensFlare code out of WebGLRenderer
* Added 2.59 folder to Blender, and removed old ones.
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() )
DataTexture can be used in the same places like image / video based Texture (WebGLRenderer-only).
To be used like this:
var width = 64, height = 64, bytes = 3;
var data = new Uint8Array( width * height * bytes );
// fill data array with values 0 .. 255
var texture = DataTexture( data, width, height, THREE.RGBFormat );
texture.needsUpdate = true;
For the moment only UNSIGNED_BYTE type is supported.
- moved 3d-only text parameters from TextPath into TextGeometry
- added safeguard for bevelSize and bevelThickness not affecting shape size if bevel is disabled
- updated text examples as now TextGeometry is not anymore centered
All three classes are now in separate files.
Updated build script.
Fixed runaway globals.
Optimized loops ("in" should be used just for iterating over object properties, for arrays it's slow and also traversal order is not guaranteed).
Cleaned whitespace.
Bit more polished example.
Fixed inverted side faces for fish shape.