Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 ] Page 1 of 2 |
|
|||||
|
hey i have another quwstion niko i am doing a project for my college and i need to know some things: -is there a way like to do a 3d wall and once i click it ,enter it can i move to a difrent page? -can i connect apllications also to c like if i want to use ajax or databases ? -is there any other helpfull tutorials that can help me i need for my project alot of elements for bulding and hw to import pictures and like to build my own canvases i would really appreciate it from you im from israel by the way and i recommended the program to alot because you started a new web programming . like i need to have a gps in c and once you get a location and you click it you can go to a game with coppercube is it possible? tnx |
||||
|
1) Yes, that's possible. In copperCube for example, add a 'When clicked do something' behavior to the wall and add an 'open a website' action to that. You can do this also manually using copperLicht alone, using JavaScript of course. 2) Yes. You can do everything using JavaScript. No limits there. 3) I'd suggest to work through the tutorials and play around. You learn it the easiest by doing and trying out. 4) sure, if you put your GPS stuff on a server and query it using JavaScript/Ajax, that's not a problem. But it involes a bit of programming of course, since it is a bit special. :) |
||||
|
tnx niko i am learning it well but there is a problem i tried now an example of running a web on my apache xampp server and when i run it my server wont let me see the project i did , ofcourse i have all the files in the directory so maybe you know what is the problem???? i only see black while i run it on firefox, chrome...... and another question i build a nice web with your site but my only problem is that while i run it how do i not walk beside the walls and ground??? i tried everything..... |
||||
|
Difficult to say without any details. Aren't there any errors? Like in the JavaScript console? And what do you mean with 'how di I not walk beside the walls and ground'? Can you be a bit more specific? |
||||
|
niko thats okay i figuerd it out but i have a question .... i would like for my final college project i would like also to do a function that when a user would like to upload a picture so his picture would be on a cube or wall ??? you have an astradigy like if i user clicks a wall or cube he can change the cube to what ever picture he would like so you have a clue maybe???? and ofcourse he doesnt have the coppercube!!!! |
||||
|
When using WebGL, you should easily be able to program this yourself. Just use a image uploader (JavaScript / PHP based or whatever you want) and then load the uploaded image in CopperLicht as texture. Of course this also works with the Flash Target then, by loading the image as Bitmap in Actionscript. |
||||
|
yes thats what i thought but i started to do an upload site but the problem is in the java script i cant find where to place the image like if i have cubemash5 for example where do i find it in the program where i can rplace it? |
||||
|
You need to store the image on your server, and probably that script which did that could also probably tell you where the image is then. |
||||
|
hey niko i am trying with java script to change the texture to my picture this is the code that i written and it doesnt work this is what i did.... var engine = startCopperLichtFromFile('3darea', 'copperlichtdata/dori4.ccbjs'); var cubeSceneNode = null; engine.ingComplete = function() { var scene = engine.getScene(); if (scene) { // find the cube scene node cubeSceneNode = scene.getSceneNodeFromName('cubeMesh9'); if (cubeSceneNode) cubeSceneNode.getTexture("copperlichtdata/red.jpg", false); } } why its not eorking any idea??????? |
||||
|
You have to use .Tex1. it should work like this: cubeSceneNode.getMaterial( 0 ).Tex1 = engine.getTextureManager().getTexture( 'copperlichtdata/red.jpg', true ); |
||||
|
hey i tried to do what you told but it hasn't worked this is the code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript" src="copperlichtdata/copperlicht.js"></script> </head> <body> <div align="center"> <canvas id="3darea" width="1040" height="800" style="background-color:000000"> </canvas> </div> <script type="text/javascript"> var engine = startCopperLichtFromFile('3darea', 'copperlichtdata/dori4.ccbjs'); var cubeSceneNode = null; engine.ingComplete = function() { var scene = engine.getScene(); if (scene) { // find the cube scene node cubeSceneNode = scene.getSceneNodeFromName('cubeMesh9'); if (cubeSceneNode) cubeSceneNode.getMaterial( 0 ).Tex1 = engine.getTextureManager().getTexture( "copperlichtdata/red.jpg", true ); } } </script> <br/> <div align="center"> </div> </body> </html> so like a wall with a diffrent picture was soppesed to turn to red but it hasent happend you know why???? |
||||
|
okay this is the new code: var engine = startCopperLichtFromFile('3darea', 'copperlichtdata/dori4.ccbjs'); var cubeSceneNode=null; // this is called when loading the 3d scene has finished engine.ingComplete = function() { var scene = engine.getScene(); if (scene) // find the cube scene node cubeSceneNode= scene.getSceneNodeFromName('cubeMesh1'); cubeSceneNode.getMaterial( 0 ).Tex1 = engine.getTextureManager().getTexture( 'copperlichtdata/car.jpg', true ); }; but the problem is that the cube is know painted in black and not with the image that i told him to have.... and when i run it it writes at the bottom "Textures loaded: 17/18...." |
||||
|
maybe it wasn't able to load the image file? Try for example with the full URL instead of the relative one. Also, be sure the image is on the same domain, WebGL doesn't allow loading textures from different domains. Additionally: See the JavaScript error console for errors. They always give a hint as well. |
||||
|
i would like for my final college project i would like also to do a function that when a user would like to upload a picture so his picture would be on a cube or wall ? ___________________________________________ http://www.mmoggg.de/ | http://www.mmoggg.de/Diablo-3-go... |
||||
|
Sure, why not. |
[ 1 2 ] Page 1 of 2 |
|