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
-moz-transition:all .15s ease-out; | |
-o-transition:all .15s ease-out; | |
-webkit-transition:all .15s ease-out; | |
transition:all .15s ease-out; | |
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
-moz-font-smoothing:antialiased; | |
-moz-text-size-adjust:100%; | |
-ms-font-smoothing:antialiased; | |
-ms-text-size-adjust:100%; | |
-webkit-font-smoothing:antialiased; | |
-webkit-text-size-adjust:100%; |
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
private const int MaxDepthDistance = 4000; | |
private const int MinDepthDistance = 850; | |
private const int MaxDepthDistanceOffset = 3150; | |
public static BitmapSource SliceDepthImage(this DepthImageFrame image, int min = 20, int max = 1000) | |
{ | |
int width = image.Width; | |
int height = image.Height; | |
//var depthFrame = image.Image.Bits; |
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
Image<Bgr, Byte> openCVImg = new Image<Bgr, byte>(depthBmp.ToBitmap()); | |
Image<Gray, byte> gray_image = openCVImg.Convert<Gray, byte>(); | |
using (MemStorage stor = new MemStorage()) | |
{ | |
Contour<System.Drawing.Point> contours = gray_image.FindContours( | |
Emgu.CV.CvEnum.CHAIN_APPROX_METHOD.CV_CHAIN_APPROX_SIMPLE, | |
Emgu.CV.CvEnum.RETR_TYPE.CV_RETR_EXTERNAL, |
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
public static System.Drawing.Bitmap ToBitmap(this BitmapSource bitmapsource) | |
{ | |
System.Drawing.Bitmap bitmap; | |
using (var outStream = new MemoryStream()) | |
{ | |
// from System.Media.BitmapImage to System.Drawing.Bitmap | |
BitmapEncoder enc = new BmpBitmapEncoder(); | |
enc.Frames.Add(BitmapFrame.Create(bitmapsource)); | |
enc.Save(outStream); | |
bitmap = new System.Drawing.Bitmap(outStream); |
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 inferInputModel() { | |
if (window.navigator.msPointerEnabled) { | |
return 'pointer'; | |
} else if (window.ontouchstart !== undefined) { | |
return 'touch'; | |
} else { | |
return 'unknown'; | |
} | |
} |
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
//---------------------HTML | |
<footer id="footer"> | |
<button id="btnExpand" class="expander" type="button"></button> | |
... | |
</footer> | |
//---------------------CSS | |
footer.expander{ | |
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
/*-------------------- | |
Usage: | |
if (Modernizr.csstransforms3d) { | |
this.set3dTransform(this.scroller, xValue + "px", yValue + "px"); | |
this.set3dTransform(this.parallaxBg, xValue/12 + "px", 0 + "px"); | |
} | |
else{ | |
this.set2dTransform(this.scroller, xVAlue + "px", yValue + "px"); | |
this.set2dTransform(this.parallaxBg, xVAlue / 12 + "px", yValue + "px"); | |
} |
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
// shim layer with setTimeout fallback | |
window.requestAnimFrame = (function(){ | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function(/* function */ callback, /* DOMElement */ element){ | |
window.setTimeout(callback, 1000 / 60); | |
}; |
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
/*----------------------------------------- | |
Usage | |
var list = document.getElementById('dataList'); //Any Div with Items in it | |
Scroller.init(list, 'x', _hasTouch); //'x' or 'y' | |
-----------------------------------------------*/ | |
var Scroller = new | |
function() { | |
//Public Properties |