This commit is contained in:
Hugh Bord 2021-05-29 10:28:30 +10:00
förälder 726d2fc105
incheckning a0b921364b
3 ändrade filer med 16 tillägg och 26 borttagningar

Visa fil

@ -14,9 +14,6 @@
[STREAMLABS] http://streamlabs.jewbird.live [PATREON] http://patreon.jewbird.live
[YT] http://yt.jewbird.live [TWITCH] http://twitch.jewbird.live [GITHUB] http://git.jewbird.live
```
FIRST SHOW OF COMPRESSION IN LOCALSTORAGE AND ASCIIBIRD STATE FILES !!!
# BUGS
* Escape chars in asciis
@ -24,8 +21,7 @@ FIRST SHOW OF COMPRESSION IN LOCALSTORAGE AND ASCIIBIRD STATE FILES !!!
* Redo (ctrl y) is a buggy
# FOCUSING ON NOW
* Toolbar stuff / Brush Size
* Need to make brush center on the mouse x and y
* SELECT
* Modals
* Edit current ascii
@ -38,7 +34,6 @@ FIRST SHOW OF COMPRESSION IN LOCALSTORAGE AND ASCIIBIRD STATE FILES !!!
* Keyboard shortcuts
* Context menu / right click / browsers context menu issue
# KILLER ASCIIBIRD FEATURES DONE
* Tabbed editing for asciis

Visa fil

@ -95,13 +95,12 @@
import Toolbar from "./components/Toolbar.vue";
import DebugPanel from "./components/DebugPanel.vue";
import Editor from "./views/Editor.vue";
// import * as Anser from "anser";
import CharPicker from "./components/parts/CharPicker.vue";
import ColourPicker from "./components/parts/ColourPicker.vue";
import ContextMenu from "./components/parts/ContextMenu.vue";
import NewAscii from "./components/modals/NewAscii.vue";
// import AsciiCursor from './components/parts/AsciiCursor.vue';
import LZString from 'lz-string';
export default {
@ -119,12 +118,12 @@ export default {
const asciiData = await res.text();
console.log({ asciiData, asciiUrlCdn });
this.mircAsciiImport(asciiData, asciiUrlCdn);
window.location.href = "/";
// window.location.href = "/";
}
const asciiUrl = new URL(location.href).searchParams.get("ircwatch");
if (asciiUrl) {
const res = await fetch(`https://irc.watch/ascii/txt/${ircwatch}`, {
const res = await fetch(`https://irc.watch/ascii/txt/${asciiUrl}`, {
method: "GET",
headers: {
Accept: "text/plain",
@ -134,7 +133,7 @@ export default {
const asciiData = await res.text();
console.log({ asciiData, asciiUrl });
this.mircAsciiImport(asciiData, asciiUrl);
window.location.href = "/";
// window.location.href = "/";
}
},
components: {

Visa fil

@ -639,27 +639,22 @@ export default {
let targetBlock = this.currentAsciiBlocks[this.y][this.x];
let brushDiffX = Math.round(this.$store.getters.brushBlocks[0].length / 2) * BLOCK_WIDTH;
let brushDiffY = Math.round(this.$store.getters.brushBlocks.length / 2) * BLOCK_HEIGHT;
for (let y = 0; y < this.$store.getters.brushBlocks.length; y++) {
for (let x = 0; x < this.$store.getters.brushBlocks[0].length; x++) {
let brushBlock = this.$store.getters.brushBlocks[y][x];
let arrayX = this.x + x;
let arrayY = this.y + y;
let diffX = Math.ceil(arrayX / 2);
let diffY = Math.ceil(arrayY / 2);
let brushDiffX = arrayX - diffX;
let brushDiffY = arrayY - diffY;
let brushX = this.x * BLOCK_WIDTH + x * BLOCK_WIDTH;
let brushY = this.y * BLOCK_HEIGHT + y * BLOCK_HEIGHT;
let brushX = (this.x * BLOCK_WIDTH + x * BLOCK_WIDTH) - brushDiffX;
let brushY = (this.y * BLOCK_HEIGHT + y * BLOCK_HEIGHT) - brushDiffY;
if (
this.currentAsciiBlocks[arrayY] &&
this.currentAsciiBlocks[arrayY][arrayX]
this.currentAsciiBlocks[brushY/BLOCK_HEIGHT] &&
this.currentAsciiBlocks[brushY/BLOCK_HEIGHT][brushX/BLOCK_WIDTH]
) {
targetBlock = this.currentAsciiBlocks[arrayY][arrayX];
targetBlock = this.currentAsciiBlocks[brushY/BLOCK_HEIGHT][brushX/BLOCK_WIDTH];
if (!plain) {
if (this.canBg && brushBlock.bg) {
@ -679,7 +674,7 @@ export default {
brushBlock.fg
];
if (this.canTool ) {
if (this.canTool) {
targetBlock.fg = this.$store.getters.getFgColour;
}
}
@ -688,6 +683,7 @@ export default {
this.toolCtx.fillStyle = this.$store.getters.mircColours[
brushBlock.fg
];
this.toolCtx.fillText(
brushBlock.char,
brushX - 1,