To embed the private distribution of This is Normal (or any web game) on your website. (Embedded running game is below the instructions. )
1. Recieve the build files. These include index.html and Build/ folder with the contents of the game. Zip of build files to the example version of the game is hosted here: https://thisisnormal-example-embed.s3.us-west-1.amazonaws.com/builds_web_embed.zip
2. Host the build files wherever you host your website. (The example is hosted on my Amazon Web Services Bucket).
3. There are two options to show the game on your website.
a. Basic method. In the webpage where you want to embed the game, use an iframe that points to the index.html in the build files location. For This is Normal, currently recommend using the size 470px by 820px. Like so: <iframe src="https://thisisnormal-example-embed.s3.us-west-1.amazonaws.com/index.html" style="width:470px; height:820px">
b. Advanced method. Edit the index.html provided in the build files to suit your needs, and use it directly as part of your website. Make sure to keep the elements that run the game, which are the <canvas> and <script> sections. Or, copy those sections into the webpage where you would like to show the game. The relevant code is provided. Be aware that the webpage using this must be in the same directory as the Build/ folder that contains the files its referencing.
<canvas id="unity-canvas" width=450 height=800 style="width: 450px; height: 800px; background: #231F20"></canvas>
<script src="Build/builds_web_embed.loader.js"></script>
<script>
createUnityInstance(document.querySelector("#unity-canvas"), {
dataUrl: "Build/builds_web_embed.data.unityweb",
frameworkUrl: "Build/builds_web_embed.framework.js.unityweb",
codeUrl: "Build/builds_web_embed.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "slothysunday",
productName: "This is Normal",
productVersion: "1.0.2",
// matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
// devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
});
</script>