Forum

Hard Coded dependencie ?

18 August 2017 11:04
Hy, It's me again !
I am having issues using Blend4web on a page build in Django. I'm on my locale machine i have put every file in the static folder of the project. Everything goes well but B4W seam to ask for files that i can't resolv.

[18/Aug/2017 07:42:53] "GET /static/character/figurine.json?v=16082017160549 HTTP/1.1" 200 85677
Not Found: /favicon.ico
[18/Aug/2017 07:42:53] "GET /favicon.ico HTTP/1.1" 404 2446
[18/Aug/2017 07:42:53] "GET /static/character/figurine.bin?v=16082017160549 HTTP/1.1" 200 70308
[18/Aug/2017 07:43:20] "GET /admin/panoply/position/ HTTP/1.1" 200 4877
Not Found: /deploy/apps/common/b4w.simple.min.js.map
[18/Aug/2017 07:43:26] "GET /deploy/apps/common/b4w.simple.min.js.map HTTP/1.1" 404 2533

Some file is requesting /deploy/apps/common/b4w.simple.min.js.map witch is out of reach as i migrated all the file of the project to /static/character/. I mean the B4W.min, the .json, the .bin and the .css.

So what is the .map file and shouldn't it be in a relative path so that you can use B4W anywhere???

I am trying to make a dynamic scene like thats loads objects dynamically so i can't use the iframe because i loose the scope for the JS file. And the objects are stored as .json export in a database so i need to have the application on my page else i cant inject the new objects into a iframe. And i need custom JS so i really don't want to embed an external player.

But i am nearly there, B4W loads. the .js, .js and bin files are loaded.


Thanks.
18 August 2017 11:06
So i used the default project setting. I am never sure wich one i should use for my hacky experiments. One thing is sure i need a custon.js file to interact with the scene i just can't do everything with the node editor this time.

EDIT : Wouldn't it be awesome if there were an npm package for B4W? it would just be a matter of npm install and go ! It might be a bit more tricky than it sound like but i would love it !

RE-EDIT : I might have a go a the compile binding method. That really makes a standalone big JS thats self sufficient. Do i need any other file with this method??? I am going to try to push the compiled JS of a simple project to test it.

RE-RE-EDIT
So The problem was CSS… The compiled version showed up in a tiny 19px heigh canvas. So i solved that problem tried wis the first version, added some css height and there it was.

So the problem was not that 404 http call but a invisible canvas du to some stupid css. FACEPALM !
You get a CMS up and running build a B4W app, upload all your file plug it all nice and neet make sure every file finds its dependencys and here comes CSS that kick you in the balls from behind.

So i guess my problem is solved but i am still curious about that strange call.
18 August 2017 11:47
Are you using the Project Manager to Build, then the Deploy function to deploy your project? The Deploy function wraps up all of your dependencies into one zip file.
18 August 2017 12:21
Are you using the Project Manager to Build, then the Deploy function to deploy your project? The Deploy function wraps up all of your dependencies into one zip file.
No in fact i haven't solved that part of the puzzle yet so i am stil copy pasting every file like a caveman !
I will consider this option, thanks for the tip that should really clean up the workflow.
 
Please register or log in to leave a reply.