dreiDrei.docs

useCamera

  • Viewcube
    Viewcube

A hook for the rare case when you are using non-default cameras for heads-up-displays or portals, and you need events/raytracing to function properly (raycasting uses the default camera otherwise).

<mesh raycast={useCamera(customCamera)} />

src/core/useCamera.tsx

Edit this page

useBoxProjectedEnv
useContextBridge
  • getting started
  • abstractions
  • cameras
  • controls
  • gizmos
  • loaders
  • misc
    • CubeCamera / useCubeCamera
    • CycleRaycast
    • DetectGPU / useDetectGPU
    • Example
    • FaceLandmarker
    • Fbo / useFBO
    • Html
    • Select
    • Sprite Animator
    • StatsGl
    • Stats
    • Trail / useTrail
    • useAspect
    • useBoxProjectedEnv
    • useCamera
    • useContextBridge
    • useCursor
    • useDepthBuffer
    • useIntersect
    • useSurfaceSampler
    • Wireframe
  • modifiers
  • performances
  • portals
  • shaders
  • shapes
  • staging

On This Page