Thomas Alexander Heatherwick 伦敦翻滚桥动画效果:
SU简化模拟旋转动画效果▼
上一讲我们实现了平滑拉高的效果,今天继续带小可爱们来看一下如何实平滑移动和平滑旋转效果。
时钟那一件我们提到了Geom::Transformation ,我们再来看下官方的demo:
移动translation
vector = Geom::Vector3d.new(0, 1, 0)
tr = Geom::Transformation.translation(vector)
旋转rotation
point = Geom::Point3d.new(10, 20, 0)
vector = Geom::Vector3d.new(0, 0, 1)
angle = 45.degrees # Return 45 degrees in radians.
transformation = Geom::Transformation.rotation(point, vector, angle)
缩放scaling
point = Geom::Point3d.new(20, 30, 0)
scale = 10
tr = Geom::Transforma