go_gamification 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13aa207cd45fbfeab10309a250433ec05eb64d6e
4
- data.tar.gz: 96e0cf28812538514c0ac08bb4f35600bc019a45
3
+ metadata.gz: '0429e9e9375cfdcb5549cdff07eb458656fa1a8a'
4
+ data.tar.gz: cd8cf4b8162f85012de2834e65087d72bc2122bc
5
5
  SHA512:
6
- metadata.gz: dccce8cc2e99290e86ec1a5f49cd31379783f0740f5c8957c21453d4443d6b9c104c81550cef3f24756dac08f4e14d344de5facb33513faba3f611b1d1ffaac0
7
- data.tar.gz: 9c7abe3f3849fb951b45ab0e43436d52757c0b7b7ab6ee140ccf559a43aa48189999fe3e7a9d6b4ba8541446c33467ca501eb0f64b2cc7f7edeb85882f098a8b
6
+ metadata.gz: 72bc47d33e38ba5105cff49ce7c1c11234aef26dc564b19eb786f076407383629ebbcb41ed47e210bad98fe527fe02bbba483f61fa71b2b208a07bf3ae9a2b3b
7
+ data.tar.gz: 2b6d90a4ad1c2357a71d5214b40e3f034c522e74df2d8f0b9ccdca31ffbc376d67f08e440b6eda515b411539e62b7f625f3b00a45629c4dc420eedc706d5d9af
@@ -48,15 +48,15 @@ function prepareCanvas(canvasDiv, canvasWidth, canvasHeight)
48
48
  canvas.width = canvas.width; // clears the canvas
49
49
  context.fillText("loading...", 40, 140);
50
50
 
51
- loadImage(("leftArm"));
52
- loadImage(("legs"));
53
- loadImage(("torso"));
54
- loadImage(("rightArm"));
55
- loadImage(("head"));
56
- loadImage(("hair"));
57
- loadImage(("leftArm-jump"));
58
- loadImage(("legs-jump"));
59
- loadImage(("rightArm-jump"));
51
+ loadImage(("<%= asset_path 'go_gamification/leftArm' %>"));
52
+ loadImage(("<%= asset_path 'go_gamification/legs' %>"));
53
+ loadImage(("<%= asset_path 'go_gamification/torso' %>"));
54
+ loadImage(("<%= asset_path 'go_gamification/rightArm' %>"));
55
+ loadImage(("<%= asset_path 'go_gamification/head' %>"));
56
+ loadImage(("<%= asset_path 'go_gamification/hair' %>"));
57
+ loadImage(("<%= asset_path 'go_gamification/leftArm-jump' %>"));
58
+ loadImage(("<%= asset_path 'go_gamification/legs-jump' %>"));
59
+ loadImage(("<%= asset_path 'go_gamification/rightArm-jump' %>"));
60
60
  }
61
61
 
62
62
  function loadImage(name) {
@@ -65,7 +65,7 @@ function loadImage(name) {
65
65
  images[name].onload = function() {
66
66
  resourceLoaded();
67
67
  }
68
- images[name].src = "/assets/go_gamification/" + name + ".png";
68
+ images[name].src = name;
69
69
  }
70
70
 
71
71
  function resourceLoaded() {
@@ -97,25 +97,25 @@ function redraw() {
97
97
  }
98
98
 
99
99
  if (jumping) {
100
- context.drawImage(images["leftArm-jump"], x + 40, y - 42 - breathAmt);
100
+ context.drawImage(images["<%= asset_path 'go_gamification/leftArm-jump' %>"], x + 40, y - 42 - breathAmt);
101
101
  } else {
102
- context.drawImage(images["leftArm"], x + 40, y - 42 - breathAmt);
102
+ context.drawImage(images["<%= asset_path 'go_gamification/leftArm' %>"], x + 40, y - 42 - breathAmt);
103
103
  }
104
104
 
105
105
  if (jumping) {
106
- context.drawImage(images["legs-jump"], x, y- 6);
106
+ context.drawImage(images["<%= asset_path 'go_gamification/legs-jump' %>"], x, y- 6);
107
107
  } else {
108
- context.drawImage(images["legs"], x, y);
108
+ context.drawImage(images["<%= asset_path 'go_gamification/legs' %>"], x, y);
109
109
  }
110
110
 
111
- context.drawImage(images["torso"], x, y - 50);
112
- context.drawImage(images["head"], x - 10, y - 125 - breathAmt);
113
- context.drawImage(images["hair"], x - 37, y - 138 - breathAmt);
111
+ context.drawImage(images["<%= asset_path 'go_gamification/torso' %>"], x, y - 50);
112
+ context.drawImage(images["<%= asset_path 'go_gamification/head' %>"], x - 10, y - 125 - breathAmt);
113
+ context.drawImage(images["<%= asset_path 'go_gamification/hair' %>"], x - 37, y - 138 - breathAmt);
114
114
 
115
115
  if (jumping) {
116
- context.drawImage(images["rightArm-jump"], x - 35, y - 42 - breathAmt);
116
+ context.drawImage(images["<%= asset_path 'go_gamification/rightArm-jump' %>"], x - 35, y - 42 - breathAmt);
117
117
  } else {
118
- context.drawImage(images["rightArm"], x - 15, y - 42 - breathAmt);
118
+ context.drawImage(images["<%= asset_path 'go_gamification/rightArm' %>"], x - 15, y - 42 - breathAmt);
119
119
  }
120
120
 
121
121
  drawEllipse(x + 47, y - 68 - breathAmt, 8, curEyeHeight); // Left Eye
@@ -10,5 +10,9 @@ module GoGamification
10
10
  end
11
11
  end
12
12
 
13
+ config.assets.precompile += ['*.js', '*.css', '**/*.js', '**/*.css', '*.jpg',
14
+ '*.png', '*.ico', '*.gif', '*.woff2', '*.eot',
15
+ '*.woff', '*.ttf', '*.svg']
16
+
13
17
  end
14
18
  end
@@ -1,3 +1,3 @@
1
1
  module GoGamification
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: go_gamification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Carlos Ottobboni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2017-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: draper