I'm trying to implement a component library that will allow babylonjs scenes to be assembled very easily using HTML (inspired by ).
I'm implementing a and I'm trying to implement it as a procedural skybox:
The relevant code:
import * as BABYLON from 'babylonjs'
import * as MAT from 'babylonjs-materials'
// later...
const material = new MAT.SkyMaterial('skybox', this.owner.scene)
material.backFaceCulling = false
this.update()
this.skybox = BABYLON.CreateBox('skybox', { size, sideOrientation: BABYLON.Mesh.BACKSIDE }, this.owner.scene)
this.material = material
When I run this code I get two errors and the cube does not render:
babylon.js? [sm]:1 GET http://localhost:3000/src/Shaders/sky.vertex.fx 404 (Not Found)
babylon.js? [sm]:1 GET http://localhost:3000/src/Shaders/sky.fragment.fx 404 (Not Found)
It looks like it expects another library or plugin to be loaded but I can't find any documentation indicating what to load.