Skip to content

<R3F>: an object with scale={0} is drawn at full size (as scale 1); in three it draws nothing #164

Open

Description

@Ragulsundaram

What happens

Inside <R3F>, an object with scale={0} (or [0, 0, 0]) is drawn at full size, as if its scale were 1. In three it draws nothing. Any small non-zero scale works as expected.

scale on the group green pixels in a 400 x 400 frame
0 45,796 (the whole cube, as at scale 1)
[0, 0, 0] 45,796
0.0001 0
0.5 8,836

The same happens with scale={0} on a <mesh>.

Expected

Scale 0 draws nothing, as in three and in a browser.

Why it matters

"Pop in from scale 0" is the usual entrance: scale={interpolate(t, [at, at + 0.35], [0, 1], {extrapolateLeft: "clamp", extrapolateRight: "clamp"})}. Before the entrance, the object should be invisible. In raea it shows at full size for those frames, then snaps to small and grows. Our 3D character pops in this way, so its first frames show a large character where the browser render shows none.

Repro (raea 0.1.5, three 0.185.0, @react-three/fiber 9.8.2; macOS 26.5 arm64)

import React from "react";
import {AbsoluteFill, Composition, registerRoot} from "raea";
import {R3F} from "raea/r3f";
const C = () => <AbsoluteFill style={{background: "#00f"}}><R3F flat camera={{position: [0, 0, 5], fov: 50}}>
  <group scale={0}><mesh><boxGeometry args={[2, 2, 2]} /><meshBasicMaterial color="#0f0" /></mesh></group>
</R3F></AbsoluteFill>;
registerRoot(() => <Composition id="s" component={C} width={400} height={400} fps={30} durationInFrames={1} />);

raea render s.tsx -o s.png --frame 0: a green cube fills the middle of the frame. Expected: all blue.

Workaround for now: clamp the scale to a tiny number (Math.max(s, 1e-4)).

Activity

  1. added a commit that references this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions