mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
d9f4594c9f
4 changed files with 7 additions and 3 deletions
|
@ -33,7 +33,7 @@ class Media
|
|||
|
||||
class AudioPlayer extends CocoClass
|
||||
subscriptions:
|
||||
'play-sound': (e) -> @playInterfaceSound e.trigger
|
||||
'play-sound': (e) -> @playInterfaceSound e.trigger, e.volume
|
||||
|
||||
constructor: () ->
|
||||
super()
|
||||
|
|
|
@ -13,6 +13,7 @@ module.exports = class God
|
|||
@ids[@lastID]
|
||||
|
||||
maxAngels: 2 # how many concurrent web workers to use; if set past 8, make up more names
|
||||
maxWorkerPoolSize: 2 # ~20MB per idle worker
|
||||
worldWaiting: false # whether we're waiting for a worker to free up and run the world
|
||||
constructor: ->
|
||||
@id = God.nextID()
|
||||
|
@ -30,8 +31,10 @@ module.exports = class God
|
|||
fillWorkerPool: =>
|
||||
return unless Worker
|
||||
@workerPool ?= []
|
||||
while @workerPool.length < @maxAngels
|
||||
if @workerPool.length < @maxWorkerPoolSize
|
||||
@workerPool.push @createWorker()
|
||||
if @workerPool.length < @maxWorkerPoolSize
|
||||
@fillWorkerPool()
|
||||
|
||||
getWorker: ->
|
||||
@fillWorkerPool()
|
||||
|
|
|
@ -54,6 +54,7 @@ module.exports = class CastButtonView extends View
|
|||
|
||||
onCastSpells: (e) ->
|
||||
@casting = true
|
||||
Backbone.Mediator.publish 'play-sound', trigger: 'cast', volume: 0.25
|
||||
@updateCastButton()
|
||||
|
||||
onWorldLoadProgressChanged: (e) ->
|
||||
|
|
2
vendor/scripts/Box2dWeb-2.1.a.3.js
vendored
2
vendor/scripts/Box2dWeb-2.1.a.3.js
vendored
|
@ -3705,7 +3705,7 @@ Box2D.postDefs = [];
|
|||
Box2D.Common.b2Settings.b2_velocityThreshold = 1.0;
|
||||
Box2D.Common.b2Settings.b2_maxLinearCorrection = 0.2;
|
||||
Box2D.Common.b2Settings.b2_maxAngularCorrection = 8.0 / 180.0 * b2Settings.b2_pi;
|
||||
Box2D.Common.b2Settings.b2_maxTranslation = 2.0;
|
||||
Box2D.Common.b2Settings.b2_maxTranslation = 20.0;
|
||||
Box2D.Common.b2Settings.b2_maxTranslationSquared = b2Settings.b2_maxTranslation * b2Settings.b2_maxTranslation;
|
||||
Box2D.Common.b2Settings.b2_maxRotation = 0.5 * b2Settings.b2_pi;
|
||||
Box2D.Common.b2Settings.b2_maxRotationSquared = b2Settings.b2_maxRotation * b2Settings.b2_maxRotation;
|
||||
|
|
Loading…
Reference in a new issue