123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- # Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
- # Secretary of Defense (Personnel & Readiness).
- #
- # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- # in compliance with the License. You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software distributed under the License
- # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- # or implied. See the License for the specific language governing permissions and limitations under
- # the License.
- ## The component representation of a light in 3D space
- ##
- ## @name light.vwf
- ## @namespace
- ---
- extends: http://vwf.example.com/node3.vwf
- properties:
- ## Does this light cast shadows
- ##
- ## @name light.vwf#lightType
- ## @property
- castShadows: false
-
- ## The type of light (point, directional, spot, hemisphere)
- ##
- ## @name light.vwf#lightType
- ## @property
- lightType:
- set: |
- switch( value ) {
- case "point":
- case "directional":
- case "spot":
- case "hemisphere":
- this.lightType = value;
- break;
- }
- value: "point"
- ## makes the light affect the scene
- ##
- ## @name light.vwf#enable
- ## @property
- enable: true
- ## Sets the position of the light
- ##
- ## @name light.vwf#color
- ## @property
- position: [ 0, 1, 0 ]
- ## Sets the color of the light
- ##
- ## @name light.vwf#color
- ## @property
- color: [ 255, 255, 255 ]
- ## Sets the ground color of the light
- ##
- ## @name light.vwf#groundColor
- ## @property
- groundColor: [ 255, 255, 255 ]
- ## Distance value
- ##
- ## @name light.vwf#distance
- ## @property
- distance: 1000
- ## Intensity value
- ##
- ## @name light.vwf#intensity
- ## @property
- intensity: 1
- ## Shadow camera bottom value
- ## Used to define the frustum of the camera used to create shadows
- ##
- ## @name light.vwf#shadowCameraBottom
- ## @property
- shadowCameraBottom: -100
- ## Shadow camera left value
- ## Used to define the frustum of the camera used to create shadows
- ##
- ## @name light.vwf#shadowCameraLeft
- ## @property
- shadowCameraLeft: -100
- ## Shadow camera right value
- ## Used to define the frustum of the camera used to create shadows
- ##
- ## @name light.vwf#shadowCameraRight
- ## @property
- shadowCameraRight: 100
- ## Shadow camera top value
- ## Used to define the frustum of the camera used to create shadows
- ##
- ## @name light.vwf#shadowCameraTop
- ## @property
- shadowCameraTop: 100
- ## Shadow camera near value
- ## Used to define the frustum of the camera used to create shadows
- ##
- ## @name light.vwf#shadowCameraNear
- ## @property
- shadowCameraNear: 0.1
- ## Shadow camera far value
- ## Used to define the frustum of the camera used to create shadows
- ##
- ## @name light.vwf#shadowCameraFar
- ## @property
- shadowCameraFar: 1000
- ## Shadow darkness value
- ## How dark the shadow is on a scale of 0 (no shadow) to 1 (pure black)
- ##
- ## @name light.vwf#shadowCameraFar
- ## @property
- shadowDarkness: 0.5
- ## The height of the shadow map
- ##
- ## @name light.vwf#shadowMapHeight
- ## @property
- shadowMapHeight: 512
- ## The width of the shadow map
- ##
- ## @name light.vwf#shadowMapWidth
- ## @property
- shadowMapWidth: 512
- ## The shadow bias of the shadow
- ##
- ## @name light.vwf#shadowBias
- ## @property
- shadowBias: 0
- target: [ 0, 0, 0 ]
|