Is the .json scene supposed to be interactive?

16 October 2015 16:40 #4457

I've been trying to load a .json scene instead of using the direct html export and I can scene my 3D model but it's really small and there is no interactivity.

Is there something I have to do to enable the same basic functionalities in the .json file as I have in the direct html export? (rotation, zoom, etc..)

16 October 2015 17:04 #4458
Are you using our ViewerDev or Webplayer? Or trying some another method?
3D Generalist, contests administrator,
Blend4Web team.
art blog:
16 October 2015 17:49 #4461
Hmmm I have no idea haha. Here's what I did:

Exported the default Blender scene (the cube) using B4W Export JSON
Copied the .json and .bin files in the root folder of my project besides the html file.
Copied b4w_min.js, uranium.js and uranium.js.mem in the same folder (I had an error when not copying uranium.js)
The code in the html is:

<!DOCTYPE html>
<script src="b4w.min.js"></script>
function hello() {
var m_main = b4w.require("main");
var m_data = b4w.require("data");

var canvas_elem = document.getElementById("myCanvas");

<body onload="hello()"><canvas id="myCanvas"></canvas></body>


And I get this when I load the page

16 October 2015 18:14 #4462
Hello JD,

I suppose, you are following our short applicaition developer's guide because your code looks similar to the code from there. The next code snippet on this page is just what you need as it adds camera controls. Copied it for convenience:
<!DOCTYPE html>
<script src="b4w.full.min.js"></script>

var m_app = b4w.require("app");
var m_data = b4w.require("data");

    canvas_container_id: "container_id",
    callback: load_cb

function load_cb() {
    m_data.load("some_scene.json", loaded_cb);

function loaded_cb() {


    <div id="container_id" style="width: 350px; height: 200px;"></div>

Blend4Web developer
16 October 2015 18:18 #4463
Aaaah I was just one snippet away from the answer!

Thank you! ;)

Please register or log in to leave a reply.