This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ignore-workspace-root-check=true | |
| shamefully-hoist=true | |
| strict-peer-dependencies=false | |
| auto-install-peers=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fullscreen = () => { | |
| window.document.exitFullscreen().catch(() => { | |
| const target = window.document.querySelector('body') | |
| target?.requestFullscreen() | |
| }) | |
| } | |
| // change the conventional global method | |
| window.addEventListener('keypress', (e) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| head: { | |
| title: 'Title Here', | |
| htmlAttrs: { | |
| lang: 'en' | |
| }, | |
| meta: [ | |
| { charset: 'utf-8' }, | |
| { name: 'googlebot', content: 'index,follow' }, | |
| { name: 'google-site-verification', content: 'YOUR_KEY' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .background { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| z-index: -1; | |
| background: #000 url('/path/to/foo.png') no-repeat center center fixed; | |
| -webkit-background-size: cover; | |
| -moz-background-size: cover; | |
| -o-background-size: cover; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //.ts not highlight :/ | |
| // ticker.ts | |
| /** | |
| * @category Context | |
| * @param base Content object. | |
| * @param cb_stop Callback for break loop condition. | |
| * @param cb_loop Array with callback's for loop. | |
| * @param cb_initial Array with callback's for initial loop creation. | |
| * @param cb_finish Array with callback's for finish loop destruction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const setNodeChunk = () => { | |
| const player = getPlayerCoordinates(); // x and y | |
| const __GLOBAL__ = getStore(); // entity system | |
| const chunk = __GLOBAL__.map.chunk; // radius | |
| const container = getMapNode(); // reference player node | |
| __GLOBAL__.player.coordinates = player; | |
| setStore(__GLOBAL__); | |
| const min_x = player.x - chunk; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Mouse from 'pixi.js-mouse'; | |
| /* | |
| * attack_time = 1 per tick | |
| * attack_velocity = 30 tick per attack animate | |
| * player_base = textures with resource loader context | |
| */ | |
| export const PlayerMouseListener = (delta, player, player_base, options) => { | |
| if (Mouse.isButtonDown(Mouse.Button.LEFT)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| /* Font Imports */ | |
| @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;700&display=swap'); | |
| @import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap'); | |
| /* Reset CSS */ | |
| * { | |
| -webkit-font-smoothing: antialiased; |