lib/mittsu/core/geometry.rb in mittsu-0.3.1 vs lib/mittsu/core/geometry.rb in mittsu-0.3.2
- old
+ new
@@ -1,8 +1,6 @@
require 'securerandom'
-require 'mittsu'
-require 'securerandom'
module Mittsu
class Geometry
include EventDispatcher
@@ -50,10 +48,12 @@
@normals_need_update = false
@tangents_need_update = false
@colors_need_update = false
@line_distances_need_update = false
@groups_need_update = false
+
+ @_listeners = {}
end
def apply_matrix(matrix)
normal_matrix = Mittsu::Matrix3.new.get_normal_matrix(matrix)
@vertices.each do |vertex|
@@ -427,15 +427,13 @@
@faces.each_with_index do |face, i|
face.a = changes[face.a]
face.b = changes[face.b]
face.c = changes[face.c]
indices = [face.a, face.b, face.c]
- dup_index = -1
# if any duplicate vertices are found in a Face3
# we have to remove the face as nothing can be saved
3.times do |n|
if indices[n] == indices[(n + 1) % 3]
- dup_index = n
face_indices_to_remove << i
break
end
end
end