Mock of an idea for a map generator for an isometric game.
A Pen by Miguel Ángel Pérez on CodePen.
Mock of an idea for a map generator for an isometric game.
A Pen by Miguel Ángel Pérez on CodePen.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>About - Document</title> | |
<script src="js/jquery-1.11.1.min.js"></script> | |
<script src="js/jquery.smoothState.js"></script> | |
<script src="js/scripts.js"></script> | |
</head> | |
<body> |
By default, jQuery.smoothState.js will:
A typical implementation of jQuery.smoothState.js using a simple fade effect for page transitoins.
An example of how to implement cool page transitions with jQuery.smoothState.js.
// DISQUS | |
var MP = MP || {}; | |
MP.comments = { | |
init: function(){ | |
"use strict"; | |
var disqus_shortname = 'miguelperez'; | |
(function() { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; |
// Contents of functions.js | |
;(function($) { | |
'use strict'; | |
var $body = $('html, body'), | |
content = $('#main').smoothState({ | |
// Runs when a link has been activated | |
onStart: function(url, $container) { | |
// toggleAnimationClass() is a public method | |
// for restarting css animations with a class | |
content.toggleAnimationClass('is-exiting'); |
var | |
/** | |
* Fires a custom event when all animations are complete | |
* @param {object} $element - jQuery object that should trigger event | |
* | |
*/ | |
triggerAllAnimationEndEvent = function ($element) { | |
var animationCount = 0, | |
animationstart = "animationstart webkitAnimationStart oanimationstart MSAnimationStart", |
<p>Hello world</p> |