Ver código fonte

Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop

victorfisac 8 anos atrás
pai
commit
db0cfa935f
100 arquivos alterados com 2727 adições e 1160 exclusões
  1. 9 0
      .gitignore
  2. 8 58
      docs/common/js/examples.js
  3. 2 8
      docs/common/js/games.js
  4. BIN
      docs/examples/img/audio/audio_module_playing.png
  5. BIN
      docs/examples/img/shaders/shaders_shapes_textures.png
  6. BIN
      docs/examples/img/shaders/shaders_standard_lighting.png
  7. BIN
      docs/examples/img/text/text_font_select.png
  8. BIN
      docs/examples/img/text/text_rbmf_fonts.png
  9. BIN
      docs/examples/img/textures/textures_formats_loading.png
  10. BIN
      docs/examples/img/textures/textures_raw_data.png
  11. BIN
      docs/examples/img/textures/textures_rectangle.png
  12. BIN
      docs/examples/img/textures/textures_srcrec_dstrec.png
  13. 3 3
      docs/examples/src/audio/audio_module_playing.c
  14. 2 2
      docs/examples/src/audio/audio_music_stream.c
  15. 16 13
      docs/examples/src/audio/audio_raw_stream.c
  16. 2 2
      docs/examples/src/audio/audio_sound_loading.c
  17. 2 2
      docs/examples/src/core/core_input_gamepad.c
  18. 20 21
      docs/examples/src/core/core_vr_simulator.c
  19. 8 10
      docs/examples/src/models/models_mesh_picking.c
  20. 11 5
      docs/examples/src/physac/physics_demo.c
  21. 12 5
      docs/examples/src/physac/physics_friction.c
  22. 13 6
      docs/examples/src/physac/physics_movement.c
  23. 12 5
      docs/examples/src/physac/physics_restitution.c
  24. 12 5
      docs/examples/src/physac/physics_shatter.c
  25. 9 12
      docs/examples/src/shaders/shaders_shapes_textures.c
  26. 59 0
      docs/examples/src/shapes/shapes_lines_bezier.c
  27. 6 6
      docs/examples/src/text/text_bmfont_ttf.c
  28. 4 4
      docs/examples/src/text/text_bmfont_unordered.c
  29. 116 0
      docs/examples/src/text/text_input_box.c
  30. 28 21
      docs/examples/src/text/text_raylib_fonts.c
  31. 12 12
      docs/examples/src/text/text_sprite_fonts.c
  32. 3 3
      docs/examples/src/text/text_ttf_loading.c
  33. 4 4
      docs/examples/src/textures/textures_particles_blending.c
  34. 13 11
      docs/examples/src/textures/textures_raw_data.c
  35. 38 17
      docs/examples/src/textures/textures_rectangle.c
  36. 7 5
      docs/examples/src/textures/textures_srcrec_dstrec.c
  37. BIN
      docs/examples/web/audio/audio_module_playing.data
  38. 189 1
      docs/examples/web/audio/audio_module_playing.js
  39. BIN
      docs/examples/web/audio/audio_module_playing.png
  40. 0 0
      docs/examples/web/audio/audio_music_stream.data
  41. 189 1
      docs/examples/web/audio/audio_music_stream.js
  42. 0 0
      docs/examples/web/audio/audio_music_stream.png
  43. 73 2
      docs/examples/web/audio/audio_raw_stream.js
  44. 0 0
      docs/examples/web/audio/audio_raw_stream.png
  45. BIN
      docs/examples/web/audio/audio_sound_loading.data
  46. 188 0
      docs/examples/web/audio/audio_sound_loading.js
  47. 0 0
      docs/examples/web/audio/audio_sound_loading.png
  48. 7 6
      docs/examples/web/audio/loader.html
  49. 50 46
      docs/examples/web/core/core_2d_camera.js
  50. 0 0
      docs/examples/web/core/core_2d_camera.png
  51. 65 61
      docs/examples/web/core/core_3d_camera_first_person.js
  52. 0 0
      docs/examples/web/core/core_3d_camera_first_person.png
  53. 65 61
      docs/examples/web/core/core_3d_camera_free.js
  54. 0 0
      docs/examples/web/core/core_3d_camera_free.png
  55. 65 61
      docs/examples/web/core/core_3d_mode.js
  56. 0 0
      docs/examples/web/core/core_3d_mode.png
  57. 65 61
      docs/examples/web/core/core_3d_picking.js
  58. 0 0
      docs/examples/web/core/core_3d_picking.png
  59. 50 46
      docs/examples/web/core/core_basic_window.js
  60. 0 0
      docs/examples/web/core/core_basic_window.png
  61. 50 46
      docs/examples/web/core/core_color_select.js
  62. 0 0
      docs/examples/web/core/core_color_select.png
  63. 0 0
      docs/examples/web/core/core_drop_files.png
  64. 50 46
      docs/examples/web/core/core_gestures_detection.js
  65. 0 0
      docs/examples/web/core/core_gestures_detection.png
  66. 2 2
      docs/examples/web/core/core_input_gamepad.js
  67. 0 0
      docs/examples/web/core/core_input_gamepad.png
  68. 50 46
      docs/examples/web/core/core_input_keys.js
  69. 0 0
      docs/examples/web/core/core_input_keys.png
  70. 50 46
      docs/examples/web/core/core_input_mouse.js
  71. 0 0
      docs/examples/web/core/core_input_mouse.png
  72. 50 46
      docs/examples/web/core/core_mouse_wheel.js
  73. 0 0
      docs/examples/web/core/core_mouse_wheel.png
  74. 50 46
      docs/examples/web/core/core_random_values.js
  75. 0 0
      docs/examples/web/core/core_random_values.png
  76. 0 0
      docs/examples/web/core/core_storage_values.png
  77. 65 61
      docs/examples/web/core/core_vr_simulator.js
  78. 0 0
      docs/examples/web/core/core_vr_simulator.png
  79. 65 61
      docs/examples/web/core/core_world_screen.js
  80. 0 0
      docs/examples/web/core/core_world_screen.png
  81. 210 0
      docs/examples/web/core/loader.html
  82. 80 33
      docs/examples/web/makefile
  83. 210 0
      docs/examples/web/models/loader.html
  84. 2 2
      docs/examples/web/models/models_billboard.js
  85. 0 0
      docs/examples/web/models/models_billboard.png
  86. 65 61
      docs/examples/web/models/models_box_collisions.js
  87. 0 0
      docs/examples/web/models/models_box_collisions.png
  88. 2 2
      docs/examples/web/models/models_cubicmap.js
  89. 0 0
      docs/examples/web/models/models_cubicmap.png
  90. 65 61
      docs/examples/web/models/models_geometric_shapes.js
  91. 0 0
      docs/examples/web/models/models_geometric_shapes.png
  92. 2 2
      docs/examples/web/models/models_heightmap.js
  93. 0 0
      docs/examples/web/models/models_heightmap.png
  94. 4 5
      docs/examples/web/models/models_mesh_picking.c
  95. 0 0
      docs/examples/web/models/models_mesh_picking.data
  96. 6 6
      docs/examples/web/models/models_mesh_picking.js
  97. BIN
      docs/examples/web/models/models_mesh_picking.png
  98. 2 2
      docs/examples/web/models/models_obj_loading.js
  99. 0 0
      docs/examples/web/models/models_obj_loading.png
  100. 210 0
      docs/examples/web/physac/loader.html

+ 9 - 0
.gitignore

@@ -114,3 +114,12 @@ project/vs2015/*.opendb
 docs/examples/web/*.html
 docs/examples/web/*/*.html
 !docs/examples/web/loader.html
+!docs/examples/web/core/loader.html
+!docs/examples/web/shapes/loader.html
+!docs/examples/web/text/loader.html
+!docs/examples/web/textures/loader.html
+!docs/examples/web/audio/loader.html
+!docs/examples/web/physac/loader.html
+!docs/examples/web/shaders/loader.html
+!docs/examples/web/models/loader.html
+

+ 8 - 58
docs/common/js/examples.js

@@ -25,6 +25,7 @@ $(document).ready(function() {
         'shapes_basic_shapes',
         'shapes_colors_palette',
         'shapes_logo_raylib_anim',
+        'shapes_lines_bezier',
         'textures_logo_raylib',
         'textures_image_loading',
         'textures_rectangle',
@@ -35,18 +36,19 @@ $(document).ready(function() {
         'textures_image_drawing',
         'text_sprite_fonts',
         'text_bmfont_ttf',
-        'text_rbmf_fonts',
+        'text_raylib_fonts',
         'text_format_text',
         'text_writing_anim',
         'text_ttf_loading',
         'text_bmfont_unordered',
+        'text_input_box',
         'models_geometric_shapes',
         'models_box_collisions',
         'models_billboard',
         'models_obj_loading',
         'models_heightmap',
         'models_cubicmap',
-        'models_ray_picking',
+        'models_mesh_picking',
         'shaders_model_shader',
         'shaders_shapes_textures',
         'shaders_custom_uniform',
@@ -56,68 +58,16 @@ $(document).ready(function() {
         'audio_module_playing',
         'audio_raw_stream'];
 
-    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',
-        'vr simulator',
-        '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',
-        'image processing',
-        'image drawing',
-        'sprite fonts',
-        'bmfonts ttf',
-        'rbmf fonts',
-        'text formatting',
-        'writing animation',
-        'ttf loading',
-        'bmfont unordered',
-        'geometric shapes',
-        'box collisions',
-        'billboard drawing',
-        'obj loading',
-        'heightmap loading',
-        'cubesmap loading',
-        'mesh ray picking',
-        'model shader',
-        'shapes textures shader',
-        'custom uniform in shaders',
-        'postprocessing shaders',
-        'standard lighting',
-        'sound loading',
-        'music streaming',
-        'module playing',
-        'raw stream'];
-
     for (var i = 0; i < exampleName.length; i++)
     {
         var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_"));
+        var exampleBase = exampleName[i].slice(exampleName[i].indexOf('_') + 1);
+        var exampleDesc = exampleBase.replace('_', ' ');
 
         $('#container').append(
             '<div class="mix f' + filterType + '">' +
-            '<a class="fancybox fancybox.iframe" href="examples/web/loader.html?name=' + filterType + '/' + exampleName[i] + '" title="' + exampleDesc[i] + '">' +
-            '<img width="400" height="225" src="../examples/img/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc[i] + '</p></div></a>' +
+            '<a class="fancybox fancybox.iframe" href="examples/web/' + filterType + '/' + 'loader.html?name=' + exampleName[i] + '" title="' + exampleDesc + '">' +
+            '<img width="400" height="225" src="../examples/web/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc + '</p></div></a>' +
             '</div>');
 
         $('#container a .extext').hide();

+ 2 - 8
docs/common/js/games.js

@@ -14,14 +14,12 @@ $(document).ready(function() {
         'sample_space_invaders',
         'sample_floppy',
         'sample_tetris',
-        'sample_gold_fever',
-        'sample_doom',
-        'game_raylib_features',
         'game_drturtle',
         'game_just_do',
         'game_skully_escape',
         'game_koala_seasons',
         'game_light_my_ritual',
+        'game_wave_collector',
         'user_raymario',    
         'user_crazyball',
         'user_tictactoe',
@@ -40,14 +38,12 @@ $(document).ready(function() {
         'space invaders',
         'floppy',
         'tetris',
-        'gold fever',
-        'doom',
-        'raylib Features DEMO',
         'Dr Turtle & Mr Gamera',
         'JUST DO',
         'Skully Escape',
         'Koala Seasons',
         'LIGHT MY RITUAL',
+        'Wave Collector',
         'RayMario (Victor Fisac)',    
         'CrazyBall (Victor Fisac)',
         'Tic-Tac-Toe (LelixSuper)',
@@ -83,8 +79,6 @@ $(document).ready(function() {
             */
         }
         
-        if (exampleName[i] == 'game_koala_seasons') linkTag = '<a target="_blank" href="http://www.koalaseasons.com" title="' + exampleDesc[i] + '">';
-
         $('#container').append(
             '<div class="mix f' + filterType + '">' + linkTag +
             '<img width="400" height="225" src="../games/img/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc[i] + '</p></div></a>' +

BIN
docs/examples/img/audio/audio_module_playing.png


BIN
docs/examples/img/shaders/shaders_shapes_textures.png


BIN
docs/examples/img/shaders/shaders_standard_lighting.png


BIN
docs/examples/img/text/text_font_select.png


BIN
docs/examples/img/text/text_rbmf_fonts.png


BIN
docs/examples/img/textures/textures_formats_loading.png


BIN
docs/examples/img/textures/textures_raw_data.png


BIN
docs/examples/img/textures/textures_rectangle.png


BIN
docs/examples/img/textures/textures_srcrec_dstrec.png


+ 3 - 3
docs/examples/src/audio/audio_module_playing.c

@@ -52,7 +52,7 @@ int main()
         circles[i].color = colors[GetRandomValue(0, 13)];
     }
 
-    Music xm = LoadMusicStream("resources/audio/mini1111.xm");
+    Music xm = LoadMusicStream("resources/mini1111.xm");
     
     PlayMusicStream(xm);
 
@@ -86,7 +86,7 @@ int main()
         }
         
         // Get timePlayed scaled to bar dimensions
-        timePlayed = (GetMusicTimePlayed(xm)/GetMusicTimeLength(xm)*(screenWidth - 40))*2;
+        timePlayed = GetMusicTimePlayed(xm)/GetMusicTimeLength(xm)*(screenWidth - 40);
         
         // Color circles animation
         for (int i = MAX_CIRCLES - 1; (i >= 0) && !pause; i--)
@@ -112,7 +112,7 @@ int main()
         //----------------------------------------------------------------------------------
         BeginDrawing();
 
-            ClearBackground(WHITE);
+            ClearBackground(RAYWHITE);
             
             for (int i = MAX_CIRCLES - 1; i >= 0; i--)
             {

+ 2 - 2
docs/examples/src/audio/audio_music_stream.c

@@ -24,7 +24,7 @@ int main()
 
     InitAudioDevice();              // Initialize audio device
 
-    Music music = LoadMusicStream("resources/audio/guitar_noodling.ogg");
+    Music music = LoadMusicStream("resources/guitar_noodling.ogg");
     
     PlayMusicStream(music);
 
@@ -58,7 +58,7 @@ int main()
         }
         
         // Get timePlayed scaled to bar dimensions (400 pixels)
-        timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*100*4;
+        timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*400;
         //----------------------------------------------------------------------------------
 
         // Draw

+ 16 - 13
docs/examples/src/audio/audio_raw_stream.c

@@ -16,7 +16,8 @@
 #include <stdlib.h>         // Required for: malloc(), free()
 #include <math.h>           // Required for: sinf()
 
-#define MAX_SAMPLES      20000
+#define MAX_SAMPLES             22050
+#define MAX_SAMPLES_PER_UPDATE   4096
 
 int main()
 {
@@ -29,21 +30,20 @@ int main()
 
     InitAudioDevice();              // Initialize audio device
 
-    // Init raw audio stream (sample rate: 22050, sample size: 32bit-float, channels: 1-mono)
-    AudioStream stream = InitAudioStream(22050, 32, 1);
+    // Init raw audio stream (sample rate: 22050, sample size: 16bit-short, channels: 1-mono)
+    AudioStream stream = InitAudioStream(22050, 16, 1);
     
-    // Fill audio stream with some samples (sine wave)
-    float *data = (float *)malloc(sizeof(float)*MAX_SAMPLES);
+    // 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] = sinf(((2*PI*(float)i)/2)*DEG2RAD);
+        data[i] = (short)(sinf(((2*PI*(float)i)/2)*DEG2RAD)*32000);
     }
     
-    // NOTE: The generated MAX_SAMPLES do not fit to close a perfect loop
-    // for that reason, there is a clip everytime audio stream is looped
-    
-    PlayAudioStream(stream);
+    PlayAudioStream(stream);        // Start processing stream buffer (no data loaded currently)
     
     int totalSamples = MAX_SAMPLES;
     int samplesLeft = totalSamples;
@@ -60,10 +60,13 @@ int main()
         //----------------------------------------------------------------------------------
         
         // 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 >= 4096) numSamples = 4096;
+            if (samplesLeft >= MAX_SAMPLES_PER_UPDATE) numSamples = MAX_SAMPLES_PER_UPDATE;
             else numSamples = samplesLeft;
 
             UpdateAudioStream(stream, data + (totalSamples - samplesLeft), numSamples);
@@ -83,11 +86,11 @@ int main()
 
             DrawText("SINE WAVE SHOULD BE PLAYING!", 240, 140, 20, LIGHTGRAY);
             
-            // NOTE: Draw a part of the sine wave (only screen width)
+            // 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];
+                position.y = 250 + 50*data[i]/32000;
                 
                 DrawPixelV(position, RED);
             }

+ 2 - 2
docs/examples/src/audio/audio_sound_loading.c

@@ -24,8 +24,8 @@ int main()
 
     InitAudioDevice();      // Initialize audio device
 
-    Sound fxWav = LoadSound("resources/audio/weird.wav");         // Load WAV audio file
-    Sound fxOgg = LoadSound("resources/audio/tanatana.ogg");      // Load OGG audio file
+    Sound fxWav = LoadSound("resources/sound.wav");         // Load WAV audio file
+    Sound fxOgg = LoadSound("resources/tanatana.ogg");      // Load OGG audio file
     
     SetTargetFPS(60);
     //--------------------------------------------------------------------------------------

+ 2 - 2
docs/examples/src/core/core_input_gamepad.c

@@ -4,8 +4,8 @@
 *
 *   NOTE: This example requires a Gamepad connected to the system
 *         raylib is configured to work with the following gamepads: 
-*                Xbox 360 Controller (Xbox 360, Xbox One)
-*                PLAYSTATION(R)3 Controller 
+*                - Xbox 360 Controller (Xbox 360, Xbox One)
+*                - PLAYSTATION(R)3 Controller 
 *         Check raylib.h for buttons configuration
 *
 *   This example has been created using raylib 1.6 (www.raylib.com)

+ 20 - 21
docs/examples/src/core/core_vr_simulator.c

@@ -1,14 +1,11 @@
 /*******************************************************************************************
 *
-*   raylib [core] example - Oculus Rift CV1
+*   raylib [core] example - VR Simulator (Oculus Rift CV1 parameters)
 *
-*   Compile example using:
-*   gcc -o $(NAME_PART).exe $(FILE_NAME) -L. -L..\src\external\OculusSDK\LibOVR -lLibOVRRT32_1 -lraylib -lglfw3 -lopengl32 -lgdi32 -std=c99
-*
-*   This example has been created using raylib 1.5 (www.raylib.com)
+*   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) 2016 Ramon Santamaria (@raysan5)
+*   Copyright (c) 2017 Ramon Santamaria (@raysan5)
 *
 ********************************************************************************************/
 
@@ -23,10 +20,9 @@ int main()
     
     // NOTE: screenWidth/screenHeight should match VR device aspect ratio
     
-    InitWindow(screenWidth, screenHeight, "raylib [core] example - oculus rift");
-    
-    // NOTE: If device is not available, it fallbacks to default device (simulator)
-    InitVrDevice(HMD_OCULUS_RIFT_CV1);                  // Init VR device (Oculus Rift CV1)
+    InitWindow(screenWidth, screenHeight, "raylib [core] example - vr simulator");
+
+    InitVrSimulator(HMD_OCULUS_RIFT_CV1);               // Init VR simulator (Oculus Rift CV1 parameters)
     
     // Define the camera to look into our 3d world
     Camera camera;
@@ -47,10 +43,9 @@ int main()
     {
         // Update
         //----------------------------------------------------------------------------------
-        if (IsVrSimulator()) UpdateCamera(&camera);             // Update camera (simulator mode)
-        else if (IsVrDeviceReady()) UpdateVrTracking(&camera);  // Update camera with device tracking data
-        
-        if (IsKeyPressed(KEY_SPACE)) ToggleVrMode();            // Toggle VR mode
+        UpdateCamera(&camera);          // Update camera (simulator mode)
+
+        if (IsKeyPressed(KEY_SPACE)) ToggleVrMode();    // Toggle VR mode
         //----------------------------------------------------------------------------------
 
         // Draw
@@ -58,15 +53,19 @@ int main()
         BeginDrawing();
 
             ClearBackground(RAYWHITE);
+            
+            BeginVrDrawing();
 
-            Begin3dMode(camera);
+                Begin3dMode(camera);
 
-                DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
-                DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
+                    DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
+                    DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
 
-                DrawGrid(40, 1.0f);
+                    DrawGrid(40, 1.0f);
 
-            End3dMode();
+                End3dMode();
+            
+            EndVrDrawing();
 
             DrawFPS(10, 10);
 
@@ -76,10 +75,10 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------
-    CloseVrDevice();        // Close VR device
+    CloseVrSimulator();     // Close VR simulator
     
     CloseWindow();          // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;
-}
+}

+ 8 - 10
examples/models/models_ray_picking.c → docs/examples/src/models/models_mesh_picking.c

@@ -1,6 +1,6 @@
 /*******************************************************************************************
 *
-*   raylib [models] example - Ray picking in 3d mode, ground plane, triangle, mesh
+*   raylib [models] example - Mesh 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)
@@ -13,9 +13,7 @@
 #include "raylib.h"
 #include "raymath.h"
 
-#include <stdio.h>
-#include <float.h>
-
+#define FLT_MAX     3.40282347E+38F     // Maximum value of a float, defined in <float.h>
 
 int main()
 {
@@ -24,7 +22,7 @@ int main()
     int screenWidth = 800;
     int screenHeight = 450;
 
-    InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d ray picking");
+    InitWindow(screenWidth, screenHeight, "raylib [models] example - mesh picking");
 
     // Define the camera to look into our 3d world
     Camera camera;
@@ -33,7 +31,7 @@ int main()
     camera.up = (Vector3){ 0.0f, 1.6f, 0.0f };          // Camera up vector (rotation towards target)
     camera.fovy = 45.0f;                                // Camera field-of-view Y
 
-    Ray ray;        // Picking line ray
+    Ray ray;        // Picking ray
     
     Model tower = LoadModel("resources/tower.obj");             // Load OBJ model
     Texture2D texture = LoadTexture("resources/tower.png");     // Load model texture
@@ -91,7 +89,7 @@ int main()
             cursorColor = PURPLE;
             hitObjectName = "Triangle";
 
-            bary = Barycenter(nearestHit.hitPosition, ta, tb, tc);
+            bary = VectorBarycenter(nearestHit.hitPosition, ta, tb, tc);
             hitTriangle = true;
         } 
         else hitTriangle = false;
@@ -138,15 +136,15 @@ int main()
                 // 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);
+                    DrawCube(nearestHit.hitPosition, 0.3, 0.3, 0.3, cursorColor);
+                    DrawCubeWires(nearestHit.hitPosition, 0.3, 0.3, 0.3, RED);
 
                     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);
+                    DrawLine3D(nearestHit.hitPosition, normalEnd, RED);
                 }
 
                 DrawRay(ray, MAROON);

+ 11 - 5
docs/examples/src/physac/physics_demo.c

@@ -2,17 +2,22 @@
 *
 *   Physac - Physics demo
 *
-*   NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-*   The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+*   NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+*   NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
 *
-*   Copyright (c) 2016 Victor Fisac
+*   Use the following line to compile:
+*
+*   gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread 
+*   -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
+*   
+*   Copyright (c) 2017 Victor Fisac
 *
 ********************************************************************************************/
 
 #include "raylib.h"
 
 #define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
 
 int main()
 {
@@ -114,9 +119,10 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------   
-    ClosePhysics();       // Unitialize physics
+    ClosePhysics();       // Uninitialize physics
     CloseWindow();        // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;
 }
+

+ 12 - 5
docs/examples/src/physac/physics_friction.c

@@ -2,17 +2,22 @@
 *
 *   Physac - Physics friction
 *
-*   NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-*   The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+*   NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+*   NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
 *
-*   Copyright (c) 2016 Victor Fisac
+*   Use the following line to compile:
+*
+*   gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread 
+*   -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
+*   
+*   Copyright (c) 2017 Victor Fisac
 *
 ********************************************************************************************/
 
 #include "raylib.h"
 
 #define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
 
 int main()
 {
@@ -128,9 +133,11 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------   
-    ClosePhysics();       // Unitialize physics
+    ClosePhysics();       // Uninitialize physics
+    
     CloseWindow();        // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;
 }
+

+ 13 - 6
docs/examples/src/physac/physics_movement.c

@@ -2,19 +2,24 @@
 *
 *   Physac - Physics movement
 *
-*   NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-*   The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+*   NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+*   NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
 *
-*   Copyright (c) 2016 Victor Fisac
+*   Use the following line to compile:
+*
+*   gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread 
+*   -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
+*   
+*   Copyright (c) 2017 Victor Fisac
 *
 ********************************************************************************************/
 
 #include "raylib.h"
 
 #define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
 
-#define     VELOCITY    0.5f
+#define VELOCITY    0.5f
 
 int main()
 {
@@ -114,9 +119,11 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------   
-    ClosePhysics();       // Unitialize physics
+    ClosePhysics();       // Uninitialize physics
+    
     CloseWindow();        // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;
 }
+

+ 12 - 5
docs/examples/src/physac/physics_restitution.c

@@ -2,17 +2,22 @@
 *
 *   Physac - Physics restitution
 *
-*   NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-*   The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+*   NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+*   NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
 *
-*   Copyright (c) 2016 Victor Fisac
+*   Use the following line to compile:
+*
+*   gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread 
+*   -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
+*   
+*   Copyright (c) 2017 Victor Fisac
 *
 ********************************************************************************************/
 
 #include "raylib.h"
 
 #define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
 
 int main()
 {
@@ -107,9 +112,11 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------   
-    ClosePhysics();       // Unitialize physics
+    ClosePhysics();       // Uninitialize physics
+    
     CloseWindow();        // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;
 }
+

+ 12 - 5
docs/examples/src/physac/physics_shatter.c

@@ -2,17 +2,22 @@
 *
 *   Physac - Body shatter
 *
-*   NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-*   The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+*   NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+*   NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
 *
-*   Copyright (c) 2016 Victor Fisac
+*   Use the following line to compile:
+*
+*   gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread 
+*   -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
+*   
+*   Copyright (c) 2017 Victor Fisac
 *
 ********************************************************************************************/
 
 #include "raylib.h"
 
 #define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h" 
+#include "physac.h" 
 
 int main()
 {
@@ -99,9 +104,11 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------   
-    ClosePhysics();       // Unitialize physics
+    ClosePhysics();       // Uninitialize physics
+    
     CloseWindow();        // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;
 }
+

+ 9 - 12
docs/examples/src/shaders/shaders_shapes_textures.c

@@ -9,7 +9,7 @@
 *         on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
 *         raylib comes with shaders ready for both versions, check raylib/shaders install folder
 *
-*   This example has been created using raylib 1.3 (www.raylib.com)
+*   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)
@@ -18,9 +18,6 @@
 
 #include "raylib.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
 int main()
 {
     // Initialization
@@ -30,14 +27,12 @@ int main()
 
     InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shapes and texture shaders");
     
-    Texture2D sonic = LoadTexture("resources/texture_formats/sonic.png");
+    Texture2D fudesumi = LoadTexture("resources/fudesumi.png");
 
     // NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version 
     Shader shader = LoadShader("resources/shaders/glsl330/base.vs", 
                                "resources/shaders/glsl330/grayscale.fs");
-                               
-    // Shader usage is also different than models/postprocessing, shader is just activated when required
-    
+
     SetTargetFPS(60);
     //--------------------------------------------------------------------------------------
 
@@ -91,21 +86,23 @@ int main()
             // Activate our custom shader to be applied on next shapes/textures drawings
             BeginShaderMode(shader);
 
-                DrawTexture(sonic, 380, -10, WHITE);    // Using custom shader
+                DrawTexture(fudesumi, 500, -30, WHITE);    // Using custom shader
             
             // Activate our default shader for next drawings
             EndShaderMode();
             
+            DrawText("(c) Fudesumi sprite by Eiden Marsal", 380, screenHeight - 20, 10, GRAY);
+            
         EndDrawing();
         //----------------------------------------------------------------------------------
     }
 
     // De-Initialization
     //--------------------------------------------------------------------------------------
-    UnloadShader(shader);   // Unload shader
-    UnloadTexture(sonic);   // Unload texture
+    UnloadShader(shader);       // Unload shader
+    UnloadTexture(fudesumi);    // Unload texture
     
-    CloseWindow();          // Close window and OpenGL context
+    CloseWindow();              // Close window and OpenGL context
     //--------------------------------------------------------------------------------------
 
     return 0;

+ 59 - 0
docs/examples/src/shapes/shapes_lines_bezier.c

@@ -0,0 +1,59 @@
+/*******************************************************************************************
+*
+*   raylib [shapes] example - Cubic-bezier lines
+*
+*   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) 2017 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+int main()
+{
+    // Initialization
+    //--------------------------------------------------------------------------------------
+    int screenWidth = 800;
+    int screenHeight = 450;
+
+    SetConfigFlags(FLAG_MSAA_4X_HINT);
+    InitWindow(screenWidth, screenHeight, "raylib [shapes] example - cubic-bezier lines");
+    
+    Vector2 start = { 0, 0 };
+    Vector2 end = { screenWidth, screenHeight };
+    
+    SetTargetFPS(60);
+    //--------------------------------------------------------------------------------------
+
+    // Main game loop
+    while (!WindowShouldClose())    // Detect window close button or ESC key
+    {
+        // Update
+        //----------------------------------------------------------------------------------
+        if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) start = GetMousePosition();
+        else if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) end = GetMousePosition();
+        //----------------------------------------------------------------------------------
+
+        // Draw
+        //----------------------------------------------------------------------------------
+        BeginDrawing();
+
+            ClearBackground(RAYWHITE);
+            
+            DrawText("USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS", 15, 20, 20, GRAY);
+
+            DrawLineBezier(start, end, 2.0f, RED);
+            
+        EndDrawing();
+        //----------------------------------------------------------------------------------
+    }
+
+    // De-Initialization
+    //--------------------------------------------------------------------------------------   
+    CloseWindow();        // Close window and OpenGL context
+    //--------------------------------------------------------------------------------------
+
+    return 0;
+}

+ 6 - 6
docs/examples/src/text/text_bmfont_ttf.c

@@ -24,13 +24,13 @@ int main()
     const char msgTtf[64] = "THIS SPRITE FONT has been GENERATED from a TTF";
 
     // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
-    SpriteFont fontBm = LoadSpriteFont("resources/fonts/bmfont.fnt");       // BMFont (AngelCode)
-    SpriteFont fontTtf = LoadSpriteFont("resources/fonts/pixantiqua.ttf");  // TTF font
+    SpriteFont fontBm = LoadSpriteFont("resources/bmfont.fnt");       // BMFont (AngelCode)
+    SpriteFont fontTtf = LoadSpriteFont("resources/pixantiqua.ttf");  // TTF font
 
     Vector2 fontPosition;
 
-    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;
 
     SetTargetFPS(60);
     //--------------------------------------------------------------------------------------
@@ -49,8 +49,8 @@ int main()
 
             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();
         //----------------------------------------------------------------------------------

+ 4 - 4
docs/examples/src/text/text_bmfont_unordered.c

@@ -25,7 +25,7 @@ int main()
     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)
+    SpriteFont font = LoadSpriteFont("resources/pixantiqua.fnt");       // BMFont (AngelCode)
 
     SetTargetFPS(60);
     //--------------------------------------------------------------------------------------
@@ -45,10 +45,10 @@ int main()
             ClearBackground(RAYWHITE);
 
             DrawText("Font name:       PixAntiqua", 40, 50, 20, GRAY);
-            DrawText(FormatText("Font base size:           %i", font.size), 40, 80, 20, GRAY);
-            DrawText(FormatText("Font chars number:     %i", font.numChars), 40, 110, 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.size, 0, MAROON);
+            DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.baseSize, 0, MAROON);
 
         EndDrawing();
         //----------------------------------------------------------------------------------

+ 116 - 0
docs/examples/src/text/text_input_box.c

@@ -0,0 +1,116 @@
+/*******************************************************************************************
+*
+*   raylib [text] example - Input Box
+*
+*   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) 2017 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+#define MAX_INPUT_CHARS     9
+
+int main()
+{
+    // Initialization
+    //--------------------------------------------------------------------------------------
+    int screenWidth = 800;
+    int screenHeight = 450;
+
+    InitWindow(screenWidth, screenHeight, "raylib [text] example - input box");
+
+    char name[MAX_INPUT_CHARS + 1] = "\0";      // NOTE: One extra space required for line ending char '\0'
+    int letterCount = 0;
+
+    Rectangle textBox = { screenWidth/2 - 100, 180, 225, 50 };
+    bool mouseOnText = false;
+
+    int framesCounter = 0;
+
+    SetTargetFPS(60);
+    //--------------------------------------------------------------------------------------
+
+    // Main game loop
+    while (!WindowShouldClose())    // Detect window close button or ESC key
+    {
+        // Update
+        //----------------------------------------------------------------------------------
+        if (CheckCollisionPointRec(GetMousePosition(), textBox)) mouseOnText = true;
+        else mouseOnText = false;
+        
+        if (mouseOnText)
+        {
+            int key = GetKeyPressed();
+            
+            // NOTE: Only allow keys in range [32..125]
+            if ((key >= 32) && (key <= 125) && (letterCount < MAX_INPUT_CHARS))
+            {
+                name[letterCount] = (char)key;
+                letterCount++;
+            }
+            
+            if (key == KEY_BACKSPACE)
+            {
+                letterCount--;
+                name[letterCount] = '\0';
+                
+                if (letterCount < 0) letterCount = 0;
+            }
+        }
+        
+        if (mouseOnText) framesCounter++;
+        else framesCounter = 0;
+        //----------------------------------------------------------------------------------
+
+        // Draw
+        //----------------------------------------------------------------------------------
+        BeginDrawing();
+
+            ClearBackground(RAYWHITE);
+            
+            DrawText("PLACE MOUSE OVER INPUT BOX!", 240, 140, 20, GRAY);
+
+            DrawRectangleRec(textBox, LIGHTGRAY);
+            if (mouseOnText) DrawRectangleLines(textBox.x, textBox.y, textBox.width, textBox.height, RED);
+            else DrawRectangleLines(textBox.x, textBox.y, textBox.width, textBox.height, DARKGRAY);
+            
+            DrawText(name, textBox.x + 5, textBox.y + 8, 40, MAROON);
+            
+            DrawText(FormatText("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY);
+
+            if (mouseOnText)
+            {
+                if (letterCount < MAX_INPUT_CHARS)
+                {
+                    // Draw blinking underscore char
+                    if (((framesCounter/20)%2) == 0) DrawText("_", textBox.x + 8 + MeasureText(name, 40), textBox.y + 12, 40, MAROON);
+                }
+                else DrawText("Press BACKSPACE to delete chars...", 230, 300, 20, GRAY);
+            }
+            
+        EndDrawing();
+        //----------------------------------------------------------------------------------
+    }
+
+    // De-Initialization
+    //--------------------------------------------------------------------------------------   
+    CloseWindow();        // Close window and OpenGL context
+    //--------------------------------------------------------------------------------------
+
+    return 0;
+}
+
+// Check if any key is pressed
+// NOTE: We limit keys check to keys between 32 (KEY_SPACE) and 126
+bool IsAnyKeyPressed()
+{
+    bool keyPressed = false;
+    int key = GetKeyPressed();
+
+    if ((key >= 32) && (key <= 126)) keyPressed = true;
+
+    return keyPressed;
+}

+ 28 - 21
examples/text/text_rbmf_fonts.c → docs/examples/src/text/text_raylib_fonts.c

@@ -1,19 +1,21 @@
 /*******************************************************************************************
 *
-*   raylib [text] example - raylib bitmap font (rbmf) loading and usage
+*   raylib [text] example - raylib font loading and usage
 *
 *   NOTE: raylib is distributed with some free to use fonts (even for commercial pourposes!)
 *         To view details and credits for those fonts, check raylib license file
 *
-*   This example has been created using raylib 1.3 (www.raylib.com)
+*   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)
+*   Copyright (c) 2017 Ramon Santamaria (@raysan5)
 *
 ********************************************************************************************/
 
 #include "raylib.h"
 
+#define MAX_FONTS   8
+
 int main()
 {
     // Initialization
@@ -21,21 +23,21 @@ int main()
     int screenWidth = 800;
     int screenHeight = 450;
 
-    InitWindow(screenWidth, screenHeight, "raylib [text] example - rBMF fonts");
+    InitWindow(screenWidth, screenHeight, "raylib [text] example - raylib fonts");
 
     // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
-    SpriteFont fonts[8];
+    SpriteFont fonts[MAX_FONTS];
     
-    fonts[0] = LoadSpriteFont("resources/fonts/alagard.rbmf");       // rBMF font loading
-    fonts[1] = LoadSpriteFont("resources/fonts/pixelplay.rbmf");     // rBMF font loading
-    fonts[2] = LoadSpriteFont("resources/fonts/mecha.rbmf");         // rBMF font loading
-    fonts[3] = LoadSpriteFont("resources/fonts/setback.rbmf");       // rBMF font loading
-    fonts[4] = LoadSpriteFont("resources/fonts/romulus.rbmf");       // rBMF font loading
-    fonts[5] = LoadSpriteFont("resources/fonts/pixantiqua.rbmf");    // rBMF font loading
-    fonts[6] = LoadSpriteFont("resources/fonts/alpha_beta.rbmf");    // rBMF font loading
-    fonts[7] = LoadSpriteFont("resources/fonts/jupiter_crash.rbmf"); // rBMF font loading
+    fonts[0] = LoadSpriteFont("resources/fonts/alagard.png");
+    fonts[1] = LoadSpriteFont("resources/fonts/pixelplay.png");
+    fonts[2] = LoadSpriteFont("resources/fonts/mecha.png");
+    fonts[3] = LoadSpriteFont("resources/fonts/setback.png");
+    fonts[4] = LoadSpriteFont("resources/fonts/romulus.png");
+    fonts[5] = LoadSpriteFont("resources/fonts/pixantiqua.png");
+    fonts[6] = LoadSpriteFont("resources/fonts/alpha_beta.png");
+    fonts[7] = LoadSpriteFont("resources/fonts/jupiter_crash.png");
     
-    const char *messages[8] = { "ALAGARD FONT designed by Hewett Tsoi", 
+    const char *messages[MAX_FONTS] = { "ALAGARD FONT designed by Hewett Tsoi", 
                                 "PIXELPLAY FONT designed by Aleksander Shevchuk",
                                 "MECHA FONT designed by Captain Falcon",  
                                 "SETBACK FONT designed by Brian Kent (AEnigma)", 
@@ -44,17 +46,22 @@ int main()
                                 "ALPHA_BETA FONT designed by Brian Kent (AEnigma)",
                                 "JUPITER_CRASH FONT designed by Brian Kent (AEnigma)" };
                                 
-    const int spacings[8] = { 2, 4, 8, 4, 3, 4, 4, 1 };
+    const int spacings[MAX_FONTS] = { 2, 4, 8, 4, 3, 4, 4, 1 };
     
-    Vector2 positions[8];
+    Vector2 positions[MAX_FONTS];
     
-    for (int i = 0; i < 8; i++)
+    for (int i = 0; i < MAX_FONTS; 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;
+        positions[i].y = 60 + fonts[i].baseSize + 45*i;
     }
     
-    Color colors[8] = { MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, LIME, GOLD };
+    // Small Y position corrections
+    positions[3].y += 8;
+    positions[4].y += 2;
+    positions[7].y -= 8;
+    
+    Color colors[MAX_FONTS] = { MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, LIME, GOLD, RED };
     //--------------------------------------------------------------------------------------
 
     // Main game loop
@@ -74,7 +81,7 @@ int main()
             DrawText("free fonts included with raylib", 250, 20, 20, DARKGRAY);
             DrawLine(220, 50, 590, 50, DARKGRAY);
             
-            for (int i = 0; i < 8; i++)
+            for (int i = 0; i < MAX_FONTS; i++)
             {
                 DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].baseSize*2, spacings[i], colors[i]);
             }
@@ -87,7 +94,7 @@ int main()
     //--------------------------------------------------------------------------------------
     
     // SpriteFonts unloading
-    for (int i = 0; i < 8; i++) UnloadSpriteFont(fonts[i]);
+    for (int i = 0; i < MAX_FONTS; i++) UnloadSpriteFont(fonts[i]);
 
     CloseWindow();                 // Close window and OpenGL context
     //--------------------------------------------------------------------------------------

+ 12 - 12
docs/examples/src/text/text_sprite_fonts.c

@@ -25,20 +25,20 @@ int main()
     const char msg3[50] = "...and a THIRD one! GREAT! :D";
 
     // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
-    SpriteFont font1 = LoadSpriteFont("resources/fonts/custom_mecha.png");          // SpriteFont loading
-    SpriteFont font2 = LoadSpriteFont("resources/fonts/custom_alagard.png");        // SpriteFont loading
-    SpriteFont font3 = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png");  // SpriteFont loading
+    SpriteFont font1 = LoadSpriteFont("resources/custom_mecha.png");          // SpriteFont loading
+    SpriteFont font2 = LoadSpriteFont("resources/custom_alagard.png");        // SpriteFont loading
+    SpriteFont font3 = LoadSpriteFont("resources/custom_jupiter_crash.png");  // SpriteFont loading
 
     Vector2 fontPosition1, fontPosition2, fontPosition3;
 
-    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;
 
     //--------------------------------------------------------------------------------------
 
@@ -56,9 +56,9 @@ int main()
 
             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();
         //----------------------------------------------------------------------------------

+ 3 - 3
docs/examples/src/text/text_ttf_loading.c

@@ -25,13 +25,13 @@ int main()
     // 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);
+    SpriteFont font = LoadSpriteFontEx("resources/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.size;
+    float fontSize = font.baseSize;
     Vector2 fontPosition = { 40, screenHeight/2 + 50 };
     Vector2 textSize;
 
@@ -82,7 +82,7 @@ int main()
             if (count == 1) // Only support one ttf file dropped
             {
                 UnloadSpriteFont(font);
-                font = LoadSpriteFontTTF(droppedFiles[0], fontSize, 0, 0);
+                font = LoadSpriteFontEx(droppedFiles[0], fontSize, 0, 0);
                 ClearDroppedFiles();
             }
         }

+ 4 - 4
examples/others/particles_trail_blending.c → docs/examples/src/textures/textures_particles_blending.c

@@ -1,11 +1,11 @@
 /*******************************************************************************************
 *
-*   raylib example - particles trail blending
+*   raylib example - particles blending
 *
-*   This example has been created using raylib 1.3 (www.raylib.com)
+*   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)
+*   Copyright (c) 2017 Ramon Santamaria (@raysan5)
 *
 ********************************************************************************************/
 
@@ -30,7 +30,7 @@ int main()
     int screenWidth = 800;
     int screenHeight = 450;
 
-    InitWindow(screenWidth, screenHeight, "raylib [textures] example - particles trail blending");
+    InitWindow(screenWidth, screenHeight, "raylib [textures] example - particles blending");
     
     // Particles pool, reuse them!
     Particle mouseTail[MAX_PARTICLES]; 

+ 13 - 11
docs/examples/src/textures/textures_raw_data.c

@@ -27,9 +27,9 @@ int main()
     // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
  
     // Load RAW image data (512x512, 32bit RGBA, no file header)
-    Image sonicRaw = LoadImageRaw("resources/texture_formats/sonic_R8G8B8A8.raw", 512, 512, UNCOMPRESSED_R8G8B8A8, 0);
-    Texture2D sonic = LoadTextureFromImage(sonicRaw);   // Upload CPU (RAM) image to GPU (VRAM)
-    UnloadImage(sonicRaw);                              // Unload CPU (RAM) image data
+    Image fudesumiRaw = LoadImageRaw("resources/fudesumi.raw", 384, 512, UNCOMPRESSED_R8G8B8A8, 0);
+    Texture2D fudesumi = LoadTextureFromImage(fudesumiRaw);   // Upload CPU (RAM) image to GPU (VRAM)
+    UnloadImage(fudesumiRaw);                              // Unload CPU (RAM) image data
     
     // Generate a checked texture by code (1024x1024 pixels)
     int width = 1024;
@@ -42,8 +42,8 @@ int main()
     {
         for (int x = 0; x < width; x++)
         {
-            if (((x/32+y/32)/1)%2 == 0) pixels[y*height + x] = DARKBLUE;
-            else pixels[y*height + x] = SKYBLUE;
+            if (((x/32+y/32)/1)%2 == 0) pixels[y*height + x] = ORANGE;
+            else pixels[y*height + x] = GOLD;
         }
     }
     
@@ -70,12 +70,14 @@ int main()
 
             ClearBackground(RAYWHITE);
 
-            DrawTexture(checked, screenWidth/2 - checked.width/2, screenHeight/2 - checked.height/2, Fade(WHITE, 0.3f));
-            DrawTexture(sonic, 330, -20, WHITE);
+            DrawTexture(checked, screenWidth/2 - checked.width/2, screenHeight/2 - checked.height/2, Fade(WHITE, 0.5f));
+            DrawTexture(fudesumi, 430, -30, WHITE);
 
-            DrawText("CHECKED TEXTURE ", 84, 100, 30, DARKBLUE);
-            DrawText("GENERATED by CODE", 72, 164, 30, DARKBLUE);
-            DrawText("and RAW IMAGE LOADING", 46, 226, 30, DARKBLUE);
+            DrawText("CHECKED TEXTURE ", 84, 100, 30, BROWN);
+            DrawText("GENERATED by CODE", 72, 164, 30, BROWN);
+            DrawText("and RAW IMAGE LOADING", 46, 226, 30, BROWN);
+            
+            DrawText("(c) Fudesumi sprite by Eiden Marsal", 310, screenHeight - 20, 10, BROWN);
 
         EndDrawing();
         //----------------------------------------------------------------------------------
@@ -83,7 +85,7 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------
-    UnloadTexture(sonic);       // Texture unloading
+    UnloadTexture(fudesumi);    // Texture unloading
     UnloadTexture(checked);     // Texture unloading
 
     CloseWindow();              // Close window and OpenGL context

+ 38 - 17
docs/examples/src/textures/textures_rectangle.c

@@ -11,6 +11,9 @@
 
 #include "raylib.h"
 
+#define MAX_FRAME_SPEED     15
+#define MIN_FRAME_SPEED      1
+
 int main()
 {
     // Initialization
@@ -21,11 +24,16 @@ int main()
     InitWindow(screenWidth, screenHeight, "raylib [texture] example - texture rectangle");
 
     // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
-    Texture2D guybrush = LoadTexture("resources/guybrush.png");        // Texture loading
+    Texture2D scarfy = LoadTexture("resources/scarfy.png");        // Texture loading
 
-    Vector2 position = { 350.0f, 240.0f };
-    Rectangle frameRec = { 0, 0, guybrush.width/7, guybrush.height };
+    Vector2 position = { 350.0f, 280.0f };
+    Rectangle frameRec = { 0, 0, scarfy.width/6, scarfy.height };
     int currentFrame = 0;
+    
+    int framesCounter = 0;
+    int framesSpeed = 8;           // Number of spritesheet frames shown by second
+    
+    SetTargetFPS(60);               // Set our game to run at 60 frames-per-second
     //--------------------------------------------------------------------------------------
 
     // Main game loop
@@ -33,14 +41,23 @@ int main()
     {
         // Update
         //----------------------------------------------------------------------------------
-        if (IsKeyPressed(KEY_RIGHT))
+        framesCounter++;
+        
+        if (framesCounter >= (60/framesSpeed))
         {
+            framesCounter = 0;
             currentFrame++;
             
-            if (currentFrame > 6) currentFrame = 0;
+            if (currentFrame > 5) currentFrame = 0;
             
-            frameRec.x = currentFrame*guybrush.width/7;
+            frameRec.x = currentFrame*scarfy.width/6;
         }
+        
+        if (IsKeyPressed(KEY_RIGHT)) framesSpeed++;
+        else if (IsKeyPressed(KEY_LEFT)) framesSpeed--;
+        
+        if (framesSpeed > MAX_FRAME_SPEED) framesSpeed = MAX_FRAME_SPEED;
+        else if (framesSpeed < MIN_FRAME_SPEED) framesSpeed = MIN_FRAME_SPEED;
         //----------------------------------------------------------------------------------
 
         // Draw
@@ -49,19 +66,23 @@ int main()
 
             ClearBackground(RAYWHITE);
 
-            DrawTexture(guybrush, 35, 40, WHITE);
-            DrawRectangleLines(35, 40, guybrush.width, guybrush.height, LIME);
-            
-            DrawTextureRec(guybrush, frameRec, position, WHITE);  // Draw part of the texture
+            DrawTexture(scarfy, 15, 40, WHITE);
+            DrawRectangleLines(15, 40, scarfy.width, scarfy.height, LIME);
+            DrawRectangleLines(15 + frameRec.x, 40 + frameRec.y, frameRec.width, frameRec.height, RED);
             
-            DrawRectangleLines(35 + frameRec.x, 40 + frameRec.y, frameRec.width, frameRec.height, RED);
+            DrawText("FRAME SPEED: ", 165, 210, 10, DARKGRAY);
+            DrawText(FormatText("%02i FPS", framesSpeed), 575, 210, 10, DARKGRAY);
+            DrawText("PRESS RIGHT/LEFT KEYS to CHANGE SPEED!", 290, 240, 10, DARKGRAY);
             
-            DrawText("PRESS RIGHT KEY to", 540, 310, 10, GRAY);
-            DrawText("CHANGE DRAWING RECTANGLE", 520, 330, 10, GRAY);
+            for (int i = 0; i < MAX_FRAME_SPEED; i++)
+            {
+                if (i < framesSpeed) DrawRectangle(250 + 21*i, 205, 20, 20, RED);
+                DrawRectangleLines(250 + 21*i, 205, 20, 20, MAROON);
+            }
             
-            DrawText("Guybrush Ulysses Threepwood,", 100, 300, 10, GRAY);
-            DrawText("main character of the Monkey Island series", 80, 320, 10, GRAY);
-            DrawText("of computer adventure games by LucasArts.", 80, 340, 10, GRAY);
+            DrawTextureRec(scarfy, frameRec, position, WHITE);  // Draw part of the texture
+
+            DrawText("(c) Scarfy sprite by Eiden Marsal", screenWidth - 200, screenHeight - 20, 10, GRAY);
 
         EndDrawing();
         //----------------------------------------------------------------------------------
@@ -69,7 +90,7 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------
-    UnloadTexture(guybrush);       // Texture unloading
+    UnloadTexture(scarfy);       // Texture unloading
 
     CloseWindow();                // Close window and OpenGL context
     //--------------------------------------------------------------------------------------

+ 7 - 5
docs/examples/src/textures/textures_srcrec_dstrec.c

@@ -21,10 +21,10 @@ int main()
     InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles");
 
     // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
-    Texture2D guybrush = LoadTexture("resources/guybrush.png");        // Texture loading
+    Texture2D scarfy = LoadTexture("resources/scarfy.png");        // Texture loading
 
-    int frameWidth = guybrush.width/7;
-    int frameHeight = guybrush.height;
+    int frameWidth = scarfy.width/6;
+    int frameHeight = scarfy.height;
     
     // NOTE: Source rectangle (part of the texture to use for drawing)
     Rectangle sourceRec = { 0, 0, frameWidth, frameHeight };
@@ -59,10 +59,12 @@ int main()
             // destRec defines the rectangle where our texture part will fit (scaling it to fit)
             // origin defines the point of the texture used as reference for rotation and scaling
             // rotation defines the texture rotation (using origin as rotation point)
-            DrawTexturePro(guybrush, sourceRec, destRec, origin, rotation, WHITE);
+            DrawTexturePro(scarfy, sourceRec, destRec, origin, rotation, WHITE);
 
             DrawLine(destRec.x, 0, destRec.x, screenHeight, GRAY);
             DrawLine(0, destRec.y, screenWidth, destRec.y, GRAY);
+            
+            DrawText("(c) Scarfy sprite by Eiden Marsal", screenWidth - 200, screenHeight - 20, 10, GRAY);
 
         EndDrawing();
         //----------------------------------------------------------------------------------
@@ -70,7 +72,7 @@ int main()
 
     // De-Initialization
     //--------------------------------------------------------------------------------------
-    UnloadTexture(guybrush);       // Texture unloading
+    UnloadTexture(scarfy);        // Texture unloading
 
     CloseWindow();                // Close window and OpenGL context
     //--------------------------------------------------------------------------------------

BIN
docs/examples/web/audio/audio_module_playing.data


Diferenças do arquivo suprimidas por serem muito extensas
+ 189 - 1
docs/examples/web/audio/audio_module_playing.js


BIN
docs/examples/web/audio/audio_module_playing.png


+ 0 - 0
games/raylib_demo/resources/audio/guitar_noodling.ogg → docs/examples/web/audio/audio_music_stream.data


Diferenças do arquivo suprimidas por serem muito extensas
+ 189 - 1
docs/examples/web/audio/audio_music_stream.js


+ 0 - 0
docs/examples/img/audio/audio_music_stream.png → docs/examples/web/audio/audio_music_stream.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 73 - 2
docs/examples/web/audio/audio_raw_stream.js


+ 0 - 0
docs/examples/img/audio/audio_raw_stream.png → docs/examples/web/audio/audio_raw_stream.png


BIN
games/raylib_demo/resources/audio/tanatana.ogg → docs/examples/web/audio/audio_sound_loading.data


Diferenças do arquivo suprimidas por serem muito extensas
+ 188 - 0
docs/examples/web/audio/audio_sound_loading.js


+ 0 - 0
docs/examples/img/audio/audio_sound_loading.png → docs/examples/web/audio/audio_sound_loading.png


+ 7 - 6
docs/examples/web/loader.html → docs/examples/web/audio/loader.html

@@ -36,7 +36,7 @@
 			}
             #eximage { width: 802px; height: 452px; text-align: center; }
 			#eximage img { margin: 0 auto; border: 1px solid; border-color: black; }
-            #eximage canvas { position: relative; top: 1px; left: 1px; border: 1px solid red; }
+            #eximage canvas { position: relative; top: 1px; left: 1px; border: 1px solid red; background: black; }
             pre { width: 802px!important;}
 			pre code{ border: 1px solid; border-color:#b0b0b0; height:auto; }
 			.exdownbtn{ margin-right: 20px; width:220px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px; 
@@ -58,8 +58,9 @@
                 
                 document.title = "raylib - " + name.replace('_', ' ');
 
-                var srcUrl = '../src/' + name + '.c';
-                var imgUrl = '../img/' + name + '.png';
+                var type = name.substring(0, name.indexOf("_"));
+                var srcUrl = '../../src/' + type + '/' + name + '.c';
+                var imgUrl = '../' + type + '/' + name + '.png';
 
                 $('#eximage img').attr('src', imgUrl);
 
@@ -69,8 +70,8 @@
 				}, 'text');
                 
                 // Quick hack for some examples not working on web
-                if ((name == "core/core_drop_files") || 
-                    (name == "core/core_storage_values"))
+                if ((name == "core_drop_files") || 
+                    (name == "core_storage_values"))
                 {
                     $('#eximage').append('<img src="' + imgUrl + '" alt=" ">');
                 }
@@ -85,7 +86,7 @@
                     Module.canvas = document.getElementById('canvas');
                     Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
                 
-                    var jsUrl = '../web/' + name + '.js';
+                    var jsUrl = name + '.js';
                 
                     // Run emscripten example
                     $.getScript(jsUrl, function() {});

+ 50 - 46
docs/examples/web/core/core_2d_camera.js

@@ -7541,6 +7541,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7640,13 +7690,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8597,45 +8640,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_2d_camera.png → docs/examples/web/core/core_2d_camera.png


+ 65 - 61
docs/examples/web/core/core_3d_camera_first_person.js

@@ -7407,30 +7407,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7565,13 +7615,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8694,45 +8737,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_3d_camera_first_person.png → docs/examples/web/core/core_3d_camera_first_person.png


+ 65 - 61
docs/examples/web/core/core_3d_camera_free.js

@@ -7319,30 +7319,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7477,13 +7527,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8606,45 +8649,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_3d_camera_free.png → docs/examples/web/core/core_3d_camera_free.png


+ 65 - 61
docs/examples/web/core/core_3d_mode.js

@@ -7226,30 +7226,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7384,13 +7434,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8513,45 +8556,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_3d_mode.png → docs/examples/web/core/core_3d_mode.png


+ 65 - 61
docs/examples/web/core/core_3d_picking.js

@@ -7390,30 +7390,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7548,13 +7598,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8982,45 +9025,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_3d_picking.png → docs/examples/web/core/core_3d_picking.png


+ 50 - 46
docs/examples/web/core/core_basic_window.js

@@ -7190,6 +7190,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7289,13 +7339,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8246,45 +8289,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_basic_window.png → docs/examples/web/core/core_basic_window.png


+ 50 - 46
docs/examples/web/core/core_color_select.js

@@ -7327,6 +7327,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorTransform($0,$1) {
  $0 = $0|0;
  $1 = $1|0;
@@ -7385,13 +7435,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8126,45 +8169,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_color_select.png → docs/examples/web/core/core_color_select.png


+ 0 - 0
docs/examples/img/core/core_drop_files.png → docs/examples/web/core/core_drop_files.png


+ 50 - 46
docs/examples/web/core/core_gestures_detection.js

@@ -7477,6 +7477,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7576,13 +7626,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8533,45 +8576,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_gestures_detection.png → docs/examples/web/core/core_gestures_detection.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 2
docs/examples/web/core/core_input_gamepad.js


+ 0 - 0
docs/examples/img/core/core_input_gamepad.png → docs/examples/web/core/core_input_gamepad.png


+ 50 - 46
docs/examples/web/core/core_input_keys.js

@@ -7244,6 +7244,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7343,13 +7393,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8300,45 +8343,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_input_keys.png → docs/examples/web/core/core_input_keys.png


+ 50 - 46
docs/examples/web/core/core_input_mouse.js

@@ -7235,6 +7235,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7334,13 +7384,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8291,45 +8334,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_input_mouse.png → docs/examples/web/core/core_input_mouse.png


+ 50 - 46
docs/examples/web/core/core_mouse_wheel.js

@@ -7229,6 +7229,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7328,13 +7378,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8285,45 +8328,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_mouse_wheel.png → docs/examples/web/core/core_mouse_wheel.png


+ 50 - 46
docs/examples/web/core/core_random_values.js

@@ -7223,6 +7223,56 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorLength($0) {
  $0 = $0|0;
  var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
@@ -7322,13 +7372,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8279,45 +8322,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_random_values.png → docs/examples/web/core/core_random_values.png


+ 0 - 0
docs/examples/img/core/core_storage_values.png → docs/examples/web/core/core_storage_values.png


+ 65 - 61
docs/examples/web/core/core_vr_simulator.js

@@ -7391,30 +7391,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7549,13 +7599,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8696,45 +8739,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_oculus_rift.png → docs/examples/web/core/core_vr_simulator.png


+ 65 - 61
docs/examples/web/core/core_world_screen.js

@@ -7287,30 +7287,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7445,13 +7495,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8672,45 +8715,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/core/core_world_screen.png → docs/examples/web/core/core_world_screen.png


+ 210 - 0
docs/examples/web/core/loader.html

@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>loading...</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+		
+		<meta name="title" content="raylib - example">
+		<meta name="description" content="raylib is a simple and easy-to-use library to learn videogames programming. This a small example of what you can do.">
+		<meta name="keywords" content="raylib, videogames, programming, C, C++, library, learn, study, simple, easy, free, open source, raysan">
+		<meta name="viewport" content="width=device-width">
+        
+        <!-- Facebook metatags for sharing -->
+        <meta property="og:title" content="raylib - example"/>
+        <meta property="og:image" content="http://www.raylib.com/common/img/fb_raylib_logo.png"/>
+        <meta property="og:url" content="http://www.raylib.com" />
+        <meta property="og:site_name" content="raylib"/>
+        <meta property="og:description" content="This a small example of what you can do with raylib"/>
+
+		<!-- Add jQuery library -->
+		<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+		
+		<!-- hightlight.js - Syntax highlighting for the Web -->
+        <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css">
+		<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>
+
+		<style type="text/css">
+			@font-face {
+                font-family: 'grixel_acme_7_wide_xtnd';
+				src: url('../../font/acme_7_wide_xtnd.eot');
+				src: url('../../font/acme_7_wide_xtnd.eot?#iefix') format('embedded-opentype'),
+					 url('../../font/acme_7_wide_xtnd.woff') format('woff'),
+					 url('../../font/acme_7_wide_xtnd.ttf') format('truetype');
+				font-weight: normal;
+				font-style: normal;
+				font-size-adjust:0.49;
+			}
+            #eximage { width: 802px; height: 452px; text-align: center; }
+			#eximage img { margin: 0 auto; border: 1px solid; border-color: black; }
+            #eximage canvas { position: relative; top: 1px; left: 1px; border: 1px solid red; background: black; }
+            pre { width: 802px!important;}
+			pre code{ border: 1px solid; border-color:#b0b0b0; height:auto; }
+			.exdownbtn{ margin-right: 20px; width:220px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px; 
+						line-height:30px; text-align: center; border-width:5px;	background-color:#e1e1e1; color:#5c5a5a; 
+						border:4px solid #898888; font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial;}
+			#exdowncode .exdownbtn:hover{background-color:#f0d6d6; color:#c55757; border:4px solid #e66666;}
+            #exdownexec .exdownbtn:hover{background-color:#bedce8; color:#417794; border:4px solid #5d9cbd;}
+            
+            .fancybox-wrap fancybox-desktop fancybox-type-iframe fancybox-opened { width: 860px!important;}
+            .fancybox-inner { width: 850px!important; }
+            .fancybox-iframe { width: 830px!important; }
+		</style>
+		
+		<script type="text/javascript">
+			$(document).ready(function() {
+
+                var mainUrl = $(location).attr('href');
+                var name = mainUrl.slice(mainUrl.indexOf('=') + 1);
+                
+                document.title = "raylib - " + name.replace('_', ' ');
+
+                var type = name.substring(0, name.indexOf("_"));
+                var srcUrl = '../../src/' + type + '/' + name + '.c';
+                var imgUrl = '../' + type + '/' + name + '.png';
+
+                $('#eximage img').attr('src', imgUrl);
+
+				$.get(srcUrl, function(data) { 
+					$('pre code').text(data);
+					$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+				}, 'text');
+                
+                // Quick hack for some examples not working on web
+                if ((name == "core_drop_files") || 
+                    (name == "core_storage_values"))
+                {
+                    $('#eximage').append('<img src="' + imgUrl + '" alt=" ">');
+                }
+                else
+                {
+                    // #eximage filling code: canvas sample and image
+                    $('#eximage').append(
+                    '<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()">' + 
+                        '<img src="' + imgUrl + '" alt=" ">' +
+                    '</canvas>');
+                    
+                    Module.canvas = document.getElementById('canvas');
+                    Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+                
+                    var jsUrl = name + '.js';
+                
+                    // Run emscripten example
+                    $.getScript(jsUrl, function() {});
+                }
+			});
+		</script>
+        
+	</head>
+	
+	<body>
+
+        <div class="emscripten">
+            <progress value="0" max="100" id="progress" hidden=1></progress>
+        </div>
+
+        <!-- Canvas example or image, filled on loading -->
+        <div id="eximage"></div>
+        
+        <!--<textarea id="output" rows="8"></textarea>-->
+        
+		<pre><code class="cpp"></code></pre>
+
+        <script type='text/javascript'>
+          //var statusElement = document.getElementById('status');
+          //var progressElement = document.getElementById('progress');
+          //var spinnerElement = document.getElementById('spinner');
+          
+          var Module = {
+            preRun: [],
+            postRun: [],
+            print: (function() {
+              var element = document.getElementById('output');
+              if (element) element.value = ''; // clear browser cache
+              return function(text) {
+                text = Array.prototype.slice.call(arguments).join(' ');
+                // These replacements are necessary if you render to raw HTML
+                //text = text.replace(/&/g, "&amp;");
+                //text = text.replace(/</g, "&lt;");
+                //text = text.replace(/>/g, "&gt;");
+                //text = text.replace('\n', '<br>', 'g');
+                console.log(text);
+                if (element) {
+                  element.value += text + "\n";
+                  element.scrollTop = element.scrollHeight; // focus on bottom
+                }
+              };
+            })(),
+            printErr: function(text) {
+              text = Array.prototype.slice.call(arguments).join(' ');
+              if (0) { // XXX disabled for safety typeof dump == 'function') {
+                dump(text + '\n'); // fast, straight to the real console
+              } else {
+                console.error(text);
+              }
+            },
+            canvas: (function() {
+              // NOTE: canvas element eventListener is added after appending!
+            
+              //var canvas = document.getElementById('canvas');
+
+              // As a default initial behavior, pop up an alert when webgl context is lost. To make your
+              // application robust, you may want to override this behavior before shipping!
+              // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
+              //canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+
+              //return canvas;
+            })(),
+            setStatus: function(text) {
+              if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
+              if (text === Module.setStatus.text) return;
+              var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+              var now = Date.now();
+              if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon
+              if (m) {
+                text = m[1];
+                //progressElement.value = parseInt(m[2])*100;
+                //progressElement.max = parseInt(m[4])*100;
+                //progressElement.hidden = false;
+                //spinnerElement.hidden = false;
+              } else {
+                //progressElement.value = null;
+                //progressElement.max = null;
+                //progressElement.hidden = true;
+                //if (!text) spinnerElement.style.display = 'none';
+              }
+              //statusElement.innerHTML = text;
+            },
+            totalDependencies: 0,
+            monitorRunDependencies: function(left) {
+              this.totalDependencies = Math.max(this.totalDependencies, left);
+              Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
+            }
+          };
+          
+          Module.setStatus('Downloading...');
+          
+          window.onerror = function(event) {
+            // TODO: do not warn on ok events like simulating an infinite loop or exitStatus
+            Module.setStatus('Exception thrown, see JavaScript console');
+            //spinnerElement.style.display = 'none';
+            Module.setStatus = function(text) {
+              if (text) Module.printErr('[post-exception status] ' + text);
+            };
+          };
+        </script>
+
+        <!--<script async type="text/javascript" src="../examples/web/core_basic_window.js"></script>-->
+        
+		<!-- Google Analytics tracking code -->
+		<script>
+			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+			})(window,document,'script','http://www.google-analytics.com/analytics.js','ga');
+
+			ga('create', 'UA-45733555-1', 'raylib.com');
+            ga('require', 'linkid', 'linkid.js');
+			ga('send', 'pageview');
+		</script>
+	</body>
+</html>

+ 80 - 33
docs/examples/web/makefile

@@ -29,10 +29,14 @@
 PLATFORM ?= PLATFORM_DESKTOP
 
 # define NO to use OpenAL Soft as static library (shared by default)
-SHARED_OPENAL ?= NO
+SHARED_OPENAL ?= YES
+
+ifeq ($(PLATFORM),PLATFORM_WEB)
+    SHARED_OPENAL = NO
+endif
 
 # define raylib directory for include and library
-RAYLIB_PATH = C:\GitHub\raylib
+RAYLIB_PATH ?= C:\GitHub\raylib
 
 # determine PLATFORM_OS in case PLATFORM_DESKTOP selected
 ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@@ -77,7 +81,7 @@ endif
 #  -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
+#  -D_DEFAULT_SOURCE    use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
 ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     ifeq ($(PLATFORM_OS),WINDOWS)
         CFLAGS = -O2 -s -Wall -std=c99
@@ -90,11 +94,12 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     endif
 endif
 ifeq ($(PLATFORM),PLATFORM_WEB)
-    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)
+    CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -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)
+    # --preload-file file.res     # embbed file.res resource into .data file
 endif
 ifeq ($(PLATFORM),PLATFORM_RPI)
     CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline
@@ -236,28 +241,31 @@ EXAMPLES = \
     shapes/shapes_basic_shapes \
     shapes/shapes_colors_palette \
     shapes/shapes_logo_raylib_anim \
+    shapes/shapes_lines_bezier \
     textures/textures_logo_raylib \
     textures/textures_image_loading \
     textures/textures_rectangle \
     textures/textures_srcrec_dstrec \
     textures/textures_to_image \
     textures/textures_raw_data \
+    textures/textures_particles_blending \
     textures/textures_image_processing \
     textures/textures_image_drawing \
     text/text_sprite_fonts \
     text/text_bmfont_ttf \
-    text/text_rbmf_fonts \
+    text/text_raylib_fonts \
     text/text_format_text \
     text/text_writing_anim \
     text/text_ttf_loading \
     text/text_bmfont_unordered \
+    text/text_input_box \
     models/models_geometric_shapes \
     models/models_box_collisions \
     models/models_billboard \
     models/models_obj_loading \
     models/models_heightmap \
     models/models_cubicmap \
-    models/models_ray_picking \
+    models/models_mesh_picking \
     shaders/shaders_model_shader \
     shaders/shaders_shapes_textures \
     shaders/shaders_custom_uniform \
@@ -266,6 +274,11 @@ EXAMPLES = \
     audio/audio_music_stream \
     audio/audio_module_playing \
     audio/audio_raw_stream \
+    physac/physics_demo \
+    physac/physics_friction \
+    physac/physics_movement \
+    physac/physics_restitution \
+    physac/physics_shatter \
 
 
 # typing 'make' will invoke the default target entry called 'all',
@@ -372,6 +385,10 @@ shapes/shapes_colors_palette: shapes/shapes_colors_palette.c
 # compile [shapes] example - raylib logo animation
 shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
+    
+# compile [shapes] example - lines bezier
+shapes/shapes_lines_bezier: shapes/shapes_lines_bezier.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
 
 # compile [textures] example - raylib logo texture loading
 textures/textures_logo_raylib: textures/textures_logo_raylib.c
@@ -399,7 +416,13 @@ textures/textures_to_image: textures/textures_to_image.c
     
 # compile [textures] example - texture raw data
 textures/textures_raw_data: textures/textures_raw_data.c
-	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
+    --preload-file textures/resources/fudesumi.raw@resources/fudesumi.raw
+    
+# compile [textures] example - texture particles blending
+textures/textures_particles_blending: textures/textures_particles_blending.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
+    --preload-file textures/resources/smoke.png@resources/smoke.png
 
 # compile [textures] example - texture image processing
 textures/textures_image_processing: textures/textures_image_processing.c
@@ -426,17 +449,17 @@ text/text_bmfont_ttf: text/text_bmfont_ttf.c
     --preload-file text/resources/bmfont.png@resources/bmfont.png \
     --preload-file text/resources/pixantiqua.ttf@resources/pixantiqua.ttf
 
-# compile [text] example - raylib bitmap fonts (rBMF)
-text/text_rbmf_fonts: text/text_rbmf_fonts.c
+# compile [text] example - raylib fonts
+text/text_raylib_fonts: text/text_raylib_fonts.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
-    --preload-file text/resources/fonts/alagard.rbmf \
-    --preload-file text/resources/fonts/pixelplay.rbmf \
-    --preload-file text/resources/fonts/mecha.rbmf \
-    --preload-file text/resources/fonts/setback.rbmf \
-    --preload-file text/resources/fonts/romulus.rbmf \
-    --preload-file text/resources/fonts/pixantiqua.rbmf \
-    --preload-file text/resources/fonts/alpha_beta.rbmf \
-    --preload-file text/resources/fonts/jupiter_crash.rbmf
+    --preload-file text/resources/fonts/alagard.png@resources/fonts/alagard.png \
+    --preload-file text/resources/fonts/pixelplay.png@resources/fonts/pixelplay.png \
+    --preload-file text/resources/fonts/mecha.png@resources/fonts/mecha.png \
+    --preload-file text/resources/fonts/setback.png@resources/fonts/setback.png \
+    --preload-file text/resources/fonts/romulus.png@resources/fonts/romulus.png \
+    --preload-file text/resources/fonts/pixantiqua.png@resources/fonts/pixantiqua.png \
+    --preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \
+    --preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png
 
 # compile [text] example - text formatting
 text/text_format_text: text/text_format_text.c
@@ -457,6 +480,10 @@ text/text_bmfont_unordered: text/text_bmfont_unordered.c
     --preload-file text/resources/pixantiqua.fnt@resources/pixantiqua.fnt \
     --preload-file text/resources/pixantiqua_0.png@resources/pixantiqua_0.png
 
+# compile [text] example - text input box
+text/text_input_box: text/text_input_box.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
+
 # compile [models] example - basic geometric 3d shapes
 models/models_geometric_shapes: models/models_geometric_shapes.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
@@ -491,8 +518,8 @@ models/models_cubicmap: models/models_cubicmap.c
     --preload-file models/resources/cubicmap.png@resources/cubicmap.png \
     --preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
 
-# compile [models] example - model ray picking
-models/models_ray_picking: models/models_ray_picking.c
+# compile [models] example - model mesh picking
+models/models_mesh_picking: models/models_mesh_picking.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
     --preload-file models/resources/tower.obj@resources/tower.obj \
     --preload-file models/resources/tower.png@resources/tower.png
@@ -508,7 +535,7 @@ shaders/shaders_model_shader: shaders/shaders_model_shader.c
 # compile [shaders] example - shapes texture shader
 shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
-    --preload-file shaders/resources/sonic.png@resources/sonic.png \
+    --preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
     --preload-file shaders/resources/shaders/glsl100/base.vs@resources/shaders/glsl100/base.vs \
     --preload-file shaders/resources/shaders/glsl100/grayscale.fs@resources/shaders/glsl100/grayscale.fs
 
@@ -529,26 +556,45 @@ shaders/shaders_postprocessing: shaders/shaders_postprocessing.c
     --preload-file shaders/resources/shaders/glsl100/bloom.fs@resources/shaders/glsl100/bloom.fs
 
 # compile [audio] example - sound loading and playing (WAV and OGG)
-audio_sound_loading: audio_sound_loading.c
+audio/audio_sound_loading: audio/audio_sound_loading.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
     --preload-file audio/resources/weird.wav@resources/weird.wav \
     --preload-file audio/resources/tanatana.ogg@resources/tanatana.ogg
 
 # compile [audio] example - music stream playing (OGG)
-audio_music_stream: audio_music_stream.c
+audio/audio_music_stream: audio/audio_music_stream.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
     --preload-file audio/resources/guitar_noodling.ogg@resources/guitar_noodling.ogg
 
-# compile [audio] example - music stream playing (OGG)
-audio_module_playing: audio_module_playing.c
+# compile [audio] example - module playing (XM)
+audio/audio_module_playing: audio/audio_module_playing.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
     --preload-file audio/resources/mini1111.xm@resources/mini1111.xm
 
-# compile [audio] example - music stream playing (OGG)
-audio_raw_stream: audio_raw_stream.c
+# compile [audio] example - raw audio streaming
+audio/audio_raw_stream: audio/audio_raw_stream.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s ALLOW_MEMORY_GROWTH=1
 
-    
+# compile [physac] example - physics demo
+physac/physics_demo: physac/physics_demo.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s USE_PTHREADS=1
+
+# compile [physac] example - physics friction
+physac/physics_friction: physac/physics_friction.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s USE_PTHREADS=1
+
+# compile [physac] example - physics movement
+physac/physics_movement: physac/physics_movement.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s USE_PTHREADS=1
+
+# compile [physac] example - physics restitution
+physac/physics_restitution: physac/physics_restitution.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s USE_PTHREADS=1
+
+# compile [physac] example - physics shatter
+physac/physics_shatter: physac/physics_shatter.c
+	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s USE_PTHREADS=1
+
 # fix dylib install path name for each executable (MAC)
 fix_dylib:
 ifeq ($(PLATFORM_OS),OSX)
@@ -565,7 +611,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     ifeq ($(PLATFORM_OS),LINUX)
 		find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
     else
-		del *.o *.exe
+		del *.o *.exe /s
     endif
     endif
 endif
@@ -574,6 +620,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
 	rm -f *.o
 endif
 ifeq ($(PLATFORM),PLATFORM_WEB)
-	del *.o *.html *.js
+    # TODO: Remove all generated files in all folders... avoid deleting loader.html!
+	del *.o *.html *.js *.data
 endif
 	@echo Cleaning done

+ 210 - 0
docs/examples/web/models/loader.html

@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>loading...</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+		
+		<meta name="title" content="raylib - example">
+		<meta name="description" content="raylib is a simple and easy-to-use library to learn videogames programming. This a small example of what you can do.">
+		<meta name="keywords" content="raylib, videogames, programming, C, C++, library, learn, study, simple, easy, free, open source, raysan">
+		<meta name="viewport" content="width=device-width">
+        
+        <!-- Facebook metatags for sharing -->
+        <meta property="og:title" content="raylib - example"/>
+        <meta property="og:image" content="http://www.raylib.com/common/img/fb_raylib_logo.png"/>
+        <meta property="og:url" content="http://www.raylib.com" />
+        <meta property="og:site_name" content="raylib"/>
+        <meta property="og:description" content="This a small example of what you can do with raylib"/>
+
+		<!-- Add jQuery library -->
+		<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+		
+		<!-- hightlight.js - Syntax highlighting for the Web -->
+        <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css">
+		<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>
+
+		<style type="text/css">
+			@font-face {
+                font-family: 'grixel_acme_7_wide_xtnd';
+				src: url('../../font/acme_7_wide_xtnd.eot');
+				src: url('../../font/acme_7_wide_xtnd.eot?#iefix') format('embedded-opentype'),
+					 url('../../font/acme_7_wide_xtnd.woff') format('woff'),
+					 url('../../font/acme_7_wide_xtnd.ttf') format('truetype');
+				font-weight: normal;
+				font-style: normal;
+				font-size-adjust:0.49;
+			}
+            #eximage { width: 802px; height: 452px; text-align: center; }
+			#eximage img { margin: 0 auto; border: 1px solid; border-color: black; }
+            #eximage canvas { position: relative; top: 1px; left: 1px; border: 1px solid red; background: black; }
+            pre { width: 802px!important;}
+			pre code{ border: 1px solid; border-color:#b0b0b0; height:auto; }
+			.exdownbtn{ margin-right: 20px; width:220px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px; 
+						line-height:30px; text-align: center; border-width:5px;	background-color:#e1e1e1; color:#5c5a5a; 
+						border:4px solid #898888; font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial;}
+			#exdowncode .exdownbtn:hover{background-color:#f0d6d6; color:#c55757; border:4px solid #e66666;}
+            #exdownexec .exdownbtn:hover{background-color:#bedce8; color:#417794; border:4px solid #5d9cbd;}
+            
+            .fancybox-wrap fancybox-desktop fancybox-type-iframe fancybox-opened { width: 860px!important;}
+            .fancybox-inner { width: 850px!important; }
+            .fancybox-iframe { width: 830px!important; }
+		</style>
+		
+		<script type="text/javascript">
+			$(document).ready(function() {
+
+                var mainUrl = $(location).attr('href');
+                var name = mainUrl.slice(mainUrl.indexOf('=') + 1);
+                
+                document.title = "raylib - " + name.replace('_', ' ');
+
+                var type = name.substring(0, name.indexOf("_"));
+                var srcUrl = '../../src/' + type + '/' + name + '.c';
+                var imgUrl = '../' + type + '/' + name + '.png';
+
+                $('#eximage img').attr('src', imgUrl);
+
+				$.get(srcUrl, function(data) { 
+					$('pre code').text(data);
+					$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+				}, 'text');
+                
+                // Quick hack for some examples not working on web
+                if ((name == "core_drop_files") || 
+                    (name == "core_storage_values"))
+                {
+                    $('#eximage').append('<img src="' + imgUrl + '" alt=" ">');
+                }
+                else
+                {
+                    // #eximage filling code: canvas sample and image
+                    $('#eximage').append(
+                    '<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()">' + 
+                        '<img src="' + imgUrl + '" alt=" ">' +
+                    '</canvas>');
+                    
+                    Module.canvas = document.getElementById('canvas');
+                    Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+                
+                    var jsUrl = name + '.js';
+                
+                    // Run emscripten example
+                    $.getScript(jsUrl, function() {});
+                }
+			});
+		</script>
+        
+	</head>
+	
+	<body>
+
+        <div class="emscripten">
+            <progress value="0" max="100" id="progress" hidden=1></progress>
+        </div>
+
+        <!-- Canvas example or image, filled on loading -->
+        <div id="eximage"></div>
+        
+        <!--<textarea id="output" rows="8"></textarea>-->
+        
+		<pre><code class="cpp"></code></pre>
+
+        <script type='text/javascript'>
+          //var statusElement = document.getElementById('status');
+          //var progressElement = document.getElementById('progress');
+          //var spinnerElement = document.getElementById('spinner');
+          
+          var Module = {
+            preRun: [],
+            postRun: [],
+            print: (function() {
+              var element = document.getElementById('output');
+              if (element) element.value = ''; // clear browser cache
+              return function(text) {
+                text = Array.prototype.slice.call(arguments).join(' ');
+                // These replacements are necessary if you render to raw HTML
+                //text = text.replace(/&/g, "&amp;");
+                //text = text.replace(/</g, "&lt;");
+                //text = text.replace(/>/g, "&gt;");
+                //text = text.replace('\n', '<br>', 'g');
+                console.log(text);
+                if (element) {
+                  element.value += text + "\n";
+                  element.scrollTop = element.scrollHeight; // focus on bottom
+                }
+              };
+            })(),
+            printErr: function(text) {
+              text = Array.prototype.slice.call(arguments).join(' ');
+              if (0) { // XXX disabled for safety typeof dump == 'function') {
+                dump(text + '\n'); // fast, straight to the real console
+              } else {
+                console.error(text);
+              }
+            },
+            canvas: (function() {
+              // NOTE: canvas element eventListener is added after appending!
+            
+              //var canvas = document.getElementById('canvas');
+
+              // As a default initial behavior, pop up an alert when webgl context is lost. To make your
+              // application robust, you may want to override this behavior before shipping!
+              // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
+              //canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+
+              //return canvas;
+            })(),
+            setStatus: function(text) {
+              if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
+              if (text === Module.setStatus.text) return;
+              var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+              var now = Date.now();
+              if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon
+              if (m) {
+                text = m[1];
+                //progressElement.value = parseInt(m[2])*100;
+                //progressElement.max = parseInt(m[4])*100;
+                //progressElement.hidden = false;
+                //spinnerElement.hidden = false;
+              } else {
+                //progressElement.value = null;
+                //progressElement.max = null;
+                //progressElement.hidden = true;
+                //if (!text) spinnerElement.style.display = 'none';
+              }
+              //statusElement.innerHTML = text;
+            },
+            totalDependencies: 0,
+            monitorRunDependencies: function(left) {
+              this.totalDependencies = Math.max(this.totalDependencies, left);
+              Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
+            }
+          };
+          
+          Module.setStatus('Downloading...');
+          
+          window.onerror = function(event) {
+            // TODO: do not warn on ok events like simulating an infinite loop or exitStatus
+            Module.setStatus('Exception thrown, see JavaScript console');
+            //spinnerElement.style.display = 'none';
+            Module.setStatus = function(text) {
+              if (text) Module.printErr('[post-exception status] ' + text);
+            };
+          };
+        </script>
+
+        <!--<script async type="text/javascript" src="../examples/web/core_basic_window.js"></script>-->
+        
+		<!-- Google Analytics tracking code -->
+		<script>
+			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+			})(window,document,'script','http://www.google-analytics.com/analytics.js','ga');
+
+			ga('create', 'UA-45733555-1', 'raylib.com');
+            ga('require', 'linkid', 'linkid.js');
+			ga('send', 'pageview');
+		</script>
+	</body>
+</html>

Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 2
docs/examples/web/models/models_billboard.js


+ 0 - 0
docs/examples/img/models/models_billboard.png → docs/examples/web/models/models_billboard.png


+ 65 - 61
docs/examples/web/models/models_box_collisions.js

@@ -7406,30 +7406,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7564,13 +7614,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8693,45 +8736,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/models/models_box_collisions.png → docs/examples/web/models/models_box_collisions.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 2
docs/examples/web/models/models_cubicmap.js


+ 0 - 0
docs/examples/img/models/models_cubicmap.png → docs/examples/web/models/models_cubicmap.png


+ 65 - 61
docs/examples/web/models/models_geometric_shapes.js

@@ -7360,30 +7360,80 @@ function _UpdateDrawFrame() {
  _EndDrawing();
  STACKTOP = sp;return;
 }
+function _Vector2Distance($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = +HEAPF32[$0>>2];
+ $3 = +HEAPF32[$1>>2];
+ $4 = $2 - $3;
+ $5 = $4 * $4;
+ $6 = ((($0)) + 4|0);
+ $7 = +HEAPF32[$6>>2];
+ $8 = ((($1)) + 4|0);
+ $9 = +HEAPF32[$8>>2];
+ $10 = $7 - $9;
+ $11 = $10 * $10;
+ $12 = $5 + $11;
+ $13 = (+Math_sqrt((+$12)));
+ return (+$13);
+}
+function _Vector2Angle($0,$1) {
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ((($1)) + 4|0);
+ $3 = +HEAPF32[$2>>2];
+ $4 = ((($0)) + 4|0);
+ $5 = +HEAPF32[$4>>2];
+ $6 = $3 - $5;
+ $7 = +HEAPF32[$1>>2];
+ $8 = +HEAPF32[$0>>2];
+ $9 = $7 - $8;
+ $10 = (+Math_atan2((+$6),(+$9)));
+ $11 = $10 * 57.2957763671875;
+ $12 = $11 < 0.0;
+ $13 = $11 + 360.0;
+ $$0 = $12 ? $13 : $11;
+ return (+$$0);
+}
+function _VectorZero($0) {
+ $0 = $0|0;
+ var $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF32[$0>>2] = 0.0;
+ $1 = ((($0)) + 4|0);
+ HEAPF32[$1>>2] = 0.0;
+ $2 = ((($0)) + 8|0);
+ HEAPF32[$2>>2] = 0.0;
+ return;
+}
 function _VectorSubtract($0,$1,$2) {
  $0 = $0|0;
  $1 = $1|0;
  $2 = $2|0;
- var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
  sp = STACKTOP;
  $3 = +HEAPF32[$1>>2];
  $4 = +HEAPF32[$2>>2];
  $5 = $3 - $4;
- $6 = ((($1)) + 4|0);
- $7 = +HEAPF32[$6>>2];
- $8 = ((($2)) + 4|0);
- $9 = +HEAPF32[$8>>2];
- $10 = $7 - $9;
- $11 = ((($1)) + 8|0);
- $12 = +HEAPF32[$11>>2];
- $13 = ((($2)) + 8|0);
- $14 = +HEAPF32[$13>>2];
- $15 = $12 - $14;
  HEAPF32[$0>>2] = $5;
- $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0);
- HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10;
- $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0);
- HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15;
+ $6 = ((($0)) + 4|0);
+ $7 = ((($1)) + 4|0);
+ $8 = +HEAPF32[$7>>2];
+ $9 = ((($2)) + 4|0);
+ $10 = +HEAPF32[$9>>2];
+ $11 = $8 - $10;
+ HEAPF32[$6>>2] = $11;
+ $12 = ((($0)) + 8|0);
+ $13 = ((($1)) + 8|0);
+ $14 = +HEAPF32[$13>>2];
+ $15 = ((($2)) + 8|0);
+ $16 = +HEAPF32[$15>>2];
+ $17 = $14 - $16;
+ HEAPF32[$12>>2] = $17;
  return;
 }
 function _VectorCrossProduct($0,$1,$2) {
@@ -7518,13 +7568,6 @@ function _VectorTransform($0,$1) {
  HEAPF32[$5>>2] = $47;
  return;
 }
-function _VectorZero($0) {
- $0 = $0|0;
- var label = 0, sp = 0;
- sp = STACKTOP;
- ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
- return;
-}
 function _MatrixTranspose($0) {
  $0 = $0|0;
  var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0;
@@ -8647,45 +8690,6 @@ function _ProcessGestureEvent($0) {
  }
  }
 }
-function _Vector2Distance($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = +HEAPF32[$1>>2];
- $3 = +HEAPF32[$0>>2];
- $4 = $2 - $3;
- $5 = ((($1)) + 4|0);
- $6 = +HEAPF32[$5>>2];
- $7 = ((($0)) + 4|0);
- $8 = +HEAPF32[$7>>2];
- $9 = $6 - $8;
- $10 = $4 * $4;
- $11 = $9 * $9;
- $12 = $10 + $11;
- $sqrtf = (+Math_sqrt((+$12)));
- return (+$sqrtf);
-}
-function _Vector2Angle($0,$1) {
- $0 = $0|0;
- $1 = $1|0;
- var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
- sp = STACKTOP;
- $2 = ((($1)) + 4|0);
- $3 = +HEAPF32[$2>>2];
- $4 = ((($0)) + 4|0);
- $5 = +HEAPF32[$4>>2];
- $6 = $3 - $5;
- $7 = +HEAPF32[$1>>2];
- $8 = +HEAPF32[$0>>2];
- $9 = $7 - $8;
- $10 = (+Math_atan2((+$6),(+$9)));
- $11 = $10 * 57.2957763671875;
- $12 = $11 < 0.0;
- $13 = $11 + 360.0;
- $$0 = $12 ? $13 : $11;
- return (+$$0);
-}
 function _UpdateGestures() {
  var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0;
  sp = STACKTOP;

+ 0 - 0
docs/examples/img/models/models_geometric_shapes.png → docs/examples/web/models/models_geometric_shapes.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 2
docs/examples/web/models/models_heightmap.js


+ 0 - 0
docs/examples/img/models/models_heightmap.png → docs/examples/web/models/models_heightmap.png


+ 4 - 5
docs/examples/web/models/models_ray_picking.c → docs/examples/web/models/models_mesh_picking.c

@@ -1,6 +1,6 @@
 /*******************************************************************************************
 *
-*   raylib [models] example - Ray picking in 3d mode, ground plane, triangle, mesh
+*   raylib [models] example - Mesh 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)
@@ -13,8 +13,7 @@
 #include "raylib.h"
 #include "raymath.h"
 
-#include <stdio.h>
-#include <float.h>
+#define FLT_MAX     3.40282347E+38F     // Maximum value of a float, defined in <float.h>
 
 #if defined(PLATFORM_WEB)
     #include <emscripten/emscripten.h>
@@ -63,7 +62,7 @@ int main()
     int screenWidth = 800;
     int screenHeight = 450;
 
-    InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d ray picking");
+    InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d mesh picking");
 
     // Define the camera to look into our 3d world
     camera.position = (Vector3){ 10.0f, 8.0f, 10.0f };          // Camera position
@@ -144,7 +143,7 @@ void UpdateDrawFrame(void)
         cursorColor = PURPLE;
         hitObjectName = "Triangle";
 
-        bary = Barycenter(nearestHit.hitPosition, ta, tb, tc);
+        bary = VectorBarycenter(nearestHit.hitPosition, ta, tb, tc);
         hitTriangle = true;
     } 
     else hitTriangle = false;

+ 0 - 0
docs/examples/web/models/models_ray_picking.data → docs/examples/web/models/models_mesh_picking.data


Diferenças do arquivo suprimidas por serem muito extensas
+ 6 - 6
docs/examples/web/models/models_mesh_picking.js


BIN
docs/examples/web/models/models_mesh_picking.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 2
docs/examples/web/models/models_obj_loading.js


+ 0 - 0
docs/examples/img/models/models_obj_loading.png → docs/examples/web/models/models_obj_loading.png


+ 210 - 0
docs/examples/web/physac/loader.html

@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>loading...</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+		
+		<meta name="title" content="raylib - example">
+		<meta name="description" content="raylib is a simple and easy-to-use library to learn videogames programming. This a small example of what you can do.">
+		<meta name="keywords" content="raylib, videogames, programming, C, C++, library, learn, study, simple, easy, free, open source, raysan">
+		<meta name="viewport" content="width=device-width">
+        
+        <!-- Facebook metatags for sharing -->
+        <meta property="og:title" content="raylib - example"/>
+        <meta property="og:image" content="http://www.raylib.com/common/img/fb_raylib_logo.png"/>
+        <meta property="og:url" content="http://www.raylib.com" />
+        <meta property="og:site_name" content="raylib"/>
+        <meta property="og:description" content="This a small example of what you can do with raylib"/>
+
+		<!-- Add jQuery library -->
+		<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+		
+		<!-- hightlight.js - Syntax highlighting for the Web -->
+        <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css">
+		<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>
+
+		<style type="text/css">
+			@font-face {
+                font-family: 'grixel_acme_7_wide_xtnd';
+				src: url('../../font/acme_7_wide_xtnd.eot');
+				src: url('../../font/acme_7_wide_xtnd.eot?#iefix') format('embedded-opentype'),
+					 url('../../font/acme_7_wide_xtnd.woff') format('woff'),
+					 url('../../font/acme_7_wide_xtnd.ttf') format('truetype');
+				font-weight: normal;
+				font-style: normal;
+				font-size-adjust:0.49;
+			}
+            #eximage { width: 802px; height: 452px; text-align: center; }
+			#eximage img { margin: 0 auto; border: 1px solid; border-color: black; }
+            #eximage canvas { position: relative; top: 1px; left: 1px; border: 1px solid red; background: black; }
+            pre { width: 802px!important;}
+			pre code{ border: 1px solid; border-color:#b0b0b0; height:auto; }
+			.exdownbtn{ margin-right: 20px; width:220px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px; 
+						line-height:30px; text-align: center; border-width:5px;	background-color:#e1e1e1; color:#5c5a5a; 
+						border:4px solid #898888; font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial;}
+			#exdowncode .exdownbtn:hover{background-color:#f0d6d6; color:#c55757; border:4px solid #e66666;}
+            #exdownexec .exdownbtn:hover{background-color:#bedce8; color:#417794; border:4px solid #5d9cbd;}
+            
+            .fancybox-wrap fancybox-desktop fancybox-type-iframe fancybox-opened { width: 860px!important;}
+            .fancybox-inner { width: 850px!important; }
+            .fancybox-iframe { width: 830px!important; }
+		</style>
+		
+		<script type="text/javascript">
+			$(document).ready(function() {
+
+                var mainUrl = $(location).attr('href');
+                var name = mainUrl.slice(mainUrl.indexOf('=') + 1);
+                
+                document.title = "raylib - " + name.replace('_', ' ');
+
+                var type = name.substring(0, name.indexOf("_"));
+                var srcUrl = '../../src/' + type + '/' + name + '.c';
+                var imgUrl = '../' + type + '/' + name + '.png';
+
+                $('#eximage img').attr('src', imgUrl);
+
+				$.get(srcUrl, function(data) { 
+					$('pre code').text(data);
+					$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+				}, 'text');
+                
+                // Quick hack for some examples not working on web
+                if ((name == "core_drop_files") || 
+                    (name == "core_storage_values"))
+                {
+                    $('#eximage').append('<img src="' + imgUrl + '" alt=" ">');
+                }
+                else
+                {
+                    // #eximage filling code: canvas sample and image
+                    $('#eximage').append(
+                    '<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()">' + 
+                        '<img src="' + imgUrl + '" alt=" ">' +
+                    '</canvas>');
+                    
+                    Module.canvas = document.getElementById('canvas');
+                    Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+                
+                    var jsUrl = name + '.js';
+                
+                    // Run emscripten example
+                    $.getScript(jsUrl, function() {});
+                }
+			});
+		</script>
+        
+	</head>
+	
+	<body>
+
+        <div class="emscripten">
+            <progress value="0" max="100" id="progress" hidden=1></progress>
+        </div>
+
+        <!-- Canvas example or image, filled on loading -->
+        <div id="eximage"></div>
+        
+        <!--<textarea id="output" rows="8"></textarea>-->
+        
+		<pre><code class="cpp"></code></pre>
+
+        <script type='text/javascript'>
+          //var statusElement = document.getElementById('status');
+          //var progressElement = document.getElementById('progress');
+          //var spinnerElement = document.getElementById('spinner');
+          
+          var Module = {
+            preRun: [],
+            postRun: [],
+            print: (function() {
+              var element = document.getElementById('output');
+              if (element) element.value = ''; // clear browser cache
+              return function(text) {
+                text = Array.prototype.slice.call(arguments).join(' ');
+                // These replacements are necessary if you render to raw HTML
+                //text = text.replace(/&/g, "&amp;");
+                //text = text.replace(/</g, "&lt;");
+                //text = text.replace(/>/g, "&gt;");
+                //text = text.replace('\n', '<br>', 'g');
+                console.log(text);
+                if (element) {
+                  element.value += text + "\n";
+                  element.scrollTop = element.scrollHeight; // focus on bottom
+                }
+              };
+            })(),
+            printErr: function(text) {
+              text = Array.prototype.slice.call(arguments).join(' ');
+              if (0) { // XXX disabled for safety typeof dump == 'function') {
+                dump(text + '\n'); // fast, straight to the real console
+              } else {
+                console.error(text);
+              }
+            },
+            canvas: (function() {
+              // NOTE: canvas element eventListener is added after appending!
+            
+              //var canvas = document.getElementById('canvas');
+
+              // As a default initial behavior, pop up an alert when webgl context is lost. To make your
+              // application robust, you may want to override this behavior before shipping!
+              // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
+              //canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+
+              //return canvas;
+            })(),
+            setStatus: function(text) {
+              if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
+              if (text === Module.setStatus.text) return;
+              var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+              var now = Date.now();
+              if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon
+              if (m) {
+                text = m[1];
+                //progressElement.value = parseInt(m[2])*100;
+                //progressElement.max = parseInt(m[4])*100;
+                //progressElement.hidden = false;
+                //spinnerElement.hidden = false;
+              } else {
+                //progressElement.value = null;
+                //progressElement.max = null;
+                //progressElement.hidden = true;
+                //if (!text) spinnerElement.style.display = 'none';
+              }
+              //statusElement.innerHTML = text;
+            },
+            totalDependencies: 0,
+            monitorRunDependencies: function(left) {
+              this.totalDependencies = Math.max(this.totalDependencies, left);
+              Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
+            }
+          };
+          
+          Module.setStatus('Downloading...');
+          
+          window.onerror = function(event) {
+            // TODO: do not warn on ok events like simulating an infinite loop or exitStatus
+            Module.setStatus('Exception thrown, see JavaScript console');
+            //spinnerElement.style.display = 'none';
+            Module.setStatus = function(text) {
+              if (text) Module.printErr('[post-exception status] ' + text);
+            };
+          };
+        </script>
+
+        <!--<script async type="text/javascript" src="../examples/web/core_basic_window.js"></script>-->
+        
+		<!-- Google Analytics tracking code -->
+		<script>
+			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+			})(window,document,'script','http://www.google-analytics.com/analytics.js','ga');
+
+			ga('create', 'UA-45733555-1', 'raylib.com');
+            ga('require', 'linkid', 'linkid.js');
+			ga('send', 'pageview');
+		</script>
+	</body>
+</html>

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff