Shape

Shape

longdo.PanoramaViewer.Shape

Constructor

new Shape(locations)

Class represent a shape on panorama view
Parameters:
Name Type Description
locations Array.<object> Array of location object as shape's coordinate.

Methods

color(red, green, blue, alpha) → {Array.<float>|self}

Set shape color
Parameters:
Name Type Description
red float range from 0.0 - 1.0
green float range from 0.0 - 1.0
blue float range from 0.0 - 1.0
alpha float range from 0.0 - 1.0
Returns:
  • Type:
    Array.<float>
    Current color.
  • Type:
    self

getOption() → {Object}

Return option given when creating this shape.
Returns:
Type:
Object
This shape option.

location(_loc) → {Array.<object>|self}

Adjust shape's location
Parameters:
Name Type Description
_loc Array.<object> Array of location object as coordinates for this shape.
Returns:
  • Type:
    Array.<object>
    Current shape's coordinates if a parameter is not set.
  • Type:
    self