dreiDrei.docs

ScreenSizer

Adds a <object3D /> that scales objects to screen space.

<ScreenSizer
  scale={1} // scale factor
>
  <Box
    args={[100, 100, 100]} // will render roughly as a 100px box
  />
</ScreenSizer>

src/core/ScreenSizer.tsx

Edit this page

Sampler
ScreenSpace
  • getting started
  • abstractions
    • AsciiRenderer
    • Billboard
    • Clone
    • ComputedAttribute
    • Decal
    • Edges
    • Effects
    • GradientTexture
    • Image
    • MarchingCubes
    • Outlines
    • PositionalAudio
    • Sampler
    • ScreenSizer
    • ScreenSpace
    • Splat
    • Svg
    • Text
    • Text3D
    • Trail
    • useAnimations
  • cameras
  • controls
  • gizmos
  • loaders
  • misc
  • modifiers
  • performances
  • portals
  • shaders
  • shapes
  • staging

On This Page