Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MCfire-miracle authored Jan 19, 2022
1 parent 8d21770 commit 816c033
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,66 @@
# OpenglModel

Minecraft Skin Display Model
The drawing of the cube requires 12 triangles.


# Triangular loci are determined from the texture
``` java
/*
uv [my]
[tb1] [tb2] [t1]
a--L--b--L--c [1]
| /|\ |
w A w B w
|/ | \|
a--L--b--L--c [2]
a-W-b--L--c-W-d--L--e [3]
|\ | /|\ |\ |
h C h D h E h F h
| \|/ | \| \|
a-W-b--L--c-W-d--L--e [4]
[mx][tb1] [tb2][b1] [b2]
//F
B2 / 64f, H2 / 64f, B2 / 64f, H1 / 64f, B1 / 64f, H1 / 64f
, B1 / 64f, H1 / 64f, B1 / 64f, H2 / 64f, B2 / 64f, H2 / 64f
//D
, TB1 / 64f, H2 / 64f, TB2 / 64f, H2 / 64f, TB2 / 64f, H1 / 64f
, TB2 / 64f, H1 / 64f, TB1 / 64f, H1 / 64f, TB1 / 64f, H2 / 64f
//B
, TB2 / 64f, mY / 64f, T1 / 64f, mY / 64f, T1 / 64f, H1 / 64f
, T1 / 64f, H1 / 64f, TB2 / 64f, H1 / 64f, TB2 / 64f, mY / 64f
//E
, B1 / 64f, H2 / 64f, B1 / 64f, H1 / 64f, TB2 / 64f, H1 / 64f
, TB2 / 64f, H1 / 64f, TB2 / 64f, H2 / 64f, B1 / 64f, H2 / 64f
//A
, TB2 / 64f, mY / 64f, TB1 / 64f, mY / 64f, TB1 / 64f, H1 / 64f
, TB1 / 64f, H1 / 64f, TB2 / 64f, H1 / 64f, TB2 / 64f, mY / 64f
//C
, mX / 64f, H1 / 64f, mX / 64f, H2 / 64f, TB1 / 64f, H2 / 64f
, TB1 / 64f, H2 / 64f, TB1 / 64f, H1 / 64f, mX / 64f, H1 / 64f
*/

# How to use
``` java
ModelRender.java
void DrawFrameStart();

public static float[] BuildModel(
Pointer model/*模型 后 左上 点 */
, float mLength, float mWidth, float mHeight/*长 宽 高 */
, Pointer source/*旋转点*/
, float degree,float off)/*角度*/

# Adjust as needed
``` java
model = JSON.parseObject(Rocker.getJsonFromAssets(context,"other"), FastModel.class);




0 comments on commit 816c033

Please sign in to comment.