Three.js: SVGLoader.pointsToStroke doesn't work when strokeLineJoin is 'round'

Created on 7 Nov 2019  路  3Comments  路  Source: mrdoob/three.js

Using the geometry text stroke example from here: https://threejs.org/examples/#webgl_geometry_text_stroke

I've added the SVG style property strokeLineJoin: "round" to the geometry style, expecting that the stroke text would become rounded (as is the case with regular SVG). However the strokeText no longer renders at all. No messages logged to the console.

I've created a test case; https://codesandbox.io/s/charming-fermat-crsl5

The only change I've made is on line 61 where strokeLineJoin: "round" is added. I've commented it out for now. If you add it back the stroked text no longer renders.

Three.js version
  • [x] r110
Browser
  • [x] Chrome
  • [x] Firefox
  • [x] Safari
OS
  • [x] macOS
Examples Loaders

Most helpful comment

If I execute your sandbox with line 61 uncommented I get error "Too many iterations in a loop". It seems some limitation of that website.

If I add the same line to the official example and run locally, I get this result which is not totally correct but almost it is:
imagen

I can debug those artifacts in some days or a week.

(Note to me in the future): It seems there is only a missing triangle when the path between two rounded corners is only one straight segment.

All 3 comments

/ping @yomboprime

If I execute your sandbox with line 61 uncommented I get error "Too many iterations in a loop". It seems some limitation of that website.

If I add the same line to the official example and run locally, I get this result which is not totally correct but almost it is:
imagen

I can debug those artifacts in some days or a week.

(Note to me in the future): It seems there is only a missing triangle when the path between two rounded corners is only one straight segment.

Wow, can't believe it was actually an issue with codesandbox - I should have checked it locally first. Many thanks @yomboprime.

FYI The artefacts aren't a deal breaker so no rush from me at all. Great work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

jlaquinte picture jlaquinte  路  3Comments

filharvey picture filharvey  路  3Comments

alexprut picture alexprut  路  3Comments

akshaysrin picture akshaysrin  路  3Comments