Showing 226 of 659 total issues
Method set_blending
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_blending(blending, blend_equation = nil, blend_src = nil, blend_dst = nil, blend_equation_alpha = nil, blend_src_alpha = nil, blend_dst_alpha = nil)
Method interpolate
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def interpolate(p0, p1, p2, p3, t, t2, t3)
Method create_texture
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_texture(where, name, source_file, repeat, offset, wrap, anisotropy)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(width, height, depth, width_segments = nil, height_segments = nil, depth_segments = nil)
Method initialize
has 6 arguments (exceeds 4 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))
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(left, right, top, bottom, near = 0.1, far = 2000.0)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(radius = 100.0, tube = 40.0, radial_segments = 64, tubular_segments = 8, p_val = 2, q_val = 3)
Method render_objects_immediate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def render_objects_immediate(render_list, material_type, camera, lights, fog, override_material)
Method set_view_offset
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_view_offset(full_width, full_height, x, y, width, height)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(p0 = nil, p1 = nil, p2 = nil, p3 = nil, p4 = nil, p5 = nil)
Method set
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def set(p0, p1, p2, p3, p4, p5)
Method make_frustum
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_frustum(left, right, bottom, top, near, far)
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(width, height, width_segments = 1, height_segments = 1)
super()
@type = 'PlaneBufferGeometry'
- 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
Avoid deeply nested control flow statements. Open
if @renderer.compressed_texture_formats.include?(gl_format)
GL.CompressedTexImage2D(GL::TEXTURE_CUBE_MAP_POSITIVE_X + i, j, gl_format, mipmap.width, mipmap.height, 0, mipmap.data)
else
puts "WARNING: Mittsu::OpenGLCubeTexture: Attempt to load unsupported compressed texture format in #set"
end
Avoid deeply nested control flow statements. Open
if custom_attribute[:bound_to].nil? || custom_attribute[:bound_to] == :vertices
@faces3.each do |chf|
face = obj_faces[chf];
v1 = custom_attribute[:value][face.a]
Method update_specific
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update_specific
gl_format = GL::MITTSU_PARAMS[format]
gl_type = GL::MITTSU_PARAMS[type]
mipmaps.each_with_index do |mipmap, i|
- 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 set_parameters
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def set_parameters(texture_type, is_image_power_of_two)
if is_image_power_of_two
GL.TexParameteri(texture_type, GL::TEXTURE_WRAP_S, GL::MITTSU_PARAMS[wrap_s])
GL.TexParameteri(texture_type, GL::TEXTURE_WRAP_T, GL::MITTSU_PARAMS[wrap_t])
- 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 render_buffer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)
Method init_geometry_groups
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def init_geometry_groups(object)
material = object.material
add_buffers = false
if @groups.nil? || @groups_need_update
- 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 make_orthographic
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_orthographic(left, right, top, bottom, near, far)