media @ VU
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources _

talk show tell print

web3d-example-text-proto.vr

web3d-example-text-proto.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]

Web3D/VR

# In Contact 4.3 there is the new option of creating a # textured rectangle for each character. The # user first must supply a special Font texture in a # ImageTexture node and sets the fontstyle # family attribute to "TEXTURE". # # The Text attributes length and maxExtent, the FontStyle # attributes size, spacing, leftToRight, topToBottom, justify # and style = PLANE or ITALIC are implemented for TEXTURE text. # The square texture map is divided into 16*16 cells for 256 different # characters, the character 0 start in the upper left corner # of the pixel image. The character width is scaled by 0.8. The # Appearance node or Texture node should be reused between # different text strings for speed. # # For special effects or fonts the texture map can be tuned. # Using textures with alpha (or a transparent GIF) can give a # transparent background. Using grayscale or black & white textures # allows color changes using the Material diffuseColor. # # To further optimize the Text texture resolution and layout # custom layout settings can be specified with up to 7 numbers # after the family "TEXTURE" string. The format is "TEXTURE # minChar maxChar cols rows aspect extraSpace shift" PROTO STText [ exposedField MFString string [] ] { Shape { appearance Appearance { texture ImageTexture { url "local/game/images/font.gif" repeatS FALSE repeatT FALSE } material Material { diffuseColor 1 1 1 } } geometry Text { string IS string fontStyle FontStyle { family ["TEXTURE 32 92 15 4 1.28 0 0"] justify "LEFT" } } } }
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources _

(C) A. Eliëns 21/5/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.