mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Update docs
This commit is contained in:
@@ -1 +1 @@
|
||||
{"content":[{"name":"game.projectc","size":3748,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":13488,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":948433,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":13875,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
||||
{"content":[{"name":"game.projectc","size":3808,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":17168,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":999541,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":17838,"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.
@@ -1,12 +1,13 @@
|
||||
[project]
|
||||
title = druid
|
||||
version = 0.8.519
|
||||
version = 0.8.559
|
||||
write_log = 0
|
||||
compress_archive = 1
|
||||
publisher = Insality
|
||||
developer = Insality
|
||||
commit_sha = 4e0fd264b169693d088a47f2bb53376a1808fb1e
|
||||
build_time = 2022-02-12T15:15:53Z
|
||||
commit_sha = 18eb52b92b9cfd7cfaface2a7e6c4d094ff7de00
|
||||
build_date = 2022-03-11T18:55:39Z
|
||||
title_as_file_name = druid
|
||||
|
||||
[display]
|
||||
width = 600
|
||||
@@ -16,8 +17,8 @@ samples = 0
|
||||
fullscreen = 0
|
||||
update_frequency = 0
|
||||
vsync = 1
|
||||
display_profiles = /builtins/render/default.display_profilesc
|
||||
dynamic_orientation = 0
|
||||
display_profiles = /example/custom.display_profilesc
|
||||
dynamic_orientation = 1
|
||||
display_device_info = 0
|
||||
|
||||
[render]
|
||||
@@ -43,6 +44,7 @@ contact_impulse_limit = 0
|
||||
ray_cast_limit_2d = 64
|
||||
ray_cast_limit_3d = 128
|
||||
trigger_overlap_capacity = 16
|
||||
velocity_threshold = 1
|
||||
|
||||
[bootstrap]
|
||||
main_collection = /example/example.collectionc
|
||||
@@ -85,9 +87,6 @@ use_accelerometer = 0
|
||||
max_count = 128
|
||||
subpixels = 1
|
||||
|
||||
[spine]
|
||||
max_count = 128
|
||||
|
||||
[model]
|
||||
max_count = 128
|
||||
|
||||
@@ -121,7 +120,7 @@ default_language = en
|
||||
localizations = en
|
||||
|
||||
[android]
|
||||
version_code = 519
|
||||
version_code = 559
|
||||
minimum_sdk_version = 16
|
||||
target_sdk_version = 30
|
||||
package = com.insality.druid
|
||||
@@ -156,6 +155,7 @@ splash_image = /media/druid_logo.png
|
||||
|
||||
[particle_fx]
|
||||
max_count = 64
|
||||
max_emitter_count = 64
|
||||
max_particle_count = 1024
|
||||
|
||||
[iap]
|
||||
@@ -193,6 +193,7 @@ run_while_iconified = 0
|
||||
[druid]
|
||||
no_auto_input = 0
|
||||
stencil_check = 0
|
||||
no_auto_template = 0
|
||||
input_text = text
|
||||
input_touch = touch
|
||||
input_marked_text = marked_text
|
||||
|
Binary file not shown.
@@ -113,9 +113,9 @@ var EngineLoader = {
|
||||
asmjs_from: 0,
|
||||
asmjs_to: 50,
|
||||
|
||||
// load .wasm and set Module.instantiateWasm to use the loaded .wasm file
|
||||
// https://github.com/emscripten-core/emscripten/blob/master/tests/manual_wasm_instantiate.html#L170
|
||||
loadWasmAsync: function(src, fromProgress, toProgress, callback) {
|
||||
stream_wasm: true,
|
||||
|
||||
loadAndInstantiateWasmAsync: function(src, fromProgress, toProgress, callback) {
|
||||
FileLoader.load(src, "arraybuffer", EngineLoader.wasm_size,
|
||||
function(loaded, total) { Progress.calculateProgress(fromProgress, toProgress, loaded, total); },
|
||||
function(error) { throw error; },
|
||||
@@ -133,6 +133,31 @@ var EngineLoader = {
|
||||
});
|
||||
},
|
||||
|
||||
streamAndInstantiateWasmAsync: function(src, fromProgress, toProgress, callback) {
|
||||
Module.instantiateWasm = function(imports, successCallback) {
|
||||
WebAssembly.instantiateStreaming(fetch(src), imports).then(function(output) {
|
||||
Progress.calculateProgress(fromProgress, toProgress, 1, 1);
|
||||
successCallback(output.instance);
|
||||
}).catch(function(e) {
|
||||
console.log('wasm streaming instantiation failed! ' + e);
|
||||
throw e;
|
||||
});
|
||||
return {}; // Compiling asynchronously, no exports.
|
||||
}
|
||||
callback();
|
||||
},
|
||||
|
||||
// instantiate the .wasm file either by streaming it or first loading and then instantiate it
|
||||
// https://github.com/emscripten-core/emscripten/blob/master/tests/manual_wasm_instantiate.html#L170
|
||||
loadWasmAsync: function(src, fromProgress, toProgress, callback) {
|
||||
if (EngineLoader.stream_wasm && (typeof WebAssembly.instantiateStreaming === "function")) {
|
||||
EngineLoader.streamAndInstantiateWasmAsync(src, fromProgress, toProgress, callback);
|
||||
}
|
||||
else {
|
||||
EngineLoader.loadAndInstantiateWasmAsync(src, fromProgress, toProgress, callback);
|
||||
}
|
||||
},
|
||||
|
||||
// load and start engine script (asm.js or wasm.js)
|
||||
loadScriptAsync: function(src, estimatedSize, fromProgress, toProgress) {
|
||||
FileLoader.load(src, "text", estimatedSize,
|
||||
@@ -457,35 +482,6 @@ var Progress = {
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************************* */
|
||||
/* Default input override */
|
||||
/* ********************************************************************* */
|
||||
|
||||
var CanvasInput = {
|
||||
arrowKeysHandler : function(e) {
|
||||
switch(e.keyCode) {
|
||||
case 37: case 38: case 39: case 40: // Arrow keys
|
||||
case 32: e.preventDefault(); e.stopPropagation(); // Space
|
||||
default: break; // do not block other keys
|
||||
}
|
||||
},
|
||||
|
||||
onFocusIn : function(e) {
|
||||
window.addEventListener("keydown", CanvasInput.arrowKeysHandler, false);
|
||||
},
|
||||
|
||||
onFocusOut: function(e) {
|
||||
window.removeEventListener("keydown", CanvasInput.arrowKeysHandler, false);
|
||||
},
|
||||
|
||||
addToCanvas : function(canvas) {
|
||||
canvas.addEventListener("focus", CanvasInput.onFocusIn, false);
|
||||
canvas.addEventListener("blur", CanvasInput.onFocusOut, false);
|
||||
canvas.focus();
|
||||
CanvasInput.onFocusIn();
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************************* */
|
||||
/* Module is Emscripten namespace */
|
||||
/* ********************************************************************* */
|
||||
@@ -578,30 +574,6 @@ var Module = {
|
||||
return webgl_support;
|
||||
},
|
||||
|
||||
handleVisibilityChange: function () {
|
||||
GLFW.onFocusChanged(document[Module.hiddenProperty] ? 0 : 1);
|
||||
},
|
||||
|
||||
getHiddenProperty: function () {
|
||||
if ('hidden' in document) return 'hidden';
|
||||
var prefixes = ['webkit','moz','ms','o'];
|
||||
for (var i = 0; i < prefixes.length; i++) {
|
||||
if ((prefixes[i] + 'Hidden') in document)
|
||||
return prefixes[i] + 'Hidden';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
setupVisibilityChangeListener: function() {
|
||||
Module.hiddenProperty = Module.getHiddenProperty();
|
||||
if( Module.hiddenProperty ) {
|
||||
var eventName = Module.hiddenProperty.replace(/[H|h]idden/,'') + 'visibilitychange';
|
||||
document.addEventListener(eventName, Module.handleVisibilityChange, false);
|
||||
} else {
|
||||
console.log("No document.hidden property found. The focus events won't be enabled.")
|
||||
}
|
||||
},
|
||||
|
||||
setupCanvas: function(appCanvasId) {
|
||||
appCanvasId = (typeof appCanvasId === 'undefined') ? 'canvas' : appCanvasId;
|
||||
Module.canvas = document.getElementById(appCanvasId);
|
||||
@@ -672,10 +644,7 @@ var Module = {
|
||||
Module.fullScreenContainer = fullScreenContainer || Module.canvas;
|
||||
|
||||
if (Module.hasWebGLSupport()) {
|
||||
// Override game keys
|
||||
CanvasInput.addToCanvas(Module.canvas);
|
||||
|
||||
Module.setupVisibilityChangeListener();
|
||||
Module.canvas.focus();
|
||||
|
||||
// Add context menu hide-handler if requested
|
||||
if (params["disable_context_menu"])
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
|
||||
<title>druid 0.8.519</title>
|
||||
<title>druid 0.8.559</title>
|
||||
<style type='text/css'>
|
||||
/* Disable user selection to avoid strange bug in Chrome on Windows:
|
||||
* Selecting a text outside the canvas, then clicking+draging would
|
||||
|
Reference in New Issue
Block a user