1. 09 12月, 2010 1 次提交
    • A
      Added normal + ambient occlusion + displacement mapping demo. · ac5276b4
      alteredq 提交于
      A lot of things going on in this commit:
      
      - added tangents computation for geometries
          - mesh must have UV coordinates
          - to be called explicitly once geometry is loaded like this: geometry.computeTangents()
          - tangents are stored in Vertex objects
          - quads are not solved properly (though workaround hack seems to work at least somehow, as far as each vertex appears at least somewhere)
      
      - extended VBOs in WebGLRenderer to include tangent streams (when available)
      
      - added "normal" shader to ShaderUtils (to be used with MeshShaderMaterial)
         - Blinn-Phong with one directional and one point light (7 varyings gone, just one spare)
         - normal maps are in tangent space
         - displacement maps use simple luminance value (could be changed if better precision is needed)
      
      - displacement mapping uses vertex texture fetch
          - this requires GPU with Shader Model 3.0
          - not currently supported in ANGLE
          - for this, added "supportsVertexTextures" method to WebGLRenderer API, so that application can handle this
      ac5276b4
  2. 08 12月, 2010 1 次提交
  3. 04 12月, 2010 1 次提交
  4. 03 12月, 2010 3 次提交
  5. 02 12月, 2010 1 次提交
    • A
      Made VBOs reusable. · c0e30b2c
      alteredq 提交于
      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.
      c0e30b2c
  6. 27 11月, 2010 1 次提交
  7. 30 10月, 2010 1 次提交
  8. 29 10月, 2010 1 次提交
  9. 27 10月, 2010 1 次提交
    • M
      * MeshBitmapUVMappingMaterial -> MeshBitmapMaterial. Second param is mode,... · 7464f5ff
      Mr.doob 提交于
      * MeshBitmapUVMappingMaterial -> MeshBitmapMaterial. Second param is mode, which is THREE.MeshBitmapMaterialMode.UVMAPPING by default.
      * Removed MeshFaceColorFillMaterial and MeshFaceColorStrokeMaterial
      * Added MeshFaceMaterial ( it uses the face.material for that pass )
      * CanvasRenderer and SVGRenderer per face material logic changed.
      * SVGRenderer supports particles again.
      * WebGLRenderer currently broken :/
      * Code clean up
      7464f5ff
  10. 18 10月, 2010 1 次提交
    • U
      Added OBJ -> Three.js converter. · 60c23544
      unknown 提交于
      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)
      60c23544
  11. 06 10月, 2010 1 次提交
    • M
      * Added `PointLight` · 647b4a57
      Mr.doob 提交于
      * `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
      647b4a57
  12. 21 9月, 2010 1 次提交
  13. 09 9月, 2010 1 次提交
  14. 17 7月, 2010 1 次提交
    • M
      * Refactored `CanvasRenderer` (more duplicated code, but easier to handle) · 8f543db1
      Mr.doob 提交于
      * `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
      8f543db1
  15. 04 7月, 2010 1 次提交
  16. 23 6月, 2010 1 次提交
  17. 20 6月, 2010 1 次提交
  18. 07 6月, 2010 1 次提交
  19. 06 6月, 2010 1 次提交
    • M
      + Added Line Object · e98397cb
      Mr.doob 提交于
      + Workaround for WebKit not supporting rgba() in SVG yet
      + Aesthetic changes on the readme file
      e98397cb
  20. 17 5月, 2010 1 次提交
  21. 16 5月, 2010 2 次提交
    • M
      Credit where credit is due. · 2a334e08
      Mr.doob 提交于
      2a334e08
    • M
      Removed Class.js dependency · a6e98d7e
      Mr.doob 提交于
      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 
      a6e98d7e
  22. 24 4月, 2010 1 次提交