swat0284 Posted September 3, 2015 Share Posted September 3, 2015 Hello i need to use castrolUI and make few actions in babylon like skybox.material = null;or chenge scale of some objects. How can i do that? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 4, 2015 Share Posted September 4, 2015 I guess you want to talk castorGUI? castor is french => in englich is beaver Yes you can create events in babylon with castorGUI. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
swat0284 Posted September 5, 2015 Author Share Posted September 5, 2015 Ok, great but how? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 5, 2015 Share Posted September 5, 2015 Easy. For exemple with event click to texture: var YourFunction = function(){ // action with BABYLON skybox.material = null;};var guiTexture = new CASTORGUI.GUITexture("imageName", "data/image.png", {w:50,h:50,x:10,y:2}, guisystem, YourFunction);Almost all Elements can receive a callback function, some are with click with other changes. You can consult the documentation for details. https://github.com/dad72/CastorGUI Quote Link to comment Share on other sites More sharing options...
swat0284 Posted September 5, 2015 Author Share Posted September 5, 2015 Ok but when i for example try to do:skybox.material = null; it dont work, or sometimes work sometimes noat this moment i have stg like that and thats is problem; button function(){try to run actionToMake inside babylon an it dont work}babylon function(){try to run actionXXXXX and it workactionToMake function(){} } Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 5, 2015 Share Posted September 5, 2015 Sorry I do not understand. Quote Link to comment Share on other sites More sharing options...
swat0284 Posted September 8, 2015 Author Share Posted September 8, 2015 Me too, it works now Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 8, 2015 Share Posted September 8, 2015 cool Quote Link to comment Share on other sites More sharing options...
swat0284 Posted September 8, 2015 Author Share Posted September 8, 2015 I have another question how can i get all files names from catalog on server. I know that i should use php but how? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 8, 2015 Share Posted September 8, 2015 something like this: $link = null; $dirname = 'Data/'; $dir = opendir($dirname); while($file = readdir($dir)) { if($file != '.' && $file != '..' && !is_dir($dirname.$file)) { $link .= $file; } } closedir($dir); Quote Link to comment Share on other sites More sharing options...
swat0284 Posted September 8, 2015 Author Share Posted September 8, 2015 Ok i make few minute before you. I think that i have got everything. Thank You my friend Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.