index.vwf.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # A-Frame & VWF simple scene
  2. # Copyright 2017 Krestianstvo.org project
  3. # Christmas tree model by 14islands Lab Made with Blocks Public / Remixable (CC-BY) https://poly.google.com/view/2VSoAQN6JoH
  4. ---
  5. extends: http://vwf.example.com/aframe/ascene.vwf
  6. properties:
  7. transparent: true
  8. assets: "assets.json"
  9. children:
  10. sky:
  11. extends: http://vwf.example.com/aframe/asky.vwf
  12. properties:
  13. color: "#ECECEC"
  14. side: "back"
  15. fog: false
  16. myLightSG:
  17. extends: http://vwf.example.com/aframe/alight.vwf
  18. properties:
  19. type: "directional"
  20. color: "white"
  21. position: "6 22 6"
  22. rotation: "-77 85 64"
  23. myLightSB:
  24. extends: http://vwf.example.com/aframe/alight.vwf
  25. properties:
  26. type: "spot"
  27. color: "blue"
  28. position: "0 5 -25"
  29. rotation: "0 0 150"
  30. myLightSR:
  31. extends: http://vwf.example.com/aframe/alight.vwf
  32. properties:
  33. type: "spot"
  34. color: "red"
  35. position: "0 5 -25"
  36. rotation: "0 -3 150"
  37. model:
  38. extends: http://vwf.example.com/aframe/aobjmodel.vwf
  39. properties:
  40. src: "#nwtree-obj"
  41. mtl: "#nwtree-mtl"
  42. position: "-1 6 -25"
  43. rotation: "0 -45 0"
  44. scale: "20 20 20"
  45. children:
  46. interpolation:
  47. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  48. properties:
  49. enabled: true
  50. methods:
  51. run:
  52. body: |
  53. var time = vwf.now;
  54. let rot = AFRAME.utils.coordinates.parse(this.rotation);
  55. this.rotation = [rot.x, Math.sin(time)*50, rot.z];
  56. this.future( 0.01 ).run(); // schedule the next step
  57. spaceText:
  58. extends: http://vwf.example.com/aframe/atext.vwf
  59. properties:
  60. value: "Happy New Year 2018!"
  61. color: "#d5ebda"
  62. position: "-19 5 -30"
  63. rotation: "0 0 45"
  64. scale: "9 9 9"
  65. spaceText2:
  66. extends: http://vwf.example.com/aframe/atext.vwf
  67. properties:
  68. value: "Project by Krestianstvo.org"
  69. color: "#305b32"
  70. position: "5 10 -30"
  71. scale: "5 5 5"
  72. box:
  73. extends: http://vwf.example.com/aframe/abox.vwf
  74. properties:
  75. position: "10 0.5 0"
  76. rotation: "0 -30 0"
  77. color: "#3c7249"
  78. depth: 2
  79. height: 5
  80. width: 2
  81. sphere:
  82. extends: http://vwf.example.com/aframe/asphere.vwf
  83. properties:
  84. position: "7 15 -25"
  85. color: "#e0e014"
  86. radius: 5
  87. wireframe: true
  88. box2:
  89. extends: http://vwf.example.com/aframe/abox.vwf
  90. properties:
  91. position: "0 0 -35"
  92. rotation: "0 0 0"
  93. color: "white"
  94. depth: 1
  95. height: 50
  96. width: 50
  97. groundPlane:
  98. extends: http://vwf.example.com/aframe/aplane.vwf
  99. properties:
  100. height: 100
  101. width: 100
  102. repeat: "10 10"
  103. rotation: "-90 0 0"
  104. color: "white"
  105. wireframe: false
  106. src: "#bg2"
  107. multicam:
  108. extends: http://vwf.example.com/aframe/abox.vwf
  109. properties:
  110. position: "0 4 -2"
  111. rotation: "0 0 0"
  112. depth: 0.5
  113. height: 0.5
  114. width: 0.5
  115. opacity: 0.5
  116. transparent: true
  117. color: "green"
  118. children:
  119. interpolation:
  120. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  121. properties:
  122. enabled: true
  123. camera1:
  124. extends: http://vwf.example.com/aframe/offsetcamera.vwf
  125. camera2:
  126. extends: http://vwf.example.com/aframe/offsetcamera.vwf
  127. methods:
  128. initialize:
  129. body: |
  130. console.log("initializing...");
  131. this.children.multicam.camera1.createCamera(3000, 2000, 0, 0, 1500, 2000);
  132. this.children.multicam.camera2.createCamera(3000, 2000, 1500, 0, 1500, 2000);