When it comes to making skyboxes in three.js, I have seen two different schools of thought. Assuming that we have the code
var imagePrefix = \"images/mountai
You have a conceptual misunderstanding.
For WebGL, both methods involve shaders. MeshBasicMaterial
has a vertex and fragment shader that has been written for you for convenience.
The primary difference between the two examples is the second example uses a cube map for input.
You would use that approach if you were already using the same cube map as an environment map in a reflective material, for example.
The first example is just another way to render a skybox, and is the only one of the two that will work with CanvasRenderer
.
three.js r.58