Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div id="app">
<span>Vue.js PWA</span>
v-bind="{ width: gameWidth, height: gameHeight }"
import unity from "vue-unity-webgl";
export default {
name: "app",
data: function() {
return {
gameWidth: window.innerWidth,
gameHeight: window.innerHeight * 0.96 - 134 // 134はヘッダー等の値
methods: {
handleResize: function() {
this.gameWidth = window.innerWidth;
this.gameHeight = window.innerHeight;
ready: function() {
window.addEventListener("resize", this.handleResize);
beforeDestroy: function() {
window.removeEventListener("resize", this.handleResize);
components: { unity }
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.