Skip to content

Document Structure

Dylan Baker edited this page Mar 16, 2024 · 11 revisions

Virtual Environment Markup Language (VEML) implements an eXtensible Markup Language (XML) schema. This page defines the XML schema.


VEML v1.1

v1.0 Sample Document

<veml>
  <metadata>
    <title>VEML Sample</title>
    <script>vossynchronization.js</script>
    <script>thirdpersoncharacter.js</script>
    <script>index.js</script>
    <inputevent input="move" event="thirdPersonCharacter.MoveCharacter(?);"></inputevent>
    <inputevent input="endmove" event="thirdPersonCharacter.EndMoveCharacter();"></inputevent>
    <inputevent input="look" event="thirdPersonCharacter.LookCharacter(?);"></inputevent>
    <inputevent input="endlook" event="thirdPersonCharacter.EndLookCharacter();"></inputevent>
    <inputevent input="key" event="thirdPersonCharacter.OnKeyPress(?)"></inputevent>
    <inputevent input="endkey" event="thirdPersonCharacter.OnKeyRelease(?)"></inputevent>
    <inputevent input="lefttouchpadvaluechange" event="thirdPersonCharacter.MoveCharacter(?);"></inputevent>
    <inputevent input="righttouchpadvaluechange" event="thirdPersonCharacter.LiftCharacter(?);"></inputevent>
  </metadata>
  <environment>
    <background>
      <panorama>background.png</panorama>
    </background>
    <entity type="meshentity" tag="floor">
      <mesh-name>floor.glb</mesh-name>
      <mesh-resource>floor.glb</mesh-resource>
      <transform type="scaletransform">
        <position x="0" y="0" z="0"></position>
        <rotation x="0.7071" y="0" z="0" w="0.7071"></rotation>
        <scale x="1" y="1" z="1"></scale>
      </transform>
      <entity type="lightentity" tag="Light">
        <transform type="scaletransform">
          <position x="0" y="75" z="0"></position>
          <rotation x="1" y="1" z="0" w="1"></rotation>
          <scale x="0" y="0" z="0"></scale>
        </transform>
      </entity>
    </entity>
    <entity type="meshentity" tag="table">
      <mesh-name>table.glb</mesh-name>
      <mesh-resource>table.glb</mesh-resource>
      <transform type="scaletransform">
        <position x="0" y="0" z="0"></position>
        <rotation x="0.7071" y="0" z="0" w="0.7071"></rotation>
        <scale x="1" y="1" z="1"></scale>
      </transform>
    </entity>
    <entity type="canvasentity" tag="Controls">
        <transform type="scaletransform">
          <position x="0" y="0" z="0"></position>
          <rotation x="1" y="1" z="0" w="1"></rotation>
          <scale x="1" y="1" z="1"></scale>
        </transform>
        <entity type="buttonentity" tag="Up" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(0, 1);">
          <transform type="canvastransform">
            <position-percent x="0.76" y="0.64"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
        <entity type="buttonentity" tag="Down" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(0, -1);">
          <transform type="canvastransform">
            <position-percent x="0.76" y="0.88"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
        <entity type="buttonentity" tag="Left" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(-1, 0);">
          <transform type="canvastransform">
            <position-percent x="0.64" y="0.76"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
        <entity type="buttonentity" tag="Right" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(1, 0);">
          <transform type="canvastransform">
            <position-percent x="0.88" y="0.76"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
    </entity>
  </environment>
</veml>

Top-Level Document Fields

  • metadata - Contains metadata and top-level information for the world.

  • environment - Contains information about the contents of the world.

v1.1 Metadata Fields

  • title - Title for the world.

    Type: String

    Minimum: 1

    Maximum: 1

  • script - Scripts to be run in the world. Can be either a filename/path or script logic.

    Type: String

    Minimum: 0

    Maximum: unbounded

  • inputevent - Input events for the world.

    Type: inputevent

    Minimum: 0

    Maximum: unbounded

  • synchronizationservice - Synchronization services for the world.

    Type: synchronizationservice

    Minimum: 0

    Maximum: unbounded

    Parameters:

    • type - The type of synchronization service to use.

      Minimum: 1

      Maximum: 1

    • address - The address to connect to.

      Minimum: 1

      Maximum: 1

    • id - The ID to use for this client with the service.

      Minimum: 1

      Maximum: 1

    • session - The tag for the session to join.

      Minimum: 1

      Maximum: 1

v1.1 Environment Fields

  • background - Color/panorama to apply to the background.

    Minimum: 1

    Maximum: 1

  • entity - Entities to place in the environment.

    Minimum: 0

    Maximum: unbounded

    Parameters:

    • type: The type of entity.

      Minimum: 1

      Maximum: 1

    • id: The ID for the entity.

      Minimum: 0

      Maximum: 1

    • tag: The tag for the entity.

      Minimum: 1

      Maximum: 1

    • synchronizer: The synchronizer to use on the entity.

      Minimum: 0

      Maximum: 1


VEML v1.0

v1.0 Sample Document

<veml>
  <metadata>
    <title>VEML Sample</title>
    <script>vossynchronization.js</script>
    <script>thirdpersoncharacter.js</script>
    <script>index.js</script>
    <inputevent input="move" event="thirdPersonCharacter.MoveCharacter(?);"></inputevent>
    <inputevent input="endmove" event="thirdPersonCharacter.EndMoveCharacter();"></inputevent>
    <inputevent input="look" event="thirdPersonCharacter.LookCharacter(?);"></inputevent>
    <inputevent input="endlook" event="thirdPersonCharacter.EndLookCharacter();"></inputevent>
    <inputevent input="key" event="thirdPersonCharacter.OnKeyPress(?)"></inputevent>
    <inputevent input="endkey" event="thirdPersonCharacter.OnKeyRelease(?)"></inputevent>
    <inputevent input="lefttouchpadvaluechange" event="thirdPersonCharacter.MoveCharacter(?);"></inputevent>
    <inputevent input="righttouchpadvaluechange" event="thirdPersonCharacter.LiftCharacter(?);"></inputevent>
  </metadata>
  <environment>
    <background>
      <panorama>background.png</panorama>
    </background>
    <entity type="meshentity" tag="floor">
      <mesh-name>floor.glb</mesh-name>
      <mesh-resource>floor.glb</mesh-resource>
      <transform type="scaletransform">
        <position x="0" y="0" z="0"></position>
        <rotation x="0.7071" y="0" z="0" w="0.7071"></rotation>
        <scale x="1" y="1" z="1"></scale>
      </transform>
      <entity type="lightentity" tag="Light">
        <transform type="scaletransform">
          <position x="0" y="75" z="0"></position>
          <rotation x="1" y="1" z="0" w="1"></rotation>
          <scale x="0" y="0" z="0"></scale>
        </transform>
      </entity>
    </entity>
    <entity type="meshentity" tag="table">
      <mesh-name>table.glb</mesh-name>
      <mesh-resource>table.glb</mesh-resource>
      <transform type="scaletransform">
        <position x="0" y="0" z="0"></position>
        <rotation x="0.7071" y="0" z="0" w="0.7071"></rotation>
        <scale x="1" y="1" z="1"></scale>
      </transform>
    </entity>
    <entity type="canvasentity" tag="Controls">
        <transform type="scaletransform">
          <position x="0" y="0" z="0"></position>
          <rotation x="1" y="1" z="0" w="1"></rotation>
          <scale x="1" y="1" z="1"></scale>
        </transform>
        <entity type="buttonentity" tag="Up" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(0, 1);">
          <transform type="canvastransform">
            <position-percent x="0.76" y="0.64"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
        <entity type="buttonentity" tag="Down" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(0, -1);">
          <transform type="canvastransform">
            <position-percent x="0.76" y="0.88"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
        <entity type="buttonentity" tag="Left" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(-1, 0);">
          <transform type="canvastransform">
            <position-percent x="0.64" y="0.76"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
        <entity type="buttonentity" tag="Right" on-click-event="thirdPersonCharacter.MoveCharacterOneStep(1, 0);">
          <transform type="canvastransform">
            <position-percent x="0.88" y="0.76"></position-percent>
            <size-percent x="0.1" y="0.1"></size-percent>
          </transform>
        </entity>
    </entity>
  </environment>
</veml>

Top-Level Document Fields

  • metadata - Contains metadata and top-level information for the world.

  • environment - Contains information about the contents of the world.

v1.0 Metadata Fields

  • title - Title for the world.

    Type: String

    Minimum: 1

    Maximum: 1

  • script - Scripts to be run in the world. Can be either a filename/path or script logic.

    Type: String

    Minimum: 0

    Maximum: unbounded

  • inputevent - Input events for the world.

    Type: inputevent

    Minimum: 0

    Maximum: unbounded

  • synchronizationservice - Synchronization services for the world.

    Type: synchronizationservice

    Minimum: 0

    Maximum: unbounded

    Parameters:

    • type - The type of synchronization service to use.

      Minimum: 1

      Maximum: 1

    • address - The address to connect to.

      Minimum: 1

      Maximum: 1

    • id - The ID to use for this client with the service.

      Minimum: 1

      Maximum: 1

    • session - The tag for the session to join.

      Minimum: 1

      Maximum: 1

v1.0 Environment Fields

  • background - Color/panorama to apply to the background.

    Minimum: 1

    Maximum: 1

  • entity - Entities to place in the environment.

    Minimum: 0

    Maximum: unbounded

    Parameters:

    • type: The type of entity.

      Minimum: 1

      Maximum: 1

    • id: The ID for the entity.

      Minimum: 0

      Maximum: 1

    • tag: The tag for the entity.

      Minimum: 1

      Maximum: 1

    • synchronizer: The synchronizer to use on the entity.

      Minimum: 0

      Maximum: 1


Clone this wiki locally