Skip to content
Alessandro Febretti edited this page Jun 12, 2013 · 8 revisions

[[module cyclops]] extends [[Entity]]

last revision: v4.0.2 - 12 Jun 2013

The Text3D entity is used to place text in a 3D scene.

Methods

Method(s) Description
static create(string fontName, float size, string text) Creates a new Text3D object using the specified font, font size and text
setFont(string fontName) Sets the text font name. The font name must point to a font file (.ttf extension supported)
setFontSize(float size) The size of the font characters in object space
setFontResolution(int size) the font resolution in texels-per meter
setFixedSize(bool fixed) when set to true, the text will be kept at a fixed size on screen, regardless of distance
setText(string text) Sets the text displayed by this entity

Example

	t = Text3D.create('fonts/arial.ttf', 1, "Hello World!")
	t.setPosition(Vector3(-0.1, 2, -4)
	t.setFontResolution(120)
Clone this wiki locally