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
#pragma once | |
#include "cinder/Log.h" | |
#include "CinderImGui.h" | |
namespace ImGui { | |
class Logger : public ci::log::Logger { | |
private: | |
ImGuiTextBuffer m_buffer; | |
ImGuiTextFilter m_filter; |
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
(function( exports ) { | |
var onDOMReady = function( fn ) { | |
if ( document.readyState !== 'loading' ) { | |
fn(); | |
} else { | |
document.addEventListener( "DOMContentLoaded", fn ); | |
} | |
}; | |
exports.onDOMReady = onDOMReady; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
namespace cv { | |
// calculates the median value of a single channel | |
// based on https://github.com/arnaudgelas/OpenCVExamples/blob/master/cvMat/Statistics/Median/Median.cpp | |
double median( cv::Mat channel ) | |
{ | |
double m = (channel.rows*channel.cols) / 2; | |
int bin = 0; | |
double med = -1.0; | |
int histSize = 256; |
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
#!/bin/bash | |
# brew install highlight | |
pbpaste | highlight --syntax bash -k 'Andale Mono' -s molokai -O rtf | pbcopy |
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 "DeferredRenderer.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/Log.h" | |
#include "cinder/Buffer.h" | |
#include "DeferredRendererShaders.h" | |
#include "DeferredRenderer_random_png.h" | |
using namespace ci; | |
using namespace std; |
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
#!/bin/bash | |
in="$1" | |
out="$2" | |
fps=6 | |
delay=$(printf "%0.f" $(echo "scale=2;100 / $fps" | bc)) | |
mkdir gif | |
cd gif | |
ffmpeg -i $in -r $fps frame%05d.png |
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
/** | |
* @author qiao / https://github.com/qiao | |
* @author mrdoob / http://mrdoob.com | |
* @author alteredq / http://alteredqualia.com/ | |
* @author WestLangley / https://github.com/WestLangley | |
*/ | |
THREE.OrbitControls = function ( object, domElement ) { | |
THREE.EventDispatcher.prototype.apply( this ); |
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 "Config.h" | |
#include "cinder/app/App.h" | |
#include <boost/algorithm/string.hpp> | |
using namespace std; | |
using namespace ci; | |
Config::Config( const ci::fs::path &path ) : | |
mPath( path ), | |
mJson( app::loadAsset( path ) ) |
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 "BlurFilter.h" | |
#include "Resources.h" | |
using namespace std; | |
using namespace ci; | |
BlurFilter::BlurFilter( int w, int h ) : | |
mFboA( w, h ), | |
mFboB( w, h ) |
NewerOlder