Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*Babylon.js Editor のCompile Script機能で出力されたコード*/
/*Web Assembly Shims */
window.webAssemblyServices = true;
window.isWebAssemblyPluginEnabled = function() {
return (typeof WebAssembly !== "undefined" && window.webAssemblyServices === true);
}
/** Windows Launch Mode */
window.preferredLaunchMode = 0;
if (typeof Windows !== "undefined" && typeof Windows.UI !== "undefined" && typeof Windows.UI.ViewManagement !== "undefined" &&typeof Windows.UI.ViewManagement.ApplicationView !== "undefined") {
Windows.UI.ViewManagement.ApplicationView.preferredLaunchWindowingMode = (window.preferredLaunchMode === 1) ? Windows.UI.ViewManagement.ApplicationViewWindowingMode.fullScreen : Windows.UI.ViewManagement.ApplicationViewWindowingMode.auto;
}
/** Xbox Full Screen Shims */
document.querySelector('style').textContent += "@media (max-height: 1080px) { @-ms-viewport { height: 1080px; } }";
/** Xbox Live Plugin Shims */
window.xboxLiveServices = false;
window.isXboxLivePluginEnabled = function() {
var isXboxLive = (typeof Windows !== "undefined" && typeof Microsoft !== "undefined" && typeof Microsoft.Xbox !== "undefined" && typeof Microsoft.Xbox.Services !== "undefined");
var hasToolkit = (typeof BabylonToolkit !== "undefined" && typeof BabylonToolkit.XboxLive !== "undefined" && typeof BabylonToolkit.XboxLive.Plugin !== "undefined");
return (window.xboxLiveServices === true && isXboxLive === true && hasToolkit === true);
}
/** Generic Promise Shims */
window.createGenericPromise = function(resolveRejectHandler) {
return new Promise(resolveRejectHandler);
}
window.resolveGenericPromise = function(resolveObject) {
return Promise.resolve(resolveObject);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment