codecombat/app/views/sprite_parser_test_view.coffee

23 lines
796 B
CoffeeScript
Raw Normal View History

2014-01-03 13:32:13 -05:00
View = require 'views/kinds/RootView'
template = require 'templates/editor/thang/sprite_parser_test'
SpriteParser = require 'lib/sprites/SpriteParser'
mixed_samples = require 'lib/sprites/parser_samples'
samples = require 'lib/sprites/parser_samples_artillery'
ThangType = require 'models/ThangType'
module.exports = class SpriteParserTestView extends View
2014-06-30 22:16:26 -04:00
id: 'sprite-parser-test-view'
2014-01-03 13:32:13 -05:00
template: template
afterRender: ->
@parse samples
parse: (samples) ->
thangType = new ThangType()
for sample in _.shuffle samples
parser = new SpriteParser(thangType)
parser.parse(sample)
2014-06-30 22:16:26 -04:00
console.log 'thang type is now', thangType
2014-01-03 13:32:13 -05:00
console.log JSON.stringify(thangType).length
2014-06-30 22:16:26 -04:00
# console.log JSON.stringify(thangType.attributes.raw.animations.tharin_defend.tweens)