Update test for scene document JSON migration
This commit is contained in:
@@ -1373,6 +1373,9 @@ describe("scene document JSON", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("migrates v19 whitebox boxes without volume settings to the current schema version", () => {
|
it("migrates v19 whitebox boxes without volume settings to the current schema version", () => {
|
||||||
|
const legacyBrush = createBoxBrush({
|
||||||
|
id: "brush-legacy"
|
||||||
|
});
|
||||||
const migratedDocument = migrateSceneDocument({
|
const migratedDocument = migrateSceneDocument({
|
||||||
version: WHITEBOX_GEOMETRY_SCENE_DOCUMENT_VERSION,
|
version: WHITEBOX_GEOMETRY_SCENE_DOCUMENT_VERSION,
|
||||||
name: "Legacy Whitebox Volume Scene",
|
name: "Legacy Whitebox Volume Scene",
|
||||||
@@ -1391,23 +1394,11 @@ describe("scene document JSON", () => {
|
|||||||
"brush-legacy": {
|
"brush-legacy": {
|
||||||
id: "brush-legacy",
|
id: "brush-legacy",
|
||||||
kind: "box",
|
kind: "box",
|
||||||
center: {
|
center: legacyBrush.center,
|
||||||
x: 0,
|
rotationDegrees: legacyBrush.rotationDegrees,
|
||||||
y: 1,
|
size: legacyBrush.size,
|
||||||
z: 0
|
geometry: legacyBrush.geometry,
|
||||||
},
|
faces: legacyBrush.faces
|
||||||
rotationDegrees: {
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
z: 0
|
|
||||||
},
|
|
||||||
size: {
|
|
||||||
x: 2,
|
|
||||||
y: 2,
|
|
||||||
z: 2
|
|
||||||
},
|
|
||||||
geometry: createBoxBrush({ id: "brush-legacy-geometry" }).geometry,
|
|
||||||
faces: createBoxBrush({ id: "brush-legacy-faces" }).faces
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modelInstances: {},
|
modelInstances: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user