Skip to content

Commit

Permalink
Remove more lingering unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
davepagurek committed Oct 17, 2024
1 parent aeb5a39 commit 26c88bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
25 changes: 0 additions & 25 deletions src/webgl/p5.Shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1325,31 +1325,6 @@ function shader(p5, fn){
return this;
}

/* NONE OF THIS IS FAST OR EFFICIENT BUT BEAR WITH ME
*
* these shader "type" query methods are used by various
* facilities of the renderer to determine if changing
* the shader type for the required action (for example,
* do we need to load the default lighting shader if the
* current shader cannot handle lighting?)
*
**/

isNormalShader() {
return this.attributes.aNormal !== undefined;
}

isTextureShader() {
return this.samplers.length > 0;
}

isColorShader() {
return (
this.attributes.aVertexColor !== undefined ||
this.uniforms.uMaterialColor !== undefined
);
}

/**
* @chainable
* @private
Expand Down
12 changes: 0 additions & 12 deletions test/unit/webgl/p5.Shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,6 @@ suite('p5.Shader', function() {
assert.isTrue(curShader === null);
});

test('isNormalShader returns true if there is a normal attribute', function() {
var s = myp5._renderer._getNormalShader();
myp5.shader(s);
assert.isTrue(s.isNormalShader());
});

test('isNormalShader returns false if there is no normal attribute', function() {
var s = myp5._renderer._getPointShader();
myp5.shader(s);
assert.isFalse(s.isNormalShader());
});

suite('Hooks', function() {
let myShader;

Expand Down

0 comments on commit 26c88bb

Please sign in to comment.