Skip to content

Instantly share code, notes, and snippets.

@e1blue
e1blue / gist:0c576a7f6fce0f8bd40c4caa9074c6f8
Created February 23, 2018 12:51 — forked from syuichi-tsuji/gist:ea387588c834bcc23c96
スクロールイベント 上下方向の判定
var start_pos = 0;
$(window).scroll(function(e){
var current_pos = $(this).scrollTop();
if (current_pos > start_pos) {
console.log('down');
} else {
console.log('up');
}
start_pos = current_pos;
});
@e1blue
e1blue / animated-svg-avatar.markdown
Created February 23, 2018 14:04
Animated SVG Avatar

Animated SVG Avatar

Created a login form with an SVG avatar that responds to the input in the email field. Used the GSAP TweenMax library + GSAP's MorphSVG plugin for the animating.

Email validation is very simple and crude just for the purposes of getting this prototype working.

A Pen by Darin S on CodePen.

License.

@e1blue
e1blue / index.html
Created March 21, 2018 13:48
Tower Blocks
<meta name="viewport" content="width=device-width,user-scalable=no">
<div id="container">
<div id="game"></div>
<div id="score">0</div>
<div id="instructions">Click (or press the spacebar) to place the block</div>
<div class="game-over">
<h2>Game Over</h2>
<p>You did great, you're the best.</p>
<p>Click or spacebar to start again</p>
@e1blue
e1blue / 3d-step-counter-card.markdown
Created March 21, 2018 13:49
3D step counter card 🚶
@e1blue
e1blue / jack-in-a-box-factory.markdown
Created March 21, 2018 13:52
Jack in a Box Factory

Jack in a Box Factory

These Jack in a boxes are all made, tested and then discarded straight away. Not sure how this factory makes any money.

Made with GSAP and Three.js. Everything except the face texture was created in code.

A Pen by Steve Gardner on CodePen.

License.

@e1blue
e1blue / index.html
Created March 21, 2018 13:59
Vue'do – A CSS-drawn virtual hair salon using VueJS
<div class="no-props">
<p>Your browser doesn't support CSS Custom Properties. 😭</p>
</div>
<div id="app" :style="{'--skin-shade': lightness, '--hair-color': picked.currentColor}">
<main>
<person :currenthairdo="picked.currentStyle" ref="person"></person>
<skintone :shade="picked.skinShade" @changeshade="updateShade($event)"></skintone>
<hair-styles :selected="picked.currentStyle"></hair-styles>
<hair-color :color="picked.currentColor" @changecolor="updateColor($event)"></hair-color>
@e1blue
e1blue / index.haml
Created March 21, 2018 14:02
Login Box Concept
.brand
%a{:href => 'https://www.jamiecoulter.co.uk',:target => '_blank'}
%img{:src => 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/logo.png'}
.login
.login_title
%span Login to your account
.login_fields
.login_fields__user
.icon
%img{:src => 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/user_icon_copy.png'}
@e1blue
e1blue / fetch-a-movie-card.markdown
Created March 21, 2018 14:07
Fetch a Movie Card
@e1blue
e1blue / index.haml
Created March 28, 2018 12:53
Solar System Explorer in CSS
%h1.logo
Solar explorer
%span in only CSS
%input.planet9{:type => 'radio', :id => 'pluto', :name => 'planet'}
%label.pluto.menu{:for => 'pluto'}
.preview
.info
%h2
.pip
Pluto
@e1blue
e1blue / index.html
Created March 28, 2018 12:56
Push my face around
<canvas id="world" width ="300" height="200"></canvas>