index.vwf.yaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. children:
  14. material:
  15. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  16. properties:
  17. color: "#ECECEC"
  18. side: "back"
  19. fog: false
  20. myLightSG:
  21. extends: http://vwf.example.com/aframe/alight.vwf
  22. properties:
  23. type: "directional"
  24. color: "white"
  25. position: "6 22 6"
  26. rotation: "-77 85 64"
  27. myLightSB:
  28. extends: http://vwf.example.com/aframe/alight.vwf
  29. properties:
  30. type: "spot"
  31. color: "blue"
  32. position: "0 5 -25"
  33. rotation: "0 0 150"
  34. myLightSR:
  35. extends: http://vwf.example.com/aframe/alight.vwf
  36. properties:
  37. type: "spot"
  38. color: "red"
  39. position: "0 5 -25"
  40. rotation: "0 -3 150"
  41. model:
  42. extends: http://vwf.example.com/aframe/aobjmodel.vwf
  43. properties:
  44. src: "#nwtree-obj"
  45. mtl: "#nwtree-mtl"
  46. position: "-1 6 -25"
  47. rotation: "0 -45 0"
  48. scale: "20 20 20"
  49. children:
  50. interpolation:
  51. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  52. properties:
  53. enabled: true
  54. methods:
  55. run:
  56. body: |
  57. var time = vwf.now;
  58. let rot = AFRAME.utils.coordinates.parse(this.rotation);
  59. this.rotation = [rot.x, Math.sin(time)*50, rot.z];
  60. this.future( 0.01 ).run(); // schedule the next step
  61. spaceText:
  62. extends: http://vwf.example.com/aframe/atext.vwf
  63. properties:
  64. value: "Happy New Year 2018!"
  65. color: "#d5ebda"
  66. position: "-19 5 -30"
  67. rotation: "0 0 45"
  68. scale: "9 9 9"
  69. spaceText2:
  70. extends: http://vwf.example.com/aframe/atext.vwf
  71. properties:
  72. value: "Project by Krestianstvo.org"
  73. color: "#305b32"
  74. position: "5 10 -30"
  75. scale: "5 5 5"
  76. box:
  77. extends: http://vwf.example.com/aframe/abox.vwf
  78. properties:
  79. position: "10 0.5 0"
  80. rotation: "0 -30 0"
  81. depth: 2
  82. height: 5
  83. width: 2
  84. children:
  85. material:
  86. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  87. properties:
  88. color: "#3c7249"
  89. sphere:
  90. extends: http://vwf.example.com/aframe/asphere.vwf
  91. properties:
  92. position: "7 15 -25"
  93. radius: 5
  94. children:
  95. material:
  96. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  97. properties:
  98. color: "#e0e014"
  99. wireframe: true
  100. box2:
  101. extends: http://vwf.example.com/aframe/abox.vwf
  102. properties:
  103. position: "0 0 -35"
  104. rotation: "0 0 0"
  105. depth: 1
  106. height: 50
  107. width: 50
  108. children:
  109. material:
  110. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  111. properties:
  112. color: "white"
  113. groundPlane:
  114. extends: http://vwf.example.com/aframe/aplane.vwf
  115. properties:
  116. height: 100
  117. width: 100
  118. rotation: "-90 0 0"
  119. children:
  120. material:
  121. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  122. properties:
  123. color: "white"
  124. wireframe: false
  125. src: "#bg2"
  126. repeat: "10 10"
  127. multicam:
  128. extends: http://vwf.example.com/aframe/abox.vwf
  129. properties:
  130. position: "0 4 -2"
  131. rotation: "0 0 0"
  132. depth: 0.5
  133. height: 0.5
  134. width: 0.5
  135. children:
  136. material:
  137. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  138. properties:
  139. opacity: 0.5
  140. transparent: true
  141. color: "green"
  142. interpolation:
  143. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  144. properties:
  145. enabled: true
  146. camera1:
  147. extends: http://vwf.example.com/aframe/offsetcamera.vwf
  148. camera2:
  149. extends: http://vwf.example.com/aframe/offsetcamera.vwf
  150. methods:
  151. initialize:
  152. body: |
  153. console.log("initializing...");
  154. this.children.multicam.camera1.createCamera(3000, 2000, 0, 0, 1500, 2000);
  155. this.children.multicam.camera2.createCamera(3000, 2000, 1500, 0, 1500, 2000);