summaryrefslogtreecommitdiffhomepage
path: root/examples/web/physics/loader.html
diff options
context:
space:
mode:
authorRay <[email protected]>2020-01-30 15:45:31 +0100
committerRay <[email protected]>2020-01-30 15:45:31 +0100
commit164f0e617ca206d46702734f24ce15290cd65352 (patch)
treec0d7baa7251c0abfed6afccb203b1a5714a61cfb /examples/web/physics/loader.html
parent68675c6a606cd85b522bd4024d3ea519d0119568 (diff)
downloadraylib.com-164f0e617ca206d46702734f24ce15290cd65352.tar.gz
raylib.com-164f0e617ca206d46702734f24ce15290cd65352.zip
Added physics examples
Diffstat (limited to 'examples/web/physics/loader.html')
-rw-r--r--examples/web/physics/loader.html12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/web/physics/loader.html b/examples/web/physics/loader.html
index b02e891..0130738 100644
--- a/examples/web/physics/loader.html
+++ b/examples/web/physics/loader.html
@@ -58,13 +58,13 @@
document.title = "raylib - " + name.replace('_', ' ');
- //var type = name.substring(0, name.indexOf("_"));
+ var type = name.substring(0, name.indexOf("_"));
//var srcUrl = '../../src/' + type + '/' + name + '.c';
//var imgUrl = '../' + type + '/' + name + '.png';
// Get example code and image directly from original raylib GitHub and avoid duplicate code to maintain
- var srcUrl = 'https://raw.githubusercontent.com/raysan5/raylib/master/examples/physac/' + name + '.c';
- var imgUrl = 'https://raw.githubusercontent.com/raysan5/raylib/master/examples/physac/' + name + '.png';
+ var srcUrl = 'https://raw.githubusercontent.com/raysan5/raylib/master/examples/' + type + '/' + name + '.c';
+ var imgUrl = 'https://raw.githubusercontent.com/raysan5/raylib/master/examples/' + type + '/' + name + '.png';
$('#eximage img').attr('src', imgUrl);
@@ -74,11 +74,7 @@
}, 'text');
// Quick hack for some examples not working on web
- if ((name == "physics_demo") ||
- (name == "physics_friction") ||
- (name == "physics_movement") ||
- (name == "physics_restitution") ||
- (name == "physics_shatter"))
+ if (name == "example_to_avoid")
{
$('#eximage').append('<img src="' + imgUrl + '" alt=" ">');
}