There are three main methods: Core animation, core graphic, and OpenGL ES.
Ease of operation: Ca> CG> OpenGL
Performance and functionality: OpenGL> CG> Ca
1. Core Animation
Non-entertainment software uses animations, which is easy to operate.
2. Quartz 2D drawing
Is a 2D drawing engine.
(1) The drawing context is the
ArticleDirectory
Note:
2D animation
Today, we will focus on 2D animation and the storyboard attributes.
Storyboard is a container timeline that provides target information for the timeline it contains. The dashboard can contain any type of timeline, including other container timelines and animations. A
over
: Ease-out from fast to slow
: Ease-in-out from slow to fast to slow
Animation: Animation@-webkit-keyframes (for troubleshooting browser compatibility issues with Google Chrome for example) @-webkit-keyframes Myfirst {0% {width:150px;}30% {width:300px; /* The percentage of excessive animation and the change of pixels over time, the smaller the
Basic training 1 and unity3dpuppet2d of the Unity3d 2D bone animation plug-in Puppet2D
Hello everyone, I am Sun Guangdong. Reprinted please indicate the source: http://blog.csdn.net/u010019717
More comprehensive content please see my game pretty cool address: http://www.unitymanual.com/space-uid-18602.html
1. BONE CREATION
Select a layer for the skeleton.
Click "Create Bone Tool. You will stay in this mode
Summarize:Observer distance Perspective: Specify distances, must have pixel units px[Observer Perspective Perspective-origin: normal Default center]Conversion Transform contains:rotate, translate,scale,matrix,perspectiveChild element 3D effect transform-style : preserve-3d | Flat[Object Transform-origin is typically centered by default][Element back backface-visibility: Generally visible by default]element Rotation Direction rotate:x-axis left hand rule y-axis right-hand ruleTransitions transit
Using unityengine;using System.Collections; public class Anisprite:monobehaviour {private float myTime = 0; private bool Isplay = true; Anisprit. Sprite (4, 6, 0, 0, 1f), meaning: The map is a 4-column, 6-row animation diagram, the graph starts with coordinates (0,0), the total number of frames given 20 frames, frame rate 24, total time 1 seconds public bool Sprite (int columnsize,in T rowsize, float colframestart, float rowframestart, int total
No matter, go first
Code: Only one activity
MainActivity: the code is very simple.
package com.animation.test;import zhuojin.lession15.animation.frame.R;import android.app.Activity;import android.graphics.drawable.AnimationDrawable;import android.graphics.drawable.Drawable;import android.os.Bundle;import android.view.View;import android.widget.ImageView;public class MainActivity extends Activity { ImageView img1=null; @Override public void onCreate(Bundle savedInstanceState) {
Custom view is written in the. m file#import "KKView.h"@interfaceKkview ()/** The Y value of the picture*/@property (nonatomic, assign) cgfloat imgy;@end@implementationKkview- (void) awakefromnib{ //Create Cadisplaylink, default 60 times per secondCadisplaylink *display = [Cadisplaylink displaylinkwithtarget:self selector: @selector (updataimage)]; //adding Cadisplaylink to the message loop[Display Addtorunloop:[nsrunloop mainrunloop] formode:nsdefaultrunloopmode]; }- (void) updataimage{/
Now it is time to introduce how to integrate a * algorithm into the sprite's 2D animation. If you follow my tutorial from the beginning, you will find it is easy.
First, I must introduce a new concept, map. map is the soul of the game, but now in my demo, it is simply a image control. let's add it in our game:
PrivateImageMap;
VoidInitmap () {map =NewImage() {Width = 800, Height = 600, source
About the automatic generation of animation, rain pine Momo has a relatively complete article, links in this click to open the link
Generating Animationclip, controller, and setting state are all references to the code he provides, and here I would like to add an anchor point to the 2d texture.
The main look at the code here, it is worth mentioning that the set custom anchor point must be set to the Sprit
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.