Commit Graph
22 Commits
Author SHA1 Message Date
alteredq 81b60ea2f6 All WebGL examples working with array-less materials.
Noticeable difference: can't anymore assign Material references to faces directly - "face.materials" became "face.materialIndex". Materials have to go to "geometry.materials" array (to which "face.materialIndex" points). This is necessary to allow run-time changing of face materials (this indirection used to be done by arrays).

Some casualties:

- multi-materials example, this functionality isn't possible anymore
- had to simplify LOD Text examples as LODs don't handle groups (used to fake multi-materials)
- multi-materials sphere in materials example can't have faces with undefined materials (this may be fixable I guess, when there'll be some real use-case)
- scene format still has materials arrays, only the last material will be used (except when there are face materials, then materials from JSON will be used, as before)

Other renderers and their corresponding examples were not touched yet.

WebGLRenderer still needs some prettification, some things don't make sense anymore without arrays, code can be cleaned up further.
2011-10-21 06:18:59 +02:00
alteredq 05b3db4dca Experimenting with array-less materials.
Do not use for anything, this is just snapshot of a test in progress. I solved quite a few issues, but many things are still clumsy and broken.
2011-10-21 03:06:06 +02:00
alteredq 9968b7dc07 Changed ambient handling for Phong and Lambert materials.
Removed diffuse color influence on ambient term in Phong. This was causing texture disappearance when diffuse color was black.

Made Lambert more similar to Phong: now it also has ambient color parameter. Before ambient light was affecting Lambert as if ambient color was always 0xffffff.
2011-10-18 00:05:09 +02:00
alteredq 942a6c89c9 Updated Clock to be more compatible with Timer (now uses seconds and getDelta API).
Lots of code got cleaner with seconds, seems we used them before all around.

Also changed examples that didn't need deltas to simple Date.now() plus some more examples cleaning, trying to get rid of obsolescence warnings.
2011-10-15 00:57:50 +02:00
alteredq f74782b61f Refactored RollControls, FlyControls and PathControls to use externally supplied time delta. 2011-10-14 05:44:12 +02:00
alteredq f1f744f0ba First attempt at Clock object.
Got tired of redoing deltas all the time. Not sure about API or implementation details, but so far seems to be useful.

In future, we could for example have clocks that are slower / faster than realtime, or fixed step based.
2011-10-13 21:46:08 +02:00
alteredq 9902cbbf2d Experimenting with Date.now(). Updated builds. 2011-10-13 20:17:21 +02:00
alteredq 59f0e645a4 Refactored shadowmap example to use MorphAnimMesh. 2011-10-13 05:02:16 +02:00
alteredq c07919529e Made FirstPersonControls work. Fixed more examples to work with the new camera system. 2011-10-04 21:10:20 +02:00
Mr.doob ad31ff1214 Fixed the rest of the examples.
Found out that CrosseyedWebGLRenderer probably wouldn't work for target-less cameras.
Something weird going on with `webgl_scene_test.html` and `webgl_scene_test_blender.html`. For some reason cubes dissapear.
2011-10-02 06:33:32 +02:00
alteredq db78ffe003 Some more Math.PI instead of magic numbers. 2011-09-25 20:19:08 +02:00
Mr.doob bbb65a768c Updated HTML of the rest of the examples. 2011-09-20 19:27:01 -07:00
Mr.doob 19d8261174 More examples clean up. 2011-09-20 18:31:13 -07:00
alteredq 0d8f3572f0 Fixed shadowmap camera aspect ratio (thanks to @kig). 2011-09-16 00:10:34 +02:00
alteredq e298ac6814 Renamed MeshShaderMaterial => ShaderMaterial 2011-09-12 19:17:20 +02:00
Mr.doob a940f05427 Updated examples with the new .add/.remove methods. 2011-09-05 23:16:56 +02:00
alteredq 797530e4f7 Moved 2d filter shaders from ShaderUtils to ShaderExtras. 2011-08-31 13:16:49 +02:00
alteredq 495de75ff2 Added OrthoCamera.
Modified examples to use it, hacking projection matrix started to feel a bit dirty.
2011-08-29 10:34:18 +02:00
alteredq 175064b071 Removed some leftover code in shadowmap example. 2011-08-04 14:28:21 +02:00
alteredq 3e321b4a17 Added passing of curveSegments for ExtrudeGeometry / TextGeometry down to Shape. 2011-08-01 22:10:49 +02:00
alteredq c0d371be7c Merged with zz85's shape / path / extrude / bevel / text updates.
- 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
2011-07-28 19:19:52 +02:00
alteredq 6376d99005 Added shadow map example.
Note: shadow maps as currently implemented are very fussy, they need tons of tweaking to look halfway decent. Also current implementation doesn't do proper depth normalization. For some reason this gives better results than the "right way".
2011-07-28 15:43:50 +02:00