• A
    All WebGL examples working with array-less materials. · 81b60ea2
    alteredq 提交于
    Noticeable difference: can't anymore assign Material references to faces directly - "face.materials" became "face.materialIndex". Materials have to go to "geometry.materials" array (to which "face.materialIndex" points). This is necessary to allow run-time changing of face materials (this indirection used to be done by arrays).
    
    Some casualties:
    
    - multi-materials example, this functionality isn't possible anymore
    - had to simplify LOD Text examples as LODs don't handle groups (used to fake multi-materials)
    - multi-materials sphere in materials example can't have faces with undefined materials (this may be fixable I guess, when there'll be some real use-case)
    - scene format still has materials arrays, only the last material will be used (except when there are face materials, then materials from JSON will be used, as before)
    
    Other renderers and their corresponding examples were not touched yet.
    
    WebGLRenderer still needs some prettification, some things don't make sense anymore without arrays, code can be cleaned up further.
    81b60ea2
ThreeSVG.js 60.5 KB