summaryrefslogtreecommitdiff
path: root/src/world.moon
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.moon')
-rw-r--r--src/world.moon8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/world.moon b/src/world.moon
index d622351..5c76187 100644
--- a/src/world.moon
+++ b/src/world.moon
@@ -8,7 +8,6 @@ shim = require("shader_shim")
log = require("log")
MAX_LAMPS = 8
-print("hc:", hc)
--Use a collider to decide what to render
x = {
world_e: ecs.Entity(1)
@@ -59,7 +58,6 @@ x.level.lamps_on_screen = () ->
return lamps
lamps
x.fromscreen = (pos) ->
- print("fromscreen pos is", pos)
-- convert creen pixel coords to world xy coords
localx = (pos.x * (win.width / win.height) * 4) / (win.width + 1)
localy = (pos.y * 1 * 4) / win.height
@@ -79,7 +77,6 @@ class Bubble
@wrap = 1
new: (pos) =>
bubble_view[@@wrap] = vec4(pos.x, pos.y, -1, am.current_time!)
- print("Bubble created")
class PhysicsComponent extends ecs.Component
new: (name, properties, shape, args) =>
@@ -90,7 +87,6 @@ class PhysicsComponent extends ecs.Component
super(name, properties)
hc = x.level.physics_world
table.insert(args,1,hc)
- print("Creating a physics component with", args)
@shape = hc[shape](unpack(args))
@shape.component = @
join: (entity) =>
@@ -104,14 +100,12 @@ class PhysicsComponent extends ecs.Component
class GraphicsComponent extends ecs.Component
new: (name, properties) =>
- print("Got name", name, "and properties", properties)
@node = am.group!
--assert(properties and properties.node , "Failed to find node for graphics component")
super(name, properties)
--x.node\append(properties.node)
join: (entity) =>
buf_size = @buf_size!
- print("Creating entity " .. entity.id .. " with graphic component with " .. buf_size .. " vertexes")
@geom_buffer = am.buffer(buf_size * 3 * 4)\view("vec3") -- 3 floats per vertex, 4 bytes per float
@norm_buffer = am.buffer(buf_size * 2 * 4)\view("vec2") -- 2 floats per uv, 4 bytes per float
@populate_buf(@geom_buffer, @norm_buffer)
@@ -147,7 +141,6 @@ class GraphicsComponent extends ecs.Component
am.bind(binds)\append(
am.draw("triangles")
)))))
- print("graphic node created for",@,@node)
component = @
@node\action(() =>
bind = component.node("bind")
@@ -174,7 +167,6 @@ class GraphicsComponent extends ecs.Component
)
if @setup
@setup(@node)
- print("Appending ", @node, " to the scene")
x.node\append(@node)
leave: () =>
x.node\remove(@node)