This codemod helps in transforming PointerLockControls.getObject()
to controls.object
Example
Before
pointerLockControls.getObject().translateX(translationVelocity.x * delta);
After
controls.object.translateX(translationVelocity.x * delta);
Before
pointerLockControls.getObject().translateY(translationVelocity.y * delta);
After
controls.object.translateY(translationVelocity.y * delta);
Before
pointerLockControls.getObject().translateZ(translationVelocity.z * delta);
After
controls.object.translateZ(translationVelocity.z * delta);
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community