1
0

shaders.app.json 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. "metadata": {
  3. "type": "App"
  4. },
  5. "project": {
  6. "shadows": true,
  7. "vr": false
  8. },
  9. "camera": {
  10. "metadata": {
  11. "version": 4.5,
  12. "type": "Object",
  13. "generator": "Object3D.toJSON"
  14. },
  15. "object": {
  16. "uuid": "4AC7ADED-CC22-4B16-8218-2E0A0C38C8F8",
  17. "type": "PerspectiveCamera",
  18. "name": "Camera",
  19. "layers": 1,
  20. "matrix": [0.605503,0,-0.795843,0,-0.261526,0.944464,-0.198978,0,0.751645,0.328615,0.571876,0,2.571484,1.124239,1.956469,1],
  21. "fov": 50,
  22. "zoom": 1,
  23. "near": 0.1,
  24. "far": 10000,
  25. "focus": 10,
  26. "aspect": 1.428977,
  27. "filmGauge": 35,
  28. "filmOffset": 0
  29. }
  30. },
  31. "scene": {
  32. "metadata": {
  33. "version": 4.5,
  34. "type": "Object",
  35. "generator": "Object3D.toJSON"
  36. },
  37. "geometries": [
  38. {
  39. "uuid": "EA781333-F3AE-470D-9110-A9724FCB42AA",
  40. "type": "IcosahedronGeometry",
  41. "radius": 1,
  42. "detail": 24
  43. }],
  44. "materials": [
  45. {
  46. "uuid": "50ED51F1-DEA4-4B61-8082-BF41609E8C27",
  47. "type": "ShaderMaterial",
  48. "depthFunc": 3,
  49. "depthTest": true,
  50. "depthWrite": true,
  51. "wireframe": true,
  52. "uniforms": {
  53. "time": {
  54. "value": 0
  55. }
  56. },
  57. "vertexShader": "uniform float time;\nvarying vec3 vPosition;\nvoid main() {\n\tvPosition = position;\n\tvPosition.x += sin( time + vPosition.z * 4.0 ) / 4.0;\n\tvPosition.y += cos( time + vPosition.z * 4.0 ) / 4.0;\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( vPosition, 1.0 );\n}",
  58. "fragmentShader": "varying vec3 vPosition;\nvoid main() {\n\tgl_FragColor = vec4( vPosition * 2.0, 1.0 );\n}"
  59. }],
  60. "object": {
  61. "uuid": "5FC9ACA9-2A93-474D-AA32-FACC76551914",
  62. "type": "Scene",
  63. "name": "Scene",
  64. "layers": 1,
  65. "matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
  66. "children": [
  67. {
  68. "uuid": "FC7B6CF2-6386-4F47-9CE6-8ADB9FCA6E1F",
  69. "type": "Mesh",
  70. "name": "Icosahedron 1",
  71. "layers": 1,
  72. "matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
  73. "geometry": "EA781333-F3AE-470D-9110-A9724FCB42AA",
  74. "material": "50ED51F1-DEA4-4B61-8082-BF41609E8C27"
  75. }],
  76. "background": 11184810
  77. }
  78. },
  79. "scripts": {
  80. "FC7B6CF2-6386-4F47-9CE6-8ADB9FCA6E1F": [
  81. {
  82. "name": "",
  83. "source": "function update( event ) {\n\n\tthis.material.uniforms.time.value = event.time / 500.0;\n\n}"
  84. }]
  85. }
  86. }