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.

ContactShadowGroundPlugin.md 1.2KB


prev:

text: 'TransformControlsPlugin'
link: './TransformControlsPlugin'

next:

text: 'GLTFAnimationPlugin'
link: './GLTFAnimationPlugin'

ContactShadowGroundPlugin

ExampleSource CodeAPI Reference

Contact Shadow Ground Plugin adds a ground plane with three.js contact shadows to the viewer scene.

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.

It inherits from the base class BaseGroundPlugin 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.

import {ThreeViewer, ContactShadowGroundPlugin} from 'threepipe'

const viewer = new ThreeViewer({...})

viewer.addPluginSync(new ContactShadowGroundPlugin())