shaders.app.json 2.3 KB

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