Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
some questions

doriman
Registered User
Quote
2012-03-08 12:23:37

hello i purchested yesturday coppercube and i have some questions:
first i would like to know if i run it in html how can i combine php script inside the copper cube like if i want a user to upload a picture as a cubemesh or if i want the user to register and open a session so like where i can put the php script in the bulding of the cppercube because i tried and i can find the solution tnx!!!


niko
Moderator
Quote
2012-03-08 17:50:24

Hi,

this depends on what target you are using, but since you posted this into the CopperLicht forum, I guess you want WebGL, correct?
You can combine php scripts with your html page just like you would do that in any other, normal html page as well. This really isn't anything CopperCube specific. You can do AJAX calls for example as you want.
For uploading a picture and then showing it in the 3d scene, I you can use the texture manager, for example like this:
http://yourSceneNode.getMaterial...
hope this helps!


doriman
Registered User
Quote
2012-03-14 11:03:08

hey nico yes i am using webgl and i have a question
first when i tried to change a cubemash it works like this:
cubeSceneNode= scene.getSceneNodeFromName('cubeMesh1');

cubeSceneNode.getMaterial( 0 ).Tex1 = engine.getTextureManager().getTexture( 'red.jpg', true );
but when i inserted a url instead of a image that i have its not working i only get a empty black wall and i tried to change it to false but still no picture from the web any help???

also i was wondering if i can make a cubemash show video like a youtube or a mp4 for chrome ?

and last question if like a session is opened and a user uploades a picture to a cube mash by clicking it and then it refers him to a upload page and then the cube is the picture that the user uploaded.
is it possible that a diffrent user will enter he's "profile" and when he se the picture he won't be able to change it ?because if he clicks the cube he will be also refered to the upload image page like the original user clicked the cube mash to upload he's image?
tnx


niko
Moderator
Quote
2012-03-14 13:39:04

I think the reason why the texture stays black is that WebGL doesn't load textures not from the same url or domain. It's a security feature built into the browsers and nothing done by CopperLicht. There is a way to work around this, by uploading some manifest to the other domain, telling the browser that it's ok for WebGL apps to load textures from it.

About multiple images from different users: Yes, you need to handle this. The usual way is to use sessions or some other workaround for this.


doriman
Registered User
Quote
2012-03-14 22:22:23

tnx niko and what about playing video on a cube mash possible ?
and do you know how to upload a texture from a url in webgl


doriman
Registered User
Quote
2012-03-14 23:57:14

oh niko and another important question :
i tried my best and didnt find a solution iam trying to make buttons so if i press up it will move foward 'down to move back left and right because for people who use touch screen and i didnt find a solution if you can help it will be gr8 and i dont know how to move it by vectors so if you can put a little source that can help me or java script it will be great man!!!


niko
Moderator
Quote
2012-03-15 07:37:13

Playing video on cube: You could do this either by having several textures, where each texture is its own video frame, or by unlocking the texture using webGL-functions and writing the video data into there manually.
About the buttons and the math: There is a thread in the CopperCube sub forum describing this: http://www.ambiera.com/forum.php...
Hope it helps!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (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