Last active
December 24, 2015 02:19
-
-
Save xoofx/6729956 to your computer and use it in GitHub Desktop.
This is a translation of the JSDL sample from the JSON Description Language http://area.autodesk.com/blogs/chris/json-scene-description-language.
You can copy paste the following YAML grammar on an online YAML parser (like http://yaml-online-parser.appspot.com/ )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# YAML Version of the JSDL Autodesk example http://area.autodesk.com/blogs/chris/json-scene-description-language | |
# This version is using flow nodes [ ] { } like JSON but is less verbose by removing all double quotes | |
{ | |
id: my_scene, | |
roots: [ | |
{ | |
assets: [Square], | |
children: [ | |
{ | |
transform: | |
[ | |
1, 0, 0, 3, | |
0, 1, 0, 4, | |
0, 0, 1, 5, | |
0, 0, 0, 1 | |
], | |
assets: [Square], | |
} | |
], | |
} | |
], | |
assets: [ | |
Square: { | |
representations: [ | |
threejs.geometry.json, | |
wavefront.obj, | |
alembic], | |
default: { | |
type: threejs.geometry.json, | |
value: { | |
vertexes: [ | |
[-1, 1, 0], | |
[1, 1, 0], | |
[1, -1, 0], | |
[-1, -1, 0], | |
], | |
faces: [ | |
[3, 2, 1], | |
[3, 1, 0], | |
] | |
} | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# YAML Version of the JSDL Autodesk example http://area.autodesk.com/blogs/chris/json-scene-description-language | |
# This version is using whitespace structured document (as python) mixed with some inline lists [] | |
id: my_scene, | |
roots: | |
- assets: [Square] | |
children: | |
- transform: | |
[ | |
1, 0, 0, 3, | |
0, 1, 0, 4, | |
0, 0, 1, 5, | |
0, 0, 0, 1 | |
] | |
assets: [Square] | |
assets: | |
- Square: | |
representations: | |
- threejs.geometry.json, | |
- wavefront.obj, | |
- alembic | |
default: | |
type: threejs.geometry.json, | |
value: | |
vertexes: [ | |
[-1, 1, 0], | |
[1, 1, 0], | |
[1, -1, 0], | |
[-1, -1, 0], | |
] | |
faces: [ | |
[3, 2, 1], | |
[3, 1, 0], | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id" : "my_scene" | |
"roots" : [ | |
{ | |
"assets" : ["Square"], | |
"children" : | |
[ | |
"transform" : | |
[ | |
1, 0, 0, 3, | |
0, 1, 0, 4, | |
0, 0, 1, 5, | |
0, 0, 0, 1 | |
] | |
"assets" : ["Square"], | |
], | |
} | |
], | |
"assets" : [ | |
"Square" : { | |
"representations" : [ | |
"threejs.geometry.json", | |
"wavefront.obj", | |
"alembic"], | |
"default" : { | |
"type" : "threejs.geometry.json", | |
"value" : { | |
"vertexes" : [ | |
[-1, 1, 0], | |
[1, 1, 0], | |
[1, -1, 0], | |
[-1, -1, 0], | |
], | |
"faces": [ | |
[3, 2, 1], | |
[3, 1, 0], | |
] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment