index.vwf.json 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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. "assetBG": {
  14. "extends": "proxy/aframe/a-asset-image-item.vwf",
  15. "properties": {
  16. "itemID": "bg",
  17. "itemSrc": "/defaults/assets/bg.jpg"
  18. }
  19. },
  20. "assetSky": {
  21. "extends": "proxy/aframe/a-asset-image-item.vwf",
  22. "properties": {
  23. "itemID": "sky",
  24. "itemSrc": "/defaults/assets/skyes/sky3.jpg"
  25. }
  26. },
  27. "assetBG2": {
  28. "extends": "proxy/aframe/a-asset-image-item.vwf",
  29. "properties": {
  30. "itemID": "bg2",
  31. "itemSrc": "/defaults/assets/checker.jpg"
  32. }
  33. },
  34. "assetPlaneObj": {
  35. "extends": "proxy/aframe/a-asset-item.vwf",
  36. "properties": {
  37. "itemID": "plane-obj",
  38. "itemSrc": "/defaults/assets/models/plane/PUSHILIN_Plane.obj"
  39. }
  40. },
  41. "assetPlaneMtl": {
  42. "extends": "proxy/aframe/a-asset-item.vwf",
  43. "properties": {
  44. "itemID": "plane-mtl",
  45. "itemSrc": "/defaults/assets/models/plane/PUSHILIN_Plane.mtl"
  46. }
  47. },
  48. "myLight": {
  49. "extends": "proxy/aframe/alight.vwf",
  50. "properties": {
  51. "type": "directional",
  52. "intensity": "0.5",
  53. "position": [
  54. 0.5,
  55. 2,
  56. 1
  57. ],
  58. "castShadow": true
  59. }
  60. },
  61. "myLight2": {
  62. "extends": "proxy/aframe/alight.vwf",
  63. "properties": {
  64. "type": "ambient",
  65. "intensity": "0.5"
  66. }
  67. },
  68. "model": {
  69. "extends": "proxy/aframe/aobjmodel.vwf",
  70. "properties": {
  71. "src": "#plane-obj",
  72. "mtl": "#plane-mtl",
  73. "position": [
  74. -1.2000000476837158,
  75. 1.7000000476837158,
  76. -2.5
  77. ],
  78. "rotation": [
  79. 0,
  80. -45,
  81. 0
  82. ],
  83. "scale": [
  84. 0.5,
  85. 0.5,
  86. 0.5
  87. ]
  88. },
  89. "children": {
  90. "shadow": {
  91. "extends": "proxy/aframe/shadowComponent.vwf",
  92. "properties": {
  93. "cast": true
  94. }
  95. }
  96. }
  97. },
  98. "spaceText": {
  99. "extends": "proxy/aframe/atext.vwf",
  100. "properties": {
  101. "value": "Virtual World Framework & A-Frame",
  102. "color": "#ddd",
  103. "position": [
  104. -2,
  105. 2.5,
  106. -2
  107. ]
  108. }
  109. },
  110. "spaceText2": {
  111. "extends": "proxy/aframe/atext.vwf",
  112. "properties": {
  113. "value": "Project by Krestianstvo.org",
  114. "color": "#aaa",
  115. "position": [
  116. 1,
  117. 3,
  118. -4
  119. ]
  120. }
  121. },
  122. "boxAnim": {
  123. "extends": "proxy/aframe/abox.vwf",
  124. "properties": {
  125. "position": [
  126. 0,
  127. 0,
  128. -3
  129. ],
  130. "rotation": [
  131. 0,
  132. 0,
  133. 0
  134. ],
  135. "depth": "2",
  136. "height": "1",
  137. "width": "1",
  138. "class": "hit"
  139. },
  140. "methods": {
  141. "hitstartEventMethod": {
  142. "body": " this.material.opacity = 0.7\n",
  143. "type": "application/javascript"
  144. },
  145. "hitendEventMethod": {
  146. "body": " this.material.opacity = 1.0\n",
  147. "type": "application/javascript"
  148. }
  149. },
  150. "children": {
  151. "aabb-collider-listener": {
  152. "extends": "proxy/aframe/app-aabb-collider-listener-component.vwf",
  153. "type": "component"
  154. },
  155. "material": {
  156. "extends": "proxy/aframe/aMaterialComponent.vwf",
  157. "properties": {
  158. "color": "#3c7249"
  159. }
  160. }
  161. }
  162. },
  163. "box": {
  164. "extends": "proxy/aframe/abox.vwf",
  165. "properties": {
  166. "position": [
  167. -1,
  168. 0.5,
  169. -3
  170. ],
  171. "rotation": [
  172. 0,
  173. -30,
  174. 0
  175. ],
  176. "depth": "2",
  177. "height": "1",
  178. "width": "1",
  179. "class": "clickable intersectable"
  180. },
  181. "methods": {
  182. "clickEventMethod": {
  183. "body": " let genColor = this.generateColor();\n this.material.color = genColor\n",
  184. "type": "application/javascript"
  185. },
  186. "intersectEventMethod": {
  187. "body": " this.material.opacity = 0.7\n",
  188. "type": "application/javascript"
  189. },
  190. "clearIntersectEventMethod": {
  191. "body": " this.material.opacity = 1.0\n",
  192. "type": "application/javascript"
  193. },
  194. "generateColor": {
  195. "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",
  196. "type": "application/javascript"
  197. }
  198. },
  199. "events": {
  200. "clickEvent": {}
  201. },
  202. "children": {
  203. "material": {
  204. "extends": "proxy/aframe/aMaterialComponent.vwf",
  205. "properties": {
  206. "color": "#3c7249",
  207. "transparent": true
  208. }
  209. },
  210. "raycaster-listener": {
  211. "extends": "proxy/aframe/app-raycaster-listener-component.vwf",
  212. "type": "component"
  213. },
  214. "cursor-listener": {
  215. "extends": "proxy/aframe/app-cursor-listener-component.vwf",
  216. "type": "component"
  217. },
  218. "shadow": {
  219. "extends": "proxy/aframe/shadowComponent.vwf",
  220. "properties": {
  221. "cast": true,
  222. "receive": true
  223. }
  224. }
  225. }
  226. },
  227. "sphere": {
  228. "extends": "proxy/aframe/asphere.vwf",
  229. "properties": {
  230. "position": [
  231. 1,
  232. 1.25,
  233. -4
  234. ],
  235. "radius": "1"
  236. },
  237. "children": {
  238. "material": {
  239. "extends": "proxy/aframe/aMaterialComponent.vwf",
  240. "properties": {
  241. "color": "#e0e014",
  242. "wireframe": true
  243. }
  244. },
  245. "box2": {
  246. "extends": "proxy/aframe/abox.vwf",
  247. "properties": {
  248. "position": [
  249. 2,
  250. -0.75,
  251. 0.948116660118103
  252. ],
  253. "depth": "1"
  254. },
  255. "methods": {
  256. "run": {
  257. "body": " var time = this.time;\n let pos = this.position; //AFRAME.utils.coordinates.parse(this.position);\n this.position = [pos[0], pos[1], Math.sin(time)]\n this.future( 0.01 ).run();\n",
  258. "type": "application/javascript"
  259. }
  260. },
  261. "children": {
  262. "raycaster": {
  263. "extends": "proxy/aframe/raycasterComponent.vwf",
  264. "type": "component",
  265. "properties": {
  266. "recursive": false,
  267. "interval": 10,
  268. "far": 2,
  269. "objects": ".intersectable"
  270. }
  271. },
  272. "material": {
  273. "extends": "proxy/aframe/aMaterialComponent.vwf",
  274. "properties": {
  275. "color": "#2167a5",
  276. "src": "#bg"
  277. }
  278. },
  279. "shadow": {
  280. "extends": "proxy/aframe/shadowComponent.vwf",
  281. "properties": {
  282. "cast": true
  283. }
  284. },
  285. "interpolation": {
  286. "extends": "proxy/aframe/interpolation-component.vwf",
  287. "properties": {
  288. "enabled": true,
  289. "deltaPos": 0.001,
  290. "deltaRot": 0.1
  291. }
  292. }
  293. }
  294. }
  295. }
  296. },
  297. "sky": {
  298. "extends": "proxy/aframe/asky.vwf",
  299. "children": {
  300. "material": {
  301. "extends": "proxy/aframe/aMaterialComponent.vwf",
  302. "properties": {
  303. "src": "#sky",
  304. "side": "back",
  305. "fog": false
  306. }
  307. }
  308. }
  309. },
  310. "groundPlane": {
  311. "extends": "proxy/aframe/aplane.vwf",
  312. "properties": {
  313. "height": "50",
  314. "width": "50",
  315. "rotation": [
  316. -90,
  317. 0,
  318. 0
  319. ]
  320. },
  321. "children": {
  322. "material": {
  323. "extends": "proxy/aframe/aMaterialComponent.vwf",
  324. "properties": {
  325. "repeat": "10 10",
  326. "color": "white",
  327. "src": "#bg2"
  328. }
  329. },
  330. "shadow": {
  331. "extends": "proxy/aframe/shadowComponent.vwf",
  332. "properties": {
  333. "receive": true
  334. }
  335. }
  336. }
  337. }
  338. }
  339. }