shaders.app.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {
  2. "metadata": {
  3. "type": "App"
  4. },
  5. "project": {
  6. "gammaInput": true,
  7. "gammaOutput": true,
  8. "shadows": true,
  9. "vr": false
  10. },
  11. "camera": {
  12. "metadata": {
  13. "version": 4.4,
  14. "type": "Object",
  15. "generator": "Object3D.toJSON"
  16. },
  17. "object": {
  18. "uuid": "FC3E973B-5A4A-4177-BD9C-A58E61E0593B",
  19. "type": "PerspectiveCamera",
  20. "name": "Camera",
  21. "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],
  22. "fov": 50,
  23. "zoom": 1,
  24. "near": 0.1,
  25. "far": 10000,
  26. "focus": 10,
  27. "aspect": 1.368715,
  28. "filmGauge": 35,
  29. "filmOffset": 0
  30. }
  31. },
  32. "scene": {
  33. "metadata": {
  34. "version": 4.4,
  35. "type": "Object",
  36. "generator": "Object3D.toJSON"
  37. },
  38. "geometries": [
  39. {
  40. "uuid": "EA781333-F3AE-470D-9110-A9724FCB42AA",
  41. "type": "IcosahedronGeometry",
  42. "radius": 1,
  43. "detail": 4
  44. }],
  45. "materials": [
  46. {
  47. "uuid": "50ED51F1-DEA4-4B61-8082-BF41609E8C27",
  48. "type": "ShaderMaterial",
  49. "depthFunc": 3,
  50. "depthTest": true,
  51. "depthWrite": true,
  52. "wireframe": true,
  53. "skinning": false,
  54. "morphTargets": false,
  55. "uniforms": {
  56. "time": {
  57. "value": 0.0
  58. }
  59. },
  60. "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}",
  61. "fragmentShader": "varying vec3 vPosition;\nvoid main() {\n\tgl_FragColor = vec4( vPosition * 2.0, 1.0 );\n}"
  62. }],
  63. "object": {
  64. "uuid": "5FC9ACA9-2A93-474D-AA32-FACC76551914",
  65. "type": "Scene",
  66. "name": "Scene",
  67. "matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
  68. "children": [
  69. {
  70. "uuid": "FC7B6CF2-6386-4F47-9CE6-8ADB9FCA6E1F",
  71. "type": "Mesh",
  72. "name": "Icosahedron 1",
  73. "matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
  74. "geometry": "EA781333-F3AE-470D-9110-A9724FCB42AA",
  75. "material": "50ED51F1-DEA4-4B61-8082-BF41609E8C27"
  76. }],
  77. "background": 11184810
  78. }
  79. },
  80. "scripts": {
  81. "FC7B6CF2-6386-4F47-9CE6-8ADB9FCA6E1F": [
  82. {
  83. "name": "",
  84. "source": "function update( event ) {\n\n\tthis.material.uniforms.time.value = event.time / 500.0;\n\n}"
  85. }]
  86. }
  87. }