How to use the @babylonjs/core.Vector3.Up function in @babylonjs/core

To help you get started, we’ve selected a few @babylonjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brianzinn / react-babylonjs / stories / babylonjs / 2-withVR / with2DGUI.stories.js View on Github external
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 &&
github brianzinn / create-react-app-typescript-babylonjs / src / App.tsx View on Github external
const onButtonClicked = () => {
  if (sphere !== null) {
    sphere.physicsImpostor!.applyImpulse(Vector3.Up().scale(10), sphere.getAbsolutePosition())
  }
}
github brianzinn / react-babylonjs / stories / babylonjs / 3-physics / physics.stories.js View on Github external
const onButtonClicked = () => {
  if (sphere !== null) {
    sphere.physicsImpostor.applyImpulse(
      Vector3.Up().scale(10), sphere.getAbsolutePosition()
    )
  }
}
github brianzinn / react-babylonjs / stories / babylonjs / 1-basic / model.stories.js View on Github external
render () {
    let baseUrl = 'https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/'
    return (
      
        
          
          

          

          
        
      
    )
  }
}