Forum

Framework with Blend4Web apps?

12 December 2017 08:45
Is there any good framework like laravel that works good with blend4web?

I'm trying to use laravel but the routes don't let me put just the direction of the folder of an app because how it works with the assets and the name of the files and more stuff and since blend4web apps are in a single folder i'm having a bad time

Someone use here a framework where i can just link to a folder and run the app without having problems of routing and stuff?
13 December 2017 12:20
Hello!
Currently you can use compiled version of engine which you can find in [blend4web_sdk_path]/deploy/apps/common with any framework. Just include it into your html with script tag and load your json from the right path:
m_data.load("right/path/to/your/assets.json", load_cb, preloader_cb);

Also you can use assets_path property to set path to your assets and get it with m_cfg.get_assets_path() or m_cfg.get("assets_path")
m_cfg.set("assets_path", "path/to/your/assets");
var APP_ASSETS_PATH = m_cfg.get_assets_path();
Alexander (Blend4Web Team)
twitter
14 December 2017 10:58
The problem (i think) is that laravel is not loading the .html files and for example if I make a link that takes me to "www.domain.com/blend4webApp" it opens the folder but dont load the .html file and in console says that it can't load the scripts (the b4w.js neither the app.js) because laravel search them in the assets folder of the framework not the blend4web App

And maybe the only thing to do is put the .js files in the assets folder of the framework and modify the tags of the .html file but then i will have to change the extention of the html file to php because is not loading it

And i dont want to modify everything because i dont know if the app is going to work if I change it to .php
 
Please register or log in to leave a reply.