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
#include "ofMain.h" | |
#include "testApp.h" | |
//======================================================================== | |
int main( ){ | |
ofSetupOpenGL(1280,720,OF_WINDOW); | |
ofRunApp(new testApp()); | |
} |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
ofSetCircleResolution(4); | |
// 摩擦係数を設定 |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
ofSetCircleResolution(32); | |
// 画面内のランダムな場所を指定 |
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
#include "Particle.h" // 必ずヘッダーファイルを読み込む | |
void Particle::draw(){ | |
// 円を描画 | |
ofSetHexColor(0x3399cc); | |
ofCircle(position, 10); | |
} |
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
#include "Particle.h" | |
void Particle::setup(ofVec2f _position){ | |
position = _position; | |
} | |
void Particle::draw(){ | |
ofSetHexColor(0x3399cc); | |
ofCircle(position, 10); | |
} |
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
#include "Particle.h" | |
void Particle::setup(ofVec2f _position, ofVec2f _velocity){ | |
// 位置を設定 | |
position = _position; | |
// 初期速度を設定 | |
velocity = _velocity; | |
} | |
// 力をリセット |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
} | |
//-------------------------------------------------------------- |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
// 色の混合を加算合成に | |
ofEnableBlendMode(OF_BLENDMODE_ADD); | |
// 円の解像度 |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
ofEnableBlendMode(OF_BLENDMODE_ADD); | |
// パーティクル画像読込み |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
ofEnableBlendMode(OF_BLENDMODE_ADD); | |
// パーティクル画像読込み |
OlderNewer