---
prefabs:
  - name: "rb_environment"
    components:
      gfx::material:
        ambient: [0.0215, 0.1754, 0.0215]
        diffuse: [1, 1, 1]
        specular: [0.0633, 0.727811, 0.633]
        shininess: 16
  - name: "rb_wallX"
    parent: "rb_environment"
    components:
      Transform:
      StaticMesh:
        pipeline: redbook/debug
        shape_id: "mesh_rb_wall_x"
        shape:
          type: box
          scale: [1.0, 5.0, 41]
      phys::Body:
        type: static
        shape:
          type: box
          extents: [0.5, 2.5, 20.5]
  # Wall Z shorter to avoid z-fighting
  - name: "rb_wallZ"
    parent: "rb_environment"
    components:
      Transform:
      StaticMesh:
        pipeline: redbook/debug
        shape_id: "mesh_rb_wall_z"
        shape:
          type: box
          scale: [39, 5, 1]
      phys::Body:
        type: static
        shape:
          type: box
          extents: [ 19.5, 2.5, 0.5 ]
  - name: "rb_floor"
    parent: "rb_environment"
    components:
      Transform:
      StaticMesh:
        pipeline: redbook/debug
        shape_id: "mesh_rb_floor"
        shape:
          type: box # we don't (currently) support planes...
          scale: [39, 0.5, 39]
      phys::Body:
        type: static
        shape:
          type: box # we don't (currently) support planes...
          extents: [19.5, 0.25, 19.5]
  - name: rb_player
    components:
      Transform:
      StaticMesh:
        pipeline: redbook/debug
        shape_id: "mesh_rb_player"
        shape:
          type: sphere
      gfx::material:
        ambient: [0.25, 0.25, 0.25]
        diffuse: [0.4, 0.4, 0.4]
        specular: [0.774597,0.774597,0.774597]
        shininess: 16
      phys::Body:
        shape:
          type: sphere
          radius: 1
  - name: rb_collectable
    tags:
      - "collectable"
    components:
      Transform:
      StaticMesh:
        pipeline: redbook/debug
        shape_id: "mesh_rb_collect"
        shape:
          type: box
      gfx::material:
        ambient: [0.0215, 0.1754, 0.0215]
        diffuse: [1, 1, 1]
        specular: [0.0633, 0.727811, 0.633]
        shininess: 16
      phys::Body:
        type: kinematic
        shape:
          type: box
  - name: rb_light
    components:
      Transform:
      gfx::phong::directional:
        direction: [10, 5, 0]
scene:
  - prefab: rb_wallX
    components:
      Transform:
        origin: [20, 0, 0]
  - prefab: rb_wallX
    components:
      Transform:
        origin: [-20, 0, 0]
  - prefab: rb_wallZ
    components:
      Transform:
        origin: [0, 0, -20]
  - prefab: rb_wallZ
    components:
      Transform:
        origin: [0, 0, 20]
  - prefab: rb_floor
    components:
      Transform:
        origin: [0, -2.5, 0]
  - prefab: rb_collectable
    components:
      Transform:
        origin: [-5, -0.5, 12]
  - prefab: rb_collectable
    components:
      Transform:
        origin: [15, -0.5, 0.5]
  - prefab: rb_collectable
    components:
      Transform:
        origin: [6, -0.5, -15]
  - prefab: rb_player
    name: "player"
  - prefab: rb_light
scripts:
  - "rollball.lua"