mono.ShapeNode Class
ShapeNode对象
Constructor
mono.ShapeNode
(
-
or{mono.Path}
-
curveSegments
-
amount
-
vertical
-
repeat
-
zMinusHalfAmount
Parameters:
-
or{mono.Path}
Arrayshapes 形状
-
curveSegments
Number曲线的切片数
-
amount
NumberShapeNode的厚度
-
vertical
Boolean是否竖直方向
-
repeat
Number重复次数
-
zMinusHalfAmount
Object
Item Index
Methods
addShape
(
-
shape
-
options
-
scope
Parameters:
-
shape
mono.ShapeShape对象
-
options
Objectoptions 格式为{curveSegments : curveSegments, amount : amount,vertical : vertical, zMinusHalfAmount : zMinusHalfAmount, repeat : repeat || 20,}
-
scope
Object作用域,为空时指的是window
addShapes
(
-
shapes
-
options
Parameters:
-
shapes
ArrayShape对象数组
-
options
Object格式为{curveSegments : curveSegments, amount : amount,vertical : vertical, zMinusHalfAmount : zMinusHalfAmount, repeat : repeat || 20}
getAmount
()
Number
ShapeNode的厚度
Returns:
Number:
厚度
getCurveSegments
()
Number
获取曲线的切片数
Returns:
Number:
切片数
getShapes
()
获取Shape对象数组
Returns:
[Array] 形状
isVertical
()
Boolean
是否竖直方向
Returns:
Boolean:
如果是竖直方向,返回true,否则返回false
setAmount
(
-
amount
设置ShapeNode厚度
Parameters:
-
amount
Number厚度
setCurveSegments
(
-
curveSegments
设置曲线的切片数
Parameters:
-
curveSegments
Number曲线的切片数
setShapes
(
-
shapes
设置形状
Parameters:
-
shapes
ArrayShape对象数组
setVertical
(
-
vertical
设置是否竖直
Parameters:
-
vertical
Boolean如果为true,竖直,如果为false,则水平