Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
asukaminato0721 committed Jun 29, 2023
1 parent 1d2c7e3 commit 63eb85f
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/webgl/p5.RendererGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,14 @@ p5.RendererGL = class RendererGL extends p5.Renderer {

this.fontInfos = {};

this._curShader = undefined;
this._curShader = undefined;

return this;
};

p5.RendererGL.prototype = Object.create(p5.Renderer.prototype);
return this;
}

//////////////////////////////////////////////
// Setting
//////////////////////////////////////////////
//////////////////////////////////////////////
// Setting
//////////////////////////////////////////////

_setAttributeDefaults(pInst) {
// See issue #3850, safer to enable AA in Safari
Expand Down Expand Up @@ -1635,7 +1633,7 @@ p5.RendererGL.prototype = Object.create(p5.Renderer.prototype);
_arraysEqual(a, b) {
const aLength = a.length;
if (aLength !== b.length) return false;
return a.every((ai,i) => ai === b[i]);
return a.every((ai, i) => ai === b[i]);
}

_isTypedArray(arr) {
Expand Down Expand Up @@ -1701,7 +1699,7 @@ p5.RendererGL.prototype = Object.create(p5.Renderer.prototype);
}

// function to calculate BezierVertex Coefficients
_bezierCoefficients (t) {
_bezierCoefficients(t) {
const t2 = t * t;
const t3 = t2 * t;
const mt = 1 - t;
Expand All @@ -1711,23 +1709,23 @@ p5.RendererGL.prototype = Object.create(p5.Renderer.prototype);
}

// function to calculate QuadraticVertex Coefficients
_quadraticCoefficients (t) {
_quadraticCoefficients(t) {
const t2 = t * t;
const mt = 1 - t;
const mt2 = mt * mt;
return [mt2, 2 * mt * t, t2];
}

// function to convert Bezier coordinates to Catmull Rom Splines
_bezierToCatmull (w) {
_bezierToCatmull(w) {
const p1 = w[1];
const p2 = w[1] + (w[2] - w[0]) / this._curveTightness;
const p3 = w[2] - (w[3] - w[1]) / this._curveTightness;
const p4 = w[2];
const p = [p1, p2, p3, p4];
return p;
}
_initTessy () {
_initTessy() {
// function called for each vertex of tesselator output
function vertexCallback(data, polyVertArray) {
for (let i = 0; i < data.length; i++) {
Expand Down Expand Up @@ -1771,7 +1769,7 @@ p5.RendererGL.prototype = Object.create(p5.Renderer.prototype);
return tessy;
}

_triangulate (contours) {
_triangulate(contours) {
// libtess will take 3d verts and flatten to a plane for tesselation.
// libtess is capable of calculating a plane to tesselate on, but
// if all of the vertices have the same z values, we'll just
Expand Down Expand Up @@ -1801,7 +1799,7 @@ p5.RendererGL.prototype = Object.create(p5.Renderer.prototype);
const triangleVerts = [];
this._tessy.gluTessBeginPolygon(triangleVerts);

for(const contour of contours){
for (const contour of contours) {
this._tessy.gluTessBeginContour();
for (
let j = 0;
Expand Down

0 comments on commit 63eb85f

Please sign in to comment.