Three/R168/ViewportTopLeft To ViewportUV

1.0.1Last update Jan 10, 2025
by@yugal41735

This codemod replaces viewportTopLeft with viewportUV

Example

Before

import { toneMapping, color, viewportTopLeft } from "three/nodes";

After

import { toneMapping, color, viewportUV } from "three/nodes";

Before

scene.backgroundNode = viewportTopLeft.y.mix(color(0x66bbff), color(0x4466ff));

After

scene.backgroundNode = viewportUV.y.mix(color(0x66bbff), color(0x4466ff));

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now