threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MeshOptSimplifyModifierPlugin.md 871B

пре 1 година
123456789101112131415161718192021222324
  1. ---
  2. prev:
  3. text: 'SimplifyModifierPlugin'
  4. link: './SimplifyModifierPlugin'
  5. next: false
  6. ---
  7. # MeshOptSimplifyModifierPlugin
  8. [Example](https://threepipe.org/examples/#meshopt-simplify-modifier-plugin/) —
  9. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/extras/MeshOptSimplifyModifierPlugin.ts) —
  10. [API Reference](https://threepipe.org/docs/classes/MeshOptSimplifyModifierPlugin.html)
  11. Simplify modifier using [meshoptimizer](https://github.com/zeux/meshoptimizer) library. It Loads the library at runtime from a customisable CDN URL.
  12. Note: It does not guarantee that the geometry will be simplified to the exact target count.
  13. ```typescript
  14. const simplifyModifier = viewer.addPluginSync(new MeshOptSimplifyModifierPlugin())
  15. const root = await viewer.load('file.glb')
  16. simplifyModifier.simplifyAll(root, {factor: 0.75})
  17. ```