rubynk 0.0.2 → 0.0.3
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 +4 -4
- data/bin/rubynk +3 -1
- data/lib/app.rb +70 -8
- data/lib/hammer.js +2643 -0
- data/lib/rubynk.rb +2 -1
- data/lib/{htmltemplate → template.html} +5 -2
- metadata +3 -2
data/lib/rubynk.rb
CHANGED
@@ -9,12 +9,13 @@ def build(script)
|
|
9
9
|
Opal.append_path "."
|
10
10
|
Opal.append_path root+"/lib"
|
11
11
|
src = IO.binread(root+"/lib/processing.js")
|
12
|
+
src << IO.binread(root+"/lib/hammer.js")
|
12
13
|
src << IO.binread(root+"/lib/opal.js")
|
13
14
|
src << Opal::Builder.build("app").to_s
|
14
15
|
src << Opal::Builder.build(script).to_s
|
15
16
|
File.binwrite "app.js", src
|
16
17
|
|
17
|
-
html = IO.binread(root+"/lib/
|
18
|
+
html = IO.binread(root+"/lib/template.html")
|
18
19
|
File.binwrite "main.html", html
|
19
20
|
|
20
21
|
end
|
@@ -1,8 +1,11 @@
|
|
1
1
|
<meta charset="utf-8">
|
2
|
-
|
2
|
+
|
3
3
|
<canvas style="outline:none" id="canvas"></canvas>
|
4
|
+
<script src="app.js"></script>
|
4
5
|
<script id="script1" type="text/javascript">
|
5
6
|
// attaching the sketchProc function to the canvas
|
6
7
|
var canvas = document.getElementById('canvas');
|
8
|
+
|
7
9
|
var p = new Processing(canvas, window.sketchProc);
|
8
|
-
|
10
|
+
|
11
|
+
</script>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubynk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Lamber
|
@@ -33,10 +33,11 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- bin/rubynk
|
35
35
|
- lib/app.rb
|
36
|
-
- lib/
|
36
|
+
- lib/hammer.js
|
37
37
|
- lib/opal.js
|
38
38
|
- lib/processing.js
|
39
39
|
- lib/rubynk.rb
|
40
|
+
- lib/template.html
|
40
41
|
homepage: http://rubygems.org/gems/hola
|
41
42
|
licenses:
|
42
43
|
- MIT
|