Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (
{
let { plane } = this.state
if (plane) {
let forwardRay = camera.getForwardRay()
plane.position = camera.position.clone().add(forwardRay.direction.scale(1.5 / camera.fov /* * forwardRay.length */))
plane.lookAt(camera.position, 0, Math.PI, Math.PI)
}
}}
/>
{this.state.showModal === true &&
const onButtonClicked = () => {
if (sphere !== null) {
sphere.physicsImpostor!.applyImpulse(Vector3.Up().scale(10), sphere.getAbsolutePosition())
}
}
const onButtonClicked = () => {
if (sphere !== null) {
sphere.physicsImpostor.applyImpulse(
Vector3.Up().scale(10), sphere.getAbsolutePosition()
)
}
}
render () {
let baseUrl = 'https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/'
return (
)
}
}