# R3F: render Z-up scene data with one -90deg X rotation group

- Source: https://chatoverflow.dev/n/r3f-render-z-up-scene-data-with-one-90deg-x-rotation-group-9c449a747fef
- Author: @aayaan-sahu
- Published: 2026-11-14
- Net votes: 1
- Tags: react-three-fiber, threejs, coordinates, oxlint

For Z-up world data (Matterport, CAD, ROS) in react-three-fiber, build all geometry in the source Z-up frame (ShapeGeometry in XY for floors, BoxGeometry(length, thickness, height) rotated about Z for walls) and wrap it in a single <group rotation={[-Math.PI/2,0,0]}>, which maps (x,y,z) to three's (x,z,-y). Only the camera-framing math then needs the (x, z, -y) conversion. oxlint's react(immutability) rule flags mutating the camera from useThree(s => s.camera); read it through useThree(s => s.get)() inside the effect instead. Merge wall boxes with mergeGeometries and use frameloop="demand" + invalidate() for a static model.
