284 Commits
Author SHA1 Message Date
Mr.doob b978e9e592 * Minor tweaks on Rectangle.js r28 2010-11-12 04:19:21 +00:00
Mr.doob 0340404cfc * examples/geometry/primitivessrc/extras/primitives 2010-11-12 04:03:27 +00:00
Mr.doob a35b35fde9 * examples/geometry/primitivessrc/extras/primitives
* THREE.Rectangle: `_x1`, ` _x2`, `_y1`, `_y2` ⟶ `_left`, `_right`, `_top`, `_bottom`
2010-11-12 04:02:30 +00:00
alteredq 94e77e4cb4 Added caching of element offsets optimization to binary loader. 2010-11-12 01:09:48 +01:00
alteredq 1e36ddee47 Applied mrdoob's optimizations from ascii loader also to binary loader.
TODO: still could save some more multiplication by precomputing offsets for individual components of the elements.
2010-11-11 21:49:29 +01:00
Mr.doob 453c6efc0d At Loader.js, as far as I can see we don't need all that stride stuff. Removed/Simplified from createModel() by now. That saves *a lot* of multiplications at init of the geometry. 2010-11-11 13:01:40 +00:00
Mr.doob 55baeb7ee4 Merge remote branch 'alteredq/master' 2010-11-11 05:28:15 +00:00
alteredq f9ec9325f9 Tested exporters with new Blender 2.55 Beta. It seems both old and new one work without any changes \o/ 2010-11-11 01:54:02 +01:00
alteredq b31c9bd8a3 Added handling of empty material slots in new Blender exporter.
Such broken materials will be replaced by dummy materials names like this "undefined_dummy_5".
2010-11-10 23:59:08 +01:00
Mr.doob 237c6656f2 Merge remote branch 'alteredq/master' 2010-11-10 16:47:26 +00:00
alteredq ca7e2fc923 Added model alignment to new Blender exporter.
Fixed crash bug with non-textured models in new Blender exporter.

Fixed bottom alignment bug in OBJ converters.
2010-11-10 02:16:29 +01:00
Mr.doob f34ca2e477 Merge remote branch 'alteredq/master' 2010-11-10 00:09:04 +00:00
alteredq baced836f3 Merge remote branch 'remotes/upstream/master' 2010-11-09 22:47:16 +01:00
alteredq c545318b51 Added experimental Blender exporter for the new ascii JSON format.
Models exported by this version should be loaded like this (the same as for slim OBJ converter):

    var loader = new THREE.Loader();
    loader.loadAscii( "path/to/model/Model.js", function( geometry ) { createScene( geometry ) }, "path/to/model" );

Compared to OBJ converter, currently only single mesh is exported (many models are composed of several meshes).

TODO
    - model alignment
    - copy used images to folder where exported file goes
    - export all selected meshes / all meshes in the scene?
    - binary format
2010-11-09 22:44:22 +01:00
alteredq b3bacc8af8 Refactored OBJ slim converter (to make it easier to reuse ASCII converter snippets in Blender exporter). 2010-11-09 22:22:39 +01:00
Mr.doob a7d70a0eff * Builders clean up 2010-11-09 06:27:44 +00:00
Mr.doob 06cef27b81 Merge remote branch 'alteredq/master' 2010-11-09 05:54:19 +00:00
alteredq 7c26e04c7a Refactored common functionality out of ascii and binary loaders. 2010-11-09 02:19:34 +01:00
Mr.doob c2ae485dea Merge remote branch 'alteredq/master' 2010-11-09 00:14:34 +00:00
alteredq 5182d90429 Merge remote branch 'remotes/upstream/master' 2010-11-08 23:41:11 +01:00
alteredq cdb6b868b3 Added a little sanity check in binary format loader (commented out debug log of computed total file size which should match with real file size). 2010-11-08 23:40:12 +01:00
alteredq a0fa2ae3dd Optimized binary model format to use indexed UVs. Updated OBJ slim converter and Loader accordingly.
This saves about 10% from size of textured binary models.
2010-11-08 23:20:25 +01:00
Mr.doob 35b21b1f4e * LICENSE: Changed copyright
* AUTHORS: Just realised there is a github page with that info already. https://github.com/mrdoob/three.js/contributors
2010-11-08 21:46:38 +00:00
alteredq ecf97e0d4c Synced with sole's branch. 2010-11-08 20:10:32 +01:00
alteredq 97425e01ae Merge remote branch 'remotes/sole/master' 2010-11-08 20:04:26 +01:00
alteredq 1ca0bf23dc Merge remote branch 'remotes/upstream/master' 2010-11-08 18:17:02 +01:00
alteredq 188f36be5d Optimized ASCII model format to use indexed UVs. Updated OBJ slim converter and Loader accordingly.
This saves ~22% from size of textured ASCII models.

TODO: make the same for binary model format.
2010-11-08 18:10:43 +01:00
sole b489e524ea Build system: now --debug applies to the current build (can generate debug versions of every type of build: canvas, dom, etc) 2010-11-08 11:43:13 +00:00
Mr.doob 39f88e74b2 * Fixed markup error in README 2010-11-08 09:38:23 +00:00
Mr.doob 7059050d19 * Updated README (examples/projects) 2010-11-08 09:36:28 +00:00
sole cb626b9d95 Merged with alteredq version (support python 2.6) and also made it more explicit as per mrdoobs suggestion 2010-11-07 19:46:53 +00:00
alteredq b14f09be61 Merged with sole's branch: took new Python build script, made it work with my ancient Python 2.6. 2010-11-06 19:50:37 +01:00
alteredq 7abad40d83 Merge remote branch 'remotes/sole/master' 2010-11-06 19:23:28 +01:00
alteredq 514a2e6135 Merged with latest changes in mrdoob's branch. All hex colors should be now without baked opacity. 2010-11-06 18:59:03 +01:00
alteredq 0cb79310e5 Added experimental binary mesh loader. Updated OBJ converter and examples accordingly.
If you want to use binary format, convert OBJ models using "convert_obj_threejs_slim.py" with "-t binary" option.

This will now create two files:
    JS part with materials
    BIN part with binary buffers

Binary models are loaded like this:

loader.loadBinary( 'obj/lucy/Lucy250k_bin.js', function( geometry ) { createScene( geometry, s ) }, "obj/lucy" );

(difference to ascii format is that url root must be always specified so loader can find binary buffers file, like it already was for textures)

Good news:

- raw binary files are quite smaller than raw ascii files (about half size)
- loading times went down about 20-25%
- now also Firefox can handle 250k triangle mesh (it just bugs about long running script), with ascii format it threw "array initialiser too large" exception

Mixed news:

- gzipped binary files are only about 25% smaller than gzipped ascii files so actual benefits are smaller,
  also it's more likely server will have JS gzipping on by default, while you need to set it up for
  other formats (could be hacked around by naming binary files with JS extension instead of BIN?)

Bad news:

- browser blocking is back :( Not that it ever went completely away (for large models object creation is more costly than loading and it is blocking), but it was slightly better with ascii loader (where data is loaded as worker's JS body).

    - this comes from having to use Ajax to load binary data
    - loading binary data by Ajax from within worker didn't really help, it was in fact slightly slower and browser did freeze :(
    - can't easily embed binary data in JSON (would need to encode it which would make it bigger, defying the purpose)

- Loader got fatter

Also in this commit: renamed Loader.loadAsync() => Loader.loadAsciiOld() and Loader.loadWorker() = Loader.loadAscii() so that names correspond to model formats instead of underlying implementation.

loadAsciiOld - JS exported by Blender and old OBJ converter
loadAscii    - JSON created by slim OBJ converter (-t ascii)
loadBinary   - JSON + BIN created by slim OBJ converter (-t binary)

TODO:

 - look into UV coordinates, should be indexed the same way as vertices, normals and faces are (instead of unrolled per each face)
 - look into HTML5 File API, binary blobs could help
2010-11-06 17:24:58 +01:00
Mr.doob 3cdc007b90 * Fixed some minor issues handling opacity in hex colors 2010-11-06 12:51:09 +00:00
sole e43af53f19 refactored build system 2010-11-05 14:21:54 +00:00
Mr.doob 1849e9050c * Added a nicer interactivity example ⟶ examples/interactive_voxelpainter.html 2010-11-05 06:00:09 +00:00
sole bf6db5a714 merging? 2010-11-05 00:41:20 +00:00
Mr.doob 52045b53cb * examples/geometry_large_mesh.html: credit were credit is due :) 2010-11-05 00:26:33 +00:00
Mr.doobandsole 0ca8efd916 Fixed stats 2010-11-05 08:26:17 +08:00
alteredq c437ce68fe Small clarifications in large mesh example description: model size meanwhile went down to 3.5 MB ;) and file access flag applies to Chrome. 2010-11-05 00:33:24 +01:00
alteredq f6e829ca21 Synced with mrdoob's branch. 2010-11-05 00:25:03 +01:00
Mr.doob 55c40d0fa3 * Renamed examples/large_mesh_test.html to examples/geometry_large_mesh.html
* Added the first WebGL example to README \:D/
2010-11-04 22:29:38 +00:00
Mr.doob 5053cc4e6d * Added 2 more examples to the README.
* Cleaned interactive_cubes example code.
2010-11-04 21:59:42 +00:00
Mr.doob 1aca787cb1 Forgot to recompile the builds 2010-11-04 21:23:34 +00:00
Mr.doob 83690551a3 Added a comment on example/large_mesh_test.html about the --allow-file-access-from-files bit. 2010-11-04 21:08:59 +00:00
Mr.doob 425c01111b Merge remote branch 'alteredq/master' 2010-11-04 20:57:29 +00:00
Mr.doob 047f190d4d Avoiding merge conflicts (I'm sure there is a way to handle these in this client, maybe not yet...) 2010-11-04 20:55:58 +00:00
alteredq 49d1bd170b Made JSON model format slimmer by flattening arrays. Modified Loader and OBJ converter accordingly.
This is a first step towards eventual binary model format.
2010-11-04 21:18:08 +01:00