examples.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. $(document).ready(function() {
  2. // Init fancybox
  3. $('.fancybox').fancybox();
  4. var exampleName = [
  5. 'core_basic_window',
  6. 'core_input_keys',
  7. 'core_input_mouse',
  8. 'core_mouse_wheel',
  9. 'core_input_gamepad',
  10. 'core_random_values',
  11. 'core_color_select',
  12. 'core_drop_files',
  13. 'core_storage_values',
  14. 'core_gestures_detection',
  15. 'core_3d_mode',
  16. 'core_3d_picking',
  17. 'core_3d_camera_free',
  18. 'core_3d_camera_first_person',
  19. 'core_2d_camera',
  20. 'core_world_screen',
  21. 'core_vr_simulator',
  22. 'shapes_logo_raylib',
  23. 'shapes_basic_shapes',
  24. 'shapes_colors_palette',
  25. 'shapes_logo_raylib_anim',
  26. 'shapes_lines_bezier',
  27. 'textures_logo_raylib',
  28. 'textures_image_loading',
  29. 'textures_rectangle',
  30. 'textures_srcrec_dstrec',
  31. 'textures_to_image',
  32. 'textures_raw_data',
  33. 'textures_image_processing',
  34. 'textures_image_drawing',
  35. 'text_sprite_fonts',
  36. 'text_bmfont_ttf',
  37. 'text_raylib_fonts',
  38. 'text_format_text',
  39. 'text_writing_anim',
  40. 'text_ttf_loading',
  41. 'text_bmfont_unordered',
  42. 'text_input_box',
  43. 'models_geometric_shapes',
  44. 'models_box_collisions',
  45. 'models_billboard',
  46. 'models_obj_loading',
  47. 'models_heightmap',
  48. 'models_cubicmap',
  49. 'models_mesh_picking',
  50. 'shaders_model_shader',
  51. 'shaders_shapes_textures',
  52. 'shaders_custom_uniform',
  53. 'shaders_postprocessing',
  54. 'audio_sound_loading',
  55. 'audio_music_stream',
  56. 'audio_module_playing',
  57. 'audio_raw_stream'];
  58. for (var i = 0; i < exampleName.length; i++)
  59. {
  60. var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_"));
  61. var exampleBase = exampleName[i].slice(exampleName[i].indexOf('_') + 1);
  62. var exampleDesc = exampleBase.replace('_', ' ');
  63. $('#container').append(
  64. '<div class="mix f' + filterType + '">' +
  65. '<a class="fancybox fancybox.iframe" href="examples/web/' + filterType + '/' + 'loader.html?name=' + exampleName[i] + '" title="' + exampleDesc + '">' +
  66. '<img width="400" height="225" src="../examples/web/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc + '</p></div></a>' +
  67. '</div>');
  68. $('#container a .extext').hide();
  69. }
  70. // Instantiate MixItUp:
  71. $('#container').mixItUp();
  72. $("#container a").hover(
  73. function(){ $(this).find(".extext").show(); },
  74. function(){ $(this).find(".extext").hide(); });
  75. /*
  76. $("#container a img").hover(
  77. function() { $(this).stop().animate({ opacity:0.6 }, 200, "easeOutQuad" ); },
  78. function() { $(this).stop().animate({ opacity:0 }, 200, "easeOutQuad" ); }
  79. )
  80. */
  81. });