Coder Social home page Coder Social logo

wasawi / ofximagesequenceplayback Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jkosoy/ofximagesequenceplayback

0.0 2.0 0.0 92 KB

An openFrameworks addon used in conjunction with ofxImageSequence for robust control over a sequence: play, reverse, loop, and ping pong and more.

C++ 100.00%

ofximagesequenceplayback's Introduction

ofxImageSequencePlayback

An openFrameworks library for managing sequences of ofImages in a more robust way. ofxImageSequencePlayback is dependant on the awesome ofxImageSequence addon by Flightphase.

It is also heavily informed by the great work done by Red Paper Heart on their Cinder Block, rph-textureSequence. This addon is as much a port of their Cinder Block as anything.

Features

  • Play sequences in reverse.
  • Loop the infinitely.
  • Ping pong the sequences (forward->reverse->forward->reverse...)
  • Notifications when a sequence completes and is not looping.
  • Pausing, Stopping, changing FPS of a sequence.

Simple Example

Assuming you have a folder in your data directory named "sequence" filled with PNGs...

In your .h file:

ofxImageSequencePlayback mySequence;
void onSequenceCompleted(ofEventArgs &evt);

In your .cpp file:

void testApp::setup() {
	mySequence.loadSequence("sequence",24.0f); // 24 FPS

	ofAddListener(mySequence.sequenceCompleted,this,&testApp::onSequenceCompleted);

	mySequence.play();
}

void testApp::onSequenceCompleted(ofEventArgs &evt) {
    mySequence.stop();
    ofLog(OF_LOG_VERBOSE,"The sequence is complete.");
}

void testApp::update() {
	mySequence.update();
}

void testApp::draw() {
	mySequence.draw();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.