This article mainly introduces the super handsome animation effect implemented by the HTML5 game engine LTweenLite, analyzes in detail the download and implementation steps of the LTweenLite animation effect, and provides the complete demo instance source code for readers to download, for more information, see the following example to describe the super handsome animation effects implemented by the HTML5 game engine LTweenLite. We will share this with you for your reference. The details are as follows:
Lufylegend. js is an open-source HTML5 game engine. there are often various animations in the game. some of these animations are flash files and some are video files, this time we will use lufylegend to create a handsome game animation, such.
The test connection is as follows:
Http://lufylegend.com/demo/effects01/
I. preparations
The preparation is of course the download of the engine.
Lufylegend. js engine official website
Http://lufylegend.com/lufylegend
Lufylegend. js engine online API documentation link
Http://lufylegend.com/lufylegend/api
II. Production process
The timeline is usually used for animation. the usage of timeline events in the lufylegend. js engine is as follows:
The code is as follows:
Layer. addEventListener (LEvent. ENTER_FRAME, onframe );
For example, if we keep object A moving to the right, we can do this.
layer.addEventListener(LEvent.ENTER_FRAME, onframe);function onframe(event){ A.x += 1;}
Timeline is the most commonly used method for making games and animations. However, this animation is made using LTweenLite.
LTweenLite is lufylegend. the easing class in the js engine is very useful in the animation production process and even more convenient than the general timeline event. in the subsequent development, all animations are implemented through the LTweenLite easing class.
1. of course, you must first prepare HTML
2017ts01