FPSAnimator is very easy animation library for Android TextureView and SurfaceView.
FPSAnimator is very easy animation library for Android TextureView and SurfaceView.
A simple but powerful Tween / SpriteSheet / ParabolicMotion / animation library for Android TextureView and SurfaceView.
Gradle
dependencies {
// jCenter
compile 'com.daasuu:FPSAnimator:0.2.4.0'
}Include the FPSTextureView widget in your layout. Set FPS by attribute. Default FPS is 30.
If you use SurfaceView , use FPSSurfaceVIew.
In your onCreate method (or onCreateView for a fragment), bind the widget.
private FPSTextureView mFPSTextureView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_easing_sample);
mFPSTextureView = (FPSTextureView) findViewById(R.id.animation_texture_view);
}Create an instance of the DisplayObject, please add it to the FPSTextureView.
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
DisplayObject bitmapDisplay = new DisplayObject();
bitmapDisplay
.with(new BitmapDrawer(bitmap))
.tween()
.toX(1600, windowWidth - bitmap.getWidth(), Ease.BACK_IN_OUT)
.waitTime(1000)
.alpha(1000, 0f)
.alpha(1000, 1f)
.end();
mFPSTextureView
.addChild(bitmapDisplay)
.tickStart();The example above will create a new tween instance that:
This is the implementation of the sample application.
SpriteSheetDrawer spriteSheetDrawer = new SpriteSheetDrawer(
spriteBitmapB,
frameWidth,
frameHeight,
frameNum)
.spriteLoop(true);
DisplayObject displayObject = new DisplayObject();
displayObject
.with(spriteSheetDrawer)
.tween()
.tweenLoop(true)
.transform(-frameWidth, windowHeight / 2)
.toX(3000, windowWidth)
.end();
mFPSTextureView
.addChild(displayObject);………A Container is a nestable display list that allows you to work with compound display elements.
For example you could group arm, leg, torso and head Bitmap instances together into a Person Container, and transform them as a group, while still being able to move the individual parts relative to each other. Children of containers have their transform and alpha properties concatenated with their parent Container.
Containers have some overhead, so you generally shouldn't create a Container to hold a single child.
Please send a pull request if you would like to be added here.
| Icon | Application |
|---|---|
| CChannel |
Copyright 2016 MasayukiSuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.No open issues yet, or sync has not completed.