three.rb 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/.gitignore +2 -0
- data/README.md +10 -0
- data/demo/app/main.rb +3 -3
- data/demo/index.html +1 -1
- data/lib/opal/three/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df5f8860ceaf399439069d39993f8d3f3cf5f04f
|
4
|
+
data.tar.gz: 4cbc296cffb7fc7be05f5ba096c2697bbc3cd161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c8fcadbcf0ec765db5dbe711b8dc75b9256c80ceb1f50efd3b5b3d43c72c1f4aa4182b863b5721cb918d5aa0a58ea99a206b5c7f4970bafa2b4a894e1854c87
|
7
|
+
data.tar.gz: 84e460e5cc80f2f0c3b54b5d89408cfdbf3dfb585491975efbde0c028c10248660c5bf952264cfab2e10fcda363d1a58b4f5cc793f2e36f6fcf9ceaf0d9665db
|
data/.gitignore
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Three.rb
|
2
2
|
|
3
|
+
[](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
|
|
data/demo/app/main.rb
CHANGED
@@ -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
|
data/demo/index.html
CHANGED
data/lib/opal/three/version.rb
CHANGED
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.
|
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-
|
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
|