All the small fixes here are being committed at the same time to allow
the use of app.js for development.
Layout: Switch back to strings for TYPES
Layout TYPES need to be strings because they're used to index into a
GLRenderingContext. I put a switch case in the Layout constructor to
calculate the gl type size in bytes.
Mesh: Add makeIndexBufferDataForMaterials to Mesh
The current behavior of makeIndexBufferData will make an index buffer
for only one material which is strange at best and difficult-to-use at
worst. I've added here a method to build an index buffer given any
number of materials.
downloadMtlTextures: Don't fetch directory listings when filename doesn't exist
When filename is empty for texture map data, don't try downloading the
root directory.
All the small fixes here are being committed at the same time to allow the use of app.js for development.
Layout: Switch back to strings for TYPES
Layout TYPES need to be strings because they're used to index into a GLRenderingContext. I put a switch case in the Layout constructor to calculate the gl type size in bytes.
Mesh: Add
makeIndexBufferDataForMaterials
to MeshThe current behavior of
makeIndexBufferData
will make an index buffer for only one material which is strange at best and difficult-to-use at worst. I've added here a method to build an index buffer given any number of materials.downloadMtlTextures: Don't fetch directory listings when filename doesn't exist
When filename is empty for texture map data, don't try downloading the root directory.