文字を表示する - VRML

更新:

VRML 文字を表示する。

文字を表示する
  1. NODE
    以下のノードは、文字を表示するためのVRMLノードです。
    #VRML V2.0 utf8
    
    Transform{
      children Shape{
        appearance Appearance{
          material Material{
            diffuseColor 0.4 0.9 0.3
          }
        }
        geometry Text{
          string["Google"]
          length[3]
          fontStyle FontStyle{
            family "Comic Sans MS"
          }
        }
      }
    }
    
  2. 文字
    string[" "]は表示したい文字で、length[ ]は文字の長さです。
    書体を変る場合は、
    fontStyle FontStyle{
    family "Comic Sans MS"
    }
    と言うように、familyの後に書体を書きます。
  3. サンプル
    1. 文字

このエントリーをはてなブックマークに追加