Development Tutorial Video Using Library

Development environment:

It is presumed to use the Eclipse and Android developed plug-in.
It is recommended to use Android SDK version OS2.3 or more.
OpenGL ES is used for drawing.

Library setting:

From the project, select Property - Build-pass of Java - Library - Add Jar, and specify "live2d_android.jar.
For order or export, add a check mark to library.

Retrieve a model or a Texture:

1.Store a model or a Texture in package/assets.
2.Use the following command to retrieve a file from assets. 
  1. InputStream in = Context.getAssets().open( "file pasth" ) ;
Enter a path from assets to retrieve the file.

3.Then pass the "in" variable where it is needed.

Use Live2DModelAndroid class for the model.

Set the model size or the position:

With Android, OpenGL ES methods are used for drawing.
Use the code provided below to set a model's size.

  1. // Adjust the position
  2. gl.glTranslatef( 50, 0, 0) ;     // ・・・[1]

  3. // Adjust the size
  4. float scale = 1.0f ;
  5. gl.glScalef( scale, scale, 1) ;  // ・・・[2]

[1]: Adjusting the model position.
The first parameter is the migration length of X, the second parameter is of Y, and the third parameter is of Z.
You do not move the Z axis basically.

[2]: Setting the ratio of zoom in/out of the model.
The first parameter is to set X, the second parameter is Y, and the third parameter is Z.
You basically set the same value for X and Y, and set 1 for Z.

Tutorial video of simple version SDK sample:

The simple version SDK sample is consisted from the basic elements to move Live2D on Android.
Refer to the following pages about the element which is dependent to Android.

    1.Create a View of OpenGL