three.rb 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f917c4db993b8513e69a161c747c808029e23489
4
- data.tar.gz: baf5c59271aa63eeae46b5c451e8838381982d73
3
+ metadata.gz: df5f8860ceaf399439069d39993f8d3f3cf5f04f
4
+ data.tar.gz: 4cbc296cffb7fc7be05f5ba096c2697bbc3cd161
5
5
  SHA512:
6
- metadata.gz: 53c4151905dbf5e79ba358410368365a75f804c965366715d1d28da726d3ae39d1b96e99860029697003584baa101faa989927415f4d4a65bfceb62f481aa6b9
7
- data.tar.gz: b91526299ee59a8f9b85e5274de782901fd135b98f789a3cbf76f3dba6cfc87d3151169fbb78c3e5d754e66b054ae23d9684ffae22e8591c3b42323a1fd716ca
6
+ metadata.gz: 9c8fcadbcf0ec765db5dbe711b8dc75b9256c80ceb1f50efd3b5b3d43c72c1f4aa4182b863b5721cb918d5aa0a58ea99a206b5c7f4970bafa2b4a894e1854c87
7
+ data.tar.gz: 84e460e5cc80f2f0c3b54b5d89408cfdbf3dfb585491975efbde0c028c10248660c5bf952264cfab2e10fcda363d1a58b4f5cc793f2e36f6fcf9ceaf0d9665db
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ demo/Gemfile.lock
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Three.rb
2
2
 
3
+ [![Join the chat at https://gitter.im/orbitalimpact/three.rb](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/orbitalimpact/three.rb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
+
3
5
  [Three.js](http://threejs.org) for Ruby via Opal.
4
6
 
5
7
  ## Installation
@@ -18,6 +20,14 @@ Or install it yourself as:
18
20
 
19
21
  $ gem install three.rb
20
22
 
23
+ ## Usage
24
+ Currently, there is only one working example of three.rb in action: the `demo` directory that is inside the main directory.
25
+ It shows the Ruby version of the app from the ["Creating a scene"](http://threejs.org/docs/#Manual/Introduction/Creating_a_scene) tutorial on the three.js docs.
26
+ To run it, simply run:
27
+
28
+ $ rackup
29
+
30
+ in the `demo` directory.
21
31
 
22
32
  ## Contributing
23
33
 
@@ -14,8 +14,8 @@ $document.body << renderer.dom_element.to_n
14
14
 
15
15
  geometry = THREE::BoxGeometry.new(width: 1, height: 1, depth: 1)
16
16
  material = THREE::MeshBasicMaterial.new( color: 0x00ff00 )
17
- cube = THREE::Mesh.new(geometry, material)
18
- scene.add(cube)
17
+ cube = THREE::Mesh.new(geometry.to_n, material.to_n)
18
+ scene.add(cube.to_n)
19
19
 
20
20
  camera.position.z = 5
21
21
 
@@ -23,6 +23,6 @@ render = proc do
23
23
  $$.requestAnimationFrame(render)
24
24
  cube.rotation.x += 0.1
25
25
  cube.rotation.y += 0.1
26
- renderer.render(scene, camera)
26
+ renderer.render(scene.to_n, camera.to_n)
27
27
  end
28
28
  render.call
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset= "utf-8" />
5
5
  <title>Three.rb in action</title>
6
- <script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r70/three.js"></script>
6
+ <script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r71/three.js"></script>
7
7
  </head>
8
8
 
9
9
  <body>
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module THREE
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: three.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Plymale
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-03-13 00:00:00.000000000 Z
13
+ date: 2015-06-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: opal
@@ -63,6 +63,7 @@ executables:
63
63
  extensions: []
64
64
  extra_rdoc_files: []
65
65
  files:
66
+ - ".gitignore"
66
67
  - Gemfile
67
68
  - README.md
68
69
  - Rakefile