diff options
Diffstat (limited to 'common/js')
| -rw-r--r-- | common/js/examples.js | 89 | ||||
| -rw-r--r-- | common/js/games.js | 103 |
2 files changed, 192 insertions, 0 deletions
diff --git a/common/js/examples.js b/common/js/examples.js new file mode 100644 index 0000000..a06f450 --- /dev/null +++ b/common/js/examples.js @@ -0,0 +1,89 @@ +$(document).ready(function() { + + // Init fancybox + $('.fancybox').fancybox(); + + var exampleName = [ + 'core_basic_window', + 'core_input_keys', + 'core_input_mouse', + 'core_mouse_wheel', + 'core_input_gamepad', + 'core_random_values', + 'core_color_select', + 'core_drop_files', + 'core_storage_values', + 'core_gestures_detection', + 'core_3d_mode', + 'core_3d_picking', + 'core_3d_camera_free', + 'core_3d_camera_first_person', + 'core_2d_camera', + 'core_world_screen', + 'core_vr_simulator', + 'shapes_logo_raylib', + 'shapes_basic_shapes', + 'shapes_colors_palette', + 'shapes_logo_raylib_anim', + 'shapes_lines_bezier', + 'textures_logo_raylib', + 'textures_image_loading', + 'textures_rectangle', + 'textures_srcrec_dstrec', + 'textures_to_image', + 'textures_raw_data', + 'textures_image_processing', + 'textures_image_drawing', + 'text_sprite_fonts', + 'text_bmfont_ttf', + 'text_raylib_fonts', + 'text_format_text', + 'text_writing_anim', + 'text_ttf_loading', + 'text_bmfont_unordered', + 'text_input_box', + 'models_geometric_shapes', + 'models_box_collisions', + 'models_billboard', + 'models_obj_loading', + 'models_heightmap', + 'models_cubicmap', + 'models_mesh_picking', + 'shaders_model_shader', + 'shaders_shapes_textures', + 'shaders_custom_uniform', + 'shaders_postprocessing', + 'audio_sound_loading', + 'audio_music_stream', + 'audio_module_playing', + 'audio_raw_stream']; + + for (var i = 0; i < exampleName.length; i++) + { + var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_")); + var exampleBase = exampleName[i].slice(exampleName[i].indexOf('_') + 1); + var exampleDesc = exampleBase.replace('_', ' '); + + $('#container').append( + '<div class="mix f' + filterType + '">' + + '<a class="fancybox fancybox.iframe" href="examples/web/' + filterType + '/' + 'loader.html?name=' + exampleName[i] + '" title="' + exampleDesc + '">' + + '<img width="400" height="225" src="../examples/web/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc + '</p></div></a>' + + '</div>'); + + $('#container a .extext').hide(); + } + + // Instantiate MixItUp: + $('#container').mixItUp(); + + $("#container a").hover( + function(){ $(this).find(".extext").show(); }, + function(){ $(this).find(".extext").hide(); }); + +/* + $("#container a img").hover( + function() { $(this).stop().animate({ opacity:0.6 }, 200, "easeOutQuad" ); }, + function() { $(this).stop().animate({ opacity:0 }, 200, "easeOutQuad" ); } + ) +*/ +});
\ No newline at end of file diff --git a/common/js/games.js b/common/js/games.js new file mode 100644 index 0000000..67a9e50 --- /dev/null +++ b/common/js/games.js @@ -0,0 +1,103 @@ +$(document).ready(function() { + + // Init fancybox + $('.fancybox').fancybox(); + + var exampleName = [ + 'sample_arkanoid', + 'sample_missile_commander', + 'sample_gorilas', + 'sample_snake', + 'sample_asteroids', + 'sample_asteroids_survival', + 'sample_pang', + 'sample_space_invaders', + 'sample_floppy', + 'sample_tetris', + 'game_drturtle', + 'game_just_do', + 'game_skully_escape', + 'game_koala_seasons', + 'game_light_my_ritual', + 'game_wave_collector', + 'user_raymario', + 'user_crazyball', + 'user_tictactoe', + 'user_super_red_rope', + 'user_taptojamp', + 'user_funwithsat']; + + var exampleDesc = [ + 'arkanoid', + 'missile commander', + 'gorilas', + 'snake', + 'asteroids', + 'asteroids survival', + 'pang', + 'space invaders', + 'floppy', + 'tetris', + 'Dr Turtle & Mr Gamera', + 'JUST DO', + 'Skully Escape', + 'Koala Seasons', + 'LIGHT MY RITUAL', + 'Wave Collector', + 'RayMario (Victor Fisac)', + 'CrazyBall (Victor Fisac)', + 'Tic-Tac-Toe (LelixSuper)', + 'Super Red Rope Puzzles (Kurnic)', + 'TapToJAmp (MarcMDE)', + 'FunWithSATCollisions (MarcMDE)']; + + for (var i = 0; i < exampleName.length; i++) + { + var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_")); + + var linkTag; + + if (filterType == 'sample') linkTag = '<a class="fancybox fancybox.iframe" href="games/loader.html?name=' + exampleName[i] + '" title="' + exampleDesc[i] + '">'; + else if (filterType == 'game') linkTag = '<a target="_blank" href="games/' + exampleName[i].substring(5) + '.html" title="' + exampleDesc[i] + '">'; + else if (filterType == 'user') + { + switch (exampleName[i]) + { + case 'user_raymario': linkTag = '<a target="_blank" href="https://github.com/victorfisac/RayMario" title="' + exampleDesc[i] + '">'; break; + case 'user_crazyball': linkTag = '<a target="_blank" href="https://github.com/victorfisac/CrazyBall" title="' + exampleDesc[i] + '">'; break; + case 'user_tictactoe': linkTag = '<a target="_blank" href="https://github.com/LelixSuper/TicTacToe" title="' + exampleDesc[i] + '">'; break; + case 'user_super_red_rope': linkTag = '<a target="_blank" href="https://kurnic.itch.io/super-red-rope-puzzles" title="' + exampleDesc[i] + '">'; break; + case 'user_taptojamp': linkTag = '<a target="_blank" href="http://marcmde.github.io/TapToJAmp_v2_0/" title="' + exampleDesc[i] + '">'; break; + case 'user_funwithsat': linkTag = '<a target="_blank" href="http://marcmde.github.io/FunWithSATCollisions_v_1_0_Browser/" title="' + exampleDesc[i] + '">'; break; + default: break; + } + /* + https://github.com/MarcMDE/TapToJump //http://marcmde.github.io/TapToJump_v1_0_Browser/ + https://github.com/MarcMDE/TapToJAmp //http://marcmde.github.io/TapToJAmp_v2_0/ + https://github.com/MarcMDE/FunWithSATCollisions //http://marcmde.github.io/FunWithSATCollisions_v_1_0_Browser/ + https://kurnic.wordpress.com/portfolio/flappy-jetpack/ + */ + } + + $('#container').append( + '<div class="mix f' + filterType + '">' + linkTag + + '<img width="400" height="225" src="../games/img/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc[i] + '</p></div></a>' + + '</div>'); + + $('#container a .extext').hide(); + } + + // Instantiate MixItUp: + $('#container').mixItUp(); + + $("#container a").hover( + function(){ $(this).find(".extext").show(); }, + function(){ $(this).find(".extext").hide(); }); + +/* + $("#container a img").hover( + function() { $(this).stop().animate({ opacity:0.6 }, 200, "easeOutQuad" ); }, + function() { $(this).stop().animate({ opacity:0 }, 200, "easeOutQuad" ); } + ) +*/ +});
\ No newline at end of file |
