1.加入OBJ lib
2.基礎obj相關程式
3. 去除黑線
stroke(255);
noStroke();
import saito.objloader.*;
OBJModel model ;
void setup()
{
size(800, 600, P3D);
frameRate(30);
model = new OBJModel(this, "dma.obj", "abslute", TRIANGLES);
model.enableDebug();
model.scale(20);
model.translateToCenter();
stroke(255);
noStroke();
}
void draw()
{
translate(width/2, height/2, 0);
model.draw();
}
1. 匯入圖片並加入滑鼠事件
2.加入判斷式,設定最底位置,使圖片不會掉出視窗外
if(catY<450) catVY+=0.98;







沒有留言:
張貼留言