Clipping planes on material not working
bryaan opened this issue · comments
Bryan Alexander Rivera commented
Is it possible to clip troika-three-text using clipping planes?
It doesn't seem to be working.
import { Text } from 'troika-three-text'
const minClippingPlane = new THREE.Plane(new THREE.Vector3(0, -1, 0), 1)
const maxClippingPlane = new THREE.Plane(new THREE.Vector3(0, -1, 0), 1)
const text = new Text()
text.text = "Hello"
text.material.clipPlanes = [minClippingPlane, maxClippingPlane]
text.material.clipIntersection = true
Jason Johnston commented
Clipping planes appear to work as expected for me. It's material.clippingPlanes
not material.clipPlanes
, and you have to set renderer.localClippingEnabled = true
per the ThreeJS docs.