Add JSON material import
fix attribute bug in renderer