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> | |
<body> | |
playing with gist | |
</body> | |
</html> |
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
define([ | |
], function(){ | |
return function(gfxSurfaceW, gfxSurfaceH, canvasW, canvasH, borderThickness, textOffset){ | |
var surfaceRatio = (gfxSurfaceW * 1.0) / (gfxSurfaceH * 1.0); | |
var canvasRatio = (canvasW * 1.0) / (canvasH * 1.0); | |
if(canvasRatio > surfaceRatio){ | |
//stick box to left | |
var xRemaining = gfxSurfaceW - (textOffset * 2); | |
var pxPerInch = xRemaining / (canvasW + (borderThickness * 2)); | |
var x = (borderThickness * pxPerInch) + textOffset; |
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
{ | |
"entities": [ | |
{ | |
"x": 1, | |
"y": 238, | |
"halfWidth": 12.5, | |
"halfHeight": 256, | |
"staticBody": true, | |
"zone": false, | |
"type": "Rectangle", |
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
{ | |
"entities": [ | |
{ | |
"x": 427.5, | |
"y": 606.5, | |
"halfWidth": 425.5, | |
"halfHeight": 16.5, | |
"staticBody": true, | |
"zone": false, | |
"type": "Rectangle", |
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
{ | |
"entities": [ | |
{ | |
"points": [ | |
{ | |
"x": -137.33333333333334, | |
"y": -119.66666666666666 | |
}, | |
{ | |
"x": 276.66666666666663, |
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
{ | |
"entities": [ | |
{ | |
"x": 334, | |
"y": 198, | |
"radius": 12.041594578792296, | |
"staticBody": true, | |
"sensor": false, | |
"type": "Circle", | |
"id": "pin" |
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
{ | |
"entities": [ | |
{ | |
"x": 334, | |
"y": 198, | |
"radius": 12.041594578792296, | |
"staticBody": true, | |
"sensor": false, | |
"type": "Circle", | |
"id": "pin" |
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> | |
<head> | |
<script> | |
dojoConfig = { | |
baseUrl: './js', | |
parseOnLoad: false, | |
defaultDuration:1, | |
packages: [{ | |
name: "app", //my own stuff |
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
define([ | |
'server/promised/sessions', | |
'when', | |
'lodash', | |
'dojo/node!https', | |
'server/users/main', | |
'dojo/node!url' | |
], function(sessions, when, _, https, users, url){ | |
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
{ | |
"entities": [ | |
{ | |
"x": 264, | |
"y": 279, | |
"halfWidth": 6, | |
"halfHeight": 23, | |
"staticBody": false, | |
"sensor": false, | |
"type": "Rectangle", |
OlderNewer