1. 22 7月, 2012 1 次提交
    • D
      Improves/extends whitespace parsing in OBJLoader · d7b9dfd3
      Dahie 提交于
      I had the issue that some of my OBJ-files weren't loaded by the OBJLoader provided in the examples. Parsing the file crashed with this exception:
      
      Uncaught TypeError: Cannot read property 'x' of undefined Three.js:13
      THREE.Vector3.addSelf (Three.js:13)
      THREE.Geometry.computeCentroids (Three.js:91)
      THREE.OBJLoader.parse (OBJLoader.js:295)
      xhr.onreadystatechange (OBJLoader.js:21)
      
      I traced the error to the OBJLoader and my OBJ files. The obj files were exported by 3ds Max Wavefront OBJ Exporter and slightly differ in format:
      
      Where the loader expected:
      v 0.4500 1.5256 0.6595
      
      they were:
      v  0.4500 1.5256 0.6595
      
      Note the extra space. This threw off the regular expressions, the vertices weren't parsed and the computeCentroid failed. This commit changes the regular impression to accomodate this variance.
      d7b9dfd3
  2. 07 7月, 2012 1 次提交
  3. 06 7月, 2012 4 次提交
  4. 05 7月, 2012 27 次提交
  5. 04 7月, 2012 1 次提交
  6. 03 7月, 2012 4 次提交
  7. 28 6月, 2012 2 次提交