BabylonJS/Spector.js

View on GitHub

Showing 306 of 573 total issues

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        this.sourceCodeComponent.onFragmentSourceClicked.add((sourceCodeState) => {
            const state = this.mvx.getGenericState<ISourceCodeState>(this.sourceCodeComponentStateId);
            state.fragment = true;
            state.translated = false;
            this.mvx.updateState(this.sourceCodeComponentStateId, state);
Severity: Major
Found in src/embeddedFrontend/resultView/resultView.ts and 3 other locations - About 3 hrs to fix
src/embeddedFrontend/resultView/resultView.ts on lines 151..156
src/embeddedFrontend/resultView/resultView.ts on lines 157..162
src/embeddedFrontend/resultView/resultView.ts on lines 163..168

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        this.sourceCodeComponent.onTranslatedVertexSourceClicked.add((sourceCodeState) => {
            const state = this.mvx.getGenericState<ISourceCodeState>(this.sourceCodeComponentStateId);
            state.fragment = false;
            state.translated = true;
            this.mvx.updateState(this.sourceCodeComponentStateId, state);
Severity: Major
Found in src/embeddedFrontend/resultView/resultView.ts and 3 other locations - About 3 hrs to fix
src/embeddedFrontend/resultView/resultView.ts on lines 157..162
src/embeddedFrontend/resultView/resultView.ts on lines 163..168
src/embeddedFrontend/resultView/resultView.ts on lines 169..174

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export class GetTransformFeedbackVarying extends BaseCommand {
    public static readonly commandName = "getTransformFeedbackVarying";

    protected get spiedCommandName(): string {
        return GetTransformFeedbackVarying.commandName;
Severity: Major
Found in src/backend/commands/getTransformFeedbackVarying.ts and 3 other locations - About 3 hrs to fix
src/backend/commands/getActiveAttrib.ts on lines 3..17
src/backend/commands/getActiveUniform.ts on lines 3..17
src/backend/commands/getShaderPrecisionFormat.ts on lines 3..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export class GetShaderPrecisionFormat extends BaseCommand {
    public static readonly commandName = "getShaderPrecisionFormat";

    protected get spiedCommandName(): string {
        return GetShaderPrecisionFormat.commandName;
Severity: Major
Found in src/backend/commands/getShaderPrecisionFormat.ts and 3 other locations - About 3 hrs to fix
src/backend/commands/getActiveAttrib.ts on lines 3..17
src/backend/commands/getActiveUniform.ts on lines 3..17
src/backend/commands/getTransformFeedbackVarying.ts on lines 3..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        this.sourceCodeComponent.onTranslatedFragmentSourceClicked.add((sourceCodeState) => {
            const state = this.mvx.getGenericState<ISourceCodeState>(this.sourceCodeComponentStateId);
            state.fragment = true;
            state.translated = true;
            this.mvx.updateState(this.sourceCodeComponentStateId, state);
Severity: Major
Found in src/embeddedFrontend/resultView/resultView.ts and 3 other locations - About 3 hrs to fix
src/embeddedFrontend/resultView/resultView.ts on lines 151..156
src/embeddedFrontend/resultView/resultView.ts on lines 163..168
src/embeddedFrontend/resultView/resultView.ts on lines 169..174

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export class GetActiveAttrib extends BaseCommand {
    public static readonly commandName = "getActiveAttrib";

    protected get spiedCommandName(): string {
        return GetActiveAttrib.commandName;
Severity: Major
Found in src/backend/commands/getActiveAttrib.ts and 3 other locations - About 3 hrs to fix
src/backend/commands/getActiveUniform.ts on lines 3..17
src/backend/commands/getShaderPrecisionFormat.ts on lines 3..17
src/backend/commands/getTransformFeedbackVarying.ts on lines 3..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        this.sourceCodeComponent.onVertexSourceClicked.add((sourceCodeState) => {
            const state = this.mvx.getGenericState<ISourceCodeState>(this.sourceCodeComponentStateId);
            state.fragment = false;
            state.translated = false;
            this.mvx.updateState(this.sourceCodeComponentStateId, state);
Severity: Major
Found in src/embeddedFrontend/resultView/resultView.ts and 3 other locations - About 3 hrs to fix
src/embeddedFrontend/resultView/resultView.ts on lines 151..156
src/embeddedFrontend/resultView/resultView.ts on lines 157..162
src/embeddedFrontend/resultView/resultView.ts on lines 169..174

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            else {
                openButton.setAttribute("open", "true");
                for (let i = 0; i < lis.length; i++) {
                    (lis[i] as HTMLElement).style.display = "block";
                    (lis[i] as HTMLElement).style.visibility = "visible";
src/embeddedFrontend/resultView/menu/resultViewMenuComponent.ts on lines 64..70

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if (openButton.getAttribute("open") === "true") {
                openButton.setAttribute("open", "false");
                for (let i = 0; i < lis.length; i++) {
                    (lis[i] as HTMLElement).style.display = "none";
                    (lis[i] as HTMLElement).style.visibility = "hidden";
src/embeddedFrontend/resultView/menu/resultViewMenuComponent.ts on lines 71..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if (this.cachedCurrentDomNode && this.cachedCurrentDomNode.parentElement) {
            if (this.cachedCurrentDomNode.remove) {
                this.cachedCurrentDomNode.remove();
            }
            else if (this.cachedCurrentDomNode.parentNode) {
Severity: Major
Found in src/embeddedFrontend/mvx/componentInstance.ts and 1 other location - About 2 hrs to fix
src/embeddedFrontend/mvx/componentInstance.ts on lines 74..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if (this.domNode && this.domNode.parentElement) {
            if (this.domNode.remove) {
                this.domNode.remove();
            }
            else if (this.domNode.parentNode) {
Severity: Major
Found in src/embeddedFrontend/mvx/componentInstance.ts and 1 other location - About 2 hrs to fix
src/embeddedFrontend/mvx/componentInstance.ts on lines 82..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/uniformArray.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/scissorClear.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/simple.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/depthRange.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/transient.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/customMarker.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/customLog.js and 11 other locations - About 2 hrs to fix
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/uniformCommand.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/customShaderName.js on lines 369..375
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 12 locations. Consider refactoring.
Open

function setMatrixUniforms() {
  var pUniform = gl.getUniformLocation(shaderProgram, "uPMatrix");
  gl.uniformMatrix4fv(pUniform, false, new Float32Array(perspectiveMatrix.flatten()));

  var mvUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
Severity: Major
Found in sample/js/customShaderName.js and 11 other locations - About 2 hrs to fix
sample/js/customLog.js on lines 371..377
sample/js/customMarker.js on lines 372..378
sample/js/depthRange.js on lines 376..382
sample/js/scissorClear.js on lines 377..383
sample/js/setTimeout.js on lines 377..383
sample/js/simple.js on lines 378..384
sample/js/simpleNoCommand.js on lines 365..371
sample/js/stencilBits.js on lines 369..375
sample/js/transient.js on lines 376..382
sample/js/uniformArray.js on lines 328..334
sample/js/uniformCommand.js on lines 368..374

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language