Browse Source

Update web examples -WORK IN PROGRESS-

Ray 8 years ago
parent
commit
e6ed85e993
70 changed files with 19239 additions and 13582 deletions
  1. 31 28
      docs/examples/web/audio_music_stream.c
  2. 316 305
      docs/examples/web/audio_music_stream.js
  3. 114 0
      docs/examples/web/audio_raw_stream.c
  4. 316 305
      docs/examples/web/audio_sound_loading.js
  5. 307 301
      docs/examples/web/core_2d_camera.js
  6. 3 4
      docs/examples/web/core_3d_camera_first_person.c
  7. 307 301
      docs/examples/web/core_3d_camera_first_person.js
  8. 1 4
      docs/examples/web/core_3d_camera_free.c
  9. 307 301
      docs/examples/web/core_3d_camera_free.js
  10. 307 301
      docs/examples/web/core_3d_mode.js
  11. 1 3
      docs/examples/web/core_3d_picking.c
  12. 307 301
      docs/examples/web/core_3d_picking.js
  13. 307 301
      docs/examples/web/core_basic_window.js
  14. 307 301
      docs/examples/web/core_color_select.js
  15. 307 301
      docs/examples/web/core_gestures_detection.js
  16. 307 301
      docs/examples/web/core_input_keys.js
  17. 307 301
      docs/examples/web/core_input_mouse.js
  18. 307 301
      docs/examples/web/core_mouse_wheel.js
  19. 307 301
      docs/examples/web/core_random_values.js
  20. 1 3
      docs/examples/web/core_world_screen.c
  21. 307 301
      docs/examples/web/core_world_screen.js
  22. 145 59
      docs/examples/web/makefile
  23. 2 4
      docs/examples/web/models_billboard.c
  24. 316 305
      docs/examples/web/models_billboard.js
  25. 307 301
      docs/examples/web/models_box_collisions.js
  26. 1 2
      docs/examples/web/models_cubicmap.c
  27. 316 305
      docs/examples/web/models_cubicmap.js
  28. 307 301
      docs/examples/web/models_geometric_shapes.js
  29. 2 3
      docs/examples/web/models_heightmap.c
  30. 316 305
      docs/examples/web/models_heightmap.js
  31. 316 305
      docs/examples/web/models_obj_loading.js
  32. 197 0
      docs/examples/web/models_ray_picking.c
  33. 1593 0
      docs/examples/web/models_ray_picking.js
  34. 1 3
      docs/examples/web/shaders_custom_uniform.c
  35. 316 305
      docs/examples/web/shaders_custom_uniform.js
  36. 3 5
      docs/examples/web/shaders_model_shader.c
  37. 316 305
      docs/examples/web/shaders_model_shader.js
  38. 1 3
      docs/examples/web/shaders_postprocessing.c
  39. 316 305
      docs/examples/web/shaders_postprocessing.js
  40. BIN
      docs/examples/web/shaders_shapes_textures.data
  41. 316 307
      docs/examples/web/shaders_shapes_textures.js
  42. 307 301
      docs/examples/web/shapes_basic_shapes.js
  43. 307 301
      docs/examples/web/shapes_colors_palette.js
  44. 307 301
      docs/examples/web/shapes_logo_raylib.js
  45. 307 301
      docs/examples/web/shapes_logo_raylib_anim.js
  46. 4 4
      docs/examples/web/text_bmfont_ttf.c
  47. 1 43
      docs/examples/web/text_bmfont_ttf.data
  48. 311 361
      docs/examples/web/text_bmfont_ttf.js
  49. 65 0
      docs/examples/web/text_bmfont_unordered.c
  50. 1593 0
      docs/examples/web/text_bmfont_unordered.js
  51. 3 3
      docs/examples/web/text_font_select.c
  52. 316 305
      docs/examples/web/text_font_select.js
  53. 307 301
      docs/examples/web/text_format_text.js
  54. 3 3
      docs/examples/web/text_rbmf_fonts.c
  55. 316 305
      docs/examples/web/text_rbmf_fonts.js
  56. 9 9
      docs/examples/web/text_sprite_fonts.c
  57. 316 305
      docs/examples/web/text_sprite_fonts.js
  58. 130 0
      docs/examples/web/text_ttf_loading.c
  59. 1611 0
      docs/examples/web/text_ttf_loading.js
  60. 307 301
      docs/examples/web/text_writing_anim.js
  61. 14 5
      docs/examples/web/textures_formats_loading.js
  62. 316 305
      docs/examples/web/textures_image_drawing.js
  63. 316 305
      docs/examples/web/textures_image_loading.js
  64. 316 305
      docs/examples/web/textures_image_processing.js
  65. 316 305
      docs/examples/web/textures_logo_raylib.js
  66. 316 305
      docs/examples/web/textures_particles_trail_blending.js
  67. 316 305
      docs/examples/web/textures_raw_data.js
  68. 316 305
      docs/examples/web/textures_rectangle.js
  69. 316 305
      docs/examples/web/textures_srcrec_dstrec.js
  70. 316 305
      docs/examples/web/textures_to_image.js

+ 31 - 28
docs/examples/web/audio_music_stream.c

@@ -25,6 +25,9 @@ int screenHeight = 450;
 
 
 int framesCounter = 0;
 int framesCounter = 0;
 float timePlayed = 0.0f;
 float timePlayed = 0.0f;
+static bool pause = false;
+
+Music music;
 
 
 //----------------------------------------------------------------------------------
 //----------------------------------------------------------------------------------
 // Module Functions Declaration
 // Module Functions Declaration
@@ -42,7 +45,9 @@ int main()
     
     
     InitAudioDevice();              // Initialize audio device
     InitAudioDevice();              // Initialize audio device
 
 
-    PlayMusicStream(0, "resources/audio/guitar_noodling.ogg");         // Play music stream
+    music = LoadMusicStream("resources/audio/guitar_noodling.ogg");
+    
+    PlayMusicStream(music);
     
     
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@@ -59,6 +64,8 @@ int main()
 
 
     // De-Initialization
     // De-Initialization
     //--------------------------------------------------------------------------------------
     //--------------------------------------------------------------------------------------
+    UnloadMusicStream(music);   // Unload music stream buffers from RAM
+
     CloseAudioDevice();     // Close audio device (music streaming is automatically stopped)
     CloseAudioDevice();     // Close audio device (music streaming is automatically stopped)
     CloseWindow();        // Close window and OpenGL context
     CloseWindow();        // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
     //--------------------------------------------------------------------------------------
@@ -73,33 +80,26 @@ void UpdateDrawFrame(void)
 {
 {
     // Update
     // Update
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------
-    framesCounter++;
+    UpdateMusicStream(music);        // Update music buffer with new stream data
     
     
-    // Testing music fading from one file to another
-/*
-        if (framesCounter > 600)    // Wait for 10 seconds (600 frames)
-        {
-            volume -= 0.01;         // Decrement music volume level
-
-            // When music volume level equal or lower than 0,
-            // restore volume level and init another music file
-            if (volume <= 0)
-            {
-                volume = 1.0;
-                framesCounter = 0;
-                PlayMusicStream(1, "resources/audio/another_file.ogg");
-            }
-
-            SetMusicVolume(volume);
-        }
-*/
+    // Restart music playing (stop and play)
+    if (IsKeyPressed(KEY_SPACE)) 
+    {
+        StopMusicStream(music);
+        PlayMusicStream(music);
+    }
     
     
-    if (IsWindowMinimized()) PauseMusicStream(0);
-    else ResumeMusicStream(0);
-
-    timePlayed = GetMusicTimePlayed(0)/GetMusicTimeLength(0)*100*4; // We scale by 4 to fit 400 pixels
+    // Pause/Resume music playing 
+    if (IsKeyPressed(KEY_P))
+    {
+        pause = !pause;
+        
+        if (pause) PauseMusicStream(music);
+        else ResumeMusicStream(music);
+    }
     
     
-    UpdateMusicStream(0);        // Update music buffer with new stream data
+    // Get timePlayed scaled to bar dimensions (400 pixels)
+    timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*400;
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------
 
 
     // Draw
     // Draw
@@ -108,11 +108,14 @@ void UpdateDrawFrame(void)
 
 
         ClearBackground(RAYWHITE);
         ClearBackground(RAYWHITE);
 
 
-        DrawText("MUSIC SHOULD BE PLAYING!", 255, 200, 20, LIGHTGRAY);
+        DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
 
 
-        DrawRectangle(200, 250, 400, 12, LIGHTGRAY);
-        DrawRectangle(200, 250, (int)timePlayed, 12, MAROON); 
+        DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
+        DrawRectangle(200, 200, (int)timePlayed, 12, MAROON);
+        DrawRectangleLines(200, 200, 400, 12, GRAY);
         
         
+        DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
+        DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY);
         
         
     EndDrawing();
     EndDrawing();
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/audio_music_stream.js


+ 114 - 0
docs/examples/web/audio_raw_stream.c

@@ -0,0 +1,114 @@
+/*******************************************************************************************
+*
+*   raylib [audio] example - Raw audio streaming
+*
+*   NOTE: This example requires OpenAL Soft library installed
+*
+*   This example has been created using raylib 1.6 (www.raylib.com)
+*   raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+*   Copyright (c) 2015 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+#include <stdlib.h>         // Required for: malloc(), free()
+#include <math.h>           // Required for: sinf()
+
+#define MAX_SAMPLES             22050
+#define MAX_SAMPLES_PER_UPDATE   4096
+
+int main()
+{
+    // Initialization
+    //--------------------------------------------------------------------------------------
+    int screenWidth = 800;
+    int screenHeight = 450;
+
+    InitWindow(screenWidth, screenHeight, "raylib [audio] example - raw audio streaming");
+
+    InitAudioDevice();              // Initialize audio device
+
+    // Init raw audio stream (sample rate: 22050, sample size: 16bit-short, channels: 1-mono)
+    AudioStream stream = InitAudioStream(22050, 16, 1);
+    
+    // Generate samples data from sine wave
+    short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES);
+    
+    // TODO: Review data generation, it seems data is discontinued for loop,
+    // for that reason, there is a clip everytime audio stream is looped...
+    for (int i = 0; i < MAX_SAMPLES; i++)
+    {
+        data[i] = (short)(sinf(((2*PI*(float)i)/2)*DEG2RAD)*32000);
+    }
+    
+    PlayAudioStream(stream);        // Start processing stream buffer (no data loaded currently)
+    
+    int totalSamples = MAX_SAMPLES;
+    int samplesLeft = totalSamples;
+    
+    Vector2 position = { 0, 0 };
+
+    SetTargetFPS(30);               // Set our game to run at 30 frames-per-second
+    //--------------------------------------------------------------------------------------
+
+    // Main game loop
+    while (!WindowShouldClose())    // Detect window close button or ESC key
+    {
+        // Update
+        //----------------------------------------------------------------------------------
+        
+        // Refill audio stream if required
+        // NOTE: Every update we check if stream data has been already consumed and we update
+        // buffer with new data from the generated samples, we upload data at a rate (MAX_SAMPLES_PER_UPDATE),
+        // but notice that at some point we update < MAX_SAMPLES_PER_UPDATE data...
+        if (IsAudioBufferProcessed(stream)) 
+        {
+            int numSamples = 0;
+            if (samplesLeft >= MAX_SAMPLES_PER_UPDATE) numSamples = MAX_SAMPLES_PER_UPDATE;
+            else numSamples = samplesLeft;
+
+            UpdateAudioStream(stream, data + (totalSamples - samplesLeft), numSamples);
+            
+            samplesLeft -= numSamples;
+            
+            // Reset samples feeding (loop audio)
+            if (samplesLeft <= 0) samplesLeft = totalSamples;
+        }
+        //----------------------------------------------------------------------------------
+
+        // Draw
+        //----------------------------------------------------------------------------------
+        BeginDrawing();
+
+            ClearBackground(RAYWHITE);
+
+            DrawText("SINE WAVE SHOULD BE PLAYING!", 240, 140, 20, LIGHTGRAY);
+            
+            // NOTE: Draw a part of the sine wave (only screen width, proportional values)
+            for (int i = 0; i < GetScreenWidth(); i++)
+            {
+                position.x = i;
+                position.y = 250 + 50*data[i]/32000;
+                
+                DrawPixelV(position, RED);
+            }
+
+        EndDrawing();
+        //----------------------------------------------------------------------------------
+    }
+
+    // De-Initialization
+    //--------------------------------------------------------------------------------------
+    free(data);                 // Unload sine wave data
+    
+    CloseAudioStream(stream);   // Close raw audio stream and delete buffers from RAM
+
+    CloseAudioDevice();         // Close audio device (music streaming is automatically stopped)
+
+    CloseWindow();              // Close window and OpenGL context
+    //--------------------------------------------------------------------------------------
+
+    return 0;
+}

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/audio_sound_loading.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_2d_camera.js


+ 3 - 4
docs/examples/web/core_3d_camera_first_person.c

@@ -56,9 +56,8 @@ int main()
         colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 };
         colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 };
     }
     }
     
     
-    SetCameraMode(CAMERA_FIRST_PERSON);         // Set a first person camera mode
-    SetCameraFovy(camera.fovy);                 // Set internal camera field-of-view Y
-	
+    SetCameraMode(camera, CAMERA_FIRST_PERSON);         // Set a first person camera mode
+
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
 #else
 #else
@@ -88,7 +87,7 @@ void UpdateDrawFrame(void)
 {
 {
     // Update
     // Update
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------
-    UpdateCameraPlayer(&camera, &playerPosition); // Update camera and player position
+    UpdateCamera(&camera);          // Update camera and player position
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------
 
 
     // Draw
     // Draw

File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_3d_camera_first_person.js


+ 1 - 4
docs/examples/web/core_3d_camera_free.c

@@ -47,10 +47,7 @@ int main()
     camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };          // Camera up vector (rotation towards target)
     camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };          // Camera up vector (rotation towards target)
     camera.fovy = 45.0f;                                // Camera field-of-view Y
     camera.fovy = 45.0f;                                // Camera field-of-view Y
     
     
-    SetCameraMode(CAMERA_FREE);         // Set a free camera mode
-    SetCameraPosition(camera.position); // Set internal camera position to match our camera position
-    SetCameraTarget(camera.target);     // Set internal camera target to match our camera target
-    SetCameraFovy(camera.fovy);         // Set internal camera field-of-view Y
+    SetCameraMode(camera, CAMERA_FREE);                 // Set a free camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_3d_camera_free.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_3d_mode.js


+ 1 - 3
docs/examples/web/core_3d_picking.c

@@ -50,9 +50,7 @@ int main()
     camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };          // Camera up vector (rotation towards target)
     camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };          // Camera up vector (rotation towards target)
     camera.fovy = 45.0f;                                // Camera field-of-view Y
     camera.fovy = 45.0f;                                // Camera field-of-view Y
 
 
-    SetCameraMode(CAMERA_FREE);         // Set a free camera mode
-    SetCameraPosition(camera.position); // Set internal camera position to match our camera position
-    SetCameraFovy(camera.fovy);         // Set internal camera field-of-view Y
+    SetCameraMode(camera, CAMERA_FREE);                 // Set a free camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_3d_picking.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_basic_window.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_color_select.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_gestures_detection.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_input_keys.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_input_mouse.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_mouse_wheel.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_random_values.js


+ 1 - 3
docs/examples/web/core_world_screen.c

@@ -42,9 +42,7 @@ int main()
     //--------------------------------------------------------------------------------------
     //--------------------------------------------------------------------------------------
     InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
     InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
     
     
-    SetCameraMode(CAMERA_FREE);         // Set a free camera mode
-    SetCameraPosition(camera.position); // Set internal camera position to match our camera position
-    SetCameraTarget(camera.target);     // Set internal camera target to match our camera target
+    SetCameraMode(camera, CAMERA_FREE);         // Set a free camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/core_world_screen.js


+ 145 - 59
docs/examples/web/makefile

@@ -2,16 +2,18 @@
 #
 #
 #   raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten)
 #   raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten)
 #
 #
-#   Copyright (c) 2015 Ramon Santamaria (@raysan5)
+#   NOTE: By default examples are compiled using raylib static library and OpenAL Soft shared library
 #
 #
-#   This software is provided "as-is", without any express or implied warranty. In no event 
+#   Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
+#
+#   This software is provided "as-is", without any express or implied warranty. In no event
 #   will the authors be held liable for any damages arising from the use of this software.
 #   will the authors be held liable for any damages arising from the use of this software.
 #
 #
-#   Permission is granted to anyone to use this software for any purpose, including commercial 
+#   Permission is granted to anyone to use this software for any purpose, including commercial
 #   applications, and to alter it and redistribute it freely, subject to the following restrictions:
 #   applications, and to alter it and redistribute it freely, subject to the following restrictions:
 #
 #
-#     1. The origin of this software must not be misrepresented; you must not claim that you 
-#     wrote the original software. If you use this software in a product, an acknowledgment 
+#     1. The origin of this software must not be misrepresented; you must not claim that you
+#     wrote the original software. If you use this software in a product, an acknowledgment
 #     in the product documentation would be appreciated but is not required.
 #     in the product documentation would be appreciated but is not required.
 #
 #
 #     2. Altered source versions must be plainly marked as such, and must not be misrepresented
 #     2. Altered source versions must be plainly marked as such, and must not be misrepresented
@@ -26,6 +28,9 @@
 # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
 # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
 PLATFORM ?= PLATFORM_DESKTOP
 PLATFORM ?= PLATFORM_DESKTOP
 
 
+# define NO to use OpenAL Soft as static library (shared by default)
+SHARED_OPENAL ?= NO
+
 # determine PLATFORM_OS in case PLATFORM_DESKTOP selected
 # determine PLATFORM_OS in case PLATFORM_DESKTOP selected
 ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows
     # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows
@@ -61,50 +66,95 @@ endif
 endif
 endif
 
 
 # define compiler flags:
 # define compiler flags:
-#  -O2         defines optimization level
-#  -Wall       turns on most, but not all, compiler warnings
-#  -std=c99    use standard C from 1999 revision
-ifeq ($(PLATFORM),PLATFORM_RPI)
-    CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline
-else
-    CFLAGS = -O2 -Wall -std=c99
+#  -O2                  defines optimization level
+#  -Og                  enable debugging
+#  -s                   strip unnecessary data from build
+#  -Wall                turns on most, but not all, compiler warnings
+#  -std=c99             defines C language mode (standard C from 1999 revision)
+#  -std=gnu99           defines C language mode (GNU C from 1999 revision)
+#  -fgnu89-inline       declaring inline functions support (GCC optimized)
+#  -Wno-missing-braces  ignore invalid warning (GCC bug 53119)
+#  -D_DEFAULT_SOURCE    use with -std=c99 on Linux to enable timespec and drflac
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+    ifeq ($(PLATFORM_OS),WINDOWS)
+        CFLAGS = -O2 -s -Wall -std=c99
+    endif
+    ifeq ($(PLATFORM_OS),LINUX)
+        CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE
+    endif
+    ifeq ($(PLATFORM_OS),OSX)
+        CFLAGS = -O2 -s -Wall -std=c99
+    endif
 endif
 endif
 ifeq ($(PLATFORM),PLATFORM_WEB)
 ifeq ($(PLATFORM),PLATFORM_WEB)
-    CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3
-    #-s ASSERTIONS=1            # to check for memory allocation errors (-O1 disables it)
-    #-s ALLOW_MEMORY_GROWTH=1   # to allow memory resizing
-    #-s TOTAL_MEMORY=16777216   # to specify heap memory size (default = 16MB)
+    CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --profiling
+    # -O2                        # if used, also set --memory-init-file 0
+    # --memory-init-file 0       # to avoid an external memory initialization code file (.mem)
+    #-s ALLOW_MEMORY_GROWTH=1    # to allow memory resizing
+    #-s TOTAL_MEMORY=16777216    # to specify heap memory size (default = 16MB)
+endif
+ifeq ($(PLATFORM),PLATFORM_RPI)
+    CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline
 endif
 endif
-
 #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
 #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
 
 
+# define raylib release directory for compiled library
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+    ifeq ($(PLATFORM_OS),WINDOWS)
+        RAYLIB_PATH = ../release/win32/mingw32
+    endif
+    ifeq ($(PLATFORM_OS),LINUX)
+        RAYLIB_PATH = ../release/linux
+    endif
+    ifeq ($(PLATFORM_OS),OSX)
+        RAYLIB_PATH = ../release/osx
+    endif
+endif
+ifeq ($(PLATFORM),PLATFORM_WEB)
+    RAYLIB_PATH = ../release/html5
+endif
+ifeq ($(PLATFORM),PLATFORM_RPI)
+    RAYLIB_PATH = ../release/rpi
+endif
+
 # define any directories containing required header files
 # define any directories containing required header files
+INCLUDES = -I. -I../../../src -I../src/external -I$(RAYLIB_PATH)
+
 ifeq ($(PLATFORM),PLATFORM_RPI)
 ifeq ($(PLATFORM),PLATFORM_RPI)
-    INCLUDES = -I. -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
-else
-    INCLUDES = -I. -I../src -I../github/raylib/src
-# external libraries headers
-# GLFW3
-    INCLUDES += -I../external/glfw3/include
-# GLEW: Not required any more, replaced by GLAD
-    #INCLUDES += -I../external/glew/include
-# OpenAL Soft
-    INCLUDES += -I../external/openal_soft/include
+    INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
+endif
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+    ifeq ($(PLATFORM_OS),WINDOWS)
+        # external libraries headers
+        # GLFW3
+            INCLUDES += -I../src/external/glfw3/include
+        # OpenAL Soft
+            INCLUDES += -I../src/external/openal_soft/include
+    endif
+    ifeq ($(PLATFORM_OS),LINUX)
+        # you may optionally create this directory and install raylib 
+        # and related headers there. Edit ../src/Makefile appropriately.
+            INCLUDES += -I/usr/local/include/raylib
+    endif
+    ifeq ($(PLATFORM_OS),OSX)
+        # additional directories for MacOS
+    endif
 endif
 endif
 
 
 # define library paths containing required libs
 # define library paths containing required libs
+LFLAGS = -L. -L../src -L$(RAYLIB_PATH)
+
 ifeq ($(PLATFORM),PLATFORM_RPI)
 ifeq ($(PLATFORM),PLATFORM_RPI)
-    LFLAGS = -L. -L../src -L/opt/vc/lib
-else
-    LFLAGS = -L. -L../src
-# external libraries to link with
-# GLFW3
-    LFLAGS += -L../external/glfw3/lib/$(LIBPATH)
-    ifneq ($(PLATFORM_OS),OSX)
-    # OpenAL Soft
-        LFLAGS += -L../external/openal_soft/lib/$(LIBPATH)
-    # GLEW: Not required any more, replaced by GLAD
-        #LFLAGS += -L../external/glew/lib/$(LIBPATH)
+    LFLAGS += -L/opt/vc/lib
+endif
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+    # add standard directories for GNU/Linux
+    ifeq ($(PLATFORM_OS),WINDOWS)
+        # external libraries to link with
+        # GLFW3
+            LFLAGS += -L../src/external/glfw3/lib/$(LIBPATH)
+        # OpenAL Soft
+            LFLAGS += -L../src/external/openal_soft/lib/$(LIBPATH)
     endif
     endif
 endif
 endif
 
 
@@ -114,20 +164,27 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     ifeq ($(PLATFORM_OS),LINUX)
     ifeq ($(PLATFORM_OS),LINUX)
         # libraries for Debian GNU/Linux desktop compiling
         # libraries for Debian GNU/Linux desktop compiling
         # requires the following packages:
         # requires the following packages:
-        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
-        LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread
+        # libglfw3-dev libopenal-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl
         # on XWindow could require also below libraries, just uncomment
         # on XWindow could require also below libraries, just uncomment
-        #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
+        LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
     else
     else
     ifeq ($(PLATFORM_OS),OSX)
     ifeq ($(PLATFORM_OS),OSX)
         # libraries for OS X 10.9 desktop compiling
         # libraries for OS X 10.9 desktop compiling
         # requires the following packages:
         # requires the following packages:
-        # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
-        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa
+        # libglfw3-dev libopenal-dev libegl1-mesa-dev
+        LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa
     else
     else
         # libraries for Windows desktop compiling
         # libraries for Windows desktop compiling
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
         # NOTE: GLFW3 and OpenAL Soft libraries should be installed
-        LIBS = -lraylib -lglfw3 -lopengl32 -lopenal32 -lgdi32
+        LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32
+        # if static OpenAL Soft required, define the corresponding libs
+        ifeq ($(SHARED_OPENAL),NO)
+            LIBS += -lopenal32 -lwinmm
+            CFLAGS += -Wl,-allow-multiple-definition
+        else
+            LIBS += -lopenal32dll
+        endif
     endif
     endif
     endif
     endif
 endif
 endif
@@ -138,7 +195,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
 endif
 endif
 ifeq ($(PLATFORM),PLATFORM_WEB)
 ifeq ($(PLATFORM),PLATFORM_WEB)
     # just adjust the correct path to libraylib.bc
     # just adjust the correct path to libraylib.bc
-    LIBS = ../github/raylib/src/libraylib.bc
+    LIBS = ../../../release/html5/libraylib.bc
 endif
 endif
 
 
 # define additional parameters and flags for windows
 # define additional parameters and flags for windows
@@ -168,6 +225,8 @@ EXAMPLES = \
     core_3d_picking \
     core_3d_picking \
     core_3d_camera_free \
     core_3d_camera_free \
     core_3d_camera_first_person \
     core_3d_camera_first_person \
+    core_2d_camera \
+    core_world_screen \
     shapes_logo_raylib \
     shapes_logo_raylib \
     shapes_basic_shapes \
     shapes_basic_shapes \
     shapes_colors_palette \
     shapes_colors_palette \
@@ -188,25 +247,28 @@ EXAMPLES = \
     text_format_text \
     text_format_text \
     text_font_select \
     text_font_select \
     text_writing_anim \
     text_writing_anim \
+    text_ttf_loading \
+    text_bmfont_unordered \
     models_geometric_shapes \
     models_geometric_shapes \
     models_box_collisions \
     models_box_collisions \
     models_billboard \
     models_billboard \
     models_obj_loading \
     models_obj_loading \
     models_heightmap \
     models_heightmap \
     models_cubicmap \
     models_cubicmap \
+    models_ray_picking \
     shaders_model_shader \
     shaders_model_shader \
     shaders_shapes_textures \
     shaders_shapes_textures \
     shaders_custom_uniform \
     shaders_custom_uniform \
     shaders_postprocessing \
     shaders_postprocessing \
-    shaders_basic_lighting \
     audio_sound_loading \
     audio_sound_loading \
     audio_music_stream \
     audio_music_stream \
-    fix_dylib \
+    audio_module_playing \
+    audio_raw_stream \
 
 
 
 
-# typing 'make' will invoke the first target entry in the file,
+# typing 'make' will invoke the default target entry called 'all',
 # in this case, the 'default' target entry is raylib
 # in this case, the 'default' target entry is raylib
-default: examples
+all: examples
 
 
 # compile all examples
 # compile all examples
 examples: $(EXAMPLES)
 examples: $(EXAMPLES)
@@ -229,10 +291,10 @@ core_mouse_wheel: core_mouse_wheel.c
 
 
 # compile [core] example - gamepad input
 # compile [core] example - gamepad input
 core_input_gamepad: core_input_gamepad.c
 core_input_gamepad: core_input_gamepad.c
-ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+ifeq ($(PLATFORM), $(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_RPI))
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 else
 else
-	@echo core_input_gamepad: Only supported on desktop platform
+	@echo core_input_gamepad: Example not supported on PLATFORM_ANDROID or PLATFORM_WEB
 endif
 endif
 
 
 # compile [core] example - generate random values
 # compile [core] example - generate random values
@@ -248,15 +310,15 @@ core_drop_files: core_drop_files.c
 ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 ifeq ($(PLATFORM),PLATFORM_DESKTOP)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 else
 else
-	@echo core_drop_files: Only supported on desktop platform
+	@echo core_drop_files: Example not supported on PLATFORM_ANDROID or PLATFORM_WEB or PLATFORM_RPI
 endif
 endif
 
 
 # compile [core] example - storage values
 # compile [core] example - storage values
 core_storage_values: core_storage_values.c
 core_storage_values: core_storage_values.c
-ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+ifeq ($(PLATFORM), $(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_RPI))
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 else
 else
-	@echo core_storage_values: Only supported on desktop platform
+	@echo core_storage_values: Example not supported on PLATFORM_ANDROID or PLATFORM_WEB
 endif
 endif
 
 
 # compile [core] example - gestures detection
 # compile [core] example - gestures detection
@@ -278,7 +340,19 @@ core_3d_camera_free: core_3d_camera_free.c
 # compile [core] example - 3d camera first person
 # compile [core] example - 3d camera first person
 core_3d_camera_first_person: core_3d_camera_first_person.c
 core_3d_camera_first_person: core_3d_camera_first_person.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
-    
+
+# compile [core] example - 2d camera
+core_2d_camera: core_2d_camera.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+
+# compile [core] example - world screen
+core_world_screen: core_world_screen.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+
+# compile [core] example - oculus rift
+#core_oculus_rift: core_oculus_rift.c
+#	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+
 # compile [shapes] example - raylib logo (with basic shapes)
 # compile [shapes] example - raylib logo (with basic shapes)
 shapes_logo_raylib: shapes_logo_raylib.c
 shapes_logo_raylib: shapes_logo_raylib.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
@@ -359,6 +433,14 @@ text_font_select: text_font_select.c
 text_writing_anim: text_writing_anim.c
 text_writing_anim: text_writing_anim.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 
 
+# compile [text] example - text ttf loading
+text_ttf_loading: text_ttf_loading.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+
+# compile [text] example - text bmfont unordered
+text_bmfont_unordered: text_bmfont_unordered.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+
 # compile [models] example - basic geometric 3d shapes
 # compile [models] example - basic geometric 3d shapes
 models_geometric_shapes: models_geometric_shapes.c
 models_geometric_shapes: models_geometric_shapes.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
@@ -387,21 +469,25 @@ models_heightmap: models_heightmap.c
 models_cubicmap: models_cubicmap.c
 models_cubicmap: models_cubicmap.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/cubicmap.png --preload-file resources/cubicmap_atlas.png
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/cubicmap.png --preload-file resources/cubicmap_atlas.png
 
 
+# compile [models] example - model ray picking
+models_ray_picking: models_ray_picking.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+
 # compile [shaders] example - model shader
 # compile [shaders] example - model shader
 shaders_model_shader: shaders_model_shader.c
 shaders_model_shader: shaders_model_shader.c
-	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/base.vs --preload-file resources/shaders/grayscale.fs
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/glsl100/base.vs --preload-file resources/shaders/glsl100/grayscale.fs
     
     
 # compile [shaders] example - shapes texture shader
 # compile [shaders] example - shapes texture shader
 shaders_shapes_textures: shaders_shapes_textures.c
 shaders_shapes_textures: shaders_shapes_textures.c
-	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/texture_formats/sonic.png --preload-file resources/shaders/shapes_base.vs --preload-file resources/shaders/shapes_grayscale.fs
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/texture_formats/sonic.png --preload-file resources/shaders/glsl100/shapes_base.vs --preload-file resources/shaders/glsl100/shapes_grayscale.fs
     
     
 # compile [shaders] example - custom uniform in shader
 # compile [shaders] example - custom uniform in shader
 shaders_custom_uniform: shaders_custom_uniform.c
 shaders_custom_uniform: shaders_custom_uniform.c
-	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/base.vs --preload-file resources/shaders/swirl.fs
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/glsl100/base.vs --preload-file resources/shaders/glsl100/swirl.fs
     
     
 # compile [shaders] example - postprocessing shader
 # compile [shaders] example - postprocessing shader
 shaders_postprocessing: shaders_postprocessing.c
 shaders_postprocessing: shaders_postprocessing.c
-	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/base.vs --preload-file resources/shaders/bloom.fs
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/glsl100/base.vs --preload-file resources/shaders/glsl100/bloom.fs
 
 
 # compile [shaders] example - shaders_basic_lighting
 # compile [shaders] example - shaders_basic_lighting
 shaders_basic_lighting: shaders_basic_lighting.c
 shaders_basic_lighting: shaders_basic_lighting.c

+ 2 - 4
docs/examples/web/models_billboard.c

@@ -41,11 +41,9 @@ int main()
     //--------------------------------------------------------------------------------------
     //--------------------------------------------------------------------------------------
     InitWindow(screenWidth, screenHeight, "raylib [models] example - drawing billboards");
     InitWindow(screenWidth, screenHeight, "raylib [models] example - drawing billboards");
 
 
-    bill = LoadTexture("resources/billboard.png");     // Our texture billboard
+    bill = LoadTexture("resources/billboard.png");  // Our texture billboard
     
     
-    SetCameraMode(CAMERA_ORBITAL);      // Set an orbital camera mode
-    SetCameraPosition(camera.position); // Set internal camera position to match our camera position
-    SetCameraTarget(camera.target);     // Set internal camera target to match our camera target
+    SetCameraMode(camera, CAMERA_ORBITAL);          // Set an orbital camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/models_billboard.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/models_box_collisions.js


+ 1 - 2
docs/examples/web/models_cubicmap.c

@@ -53,8 +53,7 @@ int main()
 
 
     UnloadImage(image);     // Unload cubesmap image from RAM, already uploaded to VRAM
     UnloadImage(image);     // Unload cubesmap image from RAM, already uploaded to VRAM
     
     
-    SetCameraMode(CAMERA_ORBITAL);      // Set an orbital camera mode
-    SetCameraPosition(camera.position); // Set internal camera position to match our custom camera position
+    SetCameraMode(camera, CAMERA_ORBITAL);              // Set an orbital camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/models_cubicmap.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/models_geometric_shapes.js


+ 2 - 3
docs/examples/web/models_heightmap.c

@@ -48,10 +48,9 @@ int main()
     map = LoadHeightmap(image, (Vector3){ 16, 8, 16 });     // Load heightmap model with defined size
     map = LoadHeightmap(image, (Vector3){ 16, 8, 16 });     // Load heightmap model with defined size
     map.material.texDiffuse = texture;                      // Set map diffuse texture
     map.material.texDiffuse = texture;                      // Set map diffuse texture
 
 
-    UnloadImage(image);                 // Unload heightmap image from RAM, already uploaded to VRAM
+    UnloadImage(image);                         // Unload heightmap image from RAM, already uploaded to VRAM
     
     
-    SetCameraMode(CAMERA_ORBITAL);      // Set an orbital camera mode
-    SetCameraPosition(camera.position); // Set internal camera position to match our custom camera position
+    SetCameraMode(camera, CAMERA_ORBITAL);      // Set an orbital camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/models_heightmap.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/models_obj_loading.js


+ 197 - 0
docs/examples/web/models_ray_picking.c

@@ -0,0 +1,197 @@
+/*******************************************************************************************
+*
+*   raylib [models] example - Ray picking in 3d mode, ground plane, triangle, mesh
+*
+*   This example has been created using raylib 1.7 (www.raylib.com)
+*   raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+*   Copyright (c) 2015 Ramon Santamaria (@raysan5)
+*   Example contributed by Joel Davis (@joeld42)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+#include "../src/raymath.h"
+
+#include <stdio.h>
+#include <float.h>
+
+
+int main()
+{
+    // Initialization
+    //--------------------------------------------------------------------------------------
+    int screenWidth = 800;
+    int screenHeight = 450;
+
+    InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d ray picking");
+
+    // Define the camera to look into our 3d world
+    Camera camera;
+    camera.position = (Vector3){ 10.0f, 8.0f, 10.0f }; // Camera position
+    camera.target = (Vector3){ 0.0f, 2.3f, 0.0f };      // Camera looking at point
+    camera.up = (Vector3){ 0.0f, 1.6f, 0.0f };          // Camera up vector (rotation towards target)
+    camera.fovy = 45.0f;                                // Camera field-of-view Y
+
+    Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
+    Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
+    
+    Ray ray;        // Picking line ray
+    
+    Model tower = LoadModel("resources/model/lowpoly-tower.obj");           // Load OBJ model
+    Texture2D texture = LoadTexture("resources/model/lowpoly-tower.png");   // Load model texture
+    tower.material.texDiffuse = texture;                                    // Set model diffuse texture
+    
+    Vector3 towerPos = { 0.0f, 0.0f, 0.0f };                                // Set model position
+    BoundingBox towerBBox = CalculateBoundingBox( tower.mesh );    
+    bool hitMeshBBox = false;
+    bool hitTriangle = false;
+
+    // Test triangle
+    Vector3 ta = (Vector3){ -25.0, 0.5, 0.0 };    
+    Vector3 tb = (Vector3){ -4.0, 2.5, 1.0 };
+    Vector3 tc = (Vector3){ -8.0, 6.5, 0.0 };
+
+    Vector3 bary = { 0.0f, 0.0f, 0.0f }; 
+
+    SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
+
+    SetTargetFPS(60);                   // Set our game to run at 60 frames-per-second
+    //--------------------------------------------------------------------------------------
+    // Main game loop
+    while (!WindowShouldClose())        // Detect window close button or ESC key
+    {
+        // Update
+        //----------------------------------------------------------------------------------
+        UpdateCamera(&camera);          // Update camera
+        
+        // Display information about closest hit
+        RayHitInfo nearestHit;
+        char *hitObjectName = "None";
+        nearestHit.distance = FLT_MAX;
+        nearestHit.hit = false;
+        Color cursorColor = WHITE;
+
+        // Get ray and test against ground, triangle, and mesh
+        ray = GetMouseRay(GetMousePosition(), camera);
+        
+        // Check ray collision aginst ground plane
+        RayHitInfo groundHitInfo = GetCollisionRayGround(ray, 0.0f);
+        
+        if ((groundHitInfo.hit) && (groundHitInfo.distance < nearestHit.distance))
+        {
+            nearestHit = groundHitInfo;
+            cursorColor = GREEN;
+            hitObjectName = "Ground";
+        }
+
+        // Check ray collision against test triangle
+        RayHitInfo triHitInfo = GetCollisionRayTriangle(ray, ta, tb, tc);
+        
+        if ((triHitInfo.hit) && (triHitInfo.distance < nearestHit.distance)) 
+        {
+            nearestHit = triHitInfo;
+            cursorColor = PURPLE;
+            hitObjectName = "Triangle";
+
+            bary = Barycenter(nearestHit.hitPosition, ta, tb, tc);
+            hitTriangle = true;
+        } 
+        else hitTriangle = false;
+
+        RayHitInfo meshHitInfo;
+
+        // Check ray collision against bounding box first, before trying the full ray-mesh test
+        if (CheckCollisionRayBox(ray, towerBBox)) 
+        {
+            hitMeshBBox = true;
+            
+            // Check ray collision against mesh
+            meshHitInfo = GetCollisionRayMesh(ray, &tower.mesh);    
+            
+            if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance)) 
+            {
+                nearestHit = meshHitInfo;
+                cursorColor = ORANGE;
+                hitObjectName = "Mesh";
+            }
+            
+        } hitMeshBBox = false; 
+        //----------------------------------------------------------------------------------
+        
+        // Draw
+        //----------------------------------------------------------------------------------
+        BeginDrawing();
+
+            ClearBackground(RAYWHITE);
+
+            Begin3dMode(camera);
+
+                // Draw the tower
+                DrawModel(tower, towerPos, 1.0, WHITE);
+                
+                // Draw the test triangle
+                DrawLine3D(ta, tb, PURPLE);
+                DrawLine3D(tb, tc, PURPLE);
+                DrawLine3D(tc, ta, PURPLE);
+
+                // Draw the mesh bbox if we hit it
+                if (hitMeshBBox) DrawBoundingBox(towerBBox, LIME);
+
+                // If we hit something, draw the cursor at the hit point
+                if (nearestHit.hit) 
+                {
+                    DrawCube(nearestHit.hitPosition, 0.5, 0.5, 0.5, cursorColor);
+                    DrawCubeWires(nearestHit.hitPosition, 0.5, 0.5, 0.5, YELLOW);
+
+                    Vector3 normalEnd;
+                    normalEnd.x = nearestHit.hitPosition.x + nearestHit.hitNormal.x;
+                    normalEnd.y = nearestHit.hitPosition.y + nearestHit.hitNormal.y;
+                    normalEnd.z = nearestHit.hitPosition.z + nearestHit.hitNormal.z;
+                    
+                    DrawLine3D(nearestHit.hitPosition, normalEnd, YELLOW);
+                }
+
+                DrawRay(ray, MAROON);
+                
+                DrawGrid(100, 1.0f);
+
+            End3dMode();
+            
+            // Draw some debug GUI text
+            DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
+
+            if (nearestHit.hit) 
+            {
+                int ypos = 70;
+
+                DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
+                
+                DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f", 
+                                    nearestHit.hitPosition.x, 
+                                    nearestHit.hitPosition.y, 
+                                    nearestHit.hitPosition.z), 10, ypos + 15, 10, BLACK);
+                                    
+                DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f", 
+                                    nearestHit.hitNormal.x, 
+                                    nearestHit.hitNormal.y, 
+                                    nearestHit.hitNormal.z), 10, ypos + 30, 10, BLACK);
+
+                if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f",  bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
+            }
+
+            DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY);
+
+            DrawFPS(10, 10);
+
+        EndDrawing();
+        //----------------------------------------------------------------------------------
+    }
+
+    // De-Initialization
+    //--------------------------------------------------------------------------------------
+    CloseWindow();        // Close window and OpenGL context
+    //--------------------------------------------------------------------------------------
+
+    return 0;
+}

File diff suppressed because it is too large
+ 1593 - 0
docs/examples/web/models_ray_picking.js


+ 1 - 3
docs/examples/web/shaders_custom_uniform.c

@@ -75,9 +75,7 @@ int main()
     target = LoadRenderTexture(screenWidth, screenHeight);
     target = LoadRenderTexture(screenWidth, screenHeight);
     
     
     // Setup orbital camera
     // Setup orbital camera
-    SetCameraMode(CAMERA_ORBITAL);          // Set an orbital camera mode
-    SetCameraPosition(camera.position);     // Set internal camera position to match our camera position
-    SetCameraTarget(camera.target);         // Set internal camera target to match our camera target
+    SetCameraMode(camera, CAMERA_ORBITAL);          // Set an orbital camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/shaders_custom_uniform.js


+ 3 - 5
docs/examples/web/shaders_model_shader.c

@@ -57,13 +57,11 @@ int main()
     shader = LoadShader("resources/shaders/glsl100/base.vs", 
     shader = LoadShader("resources/shaders/glsl100/base.vs", 
                         "resources/shaders/glsl100/grayscale.fs");   // Load model shader
                         "resources/shaders/glsl100/grayscale.fs");   // Load model shader
 
 
-    dwarf.material.shader = shader;            // Set shader effect to 3d model
-    dwarf.material.texDiffuse = texture;       // Bind texture to model
+    dwarf.material.shader = shader;             // Set shader effect to 3d model
+    dwarf.material.texDiffuse = texture;        // Bind texture to model
 
 
     // Setup orbital camera
     // Setup orbital camera
-    SetCameraMode(CAMERA_ORBITAL);          // Set an orbital camera mode
-    SetCameraPosition(camera.position);     // Set internal camera position to match our camera position
-    SetCameraTarget(camera.target);         // Set internal camera target to match our camera target
+    SetCameraMode(camera, CAMERA_ORBITAL);      // Set an orbital camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/shaders_model_shader.js


+ 1 - 3
docs/examples/web/shaders_postprocessing.c

@@ -65,9 +65,7 @@ int main()
     target = LoadRenderTexture(screenWidth, screenHeight);
     target = LoadRenderTexture(screenWidth, screenHeight);
     
     
     // Setup orbital camera
     // Setup orbital camera
-    SetCameraMode(CAMERA_ORBITAL);          // Set an orbital camera mode
-    SetCameraPosition(camera.position);     // Set internal camera position to match our camera position
-    SetCameraTarget(camera.target);         // Set internal camera target to match our camera target
+    SetCameraMode(camera, CAMERA_ORBITAL);          // Set an orbital camera mode
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/shaders_postprocessing.js


BIN
docs/examples/web/shaders_shapes_textures.data


File diff suppressed because it is too large
+ 316 - 307
docs/examples/web/shaders_shapes_textures.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/shapes_basic_shapes.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/shapes_colors_palette.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/shapes_logo_raylib.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/shapes_logo_raylib_anim.js


+ 4 - 4
docs/examples/web/text_bmfont_ttf.c

@@ -47,8 +47,8 @@ int main()
     fontBm = LoadSpriteFont("resources/fonts/bmfont.fnt");       // BMFont (AngelCode)
     fontBm = LoadSpriteFont("resources/fonts/bmfont.fnt");       // BMFont (AngelCode)
     fontTtf = LoadSpriteFont("resources/fonts/pixantiqua.ttf");  // TTF font
     fontTtf = LoadSpriteFont("resources/fonts/pixantiqua.ttf");  // TTF font
     
     
-    fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.size, 0).x/2;
-    fontPosition.y = screenHeight/2 - fontBm.size/2 - 80;
+    fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.baseSize, 0).x/2;
+    fontPosition.y = screenHeight/2 - fontBm.baseSize/2 - 80;
     
     
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@@ -90,8 +90,8 @@ void UpdateDrawFrame(void)
 
 
         ClearBackground(RAYWHITE);
         ClearBackground(RAYWHITE);
 
 
-        DrawTextEx(fontBm, msgBm, fontPosition, fontBm.size, 0, MAROON);
-        DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.size*0.8f, 2, LIME);
+        DrawTextEx(fontBm, msgBm, fontPosition, fontBm.baseSize, 0, MAROON);
+        DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.baseSize*0.8f, 2, LIME);
 
 
     EndDrawing();
     EndDrawing();
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------

+ 1 - 43
docs/examples/web/text_bmfont_ttf.data

@@ -97,49 +97,7 @@ char id=123  x=191   y=141   width=14    height=45    xoffset=-1    yoffset=0
 char id=124  x=416   y=141   width=5     height=45    xoffset=2     yoffset=0     xadvance=9     page=0  chnl=15
 char id=124  x=416   y=141   width=5     height=45    xoffset=2     yoffset=0     xadvance=9     page=0  chnl=15
 char id=125  x=207   y=141   width=13    height=45    xoffset=0     yoffset=0     xadvance=12    page=0  chnl=15
 char id=125  x=207   y=141   width=13    height=45    xoffset=0     yoffset=0     xadvance=12    page=0  chnl=15
 char id=126  x=42    y=141   width=19    height=45    xoffset=1     yoffset=0     xadvance=21    page=0  chnl=15
 char id=126  x=42    y=141   width=19    height=45    xoffset=1     yoffset=0     xadvance=21    page=0  chnl=15
-‰PNG
-
-
IHDRĹ�Îg IDATxśíťM�fÇąß#˛áE{ˇ±6V+Â+Űj+„,ě0¸í…POâ…uśxF�Ë5‘Ěä•ď…€
žya'4ăŕ�k/Lf/¬“Ä‹@�Ú×w|u=
-ąµp/Śz?Yś·nW×[ĎSUçăýčó˙ÁËLżçÔ9§>ţő<O=uáŃŁG!„b^<¶î!„bőH!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!Ź;Ŕ;ŔŁĚëťĹç)7Ťď?Z|–ă®ńýß»Ł\ÍtěŇ•łöZS®FżůŘź ŚcăŐ‹řu×9†WO¬:V:oÍýłžWß:Ws/¬¶2e9­6eݧ>íÎÖ_ďUŰböeă�ŢýđęiŚw­­ĎŘ+OK™Ć:_ź:šĂ«Gcť#¦t]cŤ#Ąöř�®~ÔPÓ÷yŻ1Ɖâ¸őpĽoŕ	ŕ#™÷?áśôó,W€]ŕ9ăűoťă­›»Ŕď€K™Ď®S~P;Ŕ«Ńß?îŹVşőó$ůżCWZ9ľź_ľkś3đ=ňĎŕř*muîYŕ™ÂwžY|Ż…‡‹˛śź_^6>»
-8Çţ:ăÔł}ŕű…ďś_n47tęoŇ=S‹ëÔ,?q>{ŽşâEçł·čę§G,hĽçĂâóÖ�eČůö€?8_G×+Î1TÜ´\tmĺwô»¶0X[ý|Ěm¦o)éÚĆaăő�Ŕ©ŕ·ĆçŹO%ďy�9äEĂS‹cĺ°Î˝	ܤ\ů.?Â~Hߤk‡Ŕ·Ç)ÚĆ`
|ˇ«}xĽć|ľĽ`|¶\v~Űg`|�bńůóŤÇeQ–:ź…ĺş•ŠĘ”{ŔťeIŮĄ«Ű޵ź_˘ţž†Ž=nW×€™×GéÚś,^çţ+láx	řlˇl^ßvü˘đű»”ŤĹmúYVuľ«‹ßÔr@˙ArČuAWÎËQ�!{‚Ćâ€i¬)—čęu«(M€Sđňł�‹t3Ľ�Ď⫊\C{űaţ¦PĆu±K×ůĆܢë�žćlGcÍÔŇcĽNy±mäę”ëI‰;t™ĹwČŚßĹ®k}ĆKFÎúUĂ·9čR.Ń)ů�8•)'től(;ŔOńźaëŕ•ÓŽ=X
.`?“cŕ3ś·±EŔCŕÇÎů˝Ů=řuööuQÍLŐcř%ĺ:´ęóíҵ·V.ÓnĆľËđë‚nP÷Äâ.ÝŔ:¤ŹŞ˝CÉő7©kAĽG§Ęs|ŞđwŽ´ˇYż9˘{›HÚÄ3€‡t®‹�\ç˙rtڱfe›H®c­©'%^ÁźŃĄŤ"¶¶¤-Ž×JŤů?ĐÇ
Ý@ç
Ú—9íHKťń.¦şŽÍş—Đoć\	‡ŔÇżÍĹW¤wA~{`±&3PvxuÖs/xő®•=ŕŤÂwŢXńů,î!ť8»@'ćŇűŢj«±¸¶�›$ŠćńJöčž˙ÔÔ¸°š-AüřŔřN<°ŐΆRż°3đÁâÜ›HÚ|H'”©ë"u}ě_[ü¬Y٦’>ďľţ˙”’+ŕ2gĆÔbóýbM^%oQřŰĚ{ńMóžĹ#>n,*SĆr1˝Ay€iqĄÄ–™Cŕ‹t�úU:ł~z®ŰŔç¬0¸
-Ľ´ř˝ňkŕ]Ł9—f\F«Îz•¸ťç�-á•,c°gŻ%×ŘçŰ‚[4ďÓYIúRjżpj�
ŻÔ›bą}Jćńôƨ97ťÇ=ň.Ż[ÎoĽşÜj51gŕ�.Ŕ%G<°ŐΆâ™Đy1tÁ‡©IÜ‹¸ÎUR+ŇŃ
-ž°˘ŽÇ^Ťhź•Ő\—u-9˙W.şąO¤éËŤ!ťůćü˙ŕwBĄ�1ž˘ďk}±|Â'Ŕ&=µÁf9<‹ÇđçŘťä	đ
†»�jfa×h»źa†—1
.qˇS˙Çś
-�NűŠ ¤­8Ż/óf¤^ßć*[şëř4Ëm˙>ťÄT,wĹŞĎçO’¬~ľÖĹë	Ű#şz‘™>>Iűuy×[§©*ĹÖmÁsZÜd@ĽDśŔzP±ňđ|ů1qCó‚Árf5Ďš3ŃY~;KýY×�6ňô~¤
-,µjÄÖŚXaö5={‘d=ř뜨!‘ó	…HÓÖĺ[é+ŤČ=“˙�íf*á
Ś{Ŕ˙´†Ü«n˝ü'ň3Íš`3‹’Ĺă[Fy`Ó˙UĘćĂÖÁ?žŮ…2¦±·˘cćîAl}ű9§ť¤Ő‘˙»ľXqV §g˝+D{V§c:1Ôâ®XőůVpĺ×脜ĺ2:¤{^%JĂ–ëJ­W’ď—==mőCcYކN÷"ďSlQ‰a€´üGAŐç°*\®ńz~»Ző—käibQ“«Da‰PˇýcĆ]ćř8đ_)›h÷č:š@—RŔLĘ›,וřľćžÉ˙i8~Ji`üűÎg}M˙`×÷·€żÁžiö™MJÁŹ9Ćč€ţ)ĺŔˇÖÁNETC1ćĘž¶˝X\ÇË–­%¨ąť@.NÀޥs+äđV7Ő~ž»"'$W}ľ€\&97N‹EĘłľÔĉݧ»/(/Eőîˇ÷¬ál˝ŠW®|†á–·RĐmę‚ö8ţÖ„Xx•ăSŘĘé�nv—ĄĄ¬˝˛pęg/)ÇTŐZfŞÜ�ĎUú°&9őµŃ
¶0ý˛ż‹Ô«Ä?ˇŢ'Ô2hĺ‚FCgś{&c{ö‡^zć˙0�YgCÜŕ[<rĺĂô@a~·±ř85këSWa�ż±ň”€´—sx�W>Ď"šso¦x9X`YHŻú|1-ćiËaá]×ŘqbCďáü•+5ÄůÂ+'˘bjóĺ\Ł8U÷>^ĺř¶rzřŹ™÷�˘ě�kŔ©J-Ĺ$Ô~ßjä7(:qb™m^ö×2hĺZ�YYţ˙1qËŔ8Ôőbů$cáj‰ćˇ>Á’Ĺ#ć«K,U
-K‰whc©°Şń§·5żńr¤–DĎüď­ý÷ĚÚü&-yPĆXYÓ7ďJÉ…¸|Śń¬žąAą&cźç4Ć=\5Ąľ,ÄH4“t/«r<	üs–Ih –űŕsŘ€%ĺo5ŕřÖ$h‰g9őWjäW°ŁMoqVmĹ�héě3—rHŕa0A•"Tă�V/jÖ‹2͑֕ŕ*ĘůÍkfy5´ŚCL˙že)Vâ^ŔYßś­xËÓ¦Ŕ[Z•‹Á0hÇőĂr¦“Ť>ąBĽśi�˛ő¬°=Y;§L¨�k‚ÍúÔÇM”71)Ý]›±ú˛\©°LšĎ�˛
-ł!k&t€=C/5jË
:ÖÚĄfńĚ6gÂ,ů}BY>Ćň˛ŤŘß/ωc
-B¤~.¸*¤ŻlÍ�‹‹’2Ź�ĂZĐąşň"ůĆ<f˛§;řËe`xÎϲ”vp^›é“ÚŻ´ČcĐbÝČY
ăúQă×ôb…JÔ$8k
R®ĹK—>Sťď.mă,|ń*%Ďr´)ÉŕVýĚJÜb\kĘ©°Y~ç0˛fBO`›Öju®ż_®“Î-QnË˙?Öě4^žÝšTŞĐ	Ą–HüĄ:UăĘŐ•O˙$yoŠdO^”÷9<ËRČ^Ö¬¨oj`hKRŇš%lBô÷P,×Pl©Ë‰„ "J®%/®)L¬•5ővڶŐ2čL}ľôř}ó\§q;
-í¦5}®čŮ—ˇ÷đ*«ŮĐm%iăSŕ%ĘĐ-7¶fÖ
g—ü€žë¤ß&ßůżH^0Ôä÷®!]öS?rě«Ig±-É$6A1[qé=ŢädO9ĆJbýÜU9ĽZ}ó%®á'Ź©Ů�	üٱĄ.­?ńó)‰wĎE,�V`cMĐ•ĺú„ĺ�+7ör¤Ŕr;o9_ŽŇůbĽGÁýčŐ‘ňVĎÜ3ó®ËôěĂĐ{ř"§«úćR	‰€<—ěđ{»‰Tx
&%ťĹ{A7)5Ń–^y>Gľ“ţ‰QŽçżIĂĆI›š[ö—HâN%5OY?ľ.j,cYXVEKęßަE9úć\‡ń\a©_)ł[ëµŐúyÓA*í+Âó©ď–µčÝ@l­ô¨±"y'˝?±…0lÄłOŰň·–óĺhYngYÁâĺ†÷é˘ý[s�yżuybÎ%[ĘvđîaÉm—[Ä@źŤ�J»�–6šL* ~v™Î⽵·)-&ěśďOY^2*p®—č’¨¤Ś@e-űËůăëÎUÄM	†©ĹË»ŘkE^¦µ>´,ťóL˙Gt)t[öFh%NČÝ č=ß’č�Űb0=—ęC:HĄ}Ex>¨ď^żd%V޵P–úĽW9ŤWJż·üěş–ł@Ôž/Gi٬ô|–« d5ŮřVN”ŇÄsĚ8ď–Ry{íłďD§$´'uńĺ€g"‰É]pÍŔŢjv÷ÔaL\�kö1|ÓŰĽěoJ&ŢMŢě)G)ÓZj—W–L˙ŻŃÍ4Ľ Î!®€[,'QŁs
-}B¸±….7ăJX,‚Oşu‰g«ĐoéĚ=‘̸ĎŇĄq.ĺ{ʱĘ\sľÔlĽżxß[g^{Źrő9¤Ę-]›;âĹő„`é\śT)+jďć¶ů
ç°ÚçPWriyóe&rä@퀛Sň53–ŚFPď–�+pŤ;˘6±‚‡·ě/O«ę\„ô¶Í–K3’mó˙ÝÂ8Gí>ôžé?®[}¶IBÉ
-pżs
-}B¸ńňĽ4–Ŕ:»KçSŽónÔŇâžlíĚďÓýZÄţâGÔíÔć­bi=_Íň˝Üů¬Éśµ?}x>ˇląUOĄ­śá4[KťĄ{¸·8ní90Ě•\şö!›Śąä@)[Ř3»ńĐgP(	‹´<5î�ˇćkŮ_ '\bőśúضm¶đ¬>Űć˙÷ĚőqęĎÜëZĎă‚oZĚŐ-oPŰdX˛”ăßuśU.îlĂď´˘ÇĂĚż%Ă\ fp	<čqü>›¸XÔX7Ć<ß!Ý.‹)53ňx n	\= /jݵbąsĆş‡ÖýkĄTžËL`Č	(›ň­ŮsŤxč3(”:ˇ\yĽ~č`›úÓ¬ŤXŇF7śT-Ź˝gŔŞđÄŮ6Y4<óM}ń\g—±oÉôź«[ĄĚŘ«J&ĘŇžčá÷aďyËdö—˙GśíC2«!k˘k¬“ĐobPÚ-®…šÜ Çtń C°xkć”1s†¤Üby“žŔĆąŹˇÎXyúǸ‡GŔ—Ťă·âm‚ő+oš°@©±xˇÔ€ú
-Ţqsźyfżˇ�mĽ™‰Ů
-ĺ(ĎŔ=Ę›Xl*VŔ¶Y4ĽíHkÜEžőËĘ	P2ý{u«4c;pŞ4�ö–±Ć�I<ű»ÁY+Jč¬Ă€ŢŮ6�/6Ě:["Żk¬“CëěęŁŃK„|ń–�÷Čł<y\ŁĽ‰Íú_ʵT°¦Ż»B˙ë
-ç®É‡_»�cě”Ç�_öÓşň¦�%Ľŕ®’ŹĚx‡dő˛Žk5Z+§ÁĐ€Ť´Ó.Ąś
;Uĺ*YČ`©ámŔr·l“˙ż´öżfVXŠUIs”v˙‚aŰ»^Z¬�g®9_śÁń€ö4Ř79ë‹˝EŰ.l5±DcÄĹ;Ó•f˛ˇý[éĽkvř»Ă©P*ť/XXZrƇë)Ą‡ÓőíńńăţŻĹ\Ţr]pvŕÖ, A�zëňÓóLŃg×ě·0jŚĎ…GŹŤu,!„(q•ł©eO€/‘ź­ĺö™÷ľżíÄ÷ć<_§Ř$„ëŕ.ísKĎ#ÁE˛Í–A±H!ÖÉ>đ3ěej÷Đ@(Ä$H!„3Ä
-B!Ä9F@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!BĚŹ»ŔŁĹżB�™" „BĚ� ö�éfcĽŢv˘óÜtľ{łPFď·ńćę�ĺŹ_Wĺcq­ď4Ţ“>×[şWŢsŚ;Őó�{×ů^Íë÷ŔnĎrxŻ÷iIëpzŇk.ÝŁ�řy,Ţ;�Ţ+=÷uQŞGc—ŰęGj¬%Cú ÚţĘ÷¤¦Ď˛(Ť5Ç¶Ž±Émď<‘ŽGf‘`ˇ˘˙Ř+|woń˝!Ťŕk~»m\~Çřfę‹Ŕ›ď(§ŕĹäď€?F˘đyJÜ8߸Îf	�0ČŐ–{Śz˛|Ŕď?5B<jďÉmÚëwčËޤk#ޱ5�oż±>�čĎUĘŤ%G€ú>�ďR?S80ťŻú6›3ŕíO&ď˝W~ž;Ţ/)Ó”ë¬76 �–Ň —r@Ű,:eříí9&hcŃ÷žÔÖďÖľlH&¦çxń˙“č˙KHôcčL�Ĺďű¨č=ŕ›Ď˝m\fşÇu6Ł#űđDňŢo>Oů&í�ŕ€őÝ“7č_îľmcř)ťŐ©/9�6CžeÉj8¤/ëۇ‰ń	îÁŕüíâý�÷8µđś±ŢHôăU†ÍXüţůžżť“+†Ý«ľC˝/}*žŹţN•űg9;@yĘ~řĘŔňĽĘę-M»ŔsĆg÷€‹×G�Că{_ˇýYľA˙6�hc°O×ŢsÜâôž\3ľSj;V_v<˝8öÓ‹żsÇ~Ő9¶X
;Ŕç˙®Ó닿/Ĺ©…çL}ŕ>]çsˇâőşÎÇâř2¶ir*îĐŻĚqEĎ˝î$ß÷:©“ĹąâßßsĘüyúu˛Űî
-�;®đ˛:™>Ä�EiŔ€®ŃĽ<Ňąűň$g;â Ü©9ý<&�P×CťĽG÷,r<<ë”w•ŻDßŔď‡jąI»i=G*ŕi]´^ź!ßg>O~€>ľýýsě:ną&Ľľě5ŕáâ˙çxŽő‹çąó,]{ÍńËőçďęC«`řYć€�#şÎçˇńůyç‡tb*ć%ě†ůÝ̡çÍđř±óągî.qL×ÁZ�Ô‹±R”tŤĎ5wŚŰÉw‚’ź_7>o	Čz›ĺ¶ůmÎÖĎ Îgą.[”˘ß[V+Ôňݵá*Ë÷µ/©€ü6ó^7ČĎňÓřŹŘď[‹'•Ľ÷+ňýq:ńÓ—ŇjžÚxŻ]Ö¶ku…W­ň×ÄŁÔ®)ąăâ	Ľe	‚Ó¶}%ĽŃ"4ř—É™ćĂŕ“SýcŘý:O®Ďlťë�úđl+CiĆk)Xj̨ô±9 ë˙Aô^Z?o4/Ü“TĽ¤ÔŠ•‡t"%÷űďE{>űśČÉaůľ˙‚~–¨Ü
-€ŕä–>‘ô±•3}NŢlţ'ĆűÖŞ…Üę’?.ŢOâž+	°kD�•sŚR»¬]ůcÝ'KäĦ÷”×±­ŕµí&вŞĂ˛Ý"Ó¶k@iđ?ľĘ<«“‚łmë^§p„ĚzŤ1cĘťăwŘAX±9rĄggqÝĄľ±†FĄÁš­AwťcřŞűÜ“ščńWČ—=ÎY`-»M]VÄ˙-–]~µäĚěázs.†đŮÖOŇ
-9,×Ŕű,^ž…ˇĎę‡]şŘ‹k”źĹMÚëŕmlqn
ž–ȱLďŢ„ĄO™Ą ËtĺĎ_rÚ–˛ÁÎ5 fđ˙őćÂóŔëÔůSA0Ĺ€pŢ\1ÁgÝ·SÎá™ds3˘!>â=şłUă	ť�0¨¶BCýć^ĐĺCŕ“ř19ż+	Ek°ĽG›ő#=fß—č‚´úLÂLŇDcĆc
ugJ«.j˙!î›ň®şc:×JŽś‹ĐŠĎř1ůz848׺L˙ŕßs¶¸M"J ´6vŽ�?t×űőżÉ€ú¨ţň&88_®€�ˇţšx
ö�.¸0�d­ř‚Ë,?›4č6ým�š~źŰňŐżDý Ç”\^Tzkߦ&ý”>őµń4o°<XŇÝŻľ]0…%ďľ‹Ń-­ý“´•ý
ěU5�żg=�ŰNźŐ"–›0uZć˙ŕöÉaĹ\Ŕr`´ŐźxA—˙ŽÓöâŃb‹Ú=’{ë	€]:3†Uŕąţ�;ôŹ\ď«ú_Á6QmóŞ‹`AY•)=5eľŚmVý"ggV7ČŻř¨Y*•ž7őc§źçL´)Á·ď­BÉ⬺iÍzrýA*”cábůvŻâ»�,jÚTÎrqB·˘`Č,ŮZg;vo@Ú^h<Ż—y0Xw6%ŃUŕ[ŘÖŁšÁěv™ĆˇÓY@r}´µňDzžĄ.ÂČ‹�ŘcbĂđéŠčDDN<[“˘cŕ?ţť��Óŕęl<…%J�?t
{®�ŕ!ťĘ.-3Ëq‘ÎşŇb	đ–?í˙¦±ŰÂŞLééĚÇňmZř¬ "o†”›‰ĹĺČwµĚĐ®PŽNńę¦uOŢ~ťy?îô¬Ąn�Ú™ť·.Ý*·e2ŁË-ŁľGwĎc·‚7 Ár*č1°2;öY50”‹ŔçŚĎÜŚu	VĚ€zî0kĺŹĺâ}ŃřŚŐ¤Ä«;Ňvq“~YfYçÎއÂ*'j˙ZĄ6ŇHęZAĐgýů}:óNŽĎ1<AŃ*ČĺđĚ^0m6Ŕž‰Ô
-”´‚{RótĽd)çżŤŹź›
ǟךĆqŤU W7˝{âĄ%®Ąvf÷pńwíĚΊřôWâŠqlo@j5ĄÇ��÷\[3;¶őŐX¤JÔ&ęăş°Ţ·ÜFż¦´)Áün­¸đ.-rÉŤµ4µH*jRbŽ=řO•?{ťÄ‚ $ú$J×nʉ58×ŇC±Ěč0^6@Żľ•RďÎŤľ‰Şú2ÖĚ.=޵Fże5Ę�;'ŽL—ňvż�›±¶–cęľşF¨ôi—­9D¬`ŔKtÂÓňĺ{K˙bâÜ5ÉMF,j6é;ř{ ¤z˝J7UC˛đ¶ýµűĆĚZ6ĺ17…)źi)‹cl‚´Ö=÷aÁŚ»tuŇK(˛ÔYî�!‰ŞZsf×:“>/xQě-÷¤őţŤŮfK)¨ű´Ë>»4ZÁ€ź"/¦jr•„ńĂ›á‡@ÚRĆÝQ fđb.{űbĽŕ—}:Óo/Úr*<żYP‡«Âsl3SÎ2,3ř©uSJV’ôŐ’Uo(aŕĎÍd-żĄ—7 ëąĹîoőKźuć›d=Ěeułfł-ëď!?ń#¸Ď
-4Ë	?O<÷ÉŇi%\*-kłžxŰi[¦A~L˛–ţĹX›:Ĺń-«ě+xŚúÁżďY°}*�Ąő‰”·¨´‚ަĆS»·Yn�ĄĄ”C|§SşÖÁXyŮ­c{Ę;53·®	n!ŤĺÜC±¸Č»]ĂŢÉÚZů{ä…QÚAz÷ä2ůX„xŐ@ĽÜ0'¬¶•[úä
Hcř¤k	�s.ţ#7›mÉŘŽť3çę —™.×ĎXé”s“™–´Á%®ŽíÂ)mč4V=)ő˝ą`Ŕ\nýšÉ¨÷lrâÁZm3*ŹQ·Őd);\)Íĺ1ÝÍôéKU�1‚Žú॓…ĺ{ĺ-ijĹŘVW€UźJ¦±Ú{űkkŽme�łfH{t˘9ĽŢÖl-—I,žMĄËËj"ĄKmí€S‘î“%şrmĚş'ą|Otĺ:=k&y‰n�	Ç.*×FbŹ�wżÓzŇš±Żtě7˘ż˝‰śŐvĽý7â¬sŢęŚÚÔË�ŘŤlEŰ—‚Ł­>8­'Ţý>ât©śEiâx@yÖîĹ.¤bî.+
-\ĺvŔwh_“l‘[7ą*J›Ö´�Ű<¨•óę
-HyŔt¦1+Ő°woCR§’`őęjś–ΦJ;Zx;ĂŐb•Ű»'Ą
ŚVçë•;>¶'Ş—’ťŕďšľ¬%†ń®~©5ÔëŰâzâ|YdޱkŇ#�ßv¬Á4ÎbjÝďĘ»ôű±€˝ż([/ą™·;a\OĽ{Rc˛÷,^�Ú{ŕYćŇľd*+č«Đ–ťĚ"—„eŐxŃęµI=šrŢ\)µ9ŢűPŠmň¬K©XÓŕ¤Ôäžúě=źeLi˝y‰Rą‡Üoß�1Ę=U=)aíaPC©ľD˙ö]ş'éžG+âË
-PZx‡ţ+’Z\Ú%‹o­+şĆ
-^�·gI3«5۲zÜŁśLdU\ˇ˙uÔěrŐ¶şj�j—Ém[Ó\ˇ}Ŕ«ÉMďeřËEĹ·¸˝B’Ş)Ę
ýę˙điüAĂ[ă_:ö:w#í{żÓdA9úfu¬}–÷é˛8¶ô5ĺ®Áł\ĆĎqq�¶WĐ^îŇľµK˙ Ţ
-‚­ďöYŐ�eŐ XÔ¦Ň
�OcšcĐrq¤çÉGΛ+ ¤ŤşerJ0ĺ¶FۆŚzĄA/ż&ëť—á/ç3ěm][îpż[v¨˙ĄN¸őY¶dŘ÷{ězŇ—Úűú´–ľ »4�ÔÖÁ��ZZ~Ö§Ü%<+@)[jpďxĺŽ÷¨čSn«|} Ż`ʎśˇ.[±,Łĺç¸đčŃŁ1Ž#„ŘîŇůď±y˘Z±"ÖeB!Ä‘B!f�\B!Ä‘@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„'ăŔÜBIDATb†H!„3D@!„�!B!Ä‘B!f�€B1Cć$ö��GÉëĂĹg­ß�ŕťĚąÂënĹ1î:ż/˝nö(sé|ď,®kŠň¦Ż«ĺ˝éüţ÷ŔnÍEWrŐ9WéľZg˝6VÓfVĹ*űÚ)Čőßµ}Š÷Ś[^ń‘ö?ĹńcN`“çŔžó˝¦<®S×)Äý đÝ=şë{pm%t‚םď\~ÇúË*´ŐŮm$Ď3/°Ü_^^CY~FP�äI¬ž]ŕŻńţ”˝Ĺo¦¤nc‹€ŕ—´•ş†đ+V?°±R*1ë*«�Ž«lŹŐĄOť˝ĽÉfÍčçÄđŞńŮWXO_rĽ•Ľ÷5ˇ(°Zv€źŇ
8­\ZüvŞíUăŘߤ}đL]ćoĐŻĽ—€ďŤ[±f‚5jÓLß)CÚŘ÷YŻ%`—΂6ĄkmÉÍţë´ü8‰ţľ|Ł–X-^Ąą\XĽ®ßŮ[c
-rÇŢĄSł9Ž€§éĘűQΚžbžžŁ€\ĹžEĹ÷÷žńťËȬz^ąÍfĆbxm¬†‹Ŕó#•EÔáÍţ«°śŻ'ďÝ$ď™ă†ŔjyŃx˙p'úű¶°fę9âAďđÎŞĂ”O%–Ľµâř*đpń÷1đe:Q�ŇŇAĄĺ-˝â{ć5Ęôţľ’)ë	đŻ€˙WYV±ť«Ŕ¦řĐ_ƶŢâ´®?Mľ}|žÍ5çťÜDîo“żKV€Ô÷sÖ„ĺët~ĘO2ďeÇŤÇđ#—s¦łRäzü}+Ő3Yĺ©QîąóŤ­ř­ë/E\îOfŢ?ˇ3ۤ¤�!3ęűt•ĆâÉß© Ľü:yďŹŔ=Ë5ĎŇÝ›”Üý}|ŚłŤěqŕ/�ż™°Ś9Sj\­zW3�ŐD—V„XŰĄňŐ¬dI)µăÜç­z𡷔±tĽďX.�´ÍîŃ
�‡ŔŹ+Ëyž°Ú…u?[VôY…�›h˙še�6†ŕ&y«ć5ÎNjbŢgy˘—µ<¶8Č-§©rđüUéLëőLA SGź5Ža͒ߢ›ić˘!wŁ‚â˙–ńŰľ…ą"ö­Šůŕ‰Ęp‘Ľ�¨%W9,n�Wźďłü,Ćşľľ<IwoR>Ţ[qYZąIŮť›	†úűťžÇ-E•Š�>KCŻŃż]Ä„ŮkǵĺűöŚ9%”q�ď: 7É×ĂŰä…Ćň–ątçą
-Ľľq›ą‹Ý.¬ű95ąŮ˙ŰtĎ=hCcöé‚řRîaţĐMÎŢÍĽż4¶Ŕ·±}¸±rđ*ááâ85�üěrx.óľ5K†®cąm|ó9ň
ł–‹‹c”°"ęÇś![3óž§í>\aŮ$u%ó=Ë]đ›Ęs?mÍ+˝ÇÖ=ů€îŢ[3‰>Ţ�ܤn€ţSÚĹjŹ›rť¶€ą=ü	D ¬¶üŚrÝĽN]´|lĺ±Üi)a‰]k˝¸H×)—žŹµ,ë>ťĘroíEľ}?h(ë6¬3Ąç\\ć62–›1�µ4ú»gvč‚÷ŇöpDçÂô8¦›¤Ą<G"p�đ|¸ĐÍ>v颤-źđ7XVˇąe	�ÜŤ±‘śÉ™E™úĚŚ¦&ÜŻëˇX>rˤ
¶Ů°ÄUüAá·=Ź»O×Áç8¤sgLŤuOާłZY3‰ë¬Ďl)ü©Ž{ŹÓĆÜĚŐߡxŃČVg7w(_sJ‹Eäě¶šŇ: ÜĶ*¤±8Sb	č\»Š…ÔÔ«V˙�›ýÇý[nÂŰ7p۲´żFÝóÎĹ,YŢă Ŕ‡‹�ç¸D·Ľę˛ńąŚť:Í	‹ś/Ű2˙żNŢÄĺÍ:ăήf†RK�cgX.k€˝ÎŮŽ¦v6T"ťQ{–ĎĘâq»�űŮ­ŠĘ3á‹t÷{Ő"ŔłĆÄő¬µţZî�¸SHE˙	ť)úÝĚąuP©iVüŠ'vÇlÇÇŔg¨�ťŠÚžŕR°ęîđiě~w.<Aç~śkö»_ŽYŽĘ‡¶Ŕm°-í-“)ËŐ{ĆRš®¸�Ýx-zÉń�ÎG’’Î|-ó˙ť?/‡%R3‰ĺËn%
Ěy	{F‘+›%†ŕtĆń@ťŠ´w&7ńEE©nl�±ÚőË–Ő"u§ŤUS÷Tl&śţ�Im»°¬]–šŞĂYłűX„°ŠĄĹŇ`ń¶KáýDÚ¶Qs?žZAYrł˙ܤ){Ňj°V†Ś1™:Óçä–ć–HYÔř#ŔŚÍ7OŃ=Ě”·ÉWt+ŞŢúMÎ$ŇJzĎĹń$ËŞď!ťÉn3ŹÚç(ÍN ë¤r±ë žÝzţ”	<ŇŔIŻţ悺ZęŻ虋łęɵ‹ś»–M¶;‹÷rLŐŽálxźX‰”XěZ3ÁZö±­­·Řśv5%cŢϡXł˙,‹fkÂ[ëVłf˙ŢD8Ç{tő;ĺ̸”-�T­?Â
-ŚÍ7ąY@.ŃA
9S{Kô{ŽěN-‡ešş|©˘,·o¶ăqD箨ťMÔ¤2îŰIĹßš Dꢺ�-VĺSl]5ŃRsÉ@<ú,‰XíÂrwµ�lÇnÇńRű­l©0RNË…“´>ŻŚy?‡»ŽJÁĐ�ś®µŘXł˙Wţľ‰!‰€ZDKÁ_ą5°‚˙`ýËεî1Áü�„B†˝ocĎűëĺÎÓbJô˘‘át¦}Ăř|J¬{bůÍr»ŕPéşáMN/űýĚĐŚ“;ٶ]¬˘‡eÂĄÍ·bBěAM]nť”°V´¬są_.w†• (ÎÚgű~nÖ8Ř7>«HNÔFäş9†3Xër_Äň*üşĎ†,ÉËe�
-ŤÄëk;WoFÝęC,&g}AI}„X
qťŇ¬±Ą.´Ö_kVhf-}‚ÝĆH9=¤]ŚAµ^łLÎşŠÖif·˛Ä­CXźgZŰÔÔXă 7DN´lL±·ř~
V&«ç€?#oţď«zrÁUC¶•€Ç
-ëĎűbĹD¬C—˙[t�Í:Łý-ak”púÜ<a‘rŢňĚÔBŃâ';ŕµDşĆÜK)Űç|­‰©Ňűë	ˇ!íŘ[!”fűC!Ĺf“«§ë©)V0ěd–źTôY—ěn7��3»^ţ$óÝřŤŃŔ[Jx@˙Ô;†µrě‡V»{–U&S�»tŃńV§{ŤÍ�™Xq&Ö’Lëţ¦Áz^Fą¸î{�[�V@Ű]xŔŰäČ#MĎ{“eS®‘bµHŰ…Ř—Ţ_OĺĘ0F;٦ŐY)ÔÇČ|W›lkSöJ“x9^)'Ę:°&}¬›ÖňLű‹€gú?ţ!öŇžZW€—0Ą&Ú×ňă¦[»Zů”[I3OY‰‘ ˙Đ®b'Îř^ň=«r®z]˝wŤPסÔv\-™Ó$-^¤pşüÍ»żi˝ł˘zálđśç°"x­ýŕ4=m‹	Î
-ĚÔçťł,XKSséž-Ňvń¶1×®k…Đíř�nYYk ©Ř¬čw8»=tK›Z^Ü1-ľg,‘±đL˙Ż˙»�­uÔ.ç¨]ňŕ	ЏSéĹëő­ÎČ
-<óň,Ôtř«^W_šŐnŢýŤĹ…u­çf-c­ĹZ-sL—AsĚčfoÓ�t@…ĽŔëłú¦¦]XíÚł˛ŚŐŽĂlÝ®*1-›ÖŠ5cď»—IÎU¶äVŔ3ýÇ�Ž7c©uÔlŇQ»äaŠt(VZä@Kž…�CşČîUŇşoŔ&Đ÷ţŃeĆË=·űŔ{–§$ÚJ;4BW¶?Łľž{{{ÄŞ5X?`_¸%„Ľ,¤CĐlzr«Ö™¤¨%gŔ»Ô[¤§ĆŠméK–‹oXŹQ6ýÇ	bĽ›[ë
-(mkŮüWÓ�B7˛®ţ�ş�—şë˙$mK´î±ú™‹çÇÝdúÜßš\7¨ßT&P›!äŞĎŐĎ[´w¨ÇŔé·°5‡Ă	đ?+ľçm_ĘâłšűűuBčšíĎĎ8¤ż›2y´[\q«ď^J¬őľż.§Ř=+@ÎÄ�ĂňÝCż 7Ż
ł€1f·±ÓR†Hâšó„%ZĄ�ě�_}AJ›’gˇqâŻ#uŁv€
ő¬4Psskpd.�HßËÚ{č[f€ż`śvQÓŽ˙eŹň‰ůamł–znš8ě»Á[Ž\ßťuë]xôčŃ�ç­Ć[Vv‹Í�*bjâ-{K©“­mŻ[39öĹjł't™-Wµ|nSĘ!Ħ’ë+鬂gDĎ�L€}ń–•ťÇ˝­…¨!öͧËB˝m݇ć›Bś/ŇĄ˛f\ÚÔ ]‡lí�$߱зŚ5ŢOÝk3ëŢnY±9ä–>Ŕ°Ś­Ă`ˇŮż�­›ö¤lÓvËB�éI3`ş;˝N-Ľ,_1't;jö/ćĆKô‹Öߤ햅ë'·m±»cď*,Ąťë®ˇÜbľ´FëŻse�bsy�ł+úŠÂu­B!Ä٤!„B¬	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ�ą€»ŔŁ�Ż»+/u®’ż†�ýĹëCă;WÇŢ~oü6>Ç*ąąxµb]Ë;ŔNrüܵö9',?źô|)Vý­©“ńąJ穡ôüs÷Ć«oÖoâóÔÔ©Ü=˛®wgńY®ż_ś{[±ęJz/Ľ>ńfĹ÷î6~'mC}ŰŽčÁÜ€‡›Ŕď€KÎw>Ţ[Mqţ®SąŢó·Ąk)qťöcřNňŢëŔń€rxĽý˙ý	Ď36�·˙ż<_řţŕZňŢđÂČĺbëCŐ,ĺ6Oö�ŻU|ďŕŹ—%Ě8úüP-5\^nřţ÷8+:�źŹT–”ŕÉčďźLtž©řmô˙OT|˙Ë"ŕ;l÷Ś^�ÁÁ|÷:E-ćÉ“t3±SÎ2�=xśç©»–Z>Oťiý*Ëe‹éî׳Ŕ3‹˙źĐ=›mâtĺxŽş�<­M�sGfYo2ng)¦çWŔQćý`ž˙5đnćóŁĹos|Ęx˙x¸°x]i*éz¨™M¶đđ‘Âwv€W“÷NčąW8˝żń«tŻcŃö.Ýsß&ŢŁ«łŹOUţ._a>VËĘÓWhö­{b�¨qŕMÍ,«6 Č{­;čćů
-ľÍţŹt¦ř”·é|«Çäg�žůŢ4Waň_÷čžőg8ŰYŢXĽ˙Ng¤15�Ó,[Ц”Wé˙?>Ęi{ą}vźî…ĎR3˝Ek@Ěťč|[«†mŻĎď“ŻŁżYuAÄćP!�jhPÔ\đ˘�k^cDc{Ó)ţ”ß˙¤�DŤ ÜŁsY×UŠ´ĎE�§Ç©qC]g�¨<ˇĆó¸<h<.äg˙P?+ëł
-`Űý˙�Ö8€,śŁeĹŔ&¬.�­&�!îź!+PĆ�qÇ\LUk˛‹tąTíł]ú�ťRĹź>»ŘżXő ±üŚeÓ:˘ŐkW/ä„S‰Ř3ĺ¬lŰý˙�>q5XĎq›VJä�­&�mt˙�‰@T[fű·čLiŹÓÍ‚¦&(éŰÉűéb<5˝KçÇž»%#6�ćž]j–˝°řÍŞ¸ü[–˙š™ř¶‘:ôâ-Ć`Űý˙�ľq}é#đ6ŤÔoźş´ÄĚxŚÓ�?T-bźŢŤÂwÇdřkü—čL.aK«ă6ľą~‰mćŔ3ägĹSV©i|jvčV	¤LíkŢÖő˙)Câ<,ë‹|ĺâÜѲ
- ĹըƇt65AtÖ+
Đy™ú<ö?YŢĘ1Ýý±®Ér:ľČövČS3eRč˘őźČĽ?d@ö&ë|S/—<ţ˙Ŕqą`ąmv•aR!úyŐfŕóČ>đ}ăłmüc�wĎřNl)ęcjLŁÇső/¸+>şř~Žŕ¦ň˘ľw€ź’�µ˛5CüyKŃSteO™ŇÔ|^ü˙�)ârÁrBśKJŕ€ÓYt)ü*‰;uoJ9~0Uˇ¬ 6čĘôe¶gđ_«ş'!¦Ä[EP;K¶r,„ř”ÔeT›@iLjý˙Öž›´LV�ő¬}©Đlů®+ŁĹ|â5Kզʒˤ±Wđg�,>ű$«olĄÁ˙ł¨H	y	ÖMK:އŔk#śsJ_óyń˙¦�ČĺĘŘöBdyŚÓ¨đ[•ż‰ýë«Ě˙_,�Ę~šĺ™Ř5ÚÍĐĄD@5+v�ˇÁż•uG\źĐ%÷i­3ˇ-ŐX¤¬ŠSqŢü˙�±ărąÎ�Xb‰Ř˛šĺP‹�deń·¨,s�ë�_đ–ž_E�żĹş#®�Ůľ5©I0ť×dË\ő5ž7˙`Š8€tąÜ6eű˘šś &Ŕ+eĚe8ç/¨ěř«É› †q@}ě‹•ŐŻ•©,çeýĘŞóqn(Ĺ%lĺ:ËěżÄ*ű:ü7…ŕ6ňâG^4ŢO±˛úwBę2˛rłOE‹˙?MµÉÁkcÇÔ¦¸ť*đ¶Ą[Lm`ś®Ć*0E€m 4ř_CË)WMÍ–ĽÇt«r®Ż'+~ľ—‹őř!yÁg-7{GB8żţ˙Ŕů„8÷ôŮXV›oâg*,eÜ´ĺ–Ű‚·‰K´ęÍŠ¬ťkÉ™î˝=2¬óŐ
-ŽΫ˙?0ŐľBśkú€@M!VĹĐYmËNpc`íĚř]–Ŕ19Żţ˙€â„čÁ~ÔUî DĘĎ)Ń>�Ăr ·óâŘy[˙ź2ŐľBśkĆBlA�zů,.bořłęÍ€ ›‰ż›Ľ7övŢý˙�MŠŘ„ÄA›P±áü˝u`ÍŚ˝ľ÷ół„ô˝‡!PtlĆ~—č6˘ňŽą|ĄÇ±Źé69Jwâ�‹ŢL}¸\yŽĎô(۶1ÖsŻ­Ďé}˝‹ť˙ˇĺů®W†ZjŻżć{Ęź°áČ D‡^ĺ¶™~DűVÓ19×Ĺ3t�{9Â9ßdő{	ô!Ý™3ÎşO统ŐnIľi¤bě-VďfŮ„2�-C`łI;ČÖ×*24ž'ĆNAśŰD&ĺřgc,7Ŕťu ÄşS)ωtŻoĺÇy.�ŘB$„8%”7„ÚMŤî’÷rů>B”čˇÎ5„$<©%ĆĘűp^Ë ¶	€Í&NŔÔçUła‘8ĺ>]ç9GŔ+
ß…ł‰�ö€’ď<E÷L=Ôů݆żsŤŐĆmBÄ# ÄYnж!VŽ[´g˛Ěm'ü*őI�BĘauţ«ă]fÔ{¬oÓ±M(�ŘR.<zôhÝeB!ÄŠ‘@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!B!Ä‘B!f�€B1C$„B�" „BĚ	!„b†H!„3D@!„�!˙ě@=V|IEND®B`‚0FFTMM…B`�¸GDEF_Ő€„NGPOSWµzß�TdGSUB"n'“€Ô€OS/2X›�ň¸VcmapaŮľr˘cvt "�ŔfeatT�Ô,gasp˙˙€|glyfĐŕ‘L5 headěc‹�<6hheaőÂt$hmtxťŚ˙w
+0FFTMM…B`�¸GDEF_Ő€„NGPOSWµzß�TdGSUB"n'“€Ô€OS/2X›�ň¸VcmapaŮľr˘cvt "�ŔfeatT�Ô,gasp˙˙€|glyfĐŕ‘L5 headěc‹�<6hheaőÂt$hmtxťŚ˙w
 kern33…=ěloca§®µ:Ä�maxp	i� morxŔNČw‰Pname Q›>Cđ:¤post#eç~”ĺq¤Np_<őĹC#íĹC#í˙U˙UUUU˙UôŞ˙UUÂĂ8@.ćô™ĚŹ™Ěë3	PfEd  ¬U˙UôU«Ôv"UUŞUUŞŞUUUŞUŞŞUUUUUŞŞUUUUŞŞUUUŞŞUŞUUUUŞUŞUUŞUŞŞUUUUŞUU˙UUUUUUŞUŞUUUUUŞŞUUUŞUŞŞŞŞŞUUŞUUUŞŞŞŞŞŞUŞŞŞŞŞŞŞŞŞŞŞŞUUUUUŞUUUUUUUUUUUUUUUUUUUŞUUUUUUUUUUś€ŁĄ§ł·»˙Sax~ ¬˙˙  Ą§©µążR`x} ¬˙˙˙ă˙Ă˙Â˙Á˙Ŕ˙ż˙ľ˙»˙i˙]˙G˙Cŕ	
 kern33…=ěloca§®µ:Ä�maxp	i� morxŔNČw‰Pname Q›>Cđ:¤post#eç~”ĺq¤Np_<őĹC#íĹC#í˙U˙UUUU˙UôŞ˙UUÂĂ8@.ćô™ĚŹ™Ěë3	PfEd  ¬U˙UôU«Ôv"UUŞUUŞŞUUUŞUŞŞUUUUUŞŞUUUUŞŞUUUŞŞUŞUUUUŞUŞUUŞUŞŞUUUUŞUU˙UUUUUUŞUŞUUUUUŞŞUUUŞUŞŞŞŞŞUUŞUUUŞŞŞŞŞŞUŞŞŞŞŞŞŞŞŞŞŞŞUUUUUŞUUUUUUUUUUUUUUUUUUUŞUUUUUUUUUUś€ŁĄ§ł·»˙Sax~ ¬˙˙  Ą§©µążR`x} ¬˙˙˙ă˙Ă˙Â˙Á˙Ŕ˙ż˙ľ˙»˙i˙]˙G˙Cŕ	
 
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab€‚„Ś‘—ś›ťźž ˘¤ŁĄ¦¨§©Ş¬®­Ż±°µ´¶·pefhušni�“qgtjxˇłzdlkyc{~�»Ľ˛şżÂv}…|†��‰Š‡ŽŹŤ•–”o"�****>P~Ľä(B\xŚžŞ¶Ô>f�¨ĐîBTj�¤ČčFj�˘şĐđ8^nžľäţ(LzަČô"@btŽ ćňBf„˘Ćŕ		(	>	X	~	Ž	°	Č	ć
 
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab€‚„Ś‘—ś›ťźž ˘¤ŁĄ¦¨§©Ş¬®­Ż±°µ´¶·pefhušni�“qgtjxˇłzdlkyc{~�»Ľ˛şżÂv}…|†��‰Š‡ŽŹŤ•–”o"�****>P~Ľä(B\xŚžŞ¶Ô>f�¨ĐîBTj�¤ČčFj�˘şĐđ8^nžľäţ(LzަČô"@btŽ ćňBf„˘Ćŕ		(	>	X	~	Ž	°	Č	ć
 
 

File diff suppressed because it is too large
+ 311 - 361
docs/examples/web/text_bmfont_ttf.js


+ 65 - 0
docs/examples/web/text_bmfont_unordered.c

@@ -0,0 +1,65 @@
+/*******************************************************************************************
+*
+*   raylib [text] example - BMFont unordered chars loading and drawing
+*
+*   This example has been created using raylib 1.4 (www.raylib.com)
+*   raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+*   Copyright (c) 2016 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+int main()
+{
+    // Initialization
+    //--------------------------------------------------------------------------------------
+    int screenWidth = 800;
+    int screenHeight = 450;
+
+    InitWindow(screenWidth, screenHeight, "raylib [text] example - bmfont unordered loading and drawing");
+
+    // NOTE: Using chars outside the [32..127] limits!
+    // NOTE: If a character is not found in the font, it just renders a space
+    const char msg[256] = "ASCII extended characters:\n¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆ\nÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæ\nçèéêëìíîïðñòóôõö÷øùúûüýþÿ";
+
+    // NOTE: Loaded font has an unordered list of characters (chars in the range 32..255)
+    SpriteFont font = LoadSpriteFont("resources/fonts/pixantiqua.fnt");       // BMFont (AngelCode)
+
+    SetTargetFPS(60);
+    //--------------------------------------------------------------------------------------
+
+    // Main game loop
+    while (!WindowShouldClose())    // Detect window close button or ESC key
+    {
+        // Update
+        //----------------------------------------------------------------------------------
+        // TODO: Update variables here...
+        //----------------------------------------------------------------------------------
+
+        // Draw
+        //----------------------------------------------------------------------------------
+        BeginDrawing();
+
+            ClearBackground(RAYWHITE);
+
+            DrawText("Font name:       PixAntiqua", 40, 50, 20, GRAY);
+            DrawText(FormatText("Font base size:           %i", font.baseSize), 40, 80, 20, GRAY);
+            DrawText(FormatText("Font chars number:     %i", font.charsCount), 40, 110, 20, GRAY);
+            
+            DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.baseSize, 0, MAROON);
+
+        EndDrawing();
+        //----------------------------------------------------------------------------------
+    }
+
+    // De-Initialization
+    //--------------------------------------------------------------------------------------
+    UnloadSpriteFont(font);     // AngelCode SpriteFont unloading
+    
+    CloseWindow();                // Close window and OpenGL context
+    //--------------------------------------------------------------------------------------
+
+    return 0;
+}

File diff suppressed because it is too large
+ 1593 - 0
docs/examples/web/text_bmfont_unordered.js


+ 3 - 3
docs/examples/web/text_font_select.c

@@ -77,7 +77,7 @@ int main()
                          
                          
     fontNames = tempFontNames;
     fontNames = tempFontNames;
     
     
-    textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1);
+    textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1);
     
     
     btnNextRec = (Rectangle){ 673, positionY, 109, 44 };    // Button rectangle (useful for collision)
     btnNextRec = (Rectangle){ 673, positionY, 109, 44 };    // Button rectangle (useful for collision)
     
     
@@ -166,7 +166,7 @@ void UpdateDrawFrame(void)
     }
     }
 
 
     // Text measurement for better positioning on screen
     // Text measurement for better positioning on screen
-    textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1);
+    textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1);
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------
 
 
     // Draw
     // Draw
@@ -188,7 +188,7 @@ void UpdateDrawFrame(void)
         DrawText("NEXT", 700, positionY + 13, 20, btnNextOutColor);
         DrawText("NEXT", 700, positionY + 13, 20, btnNextOutColor);
 
 
         DrawTextEx(fonts[currentFont], text, (Vector2){ screenWidth/2 - textSize.x/2,
         DrawTextEx(fonts[currentFont], text, (Vector2){ screenWidth/2 - textSize.x/2,
-                   260 + (70 - textSize.y)/2 }, fonts[currentFont].size*3,
+                   260 + (70 - textSize.y)/2 }, fonts[currentFont].baseSize*3,
                    1, colors[currentFont]);
                    1, colors[currentFont]);
 
 
     EndDrawing();
     EndDrawing();

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/text_font_select.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/text_format_text.js


+ 3 - 3
docs/examples/web/text_rbmf_fonts.c

@@ -68,8 +68,8 @@ int main()
         
         
     for (int i = 0; i < 8; i++)
     for (int i = 0; i < 8; i++)
     {
     {
-        positions[i].x = screenWidth/2 - MeasureTextEx(fonts[i], messages[i], fonts[i].size*2, spacings[i]).x/2;
-        positions[i].y = 60 + fonts[i].size + 50*i;
+        positions[i].x = screenWidth/2 - MeasureTextEx(fonts[i], messages[i], fonts[i].baseSize*2, spacings[i]).x/2;
+        positions[i].y = 60 + fonts[i].baseSize + 50*i;
     }
     }
     
     
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
@@ -118,7 +118,7 @@ void UpdateDrawFrame(void)
         
         
         for (int i = 0; i < 8; i++)
         for (int i = 0; i < 8; i++)
         {
         {
-            DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].size*2, spacings[i], colors[i]);
+            DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].baseSize*2, spacings[i], colors[i]);
         }
         }
 
 
     EndDrawing();
     EndDrawing();

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/text_rbmf_fonts.js


+ 9 - 9
docs/examples/web/text_sprite_fonts.c

@@ -50,14 +50,14 @@ int main()
     font2 = LoadSpriteFont("resources/fonts/custom_alagard.png");        // SpriteFont loading
     font2 = LoadSpriteFont("resources/fonts/custom_alagard.png");        // SpriteFont loading
     font3 = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png");  // SpriteFont loading
     font3 = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png");  // SpriteFont loading
     
     
-    fontPosition1.x = screenWidth/2 - MeasureTextEx(font1, msg1, font1.size, -3).x/2;
-    fontPosition1.y = screenHeight/2 - font1.size/2 - 80;
+    fontPosition1.x = screenWidth/2 - MeasureTextEx(font1, msg1, font1.baseSize, -3).x/2;
+    fontPosition1.y = screenHeight/2 - font1.baseSize/2 - 80;
 
 
-    fontPosition2.x = screenWidth/2 - MeasureTextEx(font2, msg2, font2.size, -2).x/2;
-    fontPosition2.y = screenHeight/2 - font2.size/2 - 10;
+    fontPosition2.x = screenWidth/2 - MeasureTextEx(font2, msg2, font2.baseSize, -2).x/2;
+    fontPosition2.y = screenHeight/2 - font2.baseSize/2 - 10;
 
 
-    fontPosition3.x = screenWidth/2 - MeasureTextEx(font3, msg3, font3.size, 2).x/2;
-    fontPosition3.y = screenHeight/2 - font3.size/2 + 50;
+    fontPosition3.x = screenWidth/2 - MeasureTextEx(font3, msg3, font3.baseSize, 2).x/2;
+    fontPosition3.y = screenHeight/2 - font3.baseSize/2 + 50;
     
     
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
     emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@@ -99,9 +99,9 @@ void UpdateDrawFrame(void)
 
 
         ClearBackground(RAYWHITE);
         ClearBackground(RAYWHITE);
 
 
-        DrawTextEx(font1, msg1, fontPosition1, font1.size, -3, WHITE);
-        DrawTextEx(font2, msg2, fontPosition2, font2.size, -2, WHITE);
-        DrawTextEx(font3, msg3, fontPosition3, font3.size, 2, WHITE);
+        DrawTextEx(font1, msg1, fontPosition1, font1.baseSize, -3, WHITE);
+        DrawTextEx(font2, msg2, fontPosition2, font2.baseSize, -2, WHITE);
+        DrawTextEx(font3, msg3, fontPosition3, font3.baseSize, 2, WHITE);
 
 
     EndDrawing();
     EndDrawing();
     //----------------------------------------------------------------------------------
     //----------------------------------------------------------------------------------

File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/text_sprite_fonts.js


+ 130 - 0
docs/examples/web/text_ttf_loading.c

@@ -0,0 +1,130 @@
+/*******************************************************************************************
+*
+*   raylib [text] example - TTF loading and usage
+*
+*   This example has been created using raylib 1.3.0 (www.raylib.com)
+*   raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+*   Copyright (c) 2015 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+int main()
+{
+    // Initialization
+    //--------------------------------------------------------------------------------------
+    int screenWidth = 800;
+    int screenHeight = 450;
+
+    InitWindow(screenWidth, screenHeight, "raylib [text] example - ttf loading");
+    
+    const char msg[50] = "TTF SpriteFont";
+
+    // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
+    
+    // TTF SpriteFont loading with custom generation parameters
+    SpriteFont font = LoadSpriteFontTTF("resources/fonts/KAISG.ttf", 96, 0, 0);
+    
+    // Generate mipmap levels to use trilinear filtering
+    // NOTE: On 2D drawing it won't be noticeable, it looks like FILTER_BILINEAR
+    GenTextureMipmaps(&font.texture);
+
+    float fontSize = font.baseSize;
+    Vector2 fontPosition = { 40, screenHeight/2 + 50 };
+    Vector2 textSize;
+
+    SetTextureFilter(font.texture, FILTER_POINT);
+    int currentFontFilter = 0;      // FILTER_POINT
+    
+    int count = 0;
+    char **droppedFiles;
+    
+    SetTargetFPS(60);
+    //--------------------------------------------------------------------------------------
+    
+    // Main game loop
+    while (!WindowShouldClose())    // Detect window close button or ESC key
+    {
+        // Update
+        //----------------------------------------------------------------------------------
+        fontSize += GetMouseWheelMove()*4.0f;
+        
+        // Choose font texture filter method
+        if (IsKeyPressed(KEY_ONE))
+        {
+            SetTextureFilter(font.texture, FILTER_POINT);
+            currentFontFilter = 0;
+        }
+        else if (IsKeyPressed(KEY_TWO))
+        {
+            SetTextureFilter(font.texture, FILTER_BILINEAR);
+            currentFontFilter = 1;
+        }
+        else if (IsKeyPressed(KEY_THREE))
+        {
+            // NOTE: Trilinear filter won't be noticed on 2D drawing
+            SetTextureFilter(font.texture, FILTER_TRILINEAR);
+            currentFontFilter = 2;
+        }
+        
+        textSize = MeasureTextEx(font, msg, fontSize, 0);
+        
+        if (IsKeyDown(KEY_LEFT)) fontPosition.x -= 10;
+        else if (IsKeyDown(KEY_RIGHT)) fontPosition.x += 10;
+        
+        // Load a dropped TTF file dynamically (at current fontSize)
+        if (IsFileDropped())
+        {
+            droppedFiles = GetDroppedFiles(&count);
+            
+            if (count == 1) // Only support one ttf file dropped
+            {
+                UnloadSpriteFont(font);
+                font = LoadSpriteFontTTF(droppedFiles[0], fontSize, 0, 0);
+                ClearDroppedFiles();
+            }
+        }
+        //----------------------------------------------------------------------------------
+        
+        // Draw
+        //----------------------------------------------------------------------------------
+        BeginDrawing();
+        
+            ClearBackground(RAYWHITE);
+            
+            DrawText("Use mouse wheel to change font size", 20, 20, 10, GRAY);
+            DrawText("Use KEY_RIGHT and KEY_LEFT to move text", 20, 40, 10, GRAY);
+            DrawText("Use 1, 2, 3 to change texture filter", 20, 60, 10, GRAY);
+            DrawText("Drop a new TTF font for dynamic loading", 20, 80, 10, DARKGRAY);
+
+            DrawTextEx(font, msg, fontPosition, fontSize, 0, BLACK);
+            
+            // TODO: It seems texSize measurement is not accurate due to chars offsets...
+            //DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED);
+            
+            DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY);
+            DrawText(FormatText("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY);
+            DrawText(FormatText("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY);
+            DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY);
+            
+            if (currentFontFilter == 0) DrawText("POINT", 570, 400, 20, BLACK);
+            else if (currentFontFilter == 1) DrawText("BILINEAR", 570, 400, 20, BLACK);
+            else if (currentFontFilter == 2) DrawText("TRILINEAR", 570, 400, 20, BLACK);
+      
+        EndDrawing();
+        //----------------------------------------------------------------------------------
+    }
+
+    // De-Initialization
+    //--------------------------------------------------------------------------------------
+    UnloadSpriteFont(font);     // SpriteFont unloading
+    
+    ClearDroppedFiles();        // Clear internal buffers
+
+    CloseWindow();              // Close window and OpenGL context
+    //--------------------------------------------------------------------------------------
+    
+    return 0;
+}

File diff suppressed because it is too large
+ 1611 - 0
docs/examples/web/text_ttf_loading.js


File diff suppressed because it is too large
+ 307 - 301
docs/examples/web/text_writing_anim.js


File diff suppressed because it is too large
+ 14 - 5
docs/examples/web/textures_formats_loading.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_image_drawing.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_image_loading.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_image_processing.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_logo_raylib.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_particles_trail_blending.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_raw_data.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_rectangle.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_srcrec_dstrec.js


File diff suppressed because it is too large
+ 316 - 305
docs/examples/web/textures_to_image.js


Some files were not shown because too many files changed in this diff