Permalink
Browse files

flat blocks

  • Loading branch information...
1 parent 761d39f commit 360758f0cff27614ba93478aa1fa3e928a8a4a9b @tinco committed Apr 23, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −1 cell.coffee
  2. +1 −1 world.coffee
View
@@ -1,4 +1,6 @@
class Cell
+ @Size = World.ANGLE * World.RADIUS
+ @Height = 1
@Water = 0
@Earth = 1
@Grass = 2
@@ -12,7 +14,10 @@ class Cell
@age = 0
@kind = kind || Cell.Water
@newKind = @kind
- @mesh = new THREE.Mesh(new THREE.CubeGeometry(World.SIZE,World.SIZE,World.SIZE))
+ @mesh = new THREE.Mesh(
+ new THREE.CubeGeometry(Cell.Size,
+ Cell.Size,
+ Cell.Height))
@materials = {}
@materials[Cell.Water] = new THREE.MeshLambertMaterial(color: 0x00BFFF)
@materials[Cell.Earth] = new THREE.MeshLambertMaterial(color: 0xA0522D)
View
@@ -64,7 +64,7 @@ class World
createMesh: () ->
# create the sphere's material
- sphereMaterial = new THREE.MeshLambertMaterial(color: 0xCC0000)
+ sphereMaterial = new THREE.MeshLambertMaterial(color: 0x000000)
# create a new mesh with
# sphere geometry - we will cover

0 comments on commit 360758f

Please sign in to comment.