I tried implementing texture arrays but there was a problem with the texture array format. I assigned the texture format to the texture array format because my shader can have a variety of texture formats. The format I had a problem with was the basis ETC compressed textures which gave me this warning:

My code should be able to assign any kind of texture to the texture arrays without problem.
Project: PlayCanvas | HTML5 Game Engine
Script: triplanar-mapping.js