Commit Graph
511 Commits
Author SHA1 Message Date
Mr.doob aa50e7eec3 Created Mapping classes 2010-12-04 10:32:55 +00:00
Mr.doob 69f3072e05 Added canvas spherical reflection demo.
Need to test this on IE9... :)_
2010-12-03 16:37:43 +00:00
Mr.doob 315bc5ad3e Updated build. 2010-12-03 16:13:04 +00:00
Mr.doob ef2243bdb3 Merge remote branch 'alteredq/master' 2010-12-03 16:10:53 +00:00
Mr.doob 5573f95417 Added Geometry::computeVertexNormals.
Maybe `Geometry::computeNormals` should be renamed to `Geometry::computeFaceNormals`?
2010-12-03 16:10:37 +00:00
alteredq 9b80eab891 Merge remote branch 'remotes/upstream/master' 2010-12-03 13:32:37 +01:00
alteredq a1d68ddba3 Fixed bug(s) causing broken Fresnel demo.
As suspected, this was caused by incorrect shader state management when switching between multiple shaders (thanks Firefox for verbose warnings).

Also, testing WebGL performance is very tricky. You can get different performance depending on the state of browsers / system (messed up state can be 10-66% slower):

1. freshly started Chrome can be much faster than Chrome that already ran few WebGL demos (which are now closed)
2. demo opened in new Chrome tab can be faster than demo reloaded in the same tab
3. even demos opened and closed in Firefox can slow down Chrome demos

This suggests that browsers do not clean GPU state properly :(
2010-12-03 13:25:59 +01:00
Mr.doob ed5a9b91a5 Synced materials examples with live version.
Added irc channel info in README.
2010-12-02 19:14:01 +00:00
Mr.doob d0138282ba Now that WebGLRenderer does VBO per geometry I guess we don't need that GeometryUtils.merge there. Makes loading much faster too.
Fresnel demo has a weird artifact now... As if the cubemap was smaller than the far of the camera?
2010-12-02 17:38:41 +00:00
Mr.doob fa183834b2 Merge remote branch 'alteredq/master' 2010-12-02 17:25:04 +00:00
Mr.doob 584a8440fd Merging with alteredq's branch. 2010-12-02 17:24:56 +00:00
Mr.doob cee17e1043 Merge remote branch 'orgicus/master' 2010-12-02 17:19:33 +00:00
Mr.doob 59304d8a6e Matrix4.transformVector3 ⟶ Matrix4.multiplyVector3
Matrix4.transformVector4 ⟶ Matrix4.multiplyVector4
2010-12-02 17:19:23 +00:00
alteredq e10d8c6680 Synced with mrdoob's branch. 2010-12-02 15:19:57 +01:00
alteredq c0e30b2c39 Made VBOs reusable.
The most tangible practical effect is that demos with multiple Lucys / Walts are now initialized much faster ;).

Reuse is achieved mostly by moving mesh chunks / VBOs (formerly called materialFaceGroups) from Mesh into Geometry.

This means sorting of geometry by face materials + breaking large geometries into chunks now has to be done after construction of geometry.

It becomes a step in the usual sequence:

    geometry.computeNormals();
    geometry.computeCentroids();
    geometry.sortFacesByMaterial();

If geometry is constructed programmatically (e.g. with GeometryUtils.merge), this has to be called afterwards.

Also of note: single geometry cannot be reused both for flat and smooth shading, as only one stream of normals is baked into VBO.
2010-12-02 14:43:39 +01:00
Mr.doob 2929d5a345 GeometryUtils::merge were not copying centroid/normal/material. 2010-12-02 13:40:04 +00:00
alteredq d7ba66ea26 Synced with mrdoob's branch. 2010-12-02 09:07:23 +01:00
Mr.doob d29e94ca97 Updated materials (canvas) example. 2010-12-01 17:55:20 +00:00
Mr.doob 1d7a14733b ReflectionMapping working with MeshBasicMaterial/CanvasRenderer \:D/
TODO: Add computeVertexNormals on geometry so any object can use it.
2010-12-01 17:49:02 +00:00
Mr.doob 93c9bb3486 Because CanvasRenderer now checks if map.loaded == true (following WebGLRenderer behaviour) some examples got broken. 2010-12-01 16:11:28 +00:00
Mr.doob 7441b1de59 Implemented gero3's Matrix4.transformVector3 optimisation ( http://jsperf.com/diff-in-speed-for-three-js ). 2010-12-01 16:00:13 +00:00
George Profenza e90f60ec3b added slim conversion 2010-12-01 15:46:34 +00:00
Mr.doob 6a257e8141 Merge remote branch 'alteredq/master' 2010-12-01 14:11:11 +00:00
Mr.doob 84c262d6c6 Adding support for ReflectionMapping (Spherical) to CanvasRenderer. Not done yet... 2010-12-01 14:10:51 +00:00
alteredq e57b0c5ba6 Synced with mrdoob's branch. 2010-12-01 12:52:09 +01:00
alteredq b25a003ded Merge remote branch 'remotes/upstream/master' 2010-12-01 12:48:49 +01:00
Mr.doob 0f52ae5a9b Added ImageUtils::loadTexture. 2010-12-01 08:51:50 +00:00
alteredq c1cb8e9067 Added handling of 2d textures in MeshShaderMaterial. 2010-12-01 09:38:52 +01:00
alteredq 0f9184888a Refactored common code for cube texture setting into separate setCubeTexture function. 2010-12-01 09:24:25 +01:00
Mr.doob 2463d48d26 build.py: full ⟶ common 2010-12-01 07:41:35 +00:00
Mr.doob d5a8479fc0 Hmm, I found confusing having exporter tests as examples... ? 2010-12-01 07:15:47 +00:00
Mr.doob cf2776d136 Merge remote branch 'alteredq/master' 2010-12-01 01:49:20 +00:00
alteredq da9094710f Made refraction examples working again.
Somehow they got forgotten in the merge when "THREE.RefractionMap" got renamed to "THREE.RefractionMapping".
2010-11-30 19:51:22 +01:00
sole e05234147b Added basic .gitignore file to avoid .DS_Store files and vim swap files getting into the repository 2010-11-30 17:59:32 +00:00
Mr.doob b21ced8562 Merge remote branch 'sole/master' 2010-11-30 17:44:19 +00:00
Mr.doob 75c4276df9 examples folder clean up. 2010-11-30 17:43:52 +00:00
sole 3169b4cb86 buid.py: Show help message when no arguments are specified 2010-11-30 17:39:25 +00:00
Mr.doob 870102c68d You gotta love MacOS and its .DS_Store files... 2010-11-30 17:34:18 +00:00
Mr.doob c570fac50b Updated build. 2010-11-30 17:32:23 +00:00
Mr.doob 50eff3634d Merge remote branch 'orgicus/master' 2010-11-30 17:31:48 +00:00
Mr.doob be0ad84c14 I should learn how to deal with conflicts... 2010-11-30 17:31:39 +00:00
Mr.doob e72b82cda2 Merging with orgicus' branch. 2010-11-30 17:30:45 +00:00
Mr.doob 3f16e36381 Merge remote branch 'alteredq/master' 2010-11-30 17:22:27 +00:00
Mr.doob f9f7d3645f Merging with alteredq's branch. 2010-11-30 17:22:20 +00:00
Mr.doob a6c9984a67 Commented some WIP code in CanvasRenderer so it doesn't throw warnings while compiling.
Modified build script to avoid the extra full compilation.
2010-11-30 17:18:05 +00:00
alteredq 144451f1fc Refactored also default attributes out of Fresnel shader and ubershader into buildProgram. 2010-11-30 18:07:18 +01:00
Mr.doob 27ec356ecd Merge remote branch 'alteredq/master' 2010-11-30 16:48:44 +00:00
Mr.doob 47d6116179 Merging with alteredq's branch. 2010-11-30 16:48:33 +00:00
Mr.doob b96de35ca0 Updated README r30 2010-11-30 16:41:59 +00:00
alteredq 8f06a4f37d Refactored default uniforms out of Fresnel shader and ubershader into buildProgram.
Also yet another fix for car demo load progress.
2010-11-30 17:40:40 +01:00