Mtsinstance2D - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

textureObj.mipBias = 0.5;
Methods
getHeight()
Returns the original vertical size in pixels of the image used for the texture object.
imageHeight = textureObj.getHeight();
getWidth()
Returns the original horizontal size in pixels of the image used for the texture object.
imageWidth = textureObj.getWidth();

MTSInstance2d

An MTSInstance2D object is used to represent a Viewpoint text object. The text may be attached to an Atmosphere
object in 3D, or may be placed in a fi xed position in the display window. (See the instructions for "dstPin" below.)
The geometry object must be fi rst defi ned in an XML description fi le. (It is defi ned using a <LayerData> tag of a
Viewpoint instance. The instance must also contain a geometry tag describing the type of Viewpoint geometry.) Once
loaded nearly all aspects of the text object may be modifi ed in real time.
It is important to note that the attribute AlwaysVisible="1" must be present in the MTX description fi le in order for
the text to be displayed in Atmosphere. (Text created with the "Viewpoint Scene Builder" application has this attribute
off (0) by default, but can be set to on (1) using the command "Show Hot Spot text" in the "Hot Spot" menu.)
Properties
text
Specifi es the content (the actual words) to be displayed by the text object.
textObj.text = "Hello world!";
textSize
Specifi es the text size, which corresponds directly to the Windows Font size.
textObj.textSize = 24 // set font to size 24
textColor
Contains the text color as an array of three values [ R, G, B ].
textObj.textColor = [ 0, 0, 1 ] // blue text
font
Specifi es the font to be used by the text object. Any Windows font which appears in the Control Panel may be
utilized. The default font used by Atmosphere will be the same as the users current default system font.
textObj.font = "Times New Roman";
347
ADOBE ATMOSPHERE
User Guide

Advertisement

Table of Contents
loading

Table of Contents