1. 05 11月, 2010 1 次提交
  2. 04 11月, 2010 2 次提交
    • M
      Refactored `ClickResolver to `Ray` and `Projector.unprojectVector` working. · 9a62d117
      Mr.doob 提交于
      Unimpressive example added `interactive_spheres.html`
      9a62d117
    • A
      Added Loader class providing both asynchronous JS and web worker based loading of models. · 5192428f
      alteredq 提交于
      The idea is that later there will be more loaders which would load different formats (like OBJLoader, ColladaLoader).
      
      Usage (async JS):
      
      var loader = new THREE.Loader();
      loader.loadAsync( "obj/torus/Torus.js", function() { createScene( new Torus() ) } );
      
      Usage (web worker):
      
      var loader = new THREE.Loader();
      loader.loadWorker( "obj/torus/Torus_slim.js", function( geometry ) { createScene( geometry ) } );
      
      Web worker loader is useful for large meshes, where it allows browser to stay responsive for longer time and also it can handle larger meshes than async JS loader.
      
      Web worker loader needs a simpler format of the model. Web workers can communicate with the main application only via message passing, where messages are JSON objects.
      
      There is a new version of OBJ -> Three.js converter (convert_obj_threejs_slim.py) which can produce model in format needed for web workers.
      
      All examples which were using models from OBJ converter were refactored to use Loader.
      
      Except large mesh example, all examples are using just async JS loading. Web worker loading is there, it's just commented out, as it's a bit pain for local development.
      
      Chrome doesn't allow to run web workers from pages accessed via file://, so you need either to run it with "--allow-file-access-from-files" flag, or access examples via local server (http://localhost/example.html).
      5192428f
  3. 03 11月, 2010 2 次提交
  4. 02 11月, 2010 1 次提交
  5. 01 11月, 2010 1 次提交
  6. 31 10月, 2010 3 次提交
    • M
      * Projector.js: Rather than calculating the screen space centrium of each face... · daf2700c
      Mr.doob 提交于
      * Projector.js: Rather than calculating the screen space centrium of each face per render, seemed smarter to just project the precomputed centrium. Side effect: Polygon shaking is gone \o/
      daf2700c
    • A
      Synced with mrdoob's branch. · 8e31bbb1
      alteredq 提交于
      8e31bbb1
    • A
      Added handling of multiple lights to WebGLRenderer. · 1c35d90f
      alteredq 提交于
      Limitations:
      
       - Chrome can handle up to 5 lights in total (directional + point)
       - Firefox seems to handle up to 29 lights
      
      These number are GPU specific (mine is ATI Mobility Radeon 3650).
      
      This turned out to be quite tricky. The number of varying vectors in shaders is limited. Additionally Chrome and Firefox have different limitations (at least on Windows, probably due to Chrome using ANGLE as rendering backend).
      
      Hence WebGLRenderer has hardcoded limit of maximum 5 lights.
      
      WebGLRenderer constructor now takes (optional) scene argument, so that numbers and types of lights present in the scene can be used to generate minimal possible shader.
      
      If no scene is passed, shader allowing 1 directional + 4 point lights will be generated.
      1c35d90f
  7. 30 10月, 2010 2 次提交
  8. 29 10月, 2010 3 次提交
  9. 28 10月, 2010 1 次提交
    • A
      Added Blinn-Phong material for WebGLRenderer. · b6904f3d
      alteredq 提交于
      In Chrome it looks more or less ok, but it has some problem in Firefox 4 (with some camera angles there are black areas around edges).
      
      Also updated Python builder scripts and examples to include this new material.
      b6904f3d
  10. 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
  11. 26 10月, 2010 1 次提交
    • A
      Refactored multimaterials to also work with non-textured models composed from... · 277d117b
      alteredq 提交于
      Refactored multimaterials to also work with non-textured models composed from multiple material groups.
      
      Old version was doing massive overdraw (whole mesh was drawn for each material).
      
      Even current solution is still quite messy: there is a different behavior for stroke and fill materials (when used as secondary materials).
      
      Stroke materials are applied to the complete mesh (as most common use case seems to be wireframe) while fill materials now apply only to faces within single material group (when "decalIndex" property of secondary fill material is set).
      277d117b
  12. 25 10月, 2010 1 次提交
  13. 23 10月, 2010 2 次提交
  14. 22 10月, 2010 1 次提交
  15. 21 10月, 2010 1 次提交
    • A
      Extended CanvasRenderer to be able to handle decals... · dde831bf
      alteredq 提交于
      Extended CanvasRenderer to be able to handle decals (MeshBitmapUVMappingMaterials as secondary materials).
      
      For decals you need to set "decalIndex" property of the material (corresponding to materials index of the original mesh UV material).
      
      Added multimaterials example.
      
      Fixed forgotten sphere smoothing in OBJ converter example.
      dde831bf
  16. 20 10月, 2010 1 次提交
  17. 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
  18. 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
  19. 21 9月, 2010 1 次提交
  20. 17 9月, 2010 1 次提交
  21. 21 8月, 2010 1 次提交
  22. 25 7月, 2010 1 次提交
  23. 24 7月, 2010 2 次提交
  24. 21 7月, 2010 1 次提交
  25. 19 7月, 2010 2 次提交
  26. 17 7月, 2010 3 次提交
  27. 14 7月, 2010 2 次提交