Skip to content
scene transition manager for openframeworks
C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example_carousel
example_methods
example_simple_transition changed dependent addon. Mar 28, 2019
images changed dependent addon. Mar 28, 2019
src fix miss sentence Apr 4, 2019
.gitattributes
LICENSE
README.md

README.md

ofxSceneManager

Overview

referenced by https://github.com/kokinomura/ofxSceneManager.
Added function, transition mode "Slide", function "delay".
Added basic events. mouse move mouse scrolled, mouse exits, mouse entered.
Changed dependency addon ofxTween to ofxEasing.

Dependency

ofxEaging

crousel

simple fade in out

Getting Started

  1. create class and Inherit ofxScene
#include "ofxScene.h"

class Scene: public ofxScene {
public:

	//methods...

}
  1. Instantiate ofxSceneManager and add scenes;
class ofApp : public ofBaseApp {
public:

	void setup();
	void update();
	void draw();

    ofxSceneManager scenes;

}
void ofApp::setup() {
    
    Scene a = make_shared<ofxScene>();
    Scene b = make_shared<ofxScene>();

    scenes.addScene(a);
    scenes.addScene(b);

}
  1. setup ofxSceneManger and run
void ofApp::setup() {
    Scene a = make_shared<ofxScene>();
    Scene b = make_shared<ofxScene>();

    scenes.addScene(a);
    scenes.addScene(b);

    //screen size, width, height
    scenes.setup(600, 600);
}

void ofApp::update() {
    scenes.update();
}

void ofApp::draw() {
    scenes.draw();
}

Functionality

Transition

void ofApp::setup() {

    scenes.setExitByTime(false);
    scenes.setSceneDuration(0.3, 0.3);
    scenes.setTransitionMode(ofxSceneTransition::FADE);
    scenes.setup(ofGetWidth(), ofGetHeight());

}

void ofApp::keyPressed(int key){
  
    if (key == ' ') scenes.changeScene();
  
}
You can’t perform that action at this time.