Giter VIP home page Giter VIP logo

Comments (33)

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

When it spins, you mean?
screenshot from 2015-06-14 19 03 23

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

yeah that tick thing. really annoying

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

It could be something to do with line 175 of Canvas.js. I have no idea why, but I had to do this.ctx.lineto(x, y) where x and y are already the position of the pen. Without that line, some polygons are filled wrong.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

That is, an arc has been drawn from point A to point B, and before another arc can be drawn from point B to point C, a line must be drawn from point B to point B.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

No, I removed that line and it doesn't fix this problem.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

It doesn't seem to be related to the styling, either. I removed all but the c.ctx.strokeStyle = color, and can still see it.

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

I think it's something to do with the c.ctx.lineWidth = 2;

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

I thought so, too, but I removed it, and it still had the problem.

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

I changed it to 1 and that solved it but I wanted 2px

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

width 1:
screenshot from 2015-06-14 19 20 02

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

What browser are you using, by the way?

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

chrome. you?

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

try removing the shadowBlur

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

Firefox. Could explain why width of 1 works for you.

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

what maybe it's not. I did see some flickering. I couldn't find a frame where a tick came up

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

I remove all but the color, and it still happens.

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

maybe it's the floating point

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

that possible? i dunno

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

I don't think so. It only happens with stroke. Fill seems to work fine.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

I suppose that doesn't prove that it's not a floating point error.

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

maybe it's a bug that nobody fixed for 10 years in some low level libarary

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

what os are you using? I'm thinking it's a bug in linux somewhere

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

Ubuntu.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

It gets a bit more clear with a wider stroke. See that gap?
screenshot from 2015-06-14 19 34 27

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

I tried it on windows. still happends

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

when this is fixed I want an option to turn it on and off.
https://gist.github.com/x13machine/a8af1b73ec3eec927f1d

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

Ha, we'll see.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

A separate issue occurs for certain canvas size:
screenshot from 2015-06-18 18 14 33

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

This function seems to do it less:

function drawPolygon(c,p){
    var vertices = p.vertices;
    var n = vertices.length;
    var start = c.at(vertices[0])
    for (var i = 0; i < n; i++) {
        c.ctx.beginPath();
        c.drawPath(Line.givenTwoPoints(vertices[i], vertices[(i + 1) % n]));
        c.ctx.stroke();
        c.ctx.closePath();
    }
    return true;
}

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

I'm think that the other rendering problems are do to algorithm problems.

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

I tested this with your awesome.html file, and the problem seems to occur just as frequently. It also now has the problem that I mentioned in my previous comment on the 18th of June. Since the lines are no longer a part of the same path, the polygon can't be filled.

from hyperbolic-canvas.

x13machine avatar x13machine commented on July 21, 2024

hyper

only the player does it

from hyperbolic-canvas.

ItsNickBarry avatar ItsNickBarry commented on July 21, 2024

This can be fixed by setting the lineJoin property on the canvas context to "round".

canvas.setContextProperties({ lineJoin: 'round' });

Unfortunately, this fix precludes the possibility of sharp corners. I was able to reduce the effect of the bug, but not remove it entirely, instead modifying the miterLimit property.

from hyperbolic-canvas.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.