danini-the-panini/mittsu

View on GitHub

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)
Severity: Major
Found in lib/mittsu/renderers/opengl/opengl_state.rb - About 50 mins to fix

    Method interpolate has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def interpolate(p0, p1, p2, p3, t, t2, t3)
    Severity: Major
    Found in lib/mittsu/math/spline.rb - About 50 mins to fix

      Method create_texture has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def create_texture(where, name, source_file, repeat, offset, wrap, anisotropy)
      Severity: Major
      Found in lib/mittsu/loaders/loader.rb - About 50 mins to fix

        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)
        Severity: Minor
        Found in lib/mittsu/extras/geometries/box_geometry.rb - About 45 mins to fix

          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))
          Severity: Minor
          Found in lib/mittsu/extras/geometries/ring_geometry.rb - About 45 mins to fix

            Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def initialize(left, right, top, bottom, near = 0.1, far = 2000.0)
            Severity: Minor
            Found in lib/mittsu/cameras/orthographic_camera.rb - About 45 mins to fix

              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)
              Severity: Minor
              Found in lib/mittsu/extras/geometries/torus_knot_geometry.rb - About 45 mins to fix

                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)
                Severity: Minor
                Found in lib/mittsu/renderers/opengl_renderer.rb - About 45 mins to fix

                  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)
                  Severity: Minor
                  Found in lib/mittsu/cameras/perspective_camera.rb - About 45 mins to fix

                    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)
                    Severity: Minor
                    Found in lib/mittsu/math/frustum.rb - About 45 mins to fix

                      Method set has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def set(p0, p1, p2, p3, p4, p5)
                      Severity: Minor
                      Found in lib/mittsu/math/frustum.rb - About 45 mins to fix

                        Method make_frustum has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def make_frustum(left, right, bottom, top, near, far)
                        Severity: Minor
                        Found in lib/mittsu/math/matrix4.rb - About 45 mins to fix

                          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'
                          
                          
                          Severity: Minor
                          Found in lib/mittsu/extras/geometries/plane_buffer_geometry.rb - About 45 mins to fix

                          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
                          Severity: Major
                          Found in lib/mittsu/renderers/opengl/textures/cube_texture.rb - About 45 mins to fix

                            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]
                            Severity: Major
                            Found in lib/mittsu/renderers/opengl/opengl_geometry_group.rb - About 45 mins to fix

                              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|
                              Severity: Minor
                              Found in lib/mittsu/renderers/opengl/textures/compressed_texture.rb - About 45 mins to fix

                              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])
                              
                              
                              Severity: Minor
                              Found in lib/mittsu/renderers/opengl/textures/texture.rb - About 45 mins to fix

                              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)
                              Severity: Minor
                              Found in lib/mittsu/renderers/opengl/objects/mesh.rb - About 45 mins to fix

                                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
                                Severity: Minor
                                Found in lib/mittsu/renderers/opengl/core/geometry.rb - About 45 mins to fix

                                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)
                                Severity: Minor
                                Found in lib/mittsu/math/matrix4.rb - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language