hoverinc/ray-tracing-renderer

View on GitHub
src/renderer/UniformBuffer.js

Summary

Maintainability
B
4 hrs
Test Coverage
F
0%

Function makeUniformBuffer has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function makeUniformBuffer(gl, program, blockName) {
  const blockIndex = gl.getUniformBlockIndex(program, blockName);
  const blockSize = gl.getActiveUniformBlockParameter(program, blockIndex, gl.UNIFORM_BLOCK_DATA_SIZE);

  const uniforms = getUniformBlockInfo(gl, program, blockIndex);
Severity: Major
Found in src/renderer/UniformBuffer.js - About 2 hrs to fix

    Function set has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function set(name, value) {
        if (!uniforms[name]) {
          // console.warn('No uniform property with name ', name);
          return;
        }
    Severity: Minor
    Found in src/renderer/UniformBuffer.js - About 1 hr to fix

      Function setData has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function setData(dataView, setter, size, offset, stride, components, value) {
      Severity: Major
      Found in src/renderer/UniformBuffer.js - About 50 mins to fix

        There are no issues that match your filters.

        Category
        Status