FlattenPolygonCollection

new YS.FlattenPolygonCollection(i3d, options)

压平集合,可以对i3d的实例进行多区域压平
Name Type Description
i3d I3d 需要应用shader的模型实例
options Object optional 对象有下面这些属性
Name Type Default Description
polygons Array.<FlattenPolygon> [] optional 区域数组
enabled Boolean true optional 是否启用shader
Implements:

Members

enabled : Boolean

获取或设置该shader是否启用

length : Number

获取区域的数量

Methods

add(flattenPolygon)Boolean

添加一个区域
Name Type Description
flattenPolygon FlattenPolygon 区域
Returns:
添加成功返回true, 添加失败返回false

clean()

清空所有区域
Implements:

destroy()

销毁该shader
Implements:

remove(flattenPolygon)Boolean

删除一个区域
Name Type Description
flattenPolygon FlattenPolygon 区域
Returns:
删除返回true, 删除失败返回false