GithubHelp home page GithubHelp logo

Comments (5)

jonathanrpace avatar jonathanrpace commented on June 19, 2024

Hey,

I'm not able to see how or why the stroke class would do its work twice in a frame. The validateNow() function only calls buildGeometry() if 'isInvalid == true'.

How are reproducing this?

from starling-extension-graphics.

IonSwitz avatar IonSwitz commented on June 19, 2024

The thing I was trying out was to avoid having the geometry generated during the render phase,
and instead be able to call validateNow before rendering starts, such as in a initialization stage.

However, since the "isInvalid" is only set to false in the render phase, this isn't possible.

So, even if I call validateNow in the initialization stage, the geometry will be re-generated during the first call to render(), and that can cause frame-rate hickups.

Maybe I was being unclear about the "being called twice"-reasoning, but I hope this explains the issue better?

from starling-extension-graphics.

jonathanrpace avatar jonathanrpace commented on June 19, 2024

Gotcha - seems like a bug to me (it really shouldn't be validating the geometry again if you've already called validateNow()). Will take a look in a few days (out of the country at the moment)

from starling-extension-graphics.

IonSwitz avatar IonSwitz commented on June 19, 2024

It's a no-brainer, really, to implement. I could throw something together if you prefer.

All it needs is a boolean flag to check if the geometry has been built already.:)

from starling-extension-graphics.

IonSwitz avatar IonSwitz commented on June 19, 2024

A fix for this has been checked in. Please see separate issue for explanation of what changed.

#79

from starling-extension-graphics.

Related Issues (20)

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.