Initial commit: webpack building a blank canvas
This commit is contained in:
20
src/style.css
Normal file
20
src/style.css
Normal file
@@ -0,0 +1,20 @@
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
html, body, canvas {
|
||||
overflow: none;
|
||||
}
|
||||
|
||||
canvas {
|
||||
position: fixed !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
bottom: 0 !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
10
src/transport.js
Normal file
10
src/transport.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as PIXI from 'pixi.js';
|
||||
import './style.css';
|
||||
|
||||
const app = new PIXI.Application(window.innerWidth, window.innerHeight);
|
||||
|
||||
document.body.appendChild(app.view);
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
app.renderer.resize(window.innerWidth, window.innerHeight);
|
||||
});
|
||||
Reference in New Issue
Block a user