mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Update html demo
This commit is contained in:
parent
672d221019
commit
84d2f3bf17
@ -1 +1 @@
|
||||
{"content":[{"name":"game.projectc","size":2584,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":4608,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":274093,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":9895,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
||||
{"content":[{"name":"game.projectc","size":2709,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":4608,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":263313,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":9895,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -43,7 +43,7 @@ default_texture_mag_filter = linear
|
||||
max_draw_calls = 1024
|
||||
max_characters = 8192
|
||||
max_debug_vertices = 10000
|
||||
texture_profiles = /builtins/graphics/default.texture_profiles
|
||||
texture_profiles = /example/custom.texture_profiles
|
||||
|
||||
[sound]
|
||||
gain = 1
|
||||
@ -61,7 +61,7 @@ repeat_delay = 0.5
|
||||
repeat_interval = 0.2
|
||||
gamepads = /builtins/input/default.gamepadsc
|
||||
game_binding = /input/game.input_bindingc
|
||||
use_accelerometer = 1
|
||||
use_accelerometer = 0
|
||||
|
||||
[sprite]
|
||||
max_count = 128
|
||||
@ -114,13 +114,15 @@ bundle_identifier = example.unnamed
|
||||
|
||||
[html5]
|
||||
custom_heap_size = 0
|
||||
heap_size = 256
|
||||
heap_size = 64
|
||||
htmlfile = /builtins/manifests/web/engine_template.html
|
||||
cssfile = /builtins/manifests/web/light_theme.css
|
||||
archive_location_prefix = archive
|
||||
show_fullscreen_button = 1
|
||||
show_made_with_defold = 1
|
||||
scale_mode = downscale_fit
|
||||
show_fullscreen_button = 0
|
||||
show_made_with_defold = 0
|
||||
scale_mode = fit
|
||||
engine_arguments = --verify-graphics-calls=false
|
||||
splash_image = /media/druid_logo.png
|
||||
|
||||
[particle_fx]
|
||||
max_count = 64
|
||||
@ -155,3 +157,6 @@ max_tile_count = 2048
|
||||
[druid]
|
||||
autofocus = 1
|
||||
|
||||
[native_extension]
|
||||
app_manifest = /example/game.appmanifest
|
||||
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
docs/druid/druid_logo.png
Normal file
BIN
docs/druid/druid_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
File diff suppressed because one or more lines are too long
@ -76,29 +76,6 @@
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.button {
|
||||
background-image: url("data:image/svg+xml,%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' baseProfile='full' width='16' height='16' viewBox='0 0 16 16' version='1.1' xml:space='preserve'%3E%3Ctitle%3Eic-16-fullscreen%3C/title%3E%3Cg id='ic-16-fullscreen' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M3,11.5 C3,11.776 3.224,12 3.5,12 L12.5,12 C12.776,12 13,11.776 13,11.5 L13,4.5 C13,4.224 12.776,4 12.5,4 L3.5,4 C3.224,4 3,4.224 3,4.5 L3,11.5 Z M14,11 L14,13 L12,13 C11.724,13 11.5,13.224 11.5,13.5 C11.5,13.776 11.724,14 12,14 L14.5,14 C14.776,14 15,13.776 15,13.5 L15,11 C15,10.724 14.776,10.5 14.5,10.5 C14.224,10.5 14,10.724 14,11 Z M12,2 C11.724,2 11.5,2.224 11.5,2.5 C11.5,2.776 11.724,3 12,3 L14,3 L14,5 C14,5.276 14.224,5.5 14.5,5.5 C14.776,5.5 15,5.276 15,5 L15,2.5 C15,2.224 14.776,2 14.5,2 L12,2 Z M2,13 L2,11 C2,10.724 1.776,10.5 1.5,10.5 C1.224,10.5 1,10.724 1,11 L1,13.5 C1,13.776 1.224,14 1.5,14 L4,14 C4.276,14 4.5,13.776 4.5,13.5 C4.5,13.224 4.276,13 4,13 L2,13 Z M1,2.5 C1,2.224 1.224,2 1.5,2 L4,2 C4.276,2 4.5,2.224 4.5,2.5 C4.5,2.776 4.276,3 4,3 L2,3 L2,5 C2,5.276 1.776,5.5 1.5,5.5 C1.224,5.5 1,5.276 1,5 L1,2.5 Z ' id='fill_1' fill='%23006fff'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
border-color: transparent;
|
||||
float: left;
|
||||
color: #006fff;
|
||||
padding-left: 50%;
|
||||
padding: 0px 0px 0px 20px;
|
||||
cursor:pointer;
|
||||
background-position: left bottom;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.link {
|
||||
text-align: right;
|
||||
color: #4e5258;
|
||||
margin-right: 2px;
|
||||
}
|
||||
a {
|
||||
font-weight: 600;
|
||||
color: #006fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
.link, .button {
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
@ -144,8 +121,6 @@
|
||||
<div id="app-container" class="canvas-app-container">
|
||||
<canvas id="canvas" class="canvas-app-canvas" tabindex="1" width="600" height="900"></canvas>
|
||||
<div class="buttons-background">
|
||||
<div class="button" onclick="Module.toggleFullscreen();">Fullscreen</div>
|
||||
<div class="link">Made with <a href="https://defold.com/" target="_blank">Defold</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
@ -156,8 +131,8 @@
|
||||
archive_location_filter: function( path ) {
|
||||
return ("archive" + path + "");
|
||||
},
|
||||
engine_arguments: [],
|
||||
custom_heap_size: 268435456,
|
||||
engine_arguments: ["--verify-graphics-calls=false",],
|
||||
custom_heap_size: 67108864,
|
||||
disable_context_menu: true
|
||||
}
|
||||
|
||||
@ -177,8 +152,6 @@
|
||||
|
||||
var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
var buttonHeight = 0;
|
||||
buttonHeight = 42;
|
||||
buttonHeight = 42;
|
||||
// Resize on init, screen resize and orientation change
|
||||
function resize_game_canvas() {
|
||||
// Hack for iOS when exit from Fullscreen mode
|
||||
@ -195,29 +168,23 @@
|
||||
var targetRatio = width / height;
|
||||
var actualRatio = innerWidth / innerHeight;
|
||||
|
||||
//Downscale fit
|
||||
if (innerWidth < width || innerHeight < height) {
|
||||
if (actualRatio > targetRatio) {
|
||||
width = innerHeight * targetRatio;
|
||||
height = innerHeight;
|
||||
app_container.style.marginLeft = ((innerWidth - width) / 2) + "px";
|
||||
app_container.style.marginTop = "0px";
|
||||
}
|
||||
else {
|
||||
width = innerWidth;
|
||||
height = innerWidth / targetRatio;
|
||||
app_container.style.marginLeft = "0px";
|
||||
app_container.style.marginTop = ((innerHeight - height) / 2) + "px";
|
||||
}
|
||||
|
||||
|
||||
//Fit
|
||||
if (actualRatio > targetRatio) {
|
||||
width = innerHeight * targetRatio;
|
||||
height = innerHeight;
|
||||
app_container.style.marginLeft = ((innerWidth - width) / 2) + "px";
|
||||
app_container.style.marginTop = "0px";
|
||||
}
|
||||
else {
|
||||
app_container.style.marginLeft = ((innerWidth - width) / 2) + "px";
|
||||
width = innerWidth;
|
||||
height = innerWidth / targetRatio;
|
||||
app_container.style.marginLeft = "0px";
|
||||
app_container.style.marginTop = ((innerHeight - height) / 2) + "px";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
app_container.style.width = width + "px";
|
||||
app_container.style.height = height + buttonHeight + "px";
|
||||
game_canvas.width = width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user