171 Commits
Author SHA1 Message Date
Mr.doob f848e60de0 Tweaked extras order. 2011-03-15 16:07:12 +00:00
alteredq 1c466f26e7 Moved QuakeCamera and PathCamera into extras/cameras. 2011-03-15 16:49:52 +01:00
Mr.doob 1413f96958 Fixed Camera.updateMatrix(). 2011-03-14 20:01:35 +00:00
alteredq 6972b1b5fc Added support for morph targets to OBJ converter.
To be used like this:

python convert_obj_threejs_slim.py -i model.obj -m morph*.obj -o model.js

Morph filename strings can contain wildcards "*,?,[]".

For including morphs from multiple folders, use quotes and separate filename patterns by space:

python convert_obj_threejs_slim.py -i model.obj -m "folderA/morphA*.obj folderB/morphB*.obj ..." -o model.js
2011-03-14 14:34:51 +01:00
alteredq b6b0e21015 Added PathCamera.
PathCamera automatically follows path passing through waypoints (interpolated via Catmull-Rom spline). View angles can be constrained and controlled by mouse.

Work in progress, there are still some issued to be solved (constant movement speed, broken automatic update, broken frustum culling).
2011-03-14 03:57:22 +01:00
alteredq 2b90f7c047 Fixed broken converter multi-dot filenames fix.
Also implanted Animation fix from empaempa.
2011-03-11 16:56:22 +01:00
alteredq a273871911 Fixed handling of file names with multiple dots in exporters and converters.
Also half-baked QuakeCamera update managed to sneak in.
2011-03-11 01:47:56 +01:00
alteredq 715f8c4f6e Max exporter can now export vertex colors. 2011-03-10 23:03:08 +01:00
alteredq 40bbe28c40 Fixed OBJ converter to handle edge case where MTL file has more materials than corresponding OBJ file.
Also half-baked broken vertex colors in Max exporter managed to sneak in this commit.
2011-03-10 13:20:16 +01:00
alteredq 4ae13ca087 Updated max exporter to handle also messed up multimaterials. 2011-03-09 23:41:03 +01:00
alteredq 13ccc02a8a Refactored shader and uniform snippets out of WebGLRenderer into WebGLShaders. 2011-03-09 21:44:11 +01:00
alteredq 91795a3510 Updated Max exporter.
Made face flipping heuristics optional, it messes up scenes that are ok.

For scenes that after exporting have objects with flipped normals, original assets can be fixed in Max in a following way:

1. find out problematic objects in Max
  1. select all objects
  2. set View -> xView to show "Face Orientation"
  3. select all object that are fully/mostly green
  4. in Utilities apply Reset XForm to selected objects (this will show messed normals also in Max, otherwise they are hidden)

2. fix problematic objects
  1. apply Normals => flipNormals modifier to selected object
2011-03-07 04:47:22 +01:00
alteredq c421b2d791 Number of bones in skinning shader is now taken from SkinnedMesh.
If no object is passed to initMaterials (for example, if material is pre-built while loading, or shader program is intended for sharing), max limit of 50 bones is used (should be enough to leave space for other uniforms not to hit ANGLE limits).
2011-03-07 01:25:11 +01:00
alteredq 6151624e3a Max exporter now exports multiple selected objects.
Unfortunately with larger scenes with many different types of objects face flipping heuristics doesn't work all the time :(
2011-03-07 00:28:42 +01:00
alteredq 129fddfd57 Fixed flipped normals workaround in max exporter.
Hope so. At least now hacked face normals correspond to face normals computed from scratch in Geometry.

(If only max didn't have zillion ways how to achieve the same visual results :/. I tracked this flipped normals/faces business down to XForm modifier - it doesn't get collapsed properly when making TriMesh / Editable_mesh snapshots. At least Editable_mesh snapshot differs in way that is exploitable for workaround hack.)
2011-03-06 22:56:36 +01:00
alteredq 88a13e7d39 Added safeguard in OBJ converter for not crashing on zero-sized degenerate normals. 2011-03-06 21:47:07 +01:00
Mr.doob 952631c923 REVISION++
Added some examples to README.
2011-03-06 09:41:15 +00:00
alteredq a8b5c55d1c First very rough version of 3ds max exporter.
Very much work-in-progress. So far it exports only single selected object, if there are more in selection, it'll just break apart.
2011-03-05 08:47:34 +01:00
alteredq bbe7e87df6 Changed OBJ converter to use just texture file names instead of full absolute file paths. 2011-03-03 23:26:44 +01:00
Mr.doob 795abb58a9 Uops! Forgot to increase REVISION's number :S 2011-03-03 08:46:12 +00:00
alteredq ccdff87382 Changed also JSON model files and exporters/converters to use CamelCase property names.
Only Blender 2.56 exporter and OBJ converter were tested. If somebody is using other ones, please reexport some files to be sure they work.
2011-03-02 05:55:29 +01:00
alteredq 7ad44b434c Added level-of-details example (and LOD object to compiled lib).
Thanks to empaempa for implementing this feature ;)
2011-03-01 15:50:14 +01:00
alteredq 03b9dfe80d Extracted Spline from example into core lib. 2011-03-01 03:51:43 +01:00
alteredq cf2e8c1bbf Refactored everything to use CamelCase naming for properties. Plus some smaller fixes here and there.
Went through all examples, all should work.

JSON files exported from Blender / converted from OBJ files still use underscored property names internally. I don't know, should these also be changed?
2011-02-28 14:52:04 +01:00
Mr.doob f5e819fe14 Removed all the toString methods (saving 6kbytes)
I don't remember when was the last time I used them. Current Web Developer Tools do this already for you.

Color::updateRGBA ⟶ Color::updateRGB
2011-02-28 05:13:04 +00:00
alteredq a325cd6064 Added build shell scripts for building all libs versions. 2011-02-27 22:59:26 +01:00
alteredq cf901305e5 Synced with mrdoob's branch. 2011-02-27 22:11:27 +01:00
Mr.doob 430ce532be Custom builds were missing files. (thanks to alan2 for reporting) 2011-02-27 20:20:15 +00:00
Mr.doob 470df4fa6a Updated TODO.
Blender plugins folder rename.
2011-02-27 20:08:22 +00:00
Mr.doob 7480fb69cd Updated README examples.
Sound3D ⟶ Sound
2011-02-26 14:21:15 +00:00
Mr.doob e7e47b1f88 More reformating and clean up. 2011-02-26 09:18:10 +00:00
alteredq da8afc4e6d Refactored CameraControl into THREE.QuakeCamera.
Now you can add keyboard + mouse camera control with a single line, just change camera type and add parameters:

 camera = new THREE.QuakeCamera( { fov: 50, aspect: window.innerWidth / window.innerHeight, near: 1, far: 10000,
	                           movement_speed: 1, look_speed: 0.002, nofly: true, look_vertical: false } );

Thanks to mrdoob for suggestions ;)
2011-02-26 00:24:14 +01:00
alteredq 7415759392 Added 3d sound support plus example.
Thanks to @mikaelemtinger ;)
2011-02-25 09:08:15 +01:00
Mr.doob fef3c084b1 Changed build setup:
build/Three.js - Includes all renderers + extras
	build/custom/ThreeCanvas.js - Canvas renderer only
	build/custom/ThreeDOM.js - DOM renderer only
	build/custom/ThreeSVG.js - SVG renderer only
	build/custom/ThreeWebGL.js - WebGL renderer only
	build/custom/ThreeExtras.js - Extras only

Moved `THREE.Detector.js` to `examples/js/Detector.js`.

Updated examples to reflect these changes.
2011-02-23 12:35:31 +00:00
Mr.doob a4a8f184c6 src/objects/Object3D.jssrc/core/Objects3D.js 2011-02-22 23:26:19 +00:00
Mr.doob 5aa43cd1cd All canvas examples are now using RequestAnimationFrame.js
Webgl examples next.
2011-02-22 01:54:03 +00:00
Mr.doob a4ee822b10 Easier to understand RequestAnimationFrame setup. 2011-02-21 20:39:11 +00:00
Mr.doob 848d1a338c Removed debug version from compile script. 2011-02-20 04:38:34 +00:00
alteredq 9c2b5c257c Added MiscUtils with THREE.requestAnimationFrame.
This is lifted from greggman's ThreeD http://code.google.com/p/threedlibrary/

Also modified ribbons example to show how to use this.
2011-02-19 18:21:03 +01:00
alteredq e151ff394b Added Ribbon object.
It provides a lean way how to render TRIANGLE_STRIP primitives: needs just n+2 vertices for n triangles (one Ribbon = one strip). There are no faces, no indices, everything is rendered in one simple drawArray call.

Vertex colors are supported, normals not yet.
2011-02-19 16:21:23 +01:00
alteredq afbace2801 Cleaning up to make it pass through Closure compiler.
We have been very lucky - setters / getters were not supported till just 2 hours ago (so fresh, I had to build Closure myself from their repo ;).

http://code.google.com/p/closure-compiler/issues/detail?id=249

Also some refactoring plus added hackish animation offset feature.
2011-02-17 05:10:30 +01:00
alteredq a9af9481e5 Added vertex colors to ASCII model loader and to Blender exporter (plus corresponding example).
Also fixed quads vertex color bug in WebGLRenderer and did small optimization of face state handling.
2011-02-14 20:21:42 +01:00
alteredq 082da28c8e Renamed THREE.Supports to THREE.Detector, moved it to extras. Also cleaned up example title tags. 2011-02-13 19:19:55 +01:00
alteredq 8e2f8c8b13 Fixed broken WebGL support detection.
Created "THREE.Supports" object, which should centralize this stuff. So far it detects <canvas>, WebGL and WebWorkers; later it could detect for example GPU capabilities.

Not sure about name or location, but it's pretty tiring go through all examples when something changes, so it should be somewhere in the library.

Code duplication is bad: even html snippets with error message should be centralized somewhere, so that when new browsers arrive we wouldn't have to keep changing them in many places.
2011-02-12 20:02:05 +01:00
alteredq b198531c66 Added MarchingCubes object.
Very much work-in-progress. Expect things to change.

Also changed film shader to have optional grayscale (controlled via uniform).
2011-02-07 14:29:42 +01:00
alteredq feed283804 Added support for material blending parameter to scene loader. 2011-02-04 17:14:23 +01:00
alteredq b4bffd49e3 Added basic sanitization of id->filename mapping in FBX converter. 2011-02-04 11:46:07 +01:00
alteredq 114b673ae5 Added first very rough version of FBX to Three.js converter.
Expect it not working on almost everything ;)

Requires Autodesk FBX SDK Python bindings to work.

On Windows it should theoretically work "out-of-the-box", for other platforms, you will need to get SDK from:

http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=6837478
2011-01-31 22:07:08 +01:00
Mr.doob 52c0de2b09 Merging with alteredq's branch. 2011-01-26 18:36:49 +00:00
alteredq 8faa18b620 Added simple scene format loader.
This is very much work in progress - expect things to change and to be broken.
2011-01-25 18:32:07 +01:00