-
-
Save drakeirving/8283a5ed47061c19bc4cc4d26e849226 to your computer and use it in GitHub Desktop.
Junko BG Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task TCardBG(){ | |
let v = 384; | |
let obj = ObjPrim_Create(OBJ_PRIMITIVE_2D); | |
ObjPrim_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP); | |
ObjPrim_SetTexture(obj, test); | |
ObjPrim_SetVertexCount(obj, (v+1)*2); | |
ObjRender_SetPosition(obj, 192, 128, 0); | |
let x = 0; | |
loop{ | |
ascent(i in 0..v+1){ | |
ObjPrim_SetVertexUVT(obj, i*2, 64+x, 0+(512/v)*i); | |
ObjPrim_SetVertexUVT(obj, i*2+1, 448+x, 0+(512/v)*i); | |
} | |
ascent(i in 0..v+1){ | |
ObjPrim_SetVertexPosition(obj, i*2, 384*cos((360/v)*i-90), 384*sin((360/v)*i-90), 0); | |
ObjPrim_SetVertexPosition(obj, i*2+1, 0, 0, 0); | |
} | |
x++; | |
yield; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment