Commit Graph
23 Commits
Author SHA1 Message Date
alteredq cf37a8cc43 First integration step: something appeared on the screen ;)
Otherwise things are very much work in progress, expect everything to be broken.
2011-02-16 17:58:19 +01:00
Mr.doob 1a96d32bd9 Added divideSelf to Vector3. 2011-01-03 19:42:47 +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 b913baa6f0 Code clean up and minor optimisations. 2010-11-26 07:58:44 +00:00
Mr.doob 647b4a57b8 * Added PointLight
* `CanvasRenderer` and `SVGRenderer` basic lighting support (`*ColorStroke`/`*ColorFill` only)
* `Renderer` > `Projector`. `CanvasRenderer`, `SVGRenderer` and `DOMRenderer` do not extend anymore
* Interactivity base code (hdi folder). To be refactored... ([mindlapse](http://github.com/mindlapse))
* Added `computeCentroids` method to `Geometry`
* Included `Stats.js` directly in the `/examples` folder to avoid the need of internet for playing around
2010-10-06 03:36:21 +01:00
mindlapseandMr.doob a89865bda8 3d onclick, see examples/hci_clickcube.html 2010-09-30 23:11:29 +08:00
Ben Nolan 0c6219b43f * Made vector methods chainable
* Added getCenter to Face4
2010-09-27 13:04:52 +13:00
Mr.doob 216b4eeee2 * Workaround for Opera bug (clearRect not working with context with negative scale)
* Additional `Matrix4` and `Vector3` methods
2010-08-21 02:58:07 +01:00
Mr.doob 8f543db16d * Refactored CanvasRenderer (more duplicated code, but easier to handle)
* `Face4` now supports `MeshBitmapUVMappingMaterial`
* Changed order of `*StrokeMaterial` parameters. Now it's `color`, `opacity`, `lineWidth`.
* `BitmapUVMappingMaterial` > `MeshBitmapUVMappingMaterial`
* `ColorFillMaterial` > `MeshColorFillMaterial`
* `ColorStrokeMaterial` > `MeshColorStrokeMaterial`
* `FaceColorFillMaterial` > `MeshFaceColorFillMaterial`
* `FaceColorStrokeMaterial` > `MeshFaceColorStrokeMaterial`
* `ColorStrokeMaterial` > `LineColorMaterial`
* `Rectangle.instersects` returned false with rectangles with 0px witdh or height
2010-07-17 00:25:50 +01:00
Mr.doob 8e5c8debf9 - Clean up 2010-07-14 14:10:47 +01:00
philogbandMr.doob 2b0ea54a4c Core performance improvements through shared props
Old Vector and Matrix constructor functions would create all methods and
make assignments with each call. A lot of speed-ups can be made by using
shared properties through the prototype chain. Since methods and
initialized properties are shared among all instances they're only
created once.

Some tests can be seen at examples/performance-test.html

Some results:

    Chrome

    //6.4 times faster
    performance-test.html:25 Vector2 x 5000000: 213ms
    performance-test.html:30 Vector2Orig x 5000000: 1366ms

    //8.3 times faster
    performance-test.html:37 Vector3 x 5000000: 241ms
    performance-test.html:42 Vector3Orig x 5000000: 2015ms

    //3.8 times faster
    performance-test.html:49 Vector4 x 5000000: 278ms
    performance-test.html:54 Vector4Orig x 5000000: 1059ms

    //7.5 times faster
    performance-test.html:61 Matrix4 x 5000000: 937ms
    performance-test.html:66 Matrix4Orig x 5000000: 7004ms

    Firefox

    //6.8 times faster
    Vector2 x 50000: 45ms
    Vector2Orig x 50000: 307ms

    //11.5 times faster
    Vector3 x 50000: 48ms
    Vector3Orig x 50000: 550ms

    //3.8 times faster
    Vector4 x 50000: 61ms
    Vector4Orig x 50000: 234ms

    //9.4 times faster
    Matrix4 x 50000: 199ms
    Matrix4Orig x 50000: 1878ms

where "Orig" are old versions of the objects.

Running these tests multiple times can yeild different results due to
browser cache. However the results are always kind of similar in terms
of speedup.
2010-07-14 20:58:22 +08:00
Mr.doob 74e70f1358 - Removed unneded updateMatrix in Camera
- Simplified lookAt in Matrix4
- Added cross() in Vector3
2010-06-23 06:24:10 +01:00
Mr.doob 7935bc8ab9 - Changed Camera system. (Thx [Paul Brunt](http://github.com/supereggbert))
- Object3D.overdraw = true to enable CanvasRenderer screen space point expansion hack.
2010-06-22 22:31:48 +01:00
Mr.doob 0aac038d58 - JSLinted 2010-06-19 18:13:00 +01:00
Mr.doob 90f54e2507 - CanvasRenderer expands screen space points (workaround for antialias gaps).
- CanvasRenderer supports TextureUVMappingMaterial.
- Moved UVs to Geometry.
- Minor clean up
2010-06-07 03:36:10 +01:00
Mr.doob e98397cb5a + Added Line Object
+ Workaround for WebKit not supporting rgba() in SVG yet
+ Aesthetic changes on the readme file
2010-06-05 20:07:04 +01:00
Mr.doob 3b334a3f40 VectorX.set() 2010-05-16 17:30:46 +01:00
Mr.doob 47ba30790a Vector3.multiply -> multiplyScalar
Vector3.cross -> crossSelf
added Vector3.multiplySelf and others (kile)
2010-05-16 17:26:54 +01:00
Mr.doob 2a334e0862 Credit where credit is due. 2010-05-16 16:38:54 +01:00
Mr.doob a6e98d7e9a Removed Class.js dependency
Added THREE namespace
Camera.x -> Camera.position.x
Camera.target.x -> Camera.target.position.x
ColorMaterial -> ColorFillMaterial
FaceColorMaterial -> FaceColorFillMaterial
Materials are now multipass (use array)
Added ColorStrokeMaterial and FaceColorStrokeMaterial
geometry.faces.a are now indexes instead of links
2010-05-16 05:32:43 +01:00
Mr.doob 106c77b9d0 Reverting 2010-05-01 15:36:37 +01:00
Paul BruntandMr.doob daf53d854d Now using projection matrix and particles are culled 2010-05-01 19:42:01 +08:00
Mr.doob a90c4e107f First public version. Still a lot to do 2010-04-24 04:01:19 +01:00