threepipe
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

ContactShadowGroundPlugin.md 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. prev:
  3. text: 'TransformControlsPlugin'
  4. link: './TransformControlsPlugin'
  5. next:
  6. text: 'GLTFAnimationPlugin'
  7. link: './GLTFAnimationPlugin'
  8. ---
  9. # ContactShadowGroundPlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#contact-shadow-ground-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/extras/ContactShadowGroundPlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/ContactShadowGroundPlugin.html)
  14. Contact Shadow Ground Plugin adds a ground plane with three.js contact shadows to the viewer scene.
  15. The plane is added to the scene root at runtime and not saved with scene export. Instead, the plugin settings are saved with the scene.
  16. It inherits from the base class [BaseGroundPlugin](https://threepipe.org/docs/classes/BaseGroundPlugin.html) which provides generic ground plane functionality. Check the source code for more details. With the property `autoAdjustTransform`, the ground plane is automatically adjusted based on the bounding box of the scene.
  17. ```typescript
  18. import {ThreeViewer, ContactShadowGroundPlugin} from 'threepipe'
  19. const viewer = new ThreeViewer({...})
  20. viewer.addPluginSync(new ContactShadowGroundPlugin())
  21. ```