public class ScaleController
使用双指张合 PinchGestureRecognizer
操控 BaseTransformableNode
的缩放。将 BaseTransformableNode
缩放到低于最小值/最大值范围时,应用可调性弹跳。
常量
float | 默认时区 | |
float | DEFAULT_MAX_SCALE | |
float | DEFAULT_MIN_SCALE | |
float | DEFAULT_SENSITIVITY |
公共构造函数
公共方法
布尔值 | |
浮点数 | |
浮点数 | |
浮点数 | |
浮点数 | |
无效 | |
无效 | |
无效 | |
无效 | |
无效 |
setElasticity(浮点弹性)
|
无效 |
setMaxScale(float maxScale)
|
无效 |
setMinScale(浮点数下限)
|
无效 |
setSensitivity(浮点灵敏度)
|
继承的方法
常量
public static final float DEFAULT_ELASTIcity
常量值:0.15
public static final float DEFAULT_MAX_SCALE
常量值:1.75
public static final float DEFAULT_MIN_SCALE
常量值:0.75
public static final float DEFAULT_SENSITIVITY
常量值:0.75
公共构造函数
public ScaleController (BaseTransformableNode 可变形节点、PinchGestureRecognizer gestureRecognizer)
参数
可变形节点 | |
---|---|
手势识别器 |
公共方法
public float getElasticity ()
public float getMaxScale ()
public float getMinScale ()
公开浮点数 getSensitivity ()
public void onUpdated (Node Node, FrameTime frameTime)
向监听器发出调用 onUpdate(FrameTime)
的通知。
参数
节点 | 已更新的节点 |
---|---|
帧时间 | 提供当前帧的时间信息 |
public void setElasticity (float elasteity)
参数
弹性 |
---|
public void setMaxScale (float maxScale)
参数
最大比例 |
---|
public void setMinScale (float minScale)
参数
最小缩放 |
---|
public void setSensitivity (float sensitivity)
参数
灵敏度 |
---|