Hi Daniel,
one Question, i there a way to change “IBL Environment Mode” with PUZZLE, after detect iOS!?
You can do that but you need to write a js snippet, since it’s not an only-puzzles soulution.
You need to register a function for puzzles in your app’s main js file in the prepareExternalInterface() function like this:
function prepareExternalInterface(app) {
// register functions in the app.ExternalInterface to call them from Puzzles, e.g:
app.ExternalInterface.changeIBLMode = function(modeStr) {
var mode;
switch (modeStr) {
case 'PMREM':
mode = 0;
break;
case 'PROBE_CUBEMAP':
mode = 1;
break;
case 'PROBE':
mode = 2;
break;
default:
mode = 2;
break;
}
app._envIBLMode = mode;
app.updateEnvironment(app.worldMaterial);
}
}
And after that you can call it via the call_JS_function puzzle:
Attachments:
You must be
logged in to view attached files.
Co-founder and lead developer at Soft8Soft.