Canvas rendering issues / Text Transition rendering issues
swpalmer at gmail.com
Wed Jan 2 18:36:38 PST 2013
Are the path-based vector enemies using Paths in a Group? I got hit by the Group using the visual bounds (like I wanted it to, since I was putting transformed stuff in a ScrollPane). I would apply a glow effect (actually a bright Shadow, since I can't yet use CSS to apply a glow) and that would cause the visual bounds to increase in the negative direction and bump the whole Group over to accommodate rendering the negative bits of the effect within the Group's bounds.
On 2013-01-02, at 9:07 PM, Jim Graham <james.graham at oracle.com> wrote:
> I noticed that the path-based Vector enemies jump around a bit. I'm wondering if this could be due to the bounds of the enemy shifting around as the electric lines are added. Note that you use a stroked Path with its default decorations which I believe means miter joins which can have spikes in their contributions to bounds when you turn tight corners, so as the last triangular segment is randomly generated the angle of that last corner to the end before the path is closed can shoot out a miter of arbitrary length.
> Try using a round or bevel join instead - both of which will have faster and more stable bounds computations anyway which can avoid some per-frame overhead. Round would be the most stable choice for bounds, but bevel would be the fastest to render. Another technique for making the bounds stable is to include an element that pads the bounds of your group beyond the most outlying "jittery" element. For example, including a transparent rectangle whose bounds exceed the circle by enough to encompass the spiking of the miter joins or the tiny variations in the bevel joins would smooth out the stability of the bounds. The bounds with round joins will always be fairly stable since they always have a constant stroke extension distance from the outermost points of a path...
More information about the openjfx-dev