Skip to content

text example

awe.media edited this page Oct 22, 2020 · 3 revisions

To setup a text object you need to make sure you have a valid typface.js font file (see the TextGeometry docs for more info and other text parameter options.)

Then add a geometry block similar to that outlined below.

awe.projections.add({
  id: "MY_PROJECTION_ID",
  "geometry" : {
    "shape" : "text", 
    "text" : "awe.media", // put your text here
    "font_url" : "optimer_bold.typeface.js",   // REQUIRED - see http://gero3.github.io/facetype.js/
    "parameters" : {
      "height" : "10", // depth of the extruded text
      "size" : "80"
    },
  },
  "material" : { ... },
  "texture" : { ... },
  "visible" : true, // ensure that this projection is visible
},{ poi_id: "MY_POI_ID" });