A few bugfixes, plus gigantic child window convenience for me editing levels.
This commit is contained in:
parent
d45c2d31de
commit
1537754a16
4 changed files with 8 additions and 2 deletions
app
|
@ -213,6 +213,8 @@ module.exports = class Angel extends CocoClass
|
||||||
work.t1 = now()
|
work.t1 = now()
|
||||||
Math.random = work.testWorld.rand.randf # so user code is predictable
|
Math.random = work.testWorld.rand.randf # so user code is predictable
|
||||||
Aether.replaceBuiltin('Math', Math)
|
Aether.replaceBuiltin('Math', Math)
|
||||||
|
replacedLoDash = _.runInContext(window)
|
||||||
|
_[key] = replacedLoDash[key] for key, val of replacedLoDash
|
||||||
i = 0
|
i = 0
|
||||||
while i < work.testWorld.totalFrames
|
while i < work.testWorld.totalFrames
|
||||||
frame = work.testWorld.getFrame i++
|
frame = work.testWorld.getFrame i++
|
||||||
|
|
|
@ -94,7 +94,10 @@ module.exports = class EditorLevelView extends RootView
|
||||||
# Create a new Window with a blank LevelView
|
# Create a new Window with a blank LevelView
|
||||||
scratchLevelID = @level.get('slug') + '?dev=true'
|
scratchLevelID = @level.get('slug') + '?dev=true'
|
||||||
scratchLevelID += "&team=#{team}" if team
|
scratchLevelID += "&team=#{team}" if team
|
||||||
@childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true)
|
if me.get('name') is 'Nick!'
|
||||||
|
@childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=2560,height=1080,left=0,top=-1600,location=1,menubar=1,scrollbars=1,status=0,titlebar=1,toolbar=1', true)
|
||||||
|
else
|
||||||
|
@childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true)
|
||||||
@childWindow.onPlayLevelViewLoaded = (e) => sendLevel() # still a hack
|
@childWindow.onPlayLevelViewLoaded = (e) => sendLevel() # still a hack
|
||||||
@childWindow.focus()
|
@childWindow.focus()
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ module.exports = class Spell
|
||||||
problems = spellThang.aether.problems
|
problems = spellThang.aether.problems
|
||||||
#console.log 'aether transpiled', source.length, 'to', spellThang.aether.pure.length, 'for', thangID, @spellKey
|
#console.log 'aether transpiled', source.length, 'to', spellThang.aether.pure.length, 'for', thangID, @spellKey
|
||||||
else
|
else
|
||||||
|
spellThang.aether.raw = source
|
||||||
spellThang.aether.pure = pure
|
spellThang.aether.pure = pure
|
||||||
spellThang.aether.problems = problems
|
spellThang.aether.problems = problems
|
||||||
#console.log 'aether reused transpilation for', thangID, @spellKey
|
#console.log 'aether reused transpilation for', thangID, @spellKey
|
||||||
|
|
|
@ -396,7 +396,7 @@ module.exports = class SpellView extends CocoView
|
||||||
|
|
||||||
displayAether: (aether, isCast=false) ->
|
displayAether: (aether, isCast=false) ->
|
||||||
@displayedAether = aether
|
@displayedAether = aether
|
||||||
isCast = isCast or not _.isEmpty(aether.metrics) or _.some aether.problems.errors, {type: 'runtime'}
|
isCast = isCast or not _.isEmpty(aether.metrics) or _.some aether.getAllProblems(), {type: 'runtime'}
|
||||||
problem.destroy() for problem in @problems # Just in case another problem was added since clearAetherDisplay() ran.
|
problem.destroy() for problem in @problems # Just in case another problem was added since clearAetherDisplay() ran.
|
||||||
@problems = []
|
@problems = []
|
||||||
annotations = []
|
annotations = []
|
||||||
|
|
Reference in a new issue