diff --git a/app/lib/LevelLoader.coffee b/app/lib/LevelLoader.coffee index eafbd5e42..5a81d182b 100644 --- a/app/lib/LevelLoader.coffee +++ b/app/lib/LevelLoader.coffee @@ -112,7 +112,7 @@ module.exports = class LevelLoader extends CocoClass tempSession = new LevelSession _id: @session.id tempSession.save(patch, {patch: true}) @sessionDenormalized = true - + # World init initWorld: -> @@ -120,18 +120,17 @@ module.exports = class LevelLoader extends CocoClass @world = new World @level.get('name') serializedLevel = @level.serialize(@supermodel) @world.loadFromLevel serializedLevel, false -# @setTeam @world.teamForPlayer 1 # We don't know which player we are; this will go away--temp TODO @buildSpriteSheets() - + buildSpriteSheets: -> thangTypes = {} thangTypes[tt.get('name')] = tt for tt in @supermodel.getModels(ThangType) colorConfigs = @world.getTeamColors() - + thangsProduced = {} baseOptions = {resolutionFactor: 4, async: true} - + for thang in @world.thangs continue unless thang.spriteName thangType = thangTypes[thang.spriteName] @@ -139,7 +138,7 @@ module.exports = class LevelLoader extends CocoClass options.async = true thangsProduced[thang.spriteName] = true @buildSpriteSheet(thangType, options) - + for thangName, thangType of thangTypes continue if thangsProduced[thangName] thangType.spriteOptions = {resolutionFactor: 4, async: true} @@ -155,7 +154,7 @@ module.exports = class LevelLoader extends CocoClass thangType.on 'build-complete', => @spriteSheetsBuilt += 1 @notifyProgress() - + # Initial Sound Loading loadAudio: -> diff --git a/app/views/play/level_view.coffee b/app/views/play/level_view.coffee index a3dc9a3ec..6235adba2 100644 --- a/app/views/play/level_view.coffee +++ b/app/views/play/level_view.coffee @@ -78,13 +78,13 @@ module.exports = class PlayLevelView extends View msg = $.i18n.t('play_level.level_load_error', defaultValue: "Level could not be loaded.") @$el.html('
' + msg + '
') @saveScreenshot = _.throttle @saveScreenshot, 30000 - + @load() unless @isEditorPreview setLevel: (@level, @supermodel) -> @god?.level = @level.serialize @supermodel @load() - + load: -> @levelLoader = new LevelLoader(@levelID, @supermodel, @sessionID) @levelLoader.once 'ready-to-init-world', @onReadyToInitWorld @@ -106,7 +106,7 @@ module.exports = class PlayLevelView extends View @level = @levelLoader.level @world = @levelLoader.world @loadingScreen.destroy() -# @initWorld() + @setTeam @world.teamForPlayer 1 # We don't know which player we are; this will go away--temp TODO @initSurface() @initGod() @initGoalManager() @@ -291,12 +291,6 @@ module.exports = class PlayLevelView extends View return if p.length @$el.append($('')) - initWorld: -> - @world ?= new World @level.get('name') - serializedLevel = @level.serialize(@supermodel) - @world.loadFromLevel serializedLevel, false - @setTeam @world.teamForPlayer 1 # We don't know which player we are; this will go away--temp TODO - initSurface: -> surfaceCanvas = $('canvas#surface', @$el) @surface = new Surface(@world, surfaceCanvas, thangTypes: @supermodel.getModels(ThangType), playJingle: not @isEditorPreview) diff --git a/bower.json b/bower.json index fe1d8f02e..6f68c2c01 100644 --- a/bower.json +++ b/bower.json @@ -32,7 +32,7 @@ "firepad": "~0.1.2", "marked": "~0.3.0", "moment": "~2.5.0", - "aether": "~0.0.1", + "aether": "~0.0.5", "underscore.string": "~2.3.3", "firebase": "~1.0.2" },