This file contains hidden or 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 { | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| text-rendering: optimizeLegibility; | |
| -webkit-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| } | |
| ::-moz-selection { | |
| background: #4a4a4a; | |
| color: #aaa; |
This file contains hidden or 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
| var array = [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]; | |
| var flattened = [].concat.apply([], array ); | |
| console.log( flattened ); // [1, 2, 3, 4, 5, 6] |
This file contains hidden or 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
| uniform vec2 spriteLength; | |
| uniform sampler2D texture; | |
| varying float progress; | |
| void main() { | |
| vec2 texCoord = vec2( | |
| gl_PointCoord.x / spriteLength.x + 1. / spriteLength.x * floor( spriteLength.x * progress * spriteLength.y ), | |
| 1. - ( gl_PointCoord.y / spriteLength.y + 1. / spriteLength.y * floor( spriteLength.y * progress ) ) |
This file contains hidden or 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 shareDepth ( rendertarget1, rendertarget2 ) { | |
| // to force setup RT1, not for rendering | |
| renderer.render( new THREE.Scene(), new THREE.Camera(), rendertarget1 ); | |
| // to force setup RT2, not for rendering | |
| renderer.render( new THREE.Scene(), new THREE.Camera(), rendertarget2 ); | |
| // NOTE |
This file contains hidden or 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
| div{ | |
| color:red; | |
| } | |
| @supports ( -ms-accelerator:true ) { | |
| /*only for edge*/ | |
| div{ | |
| color:blue; | |
| } | |
This file contains hidden or 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
| margin: 0 calc( -50vw + 50% ); |
This file contains hidden or 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
| // http://docs.unity3d.com/ja/current/ScriptReference/Mathf.DeltaAngle.html | |
| var getDeltaAngle = function () { | |
| var TAU = 2 * Math.PI; | |
| var mod = function ( a, n ) { return ( a % n + n ) % n; } | |
| return function ( current, target ) { | |
| var a = mod( ( current - target ), TAU ); |
This file contains hidden or 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
| @media screen and (max-width: 320px) { | |
| .Notifier { | |
| $block: &; | |
| display: block; | |
| &_Main { | |
| color: green; | |
| @at-root #{$block}.-error #{&}{ | |
| color: red; |
This file contains hidden or 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
| // app.js | |
| var http = require( 'http' ); | |
| var port = process.env.PORT || 3000; | |
| http.createServer( function( req, res ) { | |
| res.writeHead( 200, { 'Content-Type': 'text/plain' } ); | |
| res.end( 'Hello World\n' ); | |
| } ).listen( port ); |
This file contains hidden or 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
| var a = function( val ) { | |
| return new Promise( function( onFulfilled, onRejected ) { | |
| setTimeout( function() { onFulfilled( 1 ); }, 2000 ); | |
| } ); | |
| }; |