Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svg , other shapes then concave ? #347

Open
winniejo opened this issue Jan 28, 2023 · 1 comment
Open

svg , other shapes then concave ? #347

winniejo opened this issue Jan 28, 2023 · 1 comment

Comments

@winniejo
Copy link

winniejo commented Jan 28, 2023

Have a question?

taken from the svg example, I used convex' instead of "concave";
src/examples/create-3d-geometry-from-svg-file.html
bridge.shape = 'convex'
But convex did nothing,for the bridge.svg example.

Are there other shapes then convex and concave for a more rounded result?

I also played around with the Angular/liniearFactor(0,0,0) numbers
but that had no effect either.
bridge.body.setAngularFactor(0, 0, 0)
bridge.body.setLinearFactor(0, 0, 0)

@yandeu
Copy link
Member

yandeu commented Jan 30, 2023

concave and convex to not have an impact on the shape, but on the physics body.
If you add this.third.physics.debug.enable(), you will see the body.

You are probably looking for:

// extrude the shape to a 3d object
const bridge = this.third.add.extrude({
  shape: bridgeShape[0],
  depth: 120,
  bevelEnabled: true,
  bevelThickness: 10,
  bevelSize: 10,
  bevelSegments: 10,
  bevelOffset: 0
})

See https://threejs.org/docs/#api/en/geometries/ExtrudeGeometry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants