Сообщения, созданные пользователем Иван Любовников
26 февраля 2016 12:36
I've found this answer helpful: http://blender.stackexchange.com/a/13866.
This addon works well for me.
This addon works well for me.
26 февраля 2016 10:54
when you say "inserted the iframe right after the <body> tag", which page is this, the home page in the editor?I don't know about the home page. I've used the Atout theme. It has the "header.php" template file located at path: root/wp-content/themes/atout/header.php. This file is generally responsible for the opening part of a theme template. I've just found the <body> tag in it and inserted the iframe into.
26 февраля 2016 01:02
Yes! Something like that, exactly. It's literally the first example I know of where the background on a wordpress site has been replaced with webgl.
I've just picked a random theme and slightly modified it. I've inserted the iframe right after the <body> tag, so it's rendered beneath other elements. It has also been required to adjust theme CSS to maximize the iframe onto the whole page.
But I still have no idea how to get that to work. My template even has a feature where if someone looks at it on their phone, it'll replace a video background with a static image, so if there was a way to just replace the video with the blend4web html, that would be great. That way mobile users would still get a photo instead.
I think this task needs some coding. You can check the user first (for example, just like the template does) and then decide what to do: run b4w application for desktop users or just show some background image for others. I don't familiar well with wordpress template system, but I think it can be a bit difficult in case of a nontrivial template.
"it’s not html, it’s base64 encoded into the template which could be a problem, since you now cannot change the way it works since everything is inlined you need someone to implement this in a correct way, else it’s gonna bite you in the ass sooner or later. if you put it in a page with contents/videos/images etc. it’s gonna behave differently, especially on for example an ipad inlined code means js/css IN the html page, instead of loading it"
That makes sense for a single html export, but b4w application can also be built as a project with separate resource files. Moreover, it's a recommended way for complex tasks.
To sum up, this is not a usual embedding and can highly depend on the template complexity. It may require to write a whole b4w application instead of using just a simple self-contained html file.
25 февраля 2016 13:02
Yes!!! That worked, thank you so much. Could you please explain why I had to do this for it to work?
The second parameter is needed for dynamically loaded objects. You can load a single scene many times, so there would be many objects with the same name. Data_id helps to uniquely identify these objects. If an object belongs to the main scene its data_id is 0, objects from the first dynamically loaded scene have data_it set to 1, from the second - 2 and so on.
You can pass a certain data_id if you know what object you want to get, or pass DATA_ID_ALL to search through all these objects regardless of data_id.
There is also a corresponding method to retrieve this id from an object: get_object_data_id
25 февраля 2016 11:49
25 февраля 2016 10:23
No, not get_object_by_name(), but get_object_name(_objs[j]). They're easy to confuse .
25 февраля 2016 10:19
Hi! This can be done by editing the appropriate template and css theme files.
Do you want something like this: link?
Do you want something like this: link?
24 февраля 2016 16:07
24 февраля 2016 15:41
1. по scenes.set_outline_intensity. Возможно ли регулировать как бы жесткость выделения (т.е. например, чтобы меш выделялся не размытым свечением, а более четким контуром)
На вкладке Render->Object Outlining можно уменьшить значение Factor. Контур выделения станет уже и тусклее. Размытость не исчезнет, но будет не так заметна.
24 февраля 2016 15:11