diff options
| author | Ray <[email protected]> | 2022-08-08 12:42:18 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-08-08 12:42:18 +0200 |
| commit | a58f66599d40dd43e705841ab9a3bab7d7c6fa1d (patch) | |
| tree | a640d0ffa7929342ac433837c3049ec9a1737027 | |
| parent | af3132bc746961395e96a29ec535c81617b7647c (diff) | |
| download | raylib.com-a58f66599d40dd43e705841ab9a3bab7d7c6fa1d.tar.gz raylib.com-a58f66599d40dd43e705841ab9a3bab7d7c6fa1d.zip | |
ADDED: Difficulty level to examples
| -rw-r--r-- | common/examples.css | 1 | ||||
| -rw-r--r-- | common/examples.js | 255 |
2 files changed, 130 insertions, 126 deletions
diff --git a/common/examples.css b/common/examples.css index baed065..6bb01d6 100644 --- a/common/examples.css +++ b/common/examples.css @@ -1,5 +1,6 @@ #container .mix{ position: relative; display: none; } #container .extext { top: 160px!important; width: 400px!important; } +#difficulty_level { position: absolute; bottom: 18px; left: 12px; font-size: 24px; } #filter_menu { width:820px; height:80px; margin-left:15px; } diff --git a/common/examples.js b/common/examples.js index 9a25a48..dd03011 100644 --- a/common/examples.js +++ b/common/examples.js @@ -3,138 +3,141 @@ $(document).ready(function() { // Init fancybox $('.fancybox').fancybox(); - var exampleName = [ - 'core_basic_window', - 'core_basic_screen_manager', - 'core_input_keys', - 'core_input_mouse', - 'core_input_mouse_wheel', - 'core_input_gamepad', - 'core_input_multitouch', - 'core_input_gestures', - 'core_2d_camera', - 'core_2d_camera_platformer', - 'core_2d_camera_mouse_zoom', - 'core_3d_camera_mode', - 'core_3d_camera_free', - 'core_3d_camera_first_person', - 'core_3d_picking', - 'core_world_screen', - 'core_custom_logging', - 'core_window_letterbox', - 'core_drop_files', - 'core_random_values', - 'core_scissor_test', - 'core_storage_values', - 'core_vr_simulator', - 'core_loading_thread', - 'core_window_flags', - 'core_split_screen', - 'core_window_should_close', - 'core_smooth_pixelperfect', - 'core_custom_frame_control', - 'shapes_basic_shapes', - 'shapes_bouncing_ball', - 'shapes_colors_palette', - 'shapes_logo_raylib', - 'shapes_logo_raylib_anim', - 'shapes_rectangle_scaling', - 'shapes_lines_bezier', - 'shapes_collision_area', - 'shapes_following_eyes', - 'shapes_easings_ball_anim', - 'shapes_easings_box_anim', - 'shapes_easings_rectangle_array', - 'shapes_draw_ring', - 'shapes_draw_circle_sector', - 'shapes_draw_rectangle_rounded', - 'shapes_top_down_lights', - 'textures_logo_raylib', - 'textures_mouse_painting', - 'textures_sprite_anim', - 'textures_srcrec_dstrec', - 'textures_image_drawing', - 'textures_image_generation', - 'textures_image_loading', - 'textures_image_processing', - 'textures_image_text', - 'textures_to_image', - 'textures_raw_data', - 'textures_particles_blending', - 'textures_npatch_drawing', - 'textures_background_scrolling', - 'textures_sprite_button', - 'textures_sprite_explosion', - 'textures_bunnymark', - 'textures_blend_modes', - 'textures_draw_tiled', - 'textures_polygon', - 'textures_gif_player', - 'textures_fog_of_war', - 'text_raylib_fonts', - 'text_font_spritefont', - 'text_font_loading', - 'text_font_filters', - 'text_font_sdf', - 'text_format_text', - 'text_input_box', - 'text_writing_anim', - 'text_rectangle_bounds', - 'text_unicode', - 'text_draw_3d', - 'text_codepoints_loading', - 'models_animation', - 'models_billboard', - 'models_box_collisions', - 'models_cubicmap', - 'models_first_person_maze', - 'models_geometric_shapes', - 'models_mesh_generation', - 'models_mesh_picking', - 'models_loading', - 'models_loading_vox', - 'models_loading_gltf', - 'models_orthographic_projection', - 'models_rlgl_solar_system', - 'models_skybox', - 'models_yaw_pitch_roll', - 'models_heightmap', - 'models_waving_cubes', - 'shaders_model_shader', - 'shaders_shapes_textures', - 'shaders_custom_uniform', - 'shaders_postprocessing', - 'shaders_palette_switch', - 'shaders_raymarching', - 'shaders_texture_drawing', - 'shaders_texture_waves', - 'shaders_texture_outline', - 'shaders_julia_set', - 'shaders_eratosthenes', - 'shaders_basic_lighting', - 'shaders_fog', - 'shaders_simple_mask', - 'shaders_spotlight', - 'shaders_hot_reloading', - 'shaders_mesh_instancing', - 'shaders_multi_sample2d', - 'audio_module_playing', - 'audio_music_stream', - 'audio_raw_stream', - 'audio_sound_loading', - 'audio_multichannel_sound', - 'audio_stream_effects']; + var exampleData = [ + '⭐️☆☆☆#core_basic_window', + '⭐️☆☆☆#core_input_keys', + '⭐️☆☆☆#core_input_mouse', + '⭐️☆☆☆#core_input_mouse_wheel', + '⭐️☆☆☆#core_input_gamepad', + '⭐️☆☆☆#core_input_multitouch', + '⭐️⭐️☆☆#core_input_gestures', + '⭐️⭐️☆☆#core_2d_camera', + '⭐️⭐️☆☆#core_2d_camera_mouse_zoom', + '⭐️⭐️⭐️☆#core_2d_camera_platformer', + '⭐️☆☆☆#core_3d_camera_mode', + '⭐️☆☆☆#core_3d_camera_free', + '⭐️⭐️☆☆#core_3d_camera_first_person', + '⭐️⭐️☆☆#core_3d_picking', + '⭐️⭐️☆☆#core_world_screen', + '⭐️⭐️⭐️☆#core_custom_logging', + '⭐️⭐️⭐️☆#core_window_flags', + '⭐️⭐️☆☆#core_window_letterbox', + '⭐️☆☆☆#core_window_should_close', + '⭐️⭐️☆☆#core_drop_files', + '⭐️☆☆☆#core_random_values', + '⭐️⭐️☆☆#core_storage_values', + '⭐️⭐️⭐️☆#core_vr_simulator', + '⭐️⭐️⭐️☆#core_loading_thread', + '⭐️☆☆☆#core_scissor_test', + '⭐️☆☆☆#core_basic_screen_manager', + '⭐️⭐️⭐️⭐️#core_custom_frame_control', + '⭐️⭐️⭐️☆#core_smooth_pixelperfect', + '⭐️⭐️⭐️⭐️#core_split_screen', + '⭐️⭐️☆☆#core_window_should_close', + '⭐️☆☆☆#shapes_basic_shapes', + '⭐️☆☆☆#shapes_bouncing_ball', + '⭐️⭐️☆☆#shapes_colors_palette', + '⭐️☆☆☆#shapes_logo_raylib', + '⭐️⭐️☆☆#shapes_logo_raylib_anim', + '⭐️⭐️☆☆#shapes_rectangle_scaling', + '⭐️☆☆☆#shapes_lines_bezier', + '⭐️⭐️☆☆#shapes_collision_area', + '⭐️⭐️☆☆#shapes_following_eyes', + '⭐️⭐️☆☆#shapes_easings_ball_anim', + '⭐️⭐️☆☆#shapes_easings_box_anim', + '⭐️⭐️⭐️☆#shapes_easings_rectangle_array', + '⭐️⭐️⭐️☆#shapes_draw_ring', + '⭐️⭐️⭐️☆#shapes_draw_circle_sector', + '⭐️⭐️⭐️☆#shapes_draw_rectangle_rounded', + '⭐️⭐️⭐️⭐️#shapes_top_down_lights', + '⭐️☆☆☆#textures_logo_raylib', + '⭐️⭐️⭐️☆#textures_srcrec_dstrec', + '⭐️⭐️☆☆#textures_image_drawing', + '⭐️⭐️☆☆#textures_image_generation', + '⭐️☆☆☆#textures_image_loading', + '⭐️⭐️⭐️☆#textures_image_processing', + '⭐️⭐️☆☆#textures_image_text', + '⭐️☆☆☆#textures_to_image', + '⭐️⭐️⭐️☆#textures_raw_data', + '⭐️☆☆☆#textures_particles_blending', + '⭐️⭐️⭐️☆#textures_npatch_drawing', + '⭐️☆☆☆#textures_background_scrolling', + '⭐️⭐️☆☆#textures_sprite_anim', + '⭐️⭐️☆☆#textures_sprite_button', + '⭐️⭐️☆☆#textures_sprite_explosion', + '⭐️⭐️⭐️☆#textures_bunnymark', + '⭐️⭐️⭐️☆#textures_mouse_painting', + '⭐️☆☆☆#textures_blend_modes', + '⭐️⭐️⭐️☆#textures_draw_tiled', + '⭐️☆☆☆#textures_polygon', + '⭐️⭐️⭐️☆#textures_fog_of_war', + '⭐️⭐️⭐️☆#textures_gif_player', + '⭐️☆☆☆#text_raylib_fonts', + '⭐️☆☆☆#text_font_spritefont', + '⭐️⭐️☆☆#text_font_filters', + '⭐️☆☆☆#text_font_loading', + '⭐️⭐️⭐️☆#text_font_sdf', + '⭐️☆☆☆#text_format_text', + '⭐️⭐️☆☆#text_input_box', + '⭐️⭐️☆☆#text_writing_anim', + '⭐️⭐️⭐️⭐️#text_rectangle_bounds', + '⭐️⭐️⭐️⭐️#text_unicode', + '⭐️⭐️⭐️⭐️#text_draw_3d', + '⭐️⭐️⭐️☆#text_codepoints_loading', + '⭐️⭐️☆☆#models_animation', + '⭐️⭐️⭐️☆#models_billboard', + '⭐️☆☆☆#models_box_collisions', + '⭐️⭐️☆☆#models_cubicmap', + '⭐️⭐️☆☆#models_first_person_maze', + '⭐️☆☆☆#models_geometric_shapes', + '⭐️⭐️☆☆#models_mesh_generation', + '⭐️⭐️⭐️☆#models_mesh_picking', + '⭐️☆☆☆#models_loading', + '⭐️☆☆☆#models_loading_gltf', + '⭐️☆☆☆#models_loading_vox', + '⭐️☆☆☆#models_orthographic_projection', + '⭐️⭐️⭐️⭐️#models_rlgl_solar_system', + '⭐️⭐️☆☆#models_yaw_pitch_roll', + '⭐️⭐️⭐️☆#models_waving_cubes', + '⭐️☆☆☆#models_heightmap', + '⭐️⭐️☆☆#models_skybox', + '⭐️⭐️⭐️⭐️#shaders_basic_lighting', + '⭐️⭐️☆☆#shaders_model_shader', + '⭐️⭐️☆☆#shaders_shapes_textures', + '⭐️⭐️☆☆#shaders_custom_uniform', + '⭐️⭐️⭐️☆#shaders_postprocessing', + '⭐️⭐️⭐️☆#shaders_palette_switch', + '⭐️⭐️⭐️⭐️#shaders_raymarching', + '⭐️⭐️☆☆#shaders_texture_drawing', + '⭐️⭐️⭐️☆#shaders_texture_outline', + '⭐️⭐️☆☆#shaders_texture_waves', + '⭐️⭐️⭐️☆#shaders_julia_set', + '⭐️⭐️⭐️☆#shaders_eratosthenes', + '⭐️⭐️⭐️☆#shaders_fog', + '⭐️⭐️☆☆#shaders_simple_mask', + '⭐️⭐️⭐️☆#shaders_hot_reloading', + '⭐️⭐️⭐️⭐️#shaders_mesh_instancing', + '⭐️⭐️☆☆#shaders_multi_sample2d', + '⭐️⭐️☆☆#shaders_spotlight', + '⭐️☆☆☆#audio_module_playing', + '⭐️☆☆☆#audio_music_stream', + '⭐️⭐️⭐️☆#audio_raw_stream', + '⭐️☆☆☆#audio_sound_loading', + '⭐️☆☆☆#audio_multichannel_sound']; - for (var i = 0; i < exampleName.length; i++) + for (var i = 0; i < exampleData.length; i++) { - var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_")); - var exampleBase = exampleName[i].slice(exampleName[i].indexOf('_') + 1); + var difficulty = exampleData[i].substring(0, exampleData[i].indexOf('#')); + var exampleName = exampleData[i].substring(exampleData[i].indexOf('#') + 1); + var exampleBase = exampleName.slice(exampleName.indexOf('_') + 1); var exampleDesc = exampleBase.replace('_', ' '); + var filterType = exampleName.substring(0, exampleName.indexOf("_")); $('#container').append( '<div class="mix f' + filterType + '">' + - '<a class="fancybox fancybox.iframe" href="examples/' + filterType + '/' + 'loader.html?name=' + exampleName[i] + '" title="' + exampleDesc + '">' + - '<img width="400" height="225" src="https://raw.githubusercontent.com/raysan5/raylib/master/examples/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc + '</p></div></a>' + + '<a class="fancybox fancybox.iframe" href="examples/' + filterType + '/' + 'loader.html?name=' + exampleName + '" title="' + exampleDesc + '">' + + '<img width="400" height="225" src="https://raw.githubusercontent.com/raysan5/raylib/master/examples/' + filterType + '/' + exampleName + '.png"><div class="extext"><p>' + exampleDesc + '</p></div></a>' + + '<div id="difficulty_level">' + difficulty + '</div>' + '</div>'); $('#container a .extext').hide(); |
