Skip to content

Commit

Permalink
resources: fix script test repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Oct 13, 2024
1 parent 3db230f commit 7637df2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions resources/rgbscripts/sinewave.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ var testAlgo;
algo.frequency = 100;
algo.properties.push("name:frequency|type:range|display:Frequency|values:1,400|write:setFrequency|read:getFrequency");

algo.currentStep = 0;

algo.setOrientation = function(_orientation)
{
if (_orientation === "Vertical") { algo.orientation = 1; }
Expand Down Expand Up @@ -89,7 +87,7 @@ var testAlgo;

for (var cStep = 0; cStep < stepsWidth; cStep++)
{
var sineStep = algo.currentStep + cStep;
var sineStep = step + cStep;
if (sineStep >= stepsWidth)
sineStep -= stepsWidth;
var sinPos = Math.sin((sineStep * 2 * Math.PI) / stepsTotal) * ampFactor;
Expand Down Expand Up @@ -125,7 +123,6 @@ var testAlgo;

lastPos = sinPos;
}
algo.currentStep++;

return map;
};
Expand Down

0 comments on commit 7637df2

Please sign in to comment.