Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ShapeData

图形结构描述体

Hierarchy

  • ShapeData

Index

Properties

fill

fill: string

填充颜色, 接受HEX, 默认 #FFFFFF

fillOpacity

fillOpacity: number

填充透明度, 范围为 [0 - 1]

height

height: number

图形在三维空间(Z轴)高度

hollows

hollows: string

缺口索引描述, 针对shape与line,可以配置缺口. 结构为<from i0>,<to i1>,<from i2>, <to i3>, ... 每两个索引成为一组, 该组所对应的path指令将不会被绘制.

id

id: string

图形ID

parentName

parentName: string

父级名称 from group, [ground, impassable, store]

path

path: string

图形路径, 路径描述采取以下规范: 采取类path的指令式描述, 指令结构为 <command><position>,<position>[,<position>]..., path为指令的连续组合. 其中, command分为三种, 每种command后跟随数对x, y坐标:

  • m: 移动, 结构为 m<x>,<y>, 移动至x, y坐标
  • l: 直线, 结构为 l<x>,<y>, 从当前所在位置连线到x, y坐标
  • c: 二次贝塞尔曲线, 结构为 c<cp0x>,<cp0y>,<cp1x>,<cp1y>,<x>,<y>, 从当前所在位置连线到x, y, 并通过控制点cp0, cp1生成曲线

radius

radius: number

图形半径

shapeType

shapeType: "point" | "line" | "shape"

图形类型, 分别有: shape(闭合图形), line(线段集), point(点)

Optional sideColor

sideColor: undefined | string

3D侧面颜色

Optional sideOpacity

sideOpacity: undefined | number

3D侧面透明度

stroke

stroke: string

描边颜色, 接受HEX, 默认 #444444

strokeOpacity

strokeOpacity: number

透明度, 范围为 [0 - 1]

strokeWidth

strokeWidth: number

描边宽度, 接受整数, 默认 1

tag

tag: string

节点标签 from id/name, [ground, impassable, store]

x

x: number

图形位置X坐标

y

y: number

图形位置Y坐标

zIndex

zIndex: number

图形位置Z起始高度