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 class="slide"> | |
<h1>light markup, light css<br> | |
let the content do the work</h1> | |
<style> | |
#e2 .flex-container { | |
display: -webkit-flex; | |
display: flex; | |
} | |
#e2 .flex-item { |
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
module.exports = function() { | |
return "random string"; | |
} |
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
javascript:(function() {$(".js-mini-profile-stats").find(".js-nav").eq(1).html("<strong>" + Math.round(Number($(".js-mini-profile-stats").find("strong").eq(1).text().replace(/,/g,"")) / Number($(".js-mini-profile-stats").find("strong").eq(2).text().replace(/,/g,"")) * 1000) / 1000 + "</strong> ratio");}()); |
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 canvasElem = document.getElementById("game"); | |
var world = boxbox.createWorld(canvasElem); | |
world.createEntity({ | |
name: "player", | |
shape: "circle", | |
radius: 1, | |
image: "pig.png", | |
imageStretchToFit: true, | |
density: 4, |
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
.flex-container { | |
-webkit-flex-flow: column nowrap; | |
flex-flow: column nowrap; | |
} |
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
.flex-container { | |
display: -webkit-flex; | |
display: flex; | |
} |
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
gravity = new b2Vec2(0,9.8), | |
world = new b2World,gravity,true) |
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
// ... | |
physics.click(function(body) { | |
body.ApplyImpulse({ x: 1000, y: -1000 }, body.GetWorldCenter()); | |
}); |
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
body1 = new Body(physics, { color:"red", x: 15, y: 12 }).body; | |
body2 = new Body(physics, { image: img, x: 25, y: 12 }).body; | |
var def1 = new Box2D.Dynamics.Joints.b2RevoluteJointDef(); | |
def1.Initialize(physics.world.GetGroundBody(), | |
body1, | |
body1.GetWorldCenter()); | |
var joint1 = physics.world.CreateJoint(def1); | |
var def2 = new Box2D.Dynamics.Joints.b2RevoluteJointDef(); |
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
body1 = new Body(physics, { color:"red", x: 15, y: 12 }).body; | |
body2 = new Body(physics, { image: img, x: 25, y: 12 }).body; | |
def = new Box2D.Dynamics.Joints.b2PulleyJointDef(); | |
def.Initialize(body1, body2, | |
new b2Vec2(13,0), | |
new b2Vec2(25,0), | |
body1.GetWorldCenter(), | |
body2.GetWorldCenter(), | |
1); |