task.vwf.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. # Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
  2. # Secretary of Defense (Personnel & Readiness).
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  5. # in compliance with the License. You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software distributed under the License
  10. # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  11. # or implied. See the License for the specific language governing permissions and limitations under
  12. # the License.
  13. ## @name lesson.task.vwf
  14. ## @namespace
  15. ---
  16. extends: http://vwf.example.com/node.vwf
  17. implements:
  18. - http://vwf.example.com/sceneGetter.vwf
  19. properties:
  20. ## Text to display to the user to explain the task
  21. ##
  22. ## @name lesson.task.vwf#text
  23. ## @property
  24. text:
  25. ## Search string used to find a node3 that represents the transform that the camera will move to at the
  26. ## beginning of this task
  27. ##
  28. ## @name lesson.task.vwf#cameraPoseRef
  29. ## @property
  30. cameraPoseRef:
  31. ## xpath reference to the top node of the scene that the lesson listens to for task completion events
  32. ##
  33. ## @name lesson.task.vwf#scenePath
  34. ## @property
  35. scenePath:
  36. ## the scene node that the lesson listens to for task completion events
  37. ##
  38. ## @name lesson.task.vwf#scene
  39. ## @property
  40. scene:
  41. ## Array of this task's subtasks
  42. ##
  43. ## @name lesson.task.vwf#subtasks
  44. ## @property
  45. subtasks:
  46. get: |
  47. if ( !this.hasOwnProperty( "subtaskCache" ) ) {
  48. this.subtaskCache = this.find( "./element(*,'http://vwf.example.com/lesson/task.vwf')" );
  49. }
  50. return this.subtaskCache;
  51. //@ sourceURL=task.subtasks.get
  52. ## Whether this task is inactive, entered, or completed
  53. ## inactive -> entered -> completed -> inactive
  54. ##
  55. ## @name lesson.task.vwf#active
  56. ## @property
  57. status: "inactive"
  58. ## Index of the currently active subtask
  59. ##
  60. ## @name lesson.task.vwf#taskIndex
  61. ## @property
  62. taskIndex:
  63. methods:
  64. ## Method to begin the task
  65. ##
  66. ## @name lesson.task.vwf#enter
  67. ## @function
  68. enter:
  69. ## Method to step to the next task
  70. ##
  71. ## @name lesson.task.vwf#next
  72. ## @function
  73. next:
  74. ## Method to exit the task
  75. ##
  76. ## @name lesson.task.vwf#exit
  77. ## @function
  78. exit:
  79. # ## Method to step to the previous task
  80. # ##
  81. # ## @name lesson.task.vwf#previous
  82. # ## @function
  83. # previous:
  84. # ## Method that contains the success criteria to be checked when a listened-for event occurs
  85. # ##
  86. # ## @name lesson.task.vwf#checkForSuccess
  87. # ## @function
  88. checkForSuccess:
  89. # ## Method that contains the failure criteria to be checked when a listened-for event occurs
  90. # ##
  91. # ## @name lesson.task.vwf#checkForFailure
  92. # ## @function
  93. checkForFailure:
  94. events:
  95. ## Event fired on the task to let itself and others know that it is beginning
  96. ##
  97. ## @name lesson.task.vwf#entering
  98. ## @event
  99. entering:
  100. ## Event fired by the task to signify that its completion criteria has been met
  101. ##
  102. ## @name lesson.task.vwf#completed
  103. ## @event
  104. completed:
  105. ## Event fired by the task to signify that the user failed at the task
  106. ##
  107. ## @name lesson.task.vwf#failed
  108. ## @event
  109. failed:
  110. ## Event fired on the task to let it and others know that it is ending
  111. ##
  112. ## @name lesson.task.vwf#exiting
  113. ## @event
  114. exiting:
  115. ## Event fired on the task to let it and others know that the camera transform is complete
  116. ##
  117. ## @name lesson.task.vwf#cameraTransformComplete
  118. ## @event
  119. cameraTransformComplete:
  120. scripts:
  121. - source: http://vwf.example.com/lesson/task.js