Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
links

doriman
Registered User
Quote
2011-12-04 09:37:56

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


niko
Moderator
Quote
2011-12-05 19:20:29

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. :)


doriman
Registered User
Quote
2011-12-05 22:53:08

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.....


niko
Moderator
Quote
2011-12-07 08:06:04

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?


doriman
Registered User
Quote
2011-12-07 22:14:07

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!!!!


niko
Moderator
Quote
2011-12-08 13:29:11

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.


doriman
Registered User
Quote
2011-12-08 13:36:22

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?


niko
Moderator
Quote
2011-12-09 07:32:25

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.


doriman
Registered User
Quote
2011-12-12 13:22:07

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???????


mushra
Registered User
Quote
2011-12-12 14:18:11

You have to use .Tex1.
it should work like this:

cubeSceneNode.getMaterial( 0 ).Tex1 = engine.getTextureManager().getTexture( 'copperlichtdata/red.jpg', true );



doriman
Registered User
Quote
2011-12-13 01:49:37

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????


doriman
Registered User
Quote
2011-12-13 13:05:30

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...."


niko
Moderator
Quote
2011-12-13 20:19:53

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.


relgycandy
Registered User
Quote
2012-12-28 06:00:56

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...


niko
Moderator
Quote
2013-01-09 16:04:51

Sure, why not.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

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