Draw

手机端画图基类

new YS.Draw(ys)

移动,旋转视图以视图中心点画图基类(即手机端画图)
Name Type Description
ys YouScene YouScene对象
See:

Methods

addPoint()Boolean

添加一个控制点
Returns:
是否添加成功

destroy()undefined

销毁(销毁之后所有的方法都将不可以再使用,除非重新new)
Returns:
undefined

isDestroyed()Boolean

绘图是否销毁(销毁则返回true, 未销毁则返回false)
Returns:
是否销毁

removePoint()Boolean

移除最后一个控制点
Returns:
是否删除成功

start()

开始画图

stop()

结速画图

Events

addPointEvent

增加一个控制点事件
Name Type Description
point Object.<XYZ> 增加的点的数据

removePointEvent

删除一个控制点事件
Name Type Description
point Object.<XYZ> 删除的点的数据

startDrawEvent

开始绘图事件

stopDrawEvent

结速绘制事件
Name Type Description
points Array 绘制的所有点的数据