Comments (5)
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.
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.
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.
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.
A fix for this has been checked in. Please see separate issue for explanation of what changed.
from starling-extension-graphics.
Related Issues (20)
- graphicsEx.graphics.postProcess() works strange HOT 2
- when draw line and change thickness stroke incorrect HOT 1
- Why it doesn't use ddx/ddy oppcodes for curve drawing? HOT 1
- Stage resize - null material HOT 2
- TypeError: Error #1034 HOT 3
- Width returns 0 HOT 4
- Shapes cannot be touched HOT 1
- Texture no repeat in TextureVertexColorFragmentShader HOT 8
- Texture restoration after context loss HOT 3
- Duplicate variable definition of function paramters HOT 5
- extra comma in TextureMaterial class HOT 1
- graphics.moveTo doesn't work in this situation HOT 3
- Starling 2 HOT 46
- Add and update dependency version HOT 1
- Context loss SEG not recovering - No valid program set. HOT 5
- starling.core.RenderSupport problem with Starling 2 HOT 4
- Readme needs more detail
- Error #3600: No valid program set. HOT 3
- Stroke Problem
- Is TextureFill supported with starling 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starling-extension-graphics.