Skip to content

Commit

Permalink
[WIP] structured merge of scene files by pointer index dereferencing
Browse files Browse the repository at this point in the history
  • Loading branch information
sdumetz committed Jan 8, 2024
1 parent 5c597eb commit 8999a9d
Show file tree
Hide file tree
Showing 11 changed files with 841 additions and 307 deletions.
78 changes: 78 additions & 0 deletions source/server/__test_fixtures/documents/01_simple.svx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"asset": {
"type": "application/si-dpo-3d.document+json",
"version": "1.0",
"copyright": "(c) Holusion SAS, all rights reserved",
"generator": "Voyager"
},
"scene": 0,
"scenes": [{
"nodes": [0, 1, 3],
"setup": 0,
"units": "cm"
}],
"nodes": [{
"camera": 0
}, {
"name": "Lights",
"children": [2]
}, {
"translation": [0, 0, 2],
"rotation": [0.1, 0.2, 0.2, 0.8],
"scale": [1, 1, 1],
"name": "Key",
"light": 0
}, {
"name": "Model Name",
"model": 0,
"meta": 0
}],
"cameras": [{
"type": "perspective",
"perspective": {
"yfov": 52,
"znear": 0.1,
"zfar": 100000
}
}],
"lights": [{
"color": [1, 0.95, 0.9],
"intensity": 1,
"type": "directional",
"shadowEnabled": true
}],
"models": [{
"units": "mm",
"boundingBox": {
"min": [10, 10, 10],
"max": [10, 10, 10]
},
"derivatives": [
{
"usage": "Web3D",
"quality": "High",
"assets": [
{
"uri": "models/foo.glb",
"type": "Model",
"byteSize": 150,
"numFaces": 25,
"imageSize": 1
}
]
}
]
}],
"metas":[
{
"collection": {
"titles": {
"EN": "Meta Title"
}
}
}
],
"setups": [{
"units": "cm"
}]
}
2 changes: 1 addition & 1 deletion source/server/routes/scenes/put/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Request, Response } from "express";
import { getUserId, getVfs } from "../../../utils/locals.js";
import { BadRequestError } from "../../../utils/errors.js";

import * as merge from "../../../utils/merge.js";
import * as merge from "../../../utils/merge/index.js";

/**
* Simple case of PUT /scenes/:scene/scene.svx.json
Expand Down
246 changes: 0 additions & 246 deletions source/server/utils/merge.test.ts

This file was deleted.

Loading

0 comments on commit 8999a9d

Please sign in to comment.