1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- # 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.
- ---
- extends: http://vwf.example.com/node3.vwf
- implements:
- - http://vwf.example.com/sway-on-click.vwf
- source: seymourplane_triangulate.dae
- type: model/vnd.collada+xml
- properties:
- rotation: [ 0, 0, 1, -90 ]
- # sway-on-click configuration parameters
- sway-axis: [ 1, 0, 0 ]
- children:
- plane:
- extends: http://vwf.example.com/node3.vwf
- children:
- prop:
- extends: http://vwf.example.com/node3.vwf
- # # 1: Uncomment to apply the spin-on-click behavior to the prop
- # # ... located in public/types/spin-on-click.vwf.yaml
- properties:
- spin-rate: 23
- implements:
- - http://vwf.example.com/spin-on-click.vwf
- # # 2: Uncomment to enable/disable sway and rotate the prop on click
- scripts:
- - |
- this.pointerClick = function() {
- if ( this["sway-swaying"] ) {
- this["sway-swaying"] = false;
- this.plane.prop["spin-spinning"] = false;
- } else {
- this["sway-swaying"] = true;
- this.plane.prop["spin-spinning"] = true;
- }
- }
|