Simple Gallery with Logic Nodes and js call back - Load Images

31 May 2018 18:50

Simple Gallery with Logic Nodes (js call back and run_entrypoint.)

With information when the photo is loaded.

Can I do a preloader for the following function?

var m_scenes  = require("scenes");
var m_tex = require("textures");

var cube = m_scenes.get_object_by_name("Cube");
var image = new Image();
image.onload = function() {
    m_tex.replace_image(cube, "Texture", image);
image.src = "./test.png";

Please register or log in to leave a reply.