类型 函数 库 transition.* 返回值 表 修订版 版本 2024.3703 关键字 缓动、动画、转换、补间、插值 另请参阅 转换(指南) 缓动
类似于 transition.to(),但不同之处在于开始属性值指定在参数表中,而最终值是在调用前对象对应的属性值。
transition.from( target, params )
表. 指定转换属性的表。请参阅 transition.to() 的参数引用。
local square = display.newRect( 0, 0, 100, 100 ) local w,h = display.contentWidth, display.contentHeight local function listener( obj ) print( "Transition completed on object: " .. tostring( obj ) ) end -- Move square from bottom right corner to upper left corner transition.from( square, { time=1500, x=(w-50), y=(h-50), onComplete=listener } )