|  |  |  | 
|---|
|  |  |  | DEVICE_SELECTED_EFFECT_COLOR, | 
|---|
|  |  |  | POINT_ROUTE_DIRECTION, | 
|---|
|  |  |  | DEVICE_SPRITE_TINT_DARK, | 
|---|
|  |  |  | ANIMATE_DURING_TIME, | 
|---|
|  |  |  | } from './constants'; | 
|---|
|  |  |  | import { getRouteList } from './http'; | 
|---|
|  |  |  | import PointRoute from "./PointRoute"; | 
|---|
|  |  |  | 
|---|
|  |  |  | const endRotation = sprite.rotation + rotationDifference; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | new TWEEDLE.Tween(sprite) | 
|---|
|  |  |  | .to({ rotation: endRotation }, 1000) | 
|---|
|  |  |  | .to({ rotation: endRotation }, ANIMATE_DURING_TIME) | 
|---|
|  |  |  | .easing(TWEEDLE.Easing.Linear.None) | 
|---|
|  |  |  | .onUpdate(() => { | 
|---|
|  |  |  | // agv | 
|---|
|  |  |  | 
|---|
|  |  |  | agvSprite.data.battery = battery; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | animateRotation(agvSprite, targetRotation, agvRotationOffset); | 
|---|
|  |  |  | animateRotation(agvSprite, targetRotation + agvRotationOffset, agvRotationOffset); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | new TWEEDLE.Tween(agvSprite.position) | 
|---|
|  |  |  | .to({ | 
|---|
|  |  |  | x: codeSprite.position.x, | 
|---|
|  |  |  | y: codeSprite.position.y | 
|---|
|  |  |  | }, 1000) | 
|---|
|  |  |  | }, ANIMATE_DURING_TIME) | 
|---|
|  |  |  | .easing(TWEEDLE.Easing.Linear.None) | 
|---|
|  |  |  | .start(); | 
|---|
|  |  |  | } | 
|---|