Showing 659 of 659 total issues
Cyclomatic complexity for merge is too high. [8/6] Open
def merge(geometry, matrix = nil, material_index_offset = nil)
if !geometry.is_a? Mittsu::Geometry
puts('ERROR: Mittsu::Geometry#merge: geometry not an instance of Mittsu::Geometry.', geometry.inspect)
return
end
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for hsl is too high. [8/6] Open
def hsl(target = nil)
# h,s,l ranges are in 0.0 - 1.0
hsl = target || { h: 0.0, s: 0.0, l: 0.0 }
rr, gg, bb = self.r, self.g, self.b
max = [r, g, b].max
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for set_from_euler is too high. [8/6] Open
def set_from_euler(euler, update = true)
# http:#www.mathworks.com/matlabcentral/fileexchange/
# 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/
# content/SpinCalc.m
c1 = ::Math.cos(euler.x / 2.0)
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Method has too many lines. [32/30] Open
def clone
material = MeshPhongMaterial.new
super(material)
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method raycast
has 47 lines of code (exceeds 25 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)
Method compute_morph_normals
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
def compute_morph_normals
# save original normals
# - create temp variables on first access
# otherwise just copy (for faster repeated calls)
@_original_face_normal ||= []
Method merge
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
def merge(geometry, matrix = nil, material_index_offset = nil)
if !geometry.is_a? Mittsu::Geometry
puts('ERROR: Mittsu::Geometry#merge: geometry not an instance of Mittsu::Geometry.', geometry.inspect)
return
end
Method initialize
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(inner_radius = 0.0, outer_radius = 50.0, theta_segments = 8, phi_segments = 8, theta_start = 0.0, theta_length = (::Math::PI * 2.0))
super()
@type = 'RingGeometry'
Cyclomatic complexity for initialize is too high. [7/6] Open
def initialize(width, height, width_segments = 1, height_segments = 1)
super()
@type = 'PlaneBufferGeometry'
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for render is too high. [7/6] Open
def render(scene, camera, render_target = default_target, force_clear = false)
raise "ERROR: Mittsu::OpenGLRenderer#render: camera is not an instance of Mittsu::Camera" unless camera.is_a?(Camera)
reset_cache_for_this_frame
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for initialize is too high. [7/6] Open
def initialize(func, slices, stacks)
super()
@type = 'ParametricBufferGeometry'
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Method has too many lines. [31/30] Open
def initialize(color = nil, intensity = 1.0)
super(color)
@type = 'DirectionalLight'
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Cyclomatic complexity for make_rotation_from_euler is too high. [7/6] Open
def make_rotation_from_euler(euler)
te = self.elements
x, y, z = euler.x, euler.y, euler.z
a, b = ::Math.cos(x), ::Math.sin(x)
c, d = ::Math.cos(y), ::Math.sin(y)
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for fire_joystick_button_event is too high. [7/6] Open
def fire_joystick_button_event(joystick, button, pressed)
if !@joystick_buttons[joystick][button] && pressed
@joystick_button_press_handler.call(joystick, button) unless @joystick_button_press_handler.nil?
elsif @joystick_buttons[joystick][button] && !pressed
@joystick_button_release_handler.call(joystick, button) unless @joystick_button_release_handler.nil?
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for update_shadow_camera is too high. [7/6] Open
def update_shadow_camera(camera, light)
shadow_camera = light.shadow_camera
points_frustum = light.pointa_frustum
points_world = light.points_world
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for initialize is too high. [7/6] Open
def initialize(p0 = nil, p1 = nil, p2 = nil, p3 = nil, p4 = nil, p5 = nil)
@planes = [
p0 || Mittsu::Plane.new,
p1 || Mittsu::Plane.new,
p2 || Mittsu::Plane.new,
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for from_geometry is too high. [7/6] Open
def from_geometry(geometry, settings = {})
vertices = geometry.vertices
faces = geometry.faces
face_vertex_uvs = geometry.face_vertex_uvs
vertex_colors = settings.fetch(:vertex_colors, Mittsu::NoColors)
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for compute_bounding_box is too high. [7/6] Open
def compute_bounding_box
vector = Mittsu::Vector3.new
@bounding_box ||= Mittsu::Box3.new
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for set_values is too high. [7/6] Open
def set_values(values = nil)
return if values.nil?
values.each do |(key, new_value)|
if new_value.nil?
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Cyclomatic complexity for init is too high. [7/6] Open
def init
if !@initted
puts " --- INIT #{self.name}" if DEBUG
@initted = true
- Read upRead up
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.