Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created July 1, 2018 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/c1327e33d6905fdbefa9b6d3817afa21 to your computer and use it in GitHub Desktop.
Save flushpot1125/c1327e33d6905fdbefa9b6d3817afa21 to your computer and use it in GitHub Desktop.
/*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