Some notes on UI Overlays and scriptable properties


#1

First here is a rough class diagram – the blue boxes reflect the high-level type names that in theory can be passed to Overlay.addOverlay(type, ...):

And here is an attempt to exhaustively dump all scriptable properties alongside their contributing classes:

Overlay:
    _type: "::Overlay"
    _super: "::QObject"
    color: "color"
    alpha: "alpha"
    glowLevel: "glowLevel"
    pulseMax: "pulseMax"
    pulseMin: "pulseMin"
    pulsePeriod: "pulsePeriod"
    glowLevelPulse: "glowLevelPulse"
    alphaPulse: "alphaPulse"
    colorPulse: "colorPulse"
    visible: "visible"
    anchor: "anchor"

Overlay2D:
    _type: "::Overlay2D"
    _super: "::Overlay"
    bounds: "bounds"
    x: "x"
    y: "y"
    width: "width"
    height: "height"
ImageOverlay:
    _type: "image"
    _super: "::Overlay2D"
    subImage: "subImage"
    imageURL: "imageURL"
TextOverlay:
    _type: "text"
    _super: "::Overlay2D"
    font: "font"
    text: "text"
    backgroundColor: "backgroundColor"
    backgroundAlpha: "backgroundAlpha"
    leftMargin: "leftMargin"
    topMargin: "topMargin"

Base3DOverlay:
    _type: "::Base3DOverlay"
    _super: "::Overlay"
    position: [ "position", "start", "p1", "point" ]
    lineWidth: "lineWidth"
    rotation: "rotation"
    solid: [ "isSolid", "isFilled", "solid", "filed" ]
    wire: [ "isWire", "wire" ]
    dashed: [ "isDashedLine", "dashed" ]
    ignoreRayIntersection: "ignoreRayIntersection"
    drawInFront: "drawInFront"
    drawOnHUD: "drawOnHUD"
Line3DOverlay:
    _type: "line3d"
    _super: "::Base3DOverlay"
    end: [ "end", "endPoint", "p2" ]

Planar3DOverlay:
    _type: "::Planar3DOverlay"
    _super: "::Base3DOverlay"
    dimensions: ["dimensions", "scale", "size"]
Grid3DOverlay:
    _type: "grid"
    _super: "::Planar3DOverlay"
    minorGridWidth: "minorGridWidth"
    majorGridEvery: "majorGridEvery"
Text3DOverlay:
    _type: "text3d"
    _super: "::Planar3DOverlay"
    text: "text"
    backgroundColor: "backgroundColor"
    backgroundAlpha: "backgroundAlpha"
    lineHeight: "lineHeight"
    leftMargin: "leftMargin"
    topMargin: "topMargin"
    rightMargin: "rightMargin"
    bottomMargin: "bottomMargin"
    isFacingAvatar: "isFacingAvatar"
BillboardOverlay:
    _type: "billboard"
    _super: "::Planar3DOverlay"
    url: "url"
    subImage: "subImage"
    isFacingAvatar: "isFacingAvatar"
Circle3DOverlay:
    _type: "circle3d"
    _super: "::Planar3DOverlay"
    startAt: "startAt"
    endAt: "endAt"
    outerRadius: "outerRadius"
    innerRadius: "innerRadius"
    hasTickMarks: "hasTickMarks"
    majorTickMarksAngle: "majorTickMarksAngle"
    minorTickMarksAngle: "minorTickMarksAngle"
    majorTickMarksLength: "majorTickMarksLength"
    minorTickMarksLength: "minorTickMarksLength"
    majorTickMarksColor: "majorTickMarksColor"
    minorTickMarksColor: "minorTickMarksColor"

Volume3DOverlay:
    _type: "::Volume3DOverlay"
    _super: "::Base3DOverlay"
    dimensions: ["dimensions", "scale", "size"]
LocalModelsOverlay:
    _type: "::LocalModelsOverlay"
    _super: "::Volume3DOverlay"
Cube3DOverlay:
    _type: "cube"
    _super: "::Volume3DOverlay"
    borderSize: "borderSize"
ModelOverlay:
    _type: "model"
    _super: "::Volume3DOverlay"
    url: "url"
    dimensions: "dimensions"
    textures: "textures"

#eof

Debugging Entity Scripts in a Web Browser (initial tests + brainstorm)
#3

There is also now a Rectangle overlay that serves the purpose of providing a simple rectangle. People were apparently simulating this using the Text overlay with no actual text. However, it has the added features of supporting a border color and a corner radius so you can create rounded edges and enclosed boxes.