UNPKG

@gmetrixr/rjson

Version:
17 lines (16 loc) 530 B
import { r, rtp, RT } from "../../../r"; /** * Converts pano image and pano video's rotation_offset to pano_yaw_correction */ class Migration { execute(projectJson) { const pJson = projectJson; const projectF = r.record(pJson); for (const e of projectF.getAllDeepChildren(RT.element)) { r.record(e).changePropertyName("rotation_offset", "pano_yaw_correction"); } projectF.set(rtp.project.version, 112); } } const migration = new Migration(); export default migration;