996 Commits
Author SHA1 Message Date
Mr.doob f848e60de0 Tweaked extras order. r36 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
alteredq cf6e2de8c9 Synced with mrdoob's branch. 2011-03-15 15:44:23 +01:00
alteredq a9f8419ae4 Added option to PathCamera to try to follow spline with the constant speed.
Enabled by "useConstantSpeed" parameter.

This is done by creating new spline which resamples original spline proportionally to linear-piece-wise integrated length of segments of the original spline.

It's not perfect, but speed-wise it should be better, especially when the original spline has very different lengths of segments.

New spline may have a bit different shape though (Catmull-Rom spline guarantees that it will pass through control points, but with more dense control points it may get kinks in between). You may control density of resampling by "resamplingCoef" parameter of the PathCamera.
2011-03-15 14:48:23 +01:00
Mr.doob 86ee064d6c Updated README. 2011-03-15 12:40:01 +00:00
Mr.doob 2a83aeb64b Object3D: Setting matrixWorldNeedsUpdate to true when updateMatrix has been called. 2011-03-15 12:31:14 +00:00
alteredq 09a10f7b2c Fixed update of PathCamera.
No more need for manual update hack.

Problems with keeping constant speed are still there. Added debug particles sampled along the spline - seems problems come from spline, samples have weird distribution.
2011-03-15 02:01:52 +01:00
Mr.doob 1f9d0d57ed Changed API Reference link in README. 2011-03-14 20:59:07 +00:00
Mr.doob a217bed826 Updated README. 2011-03-14 20:37:56 +00:00
Mr.doob 1413f96958 Fixed Camera.updateMatrix(). 2011-03-14 20:01:35 +00:00
alteredq 67341e776a Fixed bug in frustum culling when camera is part of hierarchy.
Thanks to empaempa for the fix.
2011-03-14 17:27:57 +01: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 e7ab9e58a2 Implemented simple forward facing animation type for Catmull-Rom splines.
Gah, that was painful. Obvious solution with object.lookAt doesn't work, forward facing direction (heading and attitude) is fine, but banking gets messed up:( Tried many fixes, none worked, so I just resorted to simple rotation around Y-axis based on direction vector.
2011-03-13 04:48:11 +01:00
alteredq be875f2267 Fixed bug in spline animation.
Spline control points shouldn't be cycled, this produces freaky behaviors near start and end of path. Instead they have to be capped.

Also did some refactoring.
2011-03-13 01:38:04 +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 0bf0e59f12 Synced with mrdoob's branch. 2011-03-11 01:54:53 +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
Mr.doob ce751a10dd WebGLRenderer now doesn't render objects with material.opacity == 0. 2011-03-10 16:19:19 -08:00
alteredq 715f8c4f6e Max exporter can now export vertex colors. 2011-03-10 23:03:08 +01:00
alteredq 1ebcd0f1da Fixed bug in FogExp2.
It's now possible to create fog with zero density (which makes sense if you want to build shader with fog support, but not yet use fog, in contrast to not having fog in scene at all).
2011-03-10 16:04:58 +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 d6db37ef7f Loader now keeps track of texture file names.
These are stored in "material.map.sourceFile".
2011-03-09 14:26:08 +01:00
alteredq 4c59647907 Added FileAPI to Detector.
Also for the moment reverted autoupdate of canvas based textures. This breaks things and proper fix seems to require more efforts :(
2011-03-09 02:45:52 +01:00
alteredq b817eaf9f9 Made colored billboard particles smaller.
That's about maximum size of point primitives ANGLE can handle, at least on my ATI card :(

It seems this max size can be GPU specific:

http://www.pouet.net/topic.php?which=6092&page=1
2011-03-08 22:09:49 +01:00
Mr.doob 98af2b1b92 Added sizeAttenuation property to ParticleBasicMaterial (disable perspective scaling). 2011-03-08 12:03:52 -08:00
Mr.doob 18dd03e90f Fixed particle scaling vertex shader (hopefully it now works on ANGLE). 2011-03-08 11:00:21 -08:00
alteredq 6b9a08e5ed Synced with mrdoob's branch.
Particle size attenuation still need some work to fix differences between ANGLE and OpenGL.
2011-03-08 19:50:43 +01:00
Mr.doob 5b9ca694d3 WebGLRenderer Particles now scale.
Texture sets needsUpdate to true for <canvas> elements by default (webgl_objconvert_test.html seems to be randomly affected by this).
2011-03-08 10:02:14 -08:00
alteredq c61f89ba14 Brought back bloom.
Also updated GUI-DAT (didn't help with recent Chrome compositing bugs, though this is Chrome Windows issue), added FileAPI to Detector and fixed aspect ratio bug in WebGLRenderer.
2011-03-08 17:33:34 +01:00
Mr.doob 8a9b4ab429 Merge remote branch 'empaempa/master' 2011-03-08 05:10:49 -08:00
Mr.doob 90fc8e8790 Fixed WebGLRenderer aspect ratio bug when there is only one shader. 2011-03-08 05:08:20 -08:00
Mikael Emtinger 42b0d7e0bf Removed n.X4 = eye.xyz from lookAt 2011-03-08 13:55:14 +01:00
Mikael Emtinger 4ecbd08581 Updated so all times now are in MS instead of seconds. Note that all animations need to be re-exported with an exporter that supports this. 2011-03-08 10:26:33 +01:00
Mikael Emtinger 117672c94c Merge branch 'master' of git://github.com/mrdoob/three.js 2011-03-08 09:39:54 +01:00
alteredq c7826c1d56 Fixed old normals name in Geometry.computeFaceNormals.
Thanks to empaempa for spotting this ;)
2011-03-07 12:02:24 +01:00
Mikael Emtinger 549f9b03a5 Merged with alteredq. 2011-03-07 08:50:51 +01:00
Mikael Emtinger 0ee15104cb Fixed bug: bone.useQuaternions wasn't set, it is now. 2011-03-07 08:32:39 +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
alteredq a6146360bc Added "enableDepthBufferWrite" API call to WebGLRenderer. 2011-03-06 20:03:31 +01:00
alteredq c3d29f491b More cleanup of WebGLRenderer. 2011-03-06 19:54:31 +01:00
alteredq 2294094adf Cleaned up a bit WebGLRenderer.
Clearing API for rendering to RenderTarget is now flipped: before forced clearing of render target was default, now no clearing is default.

New way of doing things saves one extra duplicitous clear call when switching render targets (like when doing postprocessing).

(doing documentation is indeed turning out to be useful)
2011-03-06 19:39:32 +01:00
alteredq ba0047cb1c Resurrected "noFly" as QuakeCamera's override. 2011-03-06 17:39:13 +01:00
Mr.doob 482fe243a4 Removed Matrix4.multiplyVector3OnlyZ as it's not being used... ? r35 2011-03-06 11:05:30 +00:00