Commit Graph
23 Commits
Author SHA1 Message Date
alteredq b36cf734bd Removed dirty flag from Quaternion.
There don't seem to be any effects on performance (though I'm not sure this was actually used in any example/test code path - so far quaternions are used just for animation interpolation and even there they were always dirty, and also just updated during JIT baking).

Also some more code cleanup - no need for Mesh to have own "update" as now it was exactly the same as its parent Object3D.
2011-02-21 03:06:17 +01:00
Mr.doob 106db4c3f8 Object3D::autoUpdateMatrix ⟶ Object3D::matrixAutoUpdate
Object3D::matrixNeedsToUpdate ⟶ Object3D::matrixNeedsUpdate
2011-02-20 05:35:13 +00:00
alteredq 313ce3ed94 More refactoring and optimizations.
- removed unnecessary normal matrix computation in hierarchies (this is already done in renderer)
- removed unnecessary enabling of attribute arrays in every frame (it's enough to do it when shader program is created)
- depth test is now only set if it changed
2011-02-18 17:03:41 +01:00
alteredq 2ecbe2dec2 A lot of bugfixing and refactoring.
- getters/setters are no more in Vector3
  - object hierarchies thus don't use "isDirty"
  - this was completely killing performance for anything that was touching a lot of Vector3 like creation of meshes and dynamic buffers
  - even without this, performance of hierarchies went up (a lot)

- objects do not get passed renderer anymore
  - camera was almost also removed, but this is useful for LOD (though there may be some cleaner way to do this?)

- material ids are now unified, this makes "geometry.sortFacesByMaterial" faster (thus scene init / GUI blocking is shorter)

- all WebGL examples should work now (render-to-texture has weird lights and in some camera control feels different)

- CanvasRender still broken, despite many efforts :(
   - currently only points and lines work, faces don't show up. I think this may need assistance from mrdoob.
2011-02-18 00:31:08 +01:00
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 bffdc03cf1 *.material*.materials 2010-12-24 21:24:58 +00:00
Mr.doob 5e2c480b89 Implemented Frustum checking to Projector::projectObjects (thanks errynp)
Added `boundingBox`, `boundingSphere` and `computeBoundingSphere` to Geometry.
2010-12-20 00:28:31 +00:00
Mr.doob f50f42dde1 Commented out Mesh::normalizeUVs. Needs to be handled in the CanvasRenderer directly.
Added a check in `Scene` to make sure the avoid duplicate objects.
WebGLRenderer2: In the process of handling > 65535
2010-12-15 14:36:42 +00:00
Mr.doob 584a8440fd Merging with alteredq's branch. 2010-12-02 17:24:56 +00:00
Mr.doob d961ee52c8 Started GeometryUtils class.
MeshUtils.merge( object1, object2 [ geometry | mesh ] ): Merges object2 into object1. Implemented in materials_cubemap_sky.
2010-11-19 09:08:20 +00:00
Mr.doob 3cdc007b90 * Fixed some minor issues handling opacity in hex colors 2010-11-06 12:51:09 +00:00
alteredq 406063d588 Added breaking of mesh into chunks of max 64K vertices (done in materials sorting step). 2010-11-02 19:12:05 +01:00
Mr.doob 1b1fb7affe * Code clean up (yuicompressor doesn't throw a single warning :D) and some reformating
* Minor fixes (Geometry normal calculation)
* Isolated Matrix3 code into `Matrix3.js`
* README and TODO updated
2010-10-28 21:27:58 +01:00
alteredq 79ab4bf2e6 Merged with mrdoob's branch. Got WebGLRenderer working again :)
Changed OBJ -> Three.js converter to use new materials system (eventual old models need to be reconverted).

Limitations:

  - one use case is now much slower
    - when a mesh has each face with different color (e.g. polyfield in examples/test.html)
    - before this used FaceColorFill material and in WebGLRenderer it was rendered fast with color attribute array
    - now when FaceColorFill material is gone, each face gets own VBO :(

  - material sorting uses Materials "toString" methods for hashing, so it's very important to keep these in a good shape
2010-10-28 19:35:13 +02:00
unknown 60c2354424 Added OBJ -> Three.js converter.
Added OBJ converter test example.

Modified Three.js to handle converted models:

 - extended WebGL renderer to use texturing
   - broke down model into multiple VBOs according to materials
   - textures are lazy created when images get loaded
     (converter takes care of resizing images to nearest power of 2
      dimensions using 2d canvas)

 - changed material array semantics in Mesh object
    - before: multiple materials were applied to all faces (broken in WebGL, needs multitexturing shader)
    - now: there is only single material per face, but one mesh can have faces with different materials

 - added per vertex normals (to get smooth shading in WebGL)
2010-10-18 11:33:32 +02:00
Mr.doob e68109fdb2 - Clean up 2010-09-17 02:52:29 +01:00
Mr.doob 5ff2dfcaca - Added Mesh.flipSided boolean 2010-07-19 16:13:40 +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 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 a90c4e107f First public version. Still a lot to do 2010-04-24 04:01:19 +01:00