<mujoco model="Cube 3x3x3">
  <compiler autolimits="true" texturedir="assets"/>

  <option timestep="0.01" integrator="implicitfast"/>

  <size memory="600K"/>

  <visual>
    <global azimuth="180" elevation="-20"/>
    <headlight ambient="0.3 0.3 0.3" diffuse="0.6 0.6 0.6" specular="0 0 0"/>
  </visual>

  <statistic meansize="0.0087" extent="0.1"/>

  <default>
    <geom mass="0.00253704"/>
    <motor ctrlrange="-0.05 0.05"/>
    <default class="cubelet">
      <joint type="ball" armature="0.0001" damping="0.0005" frictionloss="0.001"/>
      <geom type="mesh" condim="1" mesh="cubelet" euler="0 0 90"/>
    </default>
    <default class="core">
      <geom type="sphere" contype="0" conaffinity="0" group="4" size="0.01"/>
    </default>
  </default>

  <asset>
    <texture type="skybox" builtin="gradient" width="512" height="512"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....F......" file="white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....B......" file="yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....D......" file="red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....U......" file="orange.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....R......" file="blue.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....L......" file="green.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....DF....." file="red_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....UF....." file="orange_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RF....." file="blue_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LF....." file="green_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....DB....." file="red_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....UB....." file="orange_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RB....." file="blue_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LB....." file="green_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....UD....." file="orange_red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RD....." file="blue_red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LD....." file="green_red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RU....." file="blue_orange.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LU....." file="green_orange.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RDF...." file="blue_red_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LDF...." file="green_red_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RUF...." file="blue_orange_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LUF...." file="green_orange_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RDB...." file="blue_red_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LDB...." file="green_red_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RUB...." file="blue_orange_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LUB...." file="green_orange_yellow.png"/>
    <material name="white" texture="white"/>
    <material name="yellow" texture="yellow"/>
    <material name="red" texture="red"/>
    <material name="orange" texture="orange"/>
    <material name="blue" texture="blue"/>
    <material name="green" texture="green"/>
    <material name="red_white" texture="red_white"/>
    <material name="orange_white" texture="orange_white"/>
    <material name="blue_white" texture="blue_white"/>
    <material name="green_white" texture="green_white"/>
    <material name="red_yellow" texture="red_yellow"/>
    <material name="orange_yellow" texture="orange_yellow"/>
    <material name="blue_yellow" texture="blue_yellow"/>
    <material name="green_yellow" texture="green_yellow"/>
    <material name="orange_red" texture="orange_red"/>
    <material name="blue_red" texture="blue_red"/>
    <material name="green_red" texture="green_red"/>
    <material name="blue_orange" texture="blue_orange"/>
    <material name="green_orange" texture="green_orange"/>
    <material name="blue_red_white" texture="blue_red_white"/>
    <material name="green_red_white" texture="green_red_white"/>
    <material name="blue_orange_white" texture="blue_orange_white"/>
    <material name="green_orange_white" texture="green_orange_white"/>
    <material name="blue_red_yellow" texture="blue_red_yellow"/>
    <material name="green_red_yellow" texture="green_red_yellow"/>
    <material name="blue_orange_yellow" texture="blue_orange_yellow"/>
    <material name="green_orange_yellow" texture="green_orange_yellow"/>
    <mesh name="cubelet" scale="1e-3 1e-3 1e-3"
          vertex="8.075   9.5    -8.075  -8.075   9.5    -8.075   8.075   9.5     8.075
                 -8.075   9.5     8.075  -9.5     8.075  -8.075  -9.5    -8.075  -8.075
                 -9.5     8.075   8.075  -9.5    -8.075   8.075   8.075  -9.5    -8.075
                  8.075  -9.5     8.075  -8.075  -9.5    -8.075  -8.075  -9.5     8.075
                  9.5     8.075   8.075   9.5    -8.075   8.075   9.5     8.075  -8.075
                  9.5    -8.075  -8.075   8.075   8.075   9.5    -8.075   8.075   9.5
                  8.075  -8.075   9.5    -8.075  -8.075   9.5     8.075  -8.075  -9.5
                 -8.075  -8.075  -9.5     8.075   8.075  -9.5    -8.075   8.075  -9.5"/>
  </asset>

  <worldbody>
    <light pos="0 0 1"/>
    <body name="core" childclass="cubelet">
      <geom class="core"/>
      <body name="pX">
        <joint name="pX" type="hinge" axis="1 0 0"/>
        <geom material="red" pos="0.019 0 0"/>
      </body>
      <body name="nX">
        <joint name="nX" type="hinge" axis="-1 0 0"/>
        <geom material="orange" pos="-0.019 0 0"/>
      </body>
      <body name="pY">
        <joint name="pY" type="hinge" axis="0 1 0"/>
        <geom material="blue" pos="0 0.019 0"/>
      </body>
      <body name="nY">
        <joint name="nY" type="hinge" axis="0 -1 0"/>
        <geom material="green" pos="0 -0.019 0"/>
      </body>
      <body name="pZ">
        <joint name="pZ" type="hinge" axis="0 0 1"/>
        <geom material="white" pos="0 0 0.019"/>
      </body>
      <body name="nZ">
        <joint name="nZ" type="hinge" axis="0 0 -1"/>
        <geom material="yellow" pos="0 0 -0.019"/>
      </body>
      <body name="pX_pY">
        <joint name="pX_pY"/>
        <geom material="blue_red" pos="0.019 0.019 0"/>
      </body>
      <body name="nY_pX">
        <joint name="nY_pX"/>
        <geom material="green_red" pos="0.019 -0.019 0"/>
      </body>
      <body name="pX_pZ">
        <joint name="pX_pZ"/>
        <geom material="red_white" pos="0.019 0 0.019"/>
      </body>
      <body name="nZ_pX">
        <joint name="nZ_pX"/>
        <geom material="red_yellow" pos="0.019 0 -0.019"/>
      </body>
      <body name="nX_pY">
        <joint name="nX_pY"/>
        <geom material="blue_orange" pos="-0.019 0.019 0"/>
      </body>
      <body name="nX_nY">
        <joint name="nX_nY"/>
        <geom material="green_orange" pos="-0.019 -0.019 0"/>
      </body>
      <body name="nX_pZ">
        <joint name="nX_pZ"/>
        <geom material="orange_white" pos="-0.019 0 0.019"/>
      </body>
      <body name="nX_nZ">
        <joint name="nX_nZ"/>
        <geom material="orange_yellow" pos="-0.019 0 -0.019"/>
      </body>
      <body name="pY_pZ">
        <joint name="pY_pZ"/>
        <geom material="blue_white" pos="0 0.019 0.019"/>
      </body>
      <body name="nZ_pY">
        <joint name="nZ_pY"/>
        <geom material="blue_yellow" pos="0 0.019 -0.019"/>
      </body>
      <body name="nY_pZ">
        <joint name="nY_pZ"/>
        <geom material="green_white" pos="0 -0.019 0.019"/>
      </body>
      <body name="nY_nZ">
        <joint name="nY_nZ"/>
        <geom material="green_yellow" pos="0 -0.019 -0.019"/>
      </body>
      <body name="pX_pY_pZ">
        <joint name="pX_pY_pZ"/>
        <geom material="blue_red_white" pos="0.019 0.019 0.019"/>
      </body>
      <body name="nZ_pX_pY">
        <joint name="nZ_pX_pY"/>
        <geom material="blue_red_yellow" pos="0.019 0.019 -0.019"/>
      </body>
      <body name="nY_pX_pZ">
        <joint name="nY_pX_pZ"/>
        <geom material="green_red_white" pos="0.019 -0.019 0.019"/>
      </body>
      <body name="nY_nZ_pX">
        <joint name="nY_nZ_pX"/>
        <geom material="green_red_yellow" pos="0.019 -0.019 -0.019"/>
      </body>
      <body name="nX_pY_pZ">
        <joint name="nX_pY_pZ"/>
        <geom material="blue_orange_white" pos="-0.019 0.019 0.019"/>
      </body>
      <body name="nX_nZ_pY">
        <joint name="nX_nZ_pY"/>
        <geom material="blue_orange_yellow" pos="-0.019 0.019 -0.019"/>
      </body>
      <body name="nX_nY_pZ">
        <joint name="nX_nY_pZ"/>
        <geom material="green_orange_white" pos="-0.019 -0.019 0.019"/>
      </body>
      <body name="nX_nY_nZ">
        <joint name="nX_nY_nZ"/>
        <geom material="green_orange_yellow" pos="-0.019 -0.019 -0.019"/>
      </body>
    </body>
  </worldbody>

  <actuator>
    <motor name="red" joint="pX"/>
    <motor name="orange" joint="nX"/>
    <motor name="blue" joint="pY"/>
    <motor name="green" joint="nY"/>
    <motor name="white" joint="pZ"/>
    <motor name="yellow" joint="nZ"/>
  </actuator>
</mujoco>
