Сообщения, созданные пользователем Ialohrr
05 ноября 2016 21:50
ok here is the thing. in the logic node editor of blender I have an entry point, with the "run from script" option enabled, its name is "Upentry" and it's label is "UpEntry".
When i call the logic_node.run_entrypoint(scene,nodeName) function nothing happens.
I tried to call it from it's node name and it's label name, it stays the same, nothing happens,I got no message in the console, nothing… any idea why it would do that?
When i call the logic_node.run_entrypoint(scene,nodeName) function nothing happens.
I tried to call it from it's node name and it's label name, it stays the same, nothing happens,I got no message in the console, nothing… any idea why it would do that?
05 ноября 2016 21:26
05 ноября 2016 21:20
Hello,
I have an issue using the run_entrypoint function.
nothing happens when i'm using it. the entry point does not seems to trigger.
I'm pretty sure it's because of the scene name that i got wrong. where i can find my scene name?
using the scene.getactive() function returns me ans empty string….
where did I got it wrong?
I have an issue using the run_entrypoint function.
nothing happens when i'm using it. the entry point does not seems to trigger.
I'm pretty sure it's because of the scene name that i got wrong. where i can find my scene name?
using the scene.getactive() function returns me ans empty string….
where did I got it wrong?
26 сентября 2016 20:07
26 сентября 2016 20:04
26 сентября 2016 18:08
24 сентября 2016 16:31
Hey guys, I have a question
I try to put a custom html object on an anchors for a empty object.
problem is when I try this on an bundled style project it works fine no problem
But in a non bundled external project as soon as I have a HTML element with the good ID the scene stop loading.
Any idea why? what am I missing here?
here are the code for the bundled project :
and the one for the non bundled external project :
I try to put a custom html object on an anchors for a empty object.
problem is when I try this on an bundled style project it works fine no problem
But in a non bundled external project as soon as I have a HTML element with the good ID the scene stop loading.
Any idea why? what am I missing here?
here are the code for the bundled project :
"use strict"
// register the application module
b4w.register("test", function(exports, require) {
// import modules used by the app
var m_app = require("app");
var m_data = require("data");
/**
* 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: true,
console_verbose: true,
autoresize: true
});
}
/**
* callback executed when the app is initialized
*/
function init_cb(canvas_elem, success) {
if (!success) {
console.log("b4w init failure");
return;
}
// ignore right-click on the canvas element
canvas_elem.oncontextmenu = function(e) {
e.preventDefault();
e.stopPropagation();
return false;
};
load();
}
/**
* load the scene data
*/
function load() {
var torus_text = document.createElement("span");
torus_text.id = "buttonPlay";
torus_text.style.position = "absolute";
torus_text.style.padding = "5px";
torus_text.style.visibility = "hidden";
var torus_img = document.createElement("img");
torus_img.src = "Images/B_play.png";
torus_img.atl = "the button";
torus_img.height = "42";
torus_img.width = "75";
torus_text.appendChild(torus_img);
document.body.appendChild(torus_text);
m_data.load("test.json", load_cb);
}
/**
* callback executed when the scene is loaded
*/
function load_cb(data_id) {
m_app.enable_camera_controls();
// place your code here
}
});
// import the app module and start the app by calling the init method
b4w.require("test").init();
and the one for the non bundled external project :
"use strict"
// register the application module
b4w.register("JumboConf", function(exports, require) {
// import modules used by the app
var m_app = require("app");
var m_cfg = require("config");
var m_data = require("data");
var m_preloader = require("preloader");
var m_ver = require("version");
// detect application mode
var DEBUG = (m_ver.type() == "DEBUG");
// automatically detect assets path
var APP_ASSETS_PATH = m_cfg.get_std_assets_path() + "JumboConf/";
/**
* 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: DEBUG,
console_verbose: DEBUG,
autoresize: true
});
}
/**My function
*/
function CreateBt(id, source, hgt, wht, altern) {
var btText = document.createElement("div");
btText.id = id;
btText.style.position = "absolute";
btText.style.padding = "5px";
btText.style.visibility = "hidden";
var btImage = document.createElement("img");
btImage.src = "/Images/"+source;
btImage.atl = altern;
btImage.height = hgt;
btImage.width = wht;
btText.appendChild(btImage);
document.body.appendChild(btText);
}
function IdeCration(){
CreateBt("RotBts","Bt_choix.png","42","72","bt_play.png");
}
/**
* callback executed when the app is initialized
*/
function init_cb(canvas_elem, success) {
if (!success) {
console.log("b4w init failure");
return;
}
m_preloader.create_preloader();
// ignore right-click on the canvas element
canvas_elem.oncontextmenu = function(e) {
e.preventDefault();
e.stopPropagation();
return false;
};
load();
}
/**
* load the scene data
*/
function load() {
IdeCration();
m_data.load(APP_ASSETS_PATH + "JumboConf.json", load_cb, preloader_cb);
}
/**
* update the app's preloader
*/
function preloader_cb(percentage) {
m_preloader.update_preloader(percentage);
}
/**
* callback executed when the scene data is loaded
*/
function load_cb(data_id, success) {
if (!success) {
console.log("b4w load failure");
return;
}
m_app.enable_camera_controls();
// place your code here
}
});
// import the app module and start the app by calling the init method
b4w.require("JumboConf").init();
18 сентября 2016 23:07