Texture2d Array In Javascript Functions With Parameters