camera.vwf.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. ## The component representation of a camera in 3D space
  14. ##
  15. ## @name camera.vwf
  16. ## @namespace
  17. ---
  18. extends: http://vwf.example.com/node3.vwf
  19. properties:
  20. ## The far clipping plane value
  21. ##
  22. ## @name camera.vwf#far
  23. ## @property
  24. far:
  25. set: |
  26. if ( value > 0 && value > this.near ) {
  27. this.far = value;
  28. }
  29. value: 1000.0
  30. ## The near clipping plane value
  31. ##
  32. ## @name camera.vwf#near
  33. ## @property
  34. near:
  35. set: |
  36. if ( value > 0 && value < this.far ) {
  37. this.near = value;
  38. }
  39. value: 0.1
  40. ## Field of view
  41. ##
  42. ## @name camera.vwf#fovy
  43. ## @property
  44. fovy:
  45. value: 35
  46. set: |
  47. if ( value > 0 ) {
  48. this.fovy = value;
  49. }
  50. ## Aspect ratio
  51. ##
  52. ## @name camera.vwf#aspect
  53. ## @property
  54. aspect:
  55. ## Type of camera (perspective vs. orthographic)
  56. ##
  57. ## @name camera.vwf#cameraType
  58. ## @property
  59. cameraType:
  60. set: |
  61. switch ( value ) {
  62. case 'perspective':
  63. case 'orthographic':
  64. this.cameraType = value;
  65. break;
  66. }
  67. value: "perspective"
  68. ## Speed of the camera
  69. ##
  70. ## @name camera.vwf#speed
  71. ## @property
  72. speed: 2.0
  73. ## World bounding box of the camera. Overrides inherited property to return null, since a camera has no dimensions
  74. ##
  75. ## @name camera.vwf#worldBoundingBox
  76. ## @property
  77. worldBoundingBox:
  78. get: |
  79. return null;
  80. value: null