Forum

Enabling Stereo Analglyph mode in my app

27 September 2016 13:22 #12152
Hi,

I hope i am asking in the right place, I've searched the forum for an answer in vain and i guess the question is indeed a newbie question.

I'm trying to find how to enable the Stereo Anaglyph view for my app. I find how to do it if i use the player or in the viewer, but how do i enable it when i embed my app in a div with b4w.min.js and the project_name.js ?

I figure i need to put something like "anaglyph=true" in exports.init = function(), but my websearch-fu is failing me at revealing the exact thing to write and where…

Hope i make sense, for the record, i'm not very skilled in javascript so bare with me.

Thank you in advance and big up for this awesome piece of software!
very good language
27 September 2016 13:32 #12153
I'm trying to find how to enable the Stereo Anaglyph view for my app. I find how to do it if i use the player or in the viewer, but how do i enable it when i embed my app in a div with b4w.min.js and the project_name.js ?

I figure i need to put something like "anaglyph=true" in exports.init = function(), but my websearch-fu is failing me at revealing the exact thing to write and where…
Hi!
And welcome to our forum!
In the init function you can set property stereo="ANAGLYPH"
https://www.blend4web.com/api_doc/module-config.html
Blend4Web Team - developer
27 September 2016 13:39 #12154
\o/ Great!!! i wonder why i never stumbled upon the API doc!

Spasiba very much Konstantin Khomyakov!! :)
very good language
27 September 2016 13:40 #12155
Spasiba very much Konstantin Khomyakov!! :)
Varsågod
Blend4Web Team - developer
27 September 2016 13:58 #12156
Vash Shvedskiy ochen' khorosho!!
very good language
27 September 2016 14:18 #12161
Seems i'm out of luck (most probably just doing it wrong),

I entered that in the init function (which i guess is this:)

/**
 * export the method to initialize the app (called at the bottom of this file)
 */
exports.init = function() {
    m_app.init({
        canvas_container_id: "main_canvas_container",
        callback: init_cb,
        show_fps: false,
        console_verbose: true,
        autoresize: true,
	stereo="ANAGLYPH",
    });
}

But everything disappears…. I apologize for my poor level of comprehension in javascript (i guess i really need to study it..)
very good language
27 September 2016 14:25 #12164
But everything disappears…. I apologize for my poor level of comprehension in javascript (i guess i really need to study it..)
Sorry! I've made a typo…
Of course the property should be set like this:
stereo: "ANAGLYPH"
Blend4Web Team - developer
27 September 2016 14:26 #12165
\o/ you are the best anyways, Konstantin Khomyakov! Thank you very much!
very good language
 
Please register or log in to leave a reply.