ModelMoveAnimation

模型路径移动动画

new YS.ModelMoveAnimation(ys, options)

模型路径移动动画,构造此类可以使用基类Animation的所有属性和方法
Name Type Description
ys Object YouScene对象
options Object 对象有下面这些属性:
Name Type Default Description
points Array.<XYZ> 路径点坐标
speed Number 10 optional 移动速度(m/s)
isRotate Boolean true optional 是否需要计算转角
rotateSpeed Number 10 optional 转角速度(度/s)
show Boolean true optional 模型是否显示
uri String 模型的地址
scale Boolean 1 optional 模型的放大系数
minimumPixelSize Number 128 optional 指定飞机显示的模型大小.当指定大小时时,无论是否缩放,都将显示同样的大小,当为0时,缩放将会在影响模型观察的大小
Implements:
Example:
var points = [
	 {x: 114.00840184155334, y: 29.854931486205555, z: 100},
	 {x: 114.01128800525507, y: 29.852535468795992, z: 50},
	 {x: 114.01604140807802, y: 29.850976415142217, z: 60},
	 {x: 114.02144096472733, y: 29.85308012436106, z: 40},
	 {x: 114.02227970191544, y: 29.85887161080766, z: 50},
	 {x: 114.01921171429447, y: 29.86353108232961, z: 70},
	 {x: 114.01409554961663, y: 29.863956930494343, z: 90},
	 {x: 114.00945726901081, y: 29.858707666373917, z: 100},
	 {x: 114.00867131010236, y: 29.85653088576768, z: 60},
	 {x: 114.00840184155334, y: 29.854931486205555, z: 50},
]
var animation = new YS.ModelMoveAnimation(youScene, {
	  points: points,
   uri: YSLOCALURL + 'Assets/model/Air.glb'
});
animation.fly();

Members

minimumPixelSize : Number

模型显示的像素大小
Default Value: 0

scale : Number

模型的放大系数
Default Value: 1

show : Boolean

获取或设置模型是否显示
Default Value: true

uri : String

模型的地址
Default Value: {"get":"","set":""}