Showing 226 of 659 total issues
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(parameters = {})
super()
@type = 'MeshPhongMaterial'
Method clone
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def clone
material = MeshPhongMaterial.new
super(material)
Method load_uniforms
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def load_uniforms(uniforms, uniforms_lib)
uniform_strings = nil;
in_uniform = false
uniforms.lines.map(&:strip).each_with_object({}) { |line, hash|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method raycast
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def raycast(raycaster, intersects)
threshold = raycaster.params[:point_cloud][:threshold]
@_inverse_matrix.inverse(self.matrix_world)
@_ray.copy(raycaster.ray).apply_matrix4(@_inverse_matrix)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method decompose
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def decompose(position, quaternion, scale)
vector = Mittsu::Vector3.new
matrix = Mittsu::Matrix4.new
te = self.elements
sx = vector.set(te[0], te[1], te[2]).length
Method initialize
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(color = nil, intensity = 1.0)
super(color)
@type = 'DirectionalLight'
Method make_groups
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_groups(uses_face_material = false)
max_vertices_in_group = 65535 # TODO: OES_element_index_uint ???
hash_map = {}
Method compute_vertex_normals
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def compute_vertex_normals(area_weighted = false)
vertices = Array.new(@vertices.length)
@vertices.length.times do |v|
vertices[v] = Mittsu::Vector3.new
end
Method initialize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
super
@id = (@@id ||= 1).tap { @@id += 1 }
@uuid = SecureRandom.uuid
Method initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(near, far, cube_resolution)
super()
@type = 'CubeCamera'
Method set
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def set(n11, n12, n13, n21, n22, n23, n31, n32, n33)
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(video = nil, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(images = nil, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(image = DEFAULT_IMAGE, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
Method initialize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(radius = 50.0, segments = 8, theta_start = 0.0, theta_length = (::Math::PI * 2.0))
super()
@type = 'CircleGeometry'
Method cache_uniform_locations
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cache_uniform_locations(uniforms, parameters)
identifiers = [
'viewMatrix',
'modelViewMatrix',
'projectionMatrix',
Method multiply_matrices
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def multiply_matrices(a, b)
ae = a.elements
be = b.elements
te = self.elements
a11 = ae[0]; a12 = ae[4]; a13 = ae[8]; a14 = ae[12]
Method render_buffer
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def render_buffer(camera, lights, fog, material, geometry_group, object)
puts "--- RENDER #{object.name}" if DEBUG
return unless material.visible
geometry_group.renderer = self
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method init_custom_attributes
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def init_custom_attributes(object)
material = object.material
nvertices = @vertices.length
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method project
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def project(renderer)
puts " --- PROJECT #{self.name}" if DEBUG
@renderer = renderer
return unless visible
init
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"