Forum

User posts Evgeny Rodygin
16 December 2014 10:55
Yes, this is kinda bug. Reproduced it on Firefox 34 on Windows (On Linux it is OK).
Thanks for report. We'll check shaders.
15 December 2014 11:00
Glad it helped.

You are right about iframes. Projects with keyboard interaction should avoid it.

Anyway this is a good question and now we can give a link to this topic when similar problems will take place. =)

14 December 2014 01:15
Hi!

There are two things I found in your code which block movement.

1) You commented a line:
m_app.enable_controls(canvas_elem);
, which among other things allows keyboard controls.

2) Much more difficult thing to find - you put your html into an iframe of another html. Such a setup do not allow browser to properly catch keyboard events. There are two ways to solve it:
a) Move all you <script> lines to index.html and leave iframe. Than you need to slightly change filepathes.
b) Remove i-frame (is it really needed?)
11 December 2014 16:05
Hi,

Here I am again with my Java cluelessness
JavaScript actually. A bit different thing.

…is the "full" engine written in such a way that I can set the quality there?
Most of the configuration parameters could be set with a help of auxiliary addon app.js. If you want to set antialiasing during initialization you need to set quality profile to CUSTOM. It should look like this:
var m_cfg = require("config");
m_app.init({
    quality: m_cfg.P_CUSTOM,
    antialiasing: false
});

Also, how do I set the resolution and dimensions of my output? Is that also controlled by the engine, set at the time of export, or some combination of both?
For now we don't allow resolution changes from API. This part of our engine will be rewritten in nearest future and programmers will have better flexibility customizing params.
As for "dimensions". Probably you meant physical size of the window in which your application is operating in. If so - this is a resolution of the canvas html element. It can be set like this:
<iframe width="800" height="500" allowfullscreen src="/tutorials/examples/web_page_integration/apple.html"></iframe>

Tutorial on this stuff can be found here
09 December 2014 15:27
Hello Duarte,

There is definitely a problem exists. Several scenes are causing it. It is being reproduced easily as you have said.
It will be fixed in the next release. Now it's really better to avoid using several scenes.

Thanks for pointing out a bug.
08 December 2014 11:49
Hi,

These all are good questions.

Is the exported Blend4Web .json file set in such a way as to make it dependent on the B4W web player or Javascript in general? If I read right, the tutorials using transparency do so by changing a setting in the player.
Exported .json can be read by any JSON-parser written in any language. But it contains lots of b4w specific information (additional parameters for objects, cameras, scenes, some rendering settings etc.), so I don't think you can get something really useful from it as a "raw data".

Web Player is an application written with the Blend4Web API. Such as our "Farm", "Island", "Fashion" demos. It would be more correctly to say about dependency on the whole Blend4Web framework.

I was experimenting with putting the code in to the viewer for testing, but all I accomplished was to freeze the viewer.
Where exactly did you put this code? If you did it just in console(F12) while Viewer was running nothing bad should have happened. And nothing should have changed as an application has already been initialized. The best way to give application some special parameters (including alpha transparency) is to use our app addon. Like it is done here. You can just change alpha to true in this call:
m_app.init({
    canvas_container_id: "canvas3d", 
    callback: init_cb,
    physics_enabled: false,
    alpha: false
});
08 December 2014 11:07
Hi and welcome to the forum!

For now NLA-editor doesn't support mouse_over events but it is a good feature and we'll probably include it in our TODO-list.
But if you have several hundred of objects in your scene (like in demo above) you'll have to attach such an event to every of them. So it'll be pretty difficult to control all these events.

In such a case I'd recommend to use a bit of scripting. You can write a simple manifold which will run callback every frame and call scenes.pick_object function to determine which object is selected.
03 December 2014 10:53
Hi,

We are not planning to add some extra export formats as it wouldn't be Blend4Web this way. It would be Blend4Threejs or something Our current exporting addon is doing lots of preparations for the scene to work smoothly in Browsers by means of our engine.

It would be great if you could inform us of what exactly is a limitation in the current coding model. Thus we can improve something or add some new feature. Or probably we can give an advice on realization of your colleague's project?

20 November 2014 13:16
Добрый день,

Модуль HUD предназначен для вывода отладочной информации непосредственно на канвас.

На данный момент во всех приложениях работа с интерфейсом у нас идет через чистый html. В будущем есть планы по созданию полноценного интерфейсного модуля. Так что выбранный вами метод сейчас единственно верный.
19 November 2014 15:25
Добрый день,

Самый простой способ получить рабочий firstperson пример - это модифицировать урок по созданию игры с видом от третьего лица.
В функции setup_camera тип привязки камеры следует заменить на жесткую:
 m_cons.append_stiff_trans(camera, _character, CAM_OFFSET);


Так же нужно добавить в функции init_cb обработчик следующего вида:
canvas_elem.addEventListener("mouseup", function(e) {
m_plock.request_pointerlock(canvas_elem);
});

Произойдет перехват управления мышью и поворот персонажа (первого найденного на сцене) привяжется к смещению мышки.

После этих действий функция setup_rotation станет лишей.