≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Switch scene AND externally load mesh
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Hi pals.. Niko worked it out and I wouldn´t mind sharing this: It will explain how to call a user-defined function via a button. Remember that you can replace (in the HTML-file) [code] "startCopperLichtFromFile('3darea', 'copperlichtdata/test.ccbjs');" [/code] with [code] "var engine = new CL3D.CopperLicht('3darea'); { engine.load('copperlichtdata/test.ccbjs'); }" [/code] Now additional functions may follow. In my case it switches to another scene AND externally loads a 3D-mesh.. Here is the full source-code: [code] ... html, head ... <script type="text/javascript"> <!-- var engine = new CL3D.CopperLicht('3darea'); { engine.load('copperlichtdata/test.ccbjs'); dosomething = function() { engine.gotoSceneByName("scene2"); } loadcustommesh = function() { engine.load('copperlichtdata/mesh1.ccbjs'); engine.getTextureManager().getCountOfTexturesToLoad(); } } --> </script> ... rest of the html-file here ... [/code] Then simply arrange a button in CopperCube with the action: "WhenClickedDoSomething" > "ExecuteJavaScript" > insert here: "dosomething(); loadcustommesh()" (or however your functions are called..) Hope this will help^^ Once you feel insulted by such a basic thread, please see my next post on "dynamically load external mesh"..^^ For a good solution I might pay some money. Lets get it on.. Regards KK[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact