aboutsummaryrefslogtreecommitdiff
path: root/js/examples_code.js
blob: d8716247c5ee40de320d14b9f4c06c726fe184ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
$(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_oculus_rift',
        'shapes_logo_raylib',
        'shapes_basic_shapes',
        'shapes_colors_palette',
        'shapes_logo_raylib_anim',
        'textures_logo_raylib',
        'textures_image_loading',
        'textures_rectangle',
        'textures_srcrec_dstrec',
        'textures_to_image',
        'textures_raw_data',
        'textures_formats_loading',
        'textures_particles_trail_blending',
        'textures_image_processing',
        'textures_image_drawing',
        'text_sprite_fonts',
        'text_bmfont_ttf',
        'text_rbmf_fonts',
        'text_format_text',
        'text_font_select',
        'text_writing_anim',
        'models_geometric_shapes',
        'models_box_collisions',
        'models_billboard',
        'models_obj_loading',
        'models_heightmap',
        'models_cubicmap',
        'shaders_model_shader',
        'shaders_shapes_textures',
        'shaders_custom_uniform',
        'shaders_postprocessing',
        'shaders_standard_lighting',
        'audio_sound_loading',
        'audio_music_stream',
        'audio_module_playing'];

    var exampleDesc = [
        'basic window',
        'input keys', 
        'input mouse',
        'mouse wheel',
        'input gamepad',
        'random values',
        'color select',
        'drop files',
        'storage values',
        'gestures detection',
        '3d mode',
        '3d picking',
        '3d camera free',
        '3d camera first person',
        '2d camera',
        'world screen',
        'oculus rift',
        'logo raylib shapes',
        'basic shapes',
        'colors palette',
        'logo raylib anim',
        'logo raylib texture',
        'image loading',
        'texture rectangle',
        'src-dest. rectangles',
        'texture to image',
        'raw data loading',
        'textures formats loading',
        'particles trail blending',
        'image processing',
        'image drawing',
        'sprite fonts',
        'bmfonts ttf',
        'rbmf fonts',
        'text formatting',
        'font selection',
        'writing animation',
        'geometric shapes',
        'box collisions',
        'billboard drawing',
        'obj loading',
        'heightmap loading',
        'cubesmap loading',
        'model shader',
        'shapes textures shader',
        'custom uniform in shaders',
        'postprocessing shaders',
        'standard lighting',
        'sound loading',
        'music streaming',
        'module playing'];

    for (var i = 0; i < exampleName.length; i++)
    {
        var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_"));

        $('#container').append(
            '<div class="mix f' + filterType + '">' +
            '<a class="fancybox fancybox.iframe" href="examples_web/exmain.html?name=' + exampleName[i] + '" title="' + exampleDesc[i] + '">' +
            '<img width="400" height="225" src="../examples/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" ); }
    )
*/
});