light.vwf.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 light in 3D space
  14. ##
  15. ## @name light.vwf
  16. ## @namespace
  17. ---
  18. extends: http://vwf.example.com/node3.vwf
  19. properties:
  20. ## Does this light cast shadows
  21. ##
  22. ## @name light.vwf#lightType
  23. ## @property
  24. castShadows: false
  25. ## The type of light (point, directional, spot, hemisphere)
  26. ##
  27. ## @name light.vwf#lightType
  28. ## @property
  29. lightType:
  30. set: |
  31. switch( value ) {
  32. case "point":
  33. case "directional":
  34. case "spot":
  35. case "hemisphere":
  36. this.lightType = value;
  37. break;
  38. }
  39. value: "point"
  40. ## makes the light affect the scene
  41. ##
  42. ## @name light.vwf#enable
  43. ## @property
  44. enable: true
  45. ## Sets the position of the light
  46. ##
  47. ## @name light.vwf#color
  48. ## @property
  49. position: [ 0, 1, 0 ]
  50. ## Sets the color of the light
  51. ##
  52. ## @name light.vwf#color
  53. ## @property
  54. color: [ 255, 255, 255 ]
  55. ## Sets the ground color of the light
  56. ##
  57. ## @name light.vwf#groundColor
  58. ## @property
  59. groundColor: [ 255, 255, 255 ]
  60. ## Distance value
  61. ##
  62. ## @name light.vwf#distance
  63. ## @property
  64. distance: 1000
  65. ## Intensity value
  66. ##
  67. ## @name light.vwf#intensity
  68. ## @property
  69. intensity: 1
  70. ## Shadow camera bottom value
  71. ## Used to define the frustum of the camera used to create shadows
  72. ##
  73. ## @name light.vwf#shadowCameraBottom
  74. ## @property
  75. shadowCameraBottom: -100
  76. ## Shadow camera left value
  77. ## Used to define the frustum of the camera used to create shadows
  78. ##
  79. ## @name light.vwf#shadowCameraLeft
  80. ## @property
  81. shadowCameraLeft: -100
  82. ## Shadow camera right value
  83. ## Used to define the frustum of the camera used to create shadows
  84. ##
  85. ## @name light.vwf#shadowCameraRight
  86. ## @property
  87. shadowCameraRight: 100
  88. ## Shadow camera top value
  89. ## Used to define the frustum of the camera used to create shadows
  90. ##
  91. ## @name light.vwf#shadowCameraTop
  92. ## @property
  93. shadowCameraTop: 100
  94. ## Shadow camera near value
  95. ## Used to define the frustum of the camera used to create shadows
  96. ##
  97. ## @name light.vwf#shadowCameraNear
  98. ## @property
  99. shadowCameraNear: 0.1
  100. ## Shadow camera far value
  101. ## Used to define the frustum of the camera used to create shadows
  102. ##
  103. ## @name light.vwf#shadowCameraFar
  104. ## @property
  105. shadowCameraFar: 1000
  106. ## Shadow darkness value
  107. ## How dark the shadow is on a scale of 0 (no shadow) to 1 (pure black)
  108. ##
  109. ## @name light.vwf#shadowCameraFar
  110. ## @property
  111. shadowDarkness: 0.5
  112. ## The height of the shadow map
  113. ##
  114. ## @name light.vwf#shadowMapHeight
  115. ## @property
  116. shadowMapHeight: 512
  117. ## The width of the shadow map
  118. ##
  119. ## @name light.vwf#shadowMapWidth
  120. ## @property
  121. shadowMapWidth: 512
  122. ## The shadow bias of the shadow
  123. ##
  124. ## @name light.vwf#shadowBias
  125. ## @property
  126. shadowBias: 0
  127. target: [ 0, 0, 0 ]