This file contains 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
resize: function(){ | |
this.$maskInner.css({ | |
'position': 'absolute', | |
'left': -(this.getSkewDifference() * 0.5) | |
}); | |
}, | |
getRadians: function(deg) { | |
return deg * (Math.PI / 180); | |
}, |
This file contains 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
/** | |
* Setup your Lazy Line element. | |
* see README file for more settings | |
*/ | |
var $logo = $('#logo'); | |
$logo.lazylinepainter({ | |
'svgData': svgData, | |
'strokeWidth': 7, |
This file contains 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([ | |
'jquery', | |
'underscore', | |
'backbone', | |
'config', | |
'pixi', | |
'shims/shim_resn_utils', | |
'game/games/gun_fight/view/gun_fight_gunman_view', | |
'game/games/gun_fight/view/gun_fight_obstacles_view' | |
], function( |
This file contains 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() { | |
'use strict'; | |
return { | |
// tg dimensions, depending on game state | |
obstacles: { | |
wRatio: 0.9, | |
hRatio: 0.33, |
This file contains 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([ | |
'jquery', | |
'underscore', | |
'backbone', | |
'config', | |
'shims/shim_resn_utils', | |
'TweenMaxEasing', | |
'game/games/gun_fight/model/gun_fight_target_data' | |
], function( | |
$, |
This file contains 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 self = this; | |
$.get(Config.CDN+'/svg/sprites.svg', function(response){ | |
var importedSVGRootElement = document.importNode(response.documentElement,true); | |
$(".svg-defs").append(importedSVGRootElement); | |
}, "xml"); |
This file contains 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() { | |
/** | |
* Used to dynamically create svg | |
*/ | |
'use strict'; | |
return { | |
createSVG: function(settings) { |
This file contains 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_controller.js | |
// Load / appending needs to happen on initial load of proj for references to svg defs to work | |
loadSvgs: function () { | |
$.get(Config.CDN + '/svg/sprites.svg', this.onSvgLoad, "xml"); | |
}, | |
// append to | |
onSvgLoad: function (response) { | |
var importedSVGRootElement = document.importNode(response.documentElement, true); |
This file contains 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
preloader:null, | |
cssUrl:'/css/drawingToolFonts.css', | |
loadDrawingCss:function(){ | |
this.preloader = new PreloadJS(false); | |
this.preloader.addEventListener("complete", this.onDrawingCssLoaded ); | |
var item = { id: this.cssUrl, src:this.cssUrl , type:PreloadJS.CSS }; | |
this.preloader.loadFile(item, false, Config.CDN); | |
this.preloader.load(); | |
}, |
This file contains 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
initialize: function(){ | |
_.bindAll(this); | |
this.slug = this.model.get('slug'); | |
this.view = {}; | |
if(this.slug === 'home') | |
this.view = new Home({el : $('#home')}); |
NewerOlder