index.vwf.json 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. {
  2. "extends": "proxy/aframe/ascene.vwf",
  3. "properties": {
  4. "transparent": true
  5. },
  6. "methods": {
  7. "initialize": {
  8. "body": " var runBox = vwf.find(\"\", \"/sphere/box2\")[0];\n console.log(runBox);\n vwf.callMethod(runBox, \"run\");\n",
  9. "type": "application/javascript"
  10. }
  11. },
  12. "children": {
  13. "fog": {
  14. "extends": "proxy/aframe/aSceneFogComponent.vwf",
  15. "type": "component",
  16. "properties": {
  17. "fogType": "linear",
  18. "fogColor": "#ECECEC",
  19. "far": 9,
  20. "near": 0
  21. }
  22. },
  23. "sky": {
  24. "extends": "proxy/aframe/asky.vwf",
  25. "children": {
  26. "material": {
  27. "extends": "proxy/aframe/aMaterialComponent.vwf",
  28. "properties": {
  29. "color": "#ECECEC",
  30. "side": "back",
  31. "fog": false
  32. }
  33. }
  34. }
  35. },
  36. "light1": {
  37. "extends": "proxy/aframe/alight.vwf",
  38. "properties": {
  39. "type": "ambient",
  40. "color": "#BBB"
  41. }
  42. },
  43. "light2": {
  44. "extends": "proxy/aframe/alight.vwf",
  45. "properties": {
  46. "type": "directional",
  47. "color": "#FFF",
  48. "intensity": "0.6",
  49. "position": [
  50. -0.5,
  51. 1,
  52. 1
  53. ]
  54. }
  55. },
  56. "spaceText": {
  57. "extends": "proxy/aframe/atext.vwf",
  58. "properties": {
  59. "value": "Virtual World Framework & A-Frame",
  60. "color": "#b74217",
  61. "position": [
  62. -2,
  63. 2.5,
  64. -2
  65. ]
  66. }
  67. },
  68. "spaceText2": {
  69. "extends": "proxy/aframe/atext.vwf",
  70. "properties": {
  71. "value": "Project by Krestianstvo.org",
  72. "color": "#305b32",
  73. "position": [
  74. 1,
  75. 3,
  76. -4
  77. ]
  78. }
  79. },
  80. "box": {
  81. "extends": "proxy/aframe/abox.vwf",
  82. "properties": {
  83. "position": [
  84. -1,
  85. 0.5,
  86. -3
  87. ],
  88. "rotation": [
  89. 0,
  90. -30,
  91. 0
  92. ],
  93. "depth": "2",
  94. "height": "1",
  95. "width": "1",
  96. "class": "clickable intersectable"
  97. },
  98. "methods": {
  99. "clickEventMethod": {
  100. "body": " let genColor = this.generateColor();\n this.material.color = genColor\n",
  101. "type": "application/javascript"
  102. },
  103. "intersectEventMethod": {
  104. "body": " this.material.opacity = 0.7\n",
  105. "type": "application/javascript"
  106. },
  107. "clearIntersectEventMethod": {
  108. "body": " this.material.opacity = 1.0\n",
  109. "type": "application/javascript"
  110. },
  111. "generateColor": {
  112. "body": " var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(this.random() * 16)];\n } return color\n",
  113. "type": "application/javascript"
  114. }
  115. },
  116. "events": {
  117. "clickEvent": {},
  118. "intersectEvent": {},
  119. "clearIntersectEvent": {}
  120. },
  121. "children": {
  122. "material": {
  123. "extends": "proxy/aframe/aMaterialComponent.vwf",
  124. "properties": {
  125. "color": "#3c7249",
  126. "transparent": true
  127. }
  128. },
  129. "raycaster-listener": {
  130. "extends": "proxy/aframe/app-raycaster-listener-component.vwf",
  131. "type": "component"
  132. },
  133. "cursor-listener": {
  134. "extends": "proxy/aframe/app-cursor-listener-component.vwf",
  135. "type": "component"
  136. }
  137. }
  138. },
  139. "sphere": {
  140. "extends": "proxy/aframe/asphere.vwf",
  141. "properties": {
  142. "position": [
  143. 1,
  144. 1.25,
  145. -4
  146. ],
  147. "radius": "1"
  148. },
  149. "children": {
  150. "material": {
  151. "extends": "proxy/aframe/aMaterialComponent.vwf",
  152. "properties": {
  153. "color": "#e0e014",
  154. "wireframe": true
  155. }
  156. },
  157. "box2": {
  158. "extends": "proxy/aframe/abox.vwf",
  159. "properties": {
  160. "position": [
  161. 2,
  162. -0.75,
  163. -0.590282678604126
  164. ],
  165. "depth": "1",
  166. "rotation": [
  167. 0,
  168. 0,
  169. -59.02826690673828
  170. ]
  171. },
  172. "methods": {
  173. "run": {
  174. "body": " var time = this.time;\n let rot = this.rotation; //AFRAME.utils.coordinates.parse(this.rotation);\n let pos = this.position; //AFRAME.utils.coordinates.parse(this.position);\n this.position = [pos[0], pos[1], Math.sin(time)];\n this.rotation = [rot[0], rot[1], Math.sin(time)*100];\n this.future( 0.01 ).run();\n",
  175. "type": "application/javascript"
  176. }
  177. },
  178. "children": {
  179. "material": {
  180. "extends": "proxy/aframe/aMaterialComponent.vwf",
  181. "properties": {
  182. "color": "#2167a5"
  183. }
  184. },
  185. "interpolation": {
  186. "extends": "proxy/aframe/interpolation-component.vwf",
  187. "properties": {
  188. "enabled": true
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }