Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
Rendering Text

nanni
Registered User
Quote
2011-05-14 08:18:40

What's the best way to render some text into a scene?
Does Exists an equivalent method of: GLGE.Text()?

Thanks.


niko
Moderator
Quote
2011-05-14 11:15:01

Simply create a CL3D.Overlay2DSceneNode, see the documentation for that. It has a setText() function. Use it like this:
var t = new CL3D.Overlay2DSceneNode(engine);
engine.getScene().getRootSceneNode().addChild(t);
t.set2DPosition(10, 10, 256, 256);
t.setText('Hello World')
var color = = CL3D.createColor(255, 150, 232, 249);
t.setShowBackgroundColor(true, color );
t.FontName = "12;default;arial;normal;bold;true";


This will be much simplified in a future update.


nanni
Registered User
Quote
2011-05-15 22:39:26

I would put the text into the 3D space, like any other mesh.
Is it possible?


niko
Moderator
Quote
2011-05-16 08:33:11

Well, you could use either the texture created by the 2D overlay node above, and place it over any 3d object you want, or use the Renderer.createTextureFrom2DCanvas() function. You can draw text and stuff into a 2D HTML canvas and create a texture from that using this method.


Create reply:


Posted by: (you are not logged in)


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