HTML5 game engine LTweenLite's super handsome animation effect (with demo source code download) _ javascript skills

Source: Internet
Author: User
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  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.