Skip to content

Instantly share code, notes, and snippets.

@neilsjefferies
Created June 5, 2025 09:52
Show Gist options
  • Save neilsjefferies/899aef9e1b5fc6e59c411194e9f2cee7 to your computer and use it in GitHub Desktop.
Save neilsjefferies/899aef9e1b5fc6e59c411194e9f2cee7 to your computer and use it in GitHub Desktop.
{
"@context": "http://iiif.io/api/presentation/4/context.json",
"id": "https://example.org/iiif/3d/model_transform_translate_scale_position.json",
"type": "Manifest",
"label": {
"en": [
"Scaled Model with original for comparison"
]
},
"summary": {
"en": [
"Viewer should render the model twice, once at normal scale and once at double scale, and then the viewer should add default lighting and camera"
]
},
"items": [
{
"id": "https://example.org/iiif/scene1/page/p1/1",
"type": "Scene",
"label": {
"en": [
"A Scene"
]
},
"items": [
{
"id": "https://example.org/iiif/scene1/page/p1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://example.org/iiif/3d/anno1",
"type": "Annotation",
"motivation": [
"painting"
],
"body": {
"type": "SpecificResource",
"source": [
{
"id": "https://raw.githubusercontent.com/IIIF/3d/main/assets/astronaut/astronaut.glb",
"type": "Model",
"format": "model/gltf-binary"
}
],
"transform": [
{
"type": "ScaleTransform",
"x": 1,
"y": 1,
"z": 1
},
{
"type": "RotateTransform",
"x": 110.8444136471869,
"y": -1.7249184888347212e-14,
"z": -1.1889551155199823e-14
},
{
"type": "TranslateTransform",
"x": -3.3198063021840998,
"y": 3.3811465055164165,
"z": 2.948456752786014
}
]
},
"target": {
"type": "SpecificResource",
"source": [
{
"id": "https://example.org/iiif/scene1/page/p1/1",
"type": "Scene"
}
],
"selector": [
{
"type": "PointSelector",
"x": 0,
"y": 0,
"z": 0
}
]
}
},
{
"id": "https://example.org/iiif/3d/anno2",
"type": "Annotation",
"motivation": [
"painting"
],
"body": {
"type": "SpecificResource",
"source": [
{
"id": "https://raw.githubusercontent.com/IIIF/3d/main/assets/astronaut/astronaut.glb",
"type": "Model",
"format": "model/gltf-binary"
}
],
"transform": [
{
"type": "ScaleTransform",
"x": 2,
"y": 2,
"z": 2
},
{
"type": "RotateTransform",
"x": 0,
"y": 0,
"z": 0
},
{
"type": "TranslateTransform",
"x": 1,
"y": 0,
"z": 0
}
]
},
"target": {
"type": "SpecificResource",
"source": [
{
"id": "https://example.org/iiif/scene1/page/p1/1",
"type": "Scene"
}
],
"selector": [
{
"type": "PointSelector",
"x": 0,
"y": 0,
"z": 0
}
]
}
}
]
}
],
"backgroundColor": "#7c8995"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment