mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Normalized the container renderStrategy resolution so that both renderStrategies are the same.
This commit is contained in:
parent
7fb261f577
commit
cc76458942
3 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ CocoView = require 'views/kinds/CocoView'
|
|||
marked.setOptions {gfm: true, sanitize: true, smartLists: true, breaks: false}
|
||||
|
||||
# TODO, add C-style macro constants like this?
|
||||
window.SPRITE_RESOLUTION_FACTOR = 1.5
|
||||
window.SPRITE_RESOLUTION_FACTOR = 3
|
||||
|
||||
# Prevent Ctrl/Cmd + [ / ], P, S
|
||||
ctrlDefaultPrevented = [219, 221, 80, 83]
|
||||
|
|
|
@ -179,7 +179,7 @@ module.exports = class WebGLLayer extends CocoClass
|
|||
for containerGlobalName in _.keys(containersToRender)
|
||||
containerKey = @renderGroupingKey(thangType, containerGlobalName, colorConfig)
|
||||
container = spriteBuilder.buildContainerFromStore(containerGlobalName)
|
||||
frame = spriteSheetBuilder.addFrame(container, null, @resolutionFactor)
|
||||
frame = spriteSheetBuilder.addFrame(container, null, @resolutionFactor * (thangType.get('scale') or 1))
|
||||
spriteSheetBuilder.addAnimation(containerKey, [frame], false)
|
||||
|
||||
getContainersForAnimation: (thangType, animation) ->
|
||||
|
|
|
@ -147,7 +147,7 @@ module.exports = class WebGLSprite extends createjs.SpriteContainer
|
|||
for localContainer in localContainers
|
||||
outerContainer = new createjs.SpriteContainer(@spriteSheet)
|
||||
innerContainer = new createjs.Sprite(@spriteSheet)
|
||||
innerContainer.scaleX = innerContainer.scaleY = 1 / @resolutionFactor
|
||||
innerContainer.scaleX = innerContainer.scaleY = 1 / (@resolutionFactor * (@thangType.get('scale') or 1))
|
||||
animationName = @spriteSheetPrefix + localContainer.gn
|
||||
return false if not (animationName in @spriteSheet.getAnimations())
|
||||
innerContainer.gotoAndStop(animationName)
|
||||
|
|
Loading…
Reference in a new issue