mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 10:35:51 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
68b3144b46
11 changed files with 161 additions and 111 deletions
BIN
app/assets/images/level/loading_bar_fill.png
Normal file
BIN
app/assets/images/level/loading_bar_fill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6 KiB |
BIN
app/assets/images/level/loading_bar_rim.png
Normal file
BIN
app/assets/images/level/loading_bar_rim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -28,7 +28,7 @@ module.exports = class Tracker
|
||||||
console.log "Would track analytics pageview: /#{name}" if debugAnalytics
|
console.log "Would track analytics pageview: /#{name}" if debugAnalytics
|
||||||
return unless @isProduction and analytics? and not me.isAdmin()
|
return unless @isProduction and analytics? and not me.isAdmin()
|
||||||
if includeIntegrations
|
if includeIntegrations
|
||||||
options.integrations = {'All': false}
|
options = integrations: {'All': false}
|
||||||
for integration in includeIntegrations
|
for integration in includeIntegrations
|
||||||
options.integrations[integration] = true
|
options.integrations[integration] = true
|
||||||
analytics.page null, "/#{name}", null, options
|
analytics.page null, "/#{name}", null, options
|
||||||
|
|
|
@ -86,8 +86,7 @@ module.exports = class MusicPlayer extends CocoClass
|
||||||
return if @inMenu
|
return if @inMenu
|
||||||
@inMenu = true
|
@inMenu = true
|
||||||
@previousMusic = @currentMusic
|
@previousMusic = @currentMusic
|
||||||
terrain = (e.terrain ? 'Dungeon').toLowerCase()
|
file = "/music/music-menu"
|
||||||
file = "/music/music-menu-#{terrain}"
|
|
||||||
Backbone.Mediator.publish 'music-player:play-music', file: file, play: true, delay: 1000
|
Backbone.Mediator.publish 'music-player:play-music', file: file, play: true, delay: 1000
|
||||||
|
|
||||||
onExitMenu: (e) ->
|
onExitMenu: (e) ->
|
||||||
|
|
|
@ -163,8 +163,8 @@ $itemSlotGridHeight: 51px
|
||||||
background-position: (-4 * $itemSlotInnerWidth) 0px
|
background-position: (-4 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
&[data-slot="minion"]
|
&[data-slot="minion"]
|
||||||
left: 10px + ($itemSlotGridWidth * 0)
|
left: 10px + ($itemSlotGridWidth * 5)
|
||||||
top: 15px + ($itemSlotGridHeight * 0)
|
top: 15px + ($itemSlotGridHeight * 1)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-1 * $itemSlotInnerWidth) 0px
|
background-position: (-1 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
@ -172,15 +172,11 @@ $itemSlotGridHeight: 51px
|
||||||
left: 10px + ($itemSlotGridWidth * 0)
|
left: 10px + ($itemSlotGridWidth * 0)
|
||||||
top: 15px + ($itemSlotGridHeight * 0)
|
top: 15px + ($itemSlotGridHeight * 0)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-3 * $itemSlotInnerWidth) 0px
|
background-position: (-2 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
// Only for wizards...
|
|
||||||
//&[data-slot="spellbook"] .placeholder
|
|
||||||
// background-position: (-2 * $itemSlotInnerWidth) 0px
|
|
||||||
|
|
||||||
&[data-slot="wrists"]
|
&[data-slot="wrists"]
|
||||||
left: 10px + ($itemSlotGridWidth * 0)
|
left: 10px + ($itemSlotGridWidth * 0)
|
||||||
top: 15px + ($itemSlotGridHeight * 0)
|
top: 15px + ($itemSlotGridHeight * 2)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-5 * $itemSlotInnerWidth) 0px
|
background-position: (-5 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
@ -198,7 +194,7 @@ $itemSlotGridHeight: 51px
|
||||||
|
|
||||||
&[data-slot="torso"]
|
&[data-slot="torso"]
|
||||||
left: 10px + ($itemSlotGridWidth * 5)
|
left: 10px + ($itemSlotGridWidth * 5)
|
||||||
top: 15px + ($itemSlotGridHeight * 2)
|
top: 15px + ($itemSlotGridHeight * 3)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-8 * $itemSlotInnerWidth) 0px
|
background-position: (-8 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
@ -228,7 +224,7 @@ $itemSlotGridHeight: 51px
|
||||||
|
|
||||||
&[data-slot="head"]
|
&[data-slot="head"]
|
||||||
left: 10px + ($itemSlotGridWidth * 5)
|
left: 10px + ($itemSlotGridWidth * 5)
|
||||||
top: 15px + ($itemSlotGridHeight * 1)
|
top: 15px + ($itemSlotGridHeight * 2)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-13 * $itemSlotInnerWidth) 0px
|
background-position: (-13 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
@ -240,19 +236,19 @@ $itemSlotGridHeight: 51px
|
||||||
|
|
||||||
&[data-slot="gloves"]
|
&[data-slot="gloves"]
|
||||||
left: 10px + ($itemSlotGridWidth * 0)
|
left: 10px + ($itemSlotGridWidth * 0)
|
||||||
top: 15px + ($itemSlotGridHeight * 2)
|
top: 15px + ($itemSlotGridHeight * 3)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-15 * $itemSlotInnerWidth) 0px
|
background-position: (-15 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
&[data-slot="left-hand"]
|
&[data-slot="left-hand"]
|
||||||
left: 10px + ($itemSlotGridWidth * 5)
|
left: 10px + ($itemSlotGridWidth * 5)
|
||||||
top: 15px + ($itemSlotGridHeight * 3)
|
top: 15px + ($itemSlotGridHeight * 4)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-16 * $itemSlotInnerWidth) 0px
|
background-position: (-16 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
&[data-slot="right-hand"]
|
&[data-slot="right-hand"]
|
||||||
left: 10px + ($itemSlotGridWidth * 0)
|
left: 10px + ($itemSlotGridWidth * 0)
|
||||||
top: 15px + ($itemSlotGridHeight * 3)
|
top: 15px + ($itemSlotGridHeight * 4)
|
||||||
.placeholder
|
.placeholder
|
||||||
background-position: (-17 * $itemSlotInnerWidth) 0px
|
background-position: (-17 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
@ -272,6 +268,18 @@ $itemSlotGridHeight: 51px
|
||||||
border: 2px solid black
|
border: 2px solid black
|
||||||
background-color: white
|
background-color: white
|
||||||
|
|
||||||
|
&.Wizard #equipped .item-slot
|
||||||
|
&[data-slot="right-hand"] .placeholder
|
||||||
|
background-position: (-20 * $itemSlotInnerWidth) 0px
|
||||||
|
&[data-slot="left-hand"] .placeholder
|
||||||
|
background-position: (-3 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
&.Ranger #equipped .item-slot
|
||||||
|
&[data-slot="right-hand"] .placeholder
|
||||||
|
background-position: (-18 * $itemSlotInnerWidth) 0px
|
||||||
|
&[data-slot="left-hand"] .placeholder
|
||||||
|
background-position: (-19 * $itemSlotInnerWidth) 0px
|
||||||
|
|
||||||
|
|
||||||
//- dragging styling
|
//- dragging styling
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
background-size: contain
|
background-size: contain
|
||||||
|
|
||||||
#level-loading-view
|
#level-loading-view
|
||||||
color: blue
|
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
position: absolute
|
position: absolute
|
||||||
|
@ -21,60 +20,85 @@
|
||||||
|
|
||||||
.loading-details
|
.loading-details
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 20px
|
top: 86px
|
||||||
left: 50%
|
left: 50%
|
||||||
$WIDTH: 1000px
|
$WIDTH: 450px
|
||||||
width: $WIDTH
|
width: $WIDTH
|
||||||
min-height: 60px
|
height: 450px
|
||||||
margin-left: (-$WIDTH / 2)
|
margin-left: (-$WIDTH / 2)
|
||||||
z-index: 100
|
z-index: 100
|
||||||
background-color: rgba(220, 255, 230, 0.6)
|
background: transparent url(/images/level/code_editor_background.png) no-repeat
|
||||||
|
background-size: 100% 100%
|
||||||
color: darkslategray
|
color: darkslategray
|
||||||
font-size: 15px
|
font-size: 15px
|
||||||
border-radius: 30px
|
padding: 80px 80px 40px 80px
|
||||||
padding: 10px
|
|
||||||
text-align: center
|
text-align: center
|
||||||
// http://matthewlein.com/ceaser/ Bounce down a bit, then snap up.
|
// http://matthewlein.com/ceaser/ Bounce down a bit, then snap up.
|
||||||
@include transition(top $UNVEIL_TIME cubic-bezier(0.285, -0.595, 0.670, -0.600))
|
@include transition(top $UNVEIL_TIME cubic-bezier(0.285, -0.595, 0.670, -0.600))
|
||||||
|
font-family: 'Open Sans Condensed'
|
||||||
.load-progress
|
|
||||||
position: absolute
|
|
||||||
left: 2%
|
|
||||||
top: 0px
|
|
||||||
opacity: 0.6
|
|
||||||
width: 96%
|
|
||||||
height: 40px
|
|
||||||
margin: 10px auto 0
|
|
||||||
|
|
||||||
.progress
|
|
||||||
height: 100%
|
|
||||||
|
|
||||||
.progress-bar
|
|
||||||
width: 1%
|
|
||||||
height: 100%
|
|
||||||
transition-duration: 0
|
|
||||||
|
|
||||||
&.active .progress-bar
|
|
||||||
transition-duration: 1.2s
|
|
||||||
|
|
||||||
#tip-wrapper
|
|
||||||
position: relative
|
|
||||||
z-index: 2
|
|
||||||
top: 10px
|
|
||||||
|
|
||||||
.level-loading-goals
|
.level-loading-goals
|
||||||
margin: 30px auto 10px
|
text-align: left
|
||||||
width: 400px
|
|
||||||
|
|
||||||
.panel-heading
|
.goals-title
|
||||||
font-size: 24px
|
font-size: 32px
|
||||||
|
color: black
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
.list-group-item
|
li
|
||||||
font-size: 20px
|
font-size: 20px
|
||||||
|
color: black
|
||||||
|
|
||||||
.start-level-button
|
.progress-or-start-container
|
||||||
font-size: 40px
|
position: absolute
|
||||||
font-variant: small-caps
|
bottom: 95px
|
||||||
|
width: 261px
|
||||||
|
height: 80px
|
||||||
|
left: 80px
|
||||||
|
|
||||||
|
.load-progress
|
||||||
|
width: 100%
|
||||||
|
height: 36px
|
||||||
|
margin: 20px auto 0 auto
|
||||||
|
|
||||||
|
.progress
|
||||||
|
height: 100%
|
||||||
|
position: relative
|
||||||
|
background-color: transparent
|
||||||
|
|
||||||
|
.progress-bar
|
||||||
|
width: 1%
|
||||||
|
height: 100%
|
||||||
|
transition-duration: 0
|
||||||
|
border-radius: 9px
|
||||||
|
background: transparent url(/images/level/loading_bar_fill.png) no-repeat
|
||||||
|
|
||||||
|
&.active .progress-bar
|
||||||
|
transition-duration: 1.2s
|
||||||
|
|
||||||
|
.rim
|
||||||
|
position: absolute
|
||||||
|
left: 0
|
||||||
|
top: 0
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
background: transparent url(/images/level/loading_bar_rim.png) no-repeat
|
||||||
|
background-size: 100% 100%
|
||||||
|
|
||||||
|
.start-level-button
|
||||||
|
display: none
|
||||||
|
width: 100%
|
||||||
|
margin: 0px auto
|
||||||
|
font-size: 40px
|
||||||
|
font-variant: small-caps
|
||||||
|
|
||||||
|
#tip-wrapper
|
||||||
|
position: absolute
|
||||||
|
z-index: 2
|
||||||
|
bottom: 40px
|
||||||
|
left: 25px
|
||||||
|
width: 401px
|
||||||
|
color: #666
|
||||||
|
|
||||||
.left-wing, .right-wing
|
.left-wing, .right-wing
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
left: 0px
|
left: 0px
|
||||||
height: 100%
|
height: 100%
|
||||||
right: -10px
|
right: -10px
|
||||||
|
border: 1px solid transparent
|
||||||
|
|
||||||
span.code-background
|
span.code-background
|
||||||
border-width: 124px 76px 64px 40px
|
border-width: 124px 76px 64px 40px
|
||||||
border-image: url(/images/level/code_editor_background_border.png) 124 76 64 40 fill round
|
border-image: url(/images/level/code_editor_background_border.png) 124 76 64 40 fill round
|
||||||
|
@ -131,23 +132,31 @@
|
||||||
@include animation(progress-bar-stripes 0.5s linear infinite)
|
@include animation(progress-bar-stripes 0.5s linear infinite)
|
||||||
|
|
||||||
&:not(.user-code-problem)
|
&:not(.user-code-problem)
|
||||||
.ace_gutter-cell.executing:not(.ace_error):not(.ace_warning):not(.ace_info):after
|
.ace_gutter-cell.executing:not(.ace_error):not(.ace_warning):not(.ace_info)
|
||||||
|
margin-left: 1px
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowMjgwMTE3NDA3MjA2ODExOEE2REU4Q0M1MTM1MkIxRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBQjVEQUNDMzQ4RUIxMUUxOEVGRUUyNzFENDM3RDVFMCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBQjVEQUNDMjQ4RUIxMUUxOEVGRUUyNzFENDM3RDVFMCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTU1MjE3RDIzMTIwNjgxMThEQkI4NTlBMjQ1QTEwOTUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDI4MDExNzQwNzIwNjgxMThBNkRFOENDNTEzNTJCMUYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7SazaGAAAAiElEQVR42mL8//8/AzUBEwOVweA3kAWboI2jCyhgDwBx4ZH9ey5Qy4UOQHweaHg/EAtQ08sFUIMDqBmGCkC8HmgoCCtQM1ICoK5toGYsg8KzHmjo+UGbDj8AcSMwORkSnQ7xgA3QtPmApISNBTyAGrSBGl6eAMSGxBhGyIVkZT3G0fKQYgAQYACL+C2ZM6PC7AAAAABJRU5ErkJggg==)
|
||||||
|
background-position: 0px center
|
||||||
|
|
||||||
// Experimenting with a larger executing-line-pointer
|
// .ace_gutter-cell.executing:not(.ace_error):not(.ace_warning):not(.ace_info):after
|
||||||
content: "\e072"
|
//
|
||||||
position: relative
|
// // Experimenting with a larger executing-line-pointer
|
||||||
top: -31px
|
// content: "\e072"
|
||||||
left: -39px
|
// position: relative
|
||||||
display: inline-block
|
// left: -39px
|
||||||
font-family: 'Glyphicons Halflings'
|
// font-family: 'Glyphicons Halflings'
|
||||||
font-style: normal
|
// font-style: normal
|
||||||
font-weight: normal
|
// font-weight: normal
|
||||||
line-height: 1
|
// color: white
|
||||||
color: white
|
// text-shadow: 0 0 5px black, 0 0 5px black, 0 0 5px black
|
||||||
text-shadow: 0 0 5px black, 0 0 5px black, 0 0 5px black
|
// -webkit-font-smoothing: antialiased
|
||||||
font-size: 39px
|
// -moz-osx-font-smoothing: grayscale
|
||||||
-webkit-font-smoothing: antialiased
|
//
|
||||||
-moz-osx-font-smoothing: grayscale
|
// // Chrome likes these, but Firefox does not
|
||||||
|
// // TODO: Figure out how to make the executing gutter arrow big, and compatible
|
||||||
|
// display: inline-block
|
||||||
|
// top: -31px
|
||||||
|
// line-height: 1
|
||||||
|
// font-size: 39px
|
||||||
|
|
||||||
.ace_gutter-cell.executed:not(.ace_error):not(.ace_warning):not(.ace_info)
|
.ace_gutter-cell.executed:not(.ace_error):not(.ace_warning):not(.ace_info)
|
||||||
margin-left: 1px
|
margin-left: 1px
|
||||||
|
|
|
@ -4,9 +4,19 @@
|
||||||
|
|
||||||
.loading-details.loading-container
|
.loading-details.loading-container
|
||||||
|
|
||||||
.load-progress
|
.level-loading-goals.secret
|
||||||
.progress
|
.goals-title(data-i18n="play_level.goals") Goals
|
||||||
.progress-bar.progress-bar-success
|
ul.list-unstyled
|
||||||
|
|
||||||
|
.errors
|
||||||
|
|
||||||
|
.progress-or-start-container
|
||||||
|
button.start-level-button.btn.btn-lg.btn-success.header-fontneedsclick(data-i18n="play_level.loading_start") Start Level
|
||||||
|
|
||||||
|
.load-progress
|
||||||
|
.progress
|
||||||
|
.progress-bar.progress-bar-success
|
||||||
|
.rim
|
||||||
|
|
||||||
#tip-wrapper
|
#tip-wrapper
|
||||||
strong.tip(data-i18n='play_level.tip_toggle_play') Toggle play/paused with Ctrl+P.
|
strong.tip(data-i18n='play_level.tip_toggle_play') Toggle play/paused with Ctrl+P.
|
||||||
|
@ -41,11 +51,3 @@
|
||||||
strong.tip.rare
|
strong.tip.rare
|
||||||
span(data-i18n='play_level.tip_harry') Yer a Wizard,
|
span(data-i18n='play_level.tip_harry') Yer a Wizard,
|
||||||
span= me.get('name', true)
|
span= me.get('name', true)
|
||||||
|
|
||||||
.errors
|
|
||||||
|
|
||||||
.panel.panel-default.level-loading-goals.secret
|
|
||||||
.panel-heading.header-font(data-i18n="play_level.goals") Goals
|
|
||||||
ul.list-group
|
|
||||||
|
|
||||||
button.start-level-button.btn.btn-lg.btn-success.header-font.secret.needsclick(data-i18n="play_level.loading_start") Start Level
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ module.exports = class WorldMapView extends RootView
|
||||||
@getLevelPlayCounts()
|
@getLevelPlayCounts()
|
||||||
$(window).on 'resize', @onWindowResize
|
$(window).on 'resize', @onWindowResize
|
||||||
@playAmbientSound()
|
@playAmbientSound()
|
||||||
@probablyCachedMusic = storage.load("loaded-menu-music-#{@terrain}")
|
@probablyCachedMusic = storage.load("loaded-menu-music")
|
||||||
musicDelay = if @probablyCachedMusic then 1000 else 10000
|
musicDelay = if @probablyCachedMusic then 1000 else 10000
|
||||||
@playMusicTimeout = _.delay (=> @playMusic() unless @destroyed), musicDelay
|
@playMusicTimeout = _.delay (=> @playMusic() unless @destroyed), musicDelay
|
||||||
@hadEverChosenHero = me.get('heroConfig')?.thangType
|
@hadEverChosenHero = me.get('heroConfig')?.thangType
|
||||||
|
@ -280,9 +280,9 @@ module.exports = class WorldMapView extends RootView
|
||||||
|
|
||||||
playMusic: ->
|
playMusic: ->
|
||||||
@musicPlayer = new MusicPlayer()
|
@musicPlayer = new MusicPlayer()
|
||||||
musicFile = {dungeon: '/music/music-menu-dungeon', forest: '/music/music-menu-grass'}[@terrain]
|
musicFile = '/music/music-menu'
|
||||||
Backbone.Mediator.publish 'music-player:play-music', play: true, file: musicFile
|
Backbone.Mediator.publish 'music-player:play-music', play: true, file: musicFile
|
||||||
storage.save("loaded-menu-music-#{@terrain}", true) unless @probablyCachedMusic
|
storage.save("loaded-menu-music", true) unless @probablyCachedMusic
|
||||||
|
|
||||||
preloadTopHeroes: ->
|
preloadTopHeroes: ->
|
||||||
for heroID in ['captain', 'knight']
|
for heroID in ['captain', 'knight']
|
||||||
|
|
|
@ -44,7 +44,7 @@ module.exports = class LevelLoadingView extends CocoView
|
||||||
goalCount = 0
|
goalCount = 0
|
||||||
for goalID, goal of @level.get('goals') when (not goal.team or goal.team is e.team) and not goal.hiddenGoal
|
for goalID, goal of @level.get('goals') when (not goal.team or goal.team is e.team) and not goal.hiddenGoal
|
||||||
name = utils.i18n goal, 'name'
|
name = utils.i18n goal, 'name'
|
||||||
goalList.append $('<li class="list-group-item">' + name + '</li>')
|
goalList.append $('<li>' + name + '</li>')
|
||||||
++goalCount
|
++goalCount
|
||||||
if goalCount
|
if goalCount
|
||||||
goalContainer.removeClass('secret')
|
goalContainer.removeClass('secret')
|
||||||
|
@ -68,8 +68,8 @@ module.exports = class LevelLoadingView extends CocoView
|
||||||
@unveil()
|
@unveil()
|
||||||
else
|
else
|
||||||
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'level_loaded', volume: 0.75 # old: loading_ready
|
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'level_loaded', volume: 0.75 # old: loading_ready
|
||||||
@$el.find('.progress').addClass 'active progress-striped'
|
@$el.find('.progress').hide()
|
||||||
@$el.find('.start-level-button').removeClass 'secret'
|
@$el.find('.start-level-button').show()
|
||||||
|
|
||||||
startUnveiling: (e) ->
|
startUnveiling: (e) ->
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
|
|
|
@ -13,25 +13,34 @@ regJoin = (s) -> new RegExp(s.replace(/\//, '[\\\/\\\\]'))
|
||||||
#- Build the config
|
#- Build the config
|
||||||
|
|
||||||
exports.config =
|
exports.config =
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
public: 'public'
|
public: 'public'
|
||||||
watched: [
|
watched: [
|
||||||
'app',
|
'app',
|
||||||
'vendor',
|
'vendor',
|
||||||
'test/app',
|
'test/app',
|
||||||
'test/demo'
|
'test/demo'
|
||||||
]
|
]
|
||||||
|
|
||||||
conventions:
|
conventions:
|
||||||
ignored: (path) -> _.str.startsWith(sysPath.basename(path), '_')
|
ignored: (path) -> _.str.startsWith(sysPath.basename(path), '_')
|
||||||
|
|
||||||
sourceMaps: 'absoluteUrl'
|
sourceMaps: 'absoluteUrl'
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
production:
|
production:
|
||||||
sourceMaps: 'absoluteUrl'
|
sourceMaps: 'absoluteUrl'
|
||||||
|
onCompile: (files) ->
|
||||||
|
# For some reason, production brunch produces two entries, the first of which is wrong:
|
||||||
|
# //# sourceMappingURL=public/javascripts/app.js.map
|
||||||
|
# //# sourceMappingURL=/javascripts/app.js.map
|
||||||
|
# So we remove the ones that have public in them.
|
||||||
|
exec = require('child_process').exec
|
||||||
|
for file in files
|
||||||
|
exec "perl -pi -e 's/\\/\\/# sourceMappingURL=public.*//g' #{file.path}"
|
||||||
|
exec c
|
||||||
|
|
||||||
files:
|
files:
|
||||||
javascripts:
|
javascripts:
|
||||||
defaultExtension: 'coffee'
|
defaultExtension: 'coffee'
|
||||||
|
@ -50,12 +59,12 @@ exports.config =
|
||||||
'app/locale/locale.coffee'
|
'app/locale/locale.coffee'
|
||||||
'app/lib/sprites/SpriteBuilder.coffee' # loaded by ThangType
|
'app/lib/sprites/SpriteBuilder.coffee' # loaded by ThangType
|
||||||
]
|
]
|
||||||
|
|
||||||
#- Wads. Groups of modules by folder which are loaded as a group when needed.
|
#- Wads. Groups of modules by folder which are loaded as a group when needed.
|
||||||
'javascripts/app/lib.js': regJoin('^app/lib')
|
'javascripts/app/lib.js': regJoin('^app/lib')
|
||||||
'javascripts/app/views/play.js': regJoin('^app/views/play')
|
'javascripts/app/views/play.js': regJoin('^app/views/play')
|
||||||
'javascripts/app/views/editor.js': regJoin('^app/views/editor')
|
'javascripts/app/views/editor.js': regJoin('^app/views/editor')
|
||||||
|
|
||||||
#- world.js, used by the worker to generate the world in game
|
#- world.js, used by the worker to generate the world in game
|
||||||
'javascripts/world.js': [
|
'javascripts/world.js': [
|
||||||
regJoin('^app/lib/world(?!/test)')
|
regJoin('^app/lib/world(?!/test)')
|
||||||
|
@ -72,7 +81,7 @@ exports.config =
|
||||||
regJoin('^bower_components/(?!(aether|d3|treema))')
|
regJoin('^bower_components/(?!(aether|d3|treema))')
|
||||||
'bower_components/treema/treema-utils.js'
|
'bower_components/treema/treema-utils.js'
|
||||||
]
|
]
|
||||||
|
|
||||||
#- Other vendor libraries in separate bunches
|
#- Other vendor libraries in separate bunches
|
||||||
|
|
||||||
# Include box2dweb for profiling and IE9
|
# Include box2dweb for profiling and IE9
|
||||||
|
@ -81,18 +90,18 @@ exports.config =
|
||||||
'javascripts/box2d.js': regJoin('^vendor/scripts/Box2dWeb-2.1.a.3')
|
'javascripts/box2d.js': regJoin('^vendor/scripts/Box2dWeb-2.1.a.3')
|
||||||
'javascripts/lodash.js': regJoin('^bower_components/lodash/dist/lodash.js')
|
'javascripts/lodash.js': regJoin('^bower_components/lodash/dist/lodash.js')
|
||||||
'javascripts/aether.js': regJoin('^bower_components/aether/build/aether.js')
|
'javascripts/aether.js': regJoin('^bower_components/aether/build/aether.js')
|
||||||
|
|
||||||
# Any vendor libraries we don't want the client to load immediately
|
# Any vendor libraries we don't want the client to load immediately
|
||||||
'javascripts/app/vendor/d3.js': regJoin('^bower_components/d3')
|
'javascripts/app/vendor/d3.js': regJoin('^bower_components/d3')
|
||||||
'javascripts/app/vendor/coffeescript.js': 'vendor/scripts/coffeescript.js'
|
'javascripts/app/vendor/coffeescript.js': 'vendor/scripts/coffeescript.js'
|
||||||
'javascripts/app/vendor/difflib.js': 'vendor/scripts/difflib.js'
|
'javascripts/app/vendor/difflib.js': 'vendor/scripts/difflib.js'
|
||||||
'javascripts/app/vendor/diffview.js': 'vendor/scripts/diffview.js'
|
'javascripts/app/vendor/diffview.js': 'vendor/scripts/diffview.js'
|
||||||
'javascripts/app/vendor/treema.js': 'bower_components/treema/treema.js'
|
'javascripts/app/vendor/treema.js': 'bower_components/treema/treema.js'
|
||||||
|
|
||||||
#- test, demo libraries
|
#- test, demo libraries
|
||||||
'javascripts/test-app.js': regJoin('^test/app/')
|
'javascripts/test-app.js': regJoin('^test/app/')
|
||||||
'javascripts/demo-app.js': regJoin('^test/demo/')
|
'javascripts/demo-app.js': regJoin('^test/demo/')
|
||||||
|
|
||||||
#- More output files are generated at the below
|
#- More output files are generated at the below
|
||||||
|
|
||||||
order:
|
order:
|
||||||
|
@ -117,7 +126,7 @@ exports.config =
|
||||||
'vendor/scripts/async.js'
|
'vendor/scripts/async.js'
|
||||||
'vendor/scripts/jquery-ui-1.11.1.js.custom.js'
|
'vendor/scripts/jquery-ui-1.11.1.js.custom.js'
|
||||||
]
|
]
|
||||||
|
|
||||||
stylesheets:
|
stylesheets:
|
||||||
defaultExtension: 'sass'
|
defaultExtension: 'sass'
|
||||||
joinTo:
|
joinTo:
|
||||||
|
@ -127,7 +136,7 @@ exports.config =
|
||||||
'app/styles/bootstrap/*'
|
'app/styles/bootstrap/*'
|
||||||
'vendor/styles/nanoscroller.scss'
|
'vendor/styles/nanoscroller.scss'
|
||||||
]
|
]
|
||||||
|
|
||||||
templates:
|
templates:
|
||||||
defaultExtension: 'jade'
|
defaultExtension: 'jade'
|
||||||
joinTo:
|
joinTo:
|
||||||
|
@ -172,7 +181,6 @@ exports.config =
|
||||||
defn = if path in needHeaders then commonjsHeader else ''
|
defn = if path in needHeaders then commonjsHeader else ''
|
||||||
return defn
|
return defn
|
||||||
|
|
||||||
|
|
||||||
#- Find all .coffee and .jade files in /app
|
#- Find all .coffee and .jade files in /app
|
||||||
|
|
||||||
dirStack = ['./app']
|
dirStack = ['./app']
|
||||||
|
@ -197,9 +205,9 @@ for file in coffeeFiles
|
||||||
inputFile = file.replace('./app', 'app')
|
inputFile = file.replace('./app', 'app')
|
||||||
outputFile = file.replace('.coffee', '.js').replace('./app', 'javascripts/app')
|
outputFile = file.replace('.coffee', '.js').replace('./app', 'javascripts/app')
|
||||||
exports.config.files.javascripts.joinTo[outputFile] = inputFile
|
exports.config.files.javascripts.joinTo[outputFile] = inputFile
|
||||||
|
|
||||||
numBundles = 0
|
numBundles = 0
|
||||||
|
|
||||||
for file in jadeFiles
|
for file in jadeFiles
|
||||||
inputFile = file.replace('./app', 'app')
|
inputFile = file.replace('./app', 'app')
|
||||||
outputFile = file.replace('.jade', '.js').replace('./app', 'javascripts/app')
|
outputFile = file.replace('.jade', '.js').replace('./app', 'javascripts/app')
|
||||||
|
@ -213,4 +221,4 @@ for file in jadeFiles
|
||||||
exports.config.files.templates.joinTo[possibleViewFilePath] = inputFile
|
exports.config.files.templates.joinTo[possibleViewFilePath] = inputFile
|
||||||
numBundles += 1
|
numBundles += 1
|
||||||
|
|
||||||
console.log "Got #{coffeeFiles.length} coffee files and #{jadeFiles.length} jade files (bundled #{numBundles} of them together)."
|
console.log "Got #{coffeeFiles.length} coffee files and #{jadeFiles.length} jade files (bundled #{numBundles} of them together)."
|
||||||
|
|
Loading…
Reference in a new issue