Add a test
This commit is contained in:
20
examples/materials.json
Normal file
20
examples/materials.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"materials": {
|
||||
"metal": {
|
||||
"reflectivity": 1.0
|
||||
},
|
||||
"plastic": {
|
||||
"reflectivity": 0.5
|
||||
}
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
"name": "hero",
|
||||
"material": "metal"
|
||||
},
|
||||
{
|
||||
"name": "monster",
|
||||
"material": "plastic"
|
||||
}
|
||||
]
|
||||
}
|
20
examples/materials.ron
Normal file
20
examples/materials.ron
Normal file
@ -0,0 +1,20 @@
|
||||
Scene( // class name is optional
|
||||
materials: { // this is a map
|
||||
"metal": (
|
||||
reflectivity: 1.0,
|
||||
),
|
||||
"plastic": (
|
||||
reflectivity: 0.5,
|
||||
),
|
||||
},
|
||||
entities: [ // this is an array
|
||||
(
|
||||
name: "hero",
|
||||
material: "metal",
|
||||
),
|
||||
(
|
||||
name: "monster",
|
||||
material: "plastic",
|
||||
),
|
||||
],
|
||||
)
|
Reference in New Issue
Block a user