fateriddle Posted October 9, 2018 Share Posted October 9, 2018 const path = require('path') module.exports = { mode: 'development', entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', }, }, ], }, } I'm using webpack with a basic setup. Now I'm trying to build a skybox skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture( './textures/skybox/box', scene ) Then I get the 404 error for all the files it needed: box_px.jpg:1 GET http://localhost:1234/textures/skybox/box_px.jpg 404 (Not Found) box_py.jpg:1 GET http://localhost:1234/textures/skybox/box_py.jpg 404 (Not Found) box_pz.jpg:1 GET http://localhost:1234/textures/skybox/box_pz.jpg 404 (Not Found) box_nx.jpg:1 GET http://localhost:1234/textures/skybox/box_nx.jpg 404 (Not Found) box_ny.jpg:1 GET http://localhost:1234/textures/skybox/box_ny.jpg 404 (Not Found) box_nz.jpg:1 GET http://localhost:1234/textures/skybox/box_nz.jpg 404 (Not Found) How to solve this? Quote Link to comment Share on other sites More sharing options...
fateriddle Posted October 9, 2018 Author Share Posted October 9, 2018 Or maybe, can I load 6 texture face using a different api? Like actually loading those 6 image url, that too can solve the problem. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 9, 2018 Share Posted October 9, 2018 Well we may need more info to help. Is the urls you mentioned supposed to work? Quote Link to comment Share on other sites More sharing options...
fateriddle Posted October 10, 2018 Author Share Posted October 10, 2018 11 hours ago, Deltakosh said: Well we may need more info to help. Is the urls you mentioned supposed to work? Yes, if I use a plain html + js + assets, it works, but then I bundle them using a webpack setup, the assets can't be found. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 10, 2018 Share Posted October 10, 2018 Are you trying to bundle the jpg in your bundle ? I would try to avoid it to prevent download a single large js + preventing nice compression. Now it means you would need to deploy them aside of your lib and if they are could you ensure the path is your expected one ? Quote Link to comment Share on other sites More sharing options...
ssaket Posted October 10, 2018 Share Posted October 10, 2018 How's your project directory structure? Hit like if you want a sample starter project GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.