由用户创建的信息 亚历山大·卡夫兰诺
01 March 2015 16:25
Also to get the whole picture I'd recommended you to check some of our simple tutorials like Jungle Outpost. Demo. Tutorial.
01 March 2015 14:22
I think the problem is on_resize() is never being executed, you need to register callback, best way to do this in load_cb() function:
window.onresize = on_resize;
on_resize();

(second line is to resize immediately)
28 February 2015 22:13
Hi
The simple method to resize the canvas is using main.resize() function. You can get dimenstions from window as follows:
var w = window.innerWidth;
var h = window.innerHeight;
m_main.resize(w, h);

The second method is to resize canvas container element by css (or js if you prefer that) and then use app.resize_to_container().

Currently *.bin files contain only geometry and animation, you can not pack images or sounds in them. Actually that's not an issue, because the browsers "prefer" native *.png and *.jpg files.
27 February 2015 23:00
В рунете наш сайт оказался в рейтинге Alexa Top 500, что означает большой интерес к проекту среди российских пользователей, прежде всего веб-разработчиков.
На данный момент сайт blend4web.com занимает 468 место в России:
http://www.alexa.com/siteinfo/blend4web.com#trafficstats
26 February 2015 21:34
Да, Крита неплохо развивается, особенно на фоне GIMP и Inkscape
26 February 2015 21:29
Ok, you need additional check before load method and reset ID after unload:

load_add_scene.addEventListener("click", function(e) {
    // if not loaded load it now
    if (arrows_scene_id == 0)
        arrows_scene_id = m_data.load("Scene_Demo_Arrows.json", null, null, false, false);
});

unload_add_scene.addEventListener("click", function(e) {
    // check that the scene is loaded (0 unloads all scenes)
    if (arrows_scene_id != 0) {
        m_data.unload(arrows_scene_id);
        arrows_scene_id = 0;
    }
});
26 February 2015 20:53
Try something like that:

function init_show_hide() {
    
    var load_add_scene = document.getElementById("load_add_button");
    var unload_add_scene = document.getElementById("unload_add_button");  
    
    // will keep loaded scene ID here
    var arrows_scene_id = 0;
    
    load_add_scene.addEventListener("click", function(e) {
        arrows_scene_id = m_data.load("Scene_Demo_Arrows.json", null, null, false, false);
    });

    unload_add_scene.addEventListener("click", function(e) {
        // check that the scene is loaded (0 unloads all scenes)
        if (arrows_scene_id != 0)
            m_data.unload(arrows_scene_id);
    });
}
26 February 2015 20:24
Hi!
Indeed, the loaded data ID is returned by the load() method. You can push it in some array, initialized as "global" (module's internal) variable, and later use the values from that array in your unload() functions.
var _ids = [];


_ids.push(data.load("scene1"))
_ids.push(data.load("scene2"))
_ids.push(data.load("scene3"))


for (var ii = 0; ii < _ids.length; ii++)
    data.unload(_ids[ii]);
24 February 2015 19:29
Доступен для загрузки всем желающим, финальный релиз намечен на среду.

Замечания к релизам
24 February 2015 19:28
Available for download for all users. Release notes.

The release scheduled for tomorrow, you still have some time to test your apps and scenes .