fixed last line width bug

This commit is contained in:
Hugh Bord 2021-03-20 10:39:17 +10:00
parent 4aa9879283
commit b482e6f1b0
6 changed files with 92 additions and 75 deletions

View File

@ -2,57 +2,16 @@
ASCIIBIRD DEVELOPMENT - BORING VUEJS DEV STUFF FOR ASCII CREATION
# FOCUS
* REFACTOR STUFF !!!
* Maybe some patlette tool stuff
* Single or double digit color codes in mIRC imports
* maybe we can use some regex
* ASCIIBLASTER has a parser for mIRC codes
* Import / Export code
* ASCII -> JSON
* JSON -> ASCII
* Have multiple canvas elements, they can different z-index for the layers.
* Fix up the store, put in code and more shit in there
* Store colours, tools and any other shit in here
* I added some grid but it is FUCKED
## HOW TO DRAW BLOCKS
* **Plain vanilla Canvas**
* Webgl rendering direct to canvas, three.js webgl
* Render as SVG
# Things To Do Later
* Sort out the vuex store shit, make it lighter, integrate the methods from Dashboard to there.
* Keyboard shortcuts
* Integrate front end library - DONE
* Tie the ascii Meta Data into tabs / interface - DONE
* Take a quick look at ASCIIBLASTER, compare code
* Render the individual blocks
* To import ASCIIs we are going to have to write an ASCII/ANSI -> JSON
* Then we can reverse it JSON -> ANSI to export
* Technically we could have our own file format and share the ASCII data in JSON, but also extra information in the JSON.
* .ASB, all this is gzipped JSON of the internal data structure.
* While exporting the ascii wont obviously support 'extra fields', we can have a name and description for the ASCIIs.
* To share the ASCII to another person you can export the JSON and they can load it, along with any extra info outside the original ASCII data.
* Properly get CSS into the JS stuff ya lazy bird
# Ideas and stuff
In 2018 I had started some ASCII creation program in vuejs but really darkmage'd it and never finished it after a few hours of development time.
# KILLER ASCIIBIRD FEATURES DONE
* Tabbed editing for asciis
* REMEMBERS UR FKN DATA IF YOU CLOSE OR REFRESH THE PAGE
* Import ASCII from irc.watch
# KILLER ASCIIBIRD FEATURES TO DO
* Layers
* Update text colours without deleting the block
* Floating pattlets (or option to fix or non fix them)
@ -66,21 +25,13 @@ In 2018 I had started some ASCII creation program in vuejs but really darkmage'd
* Animated ASCII (key frames like in flash with sound) (Possible with JSON but it will be FKN memory hog maybe)
* We could do this, but these custom ASCIIs could only be played in our player
## How to do it
# Things To Do Later
* Two dimensional array of objects,
* Each object holds the block info
* Keyboard shortcuts
* .ASB, all this is gzipped JSON of the internal data structure.
* While exporting the ascii wont obviously support 'extra fields', we can have a name and description for the ASCIIs.
If we can import an ASCII -> two dimensional array -> Export
* TailwindCSS
* Allows us to use different themes/skins or maybe layouts
## Development Approach
* Start basic project with README.md
* Put in the tailwindCSS shit
* Data structures for the ASCII, two dimensional array shit
* Properly get CSS into the JS stuff ya lazy bird
# References
@ -93,11 +44,9 @@ If we can import an ASCII -> two dimensional array -> Export
* https://codereview.stackexchange.com/questions/114702/drawing-a-grid-on-canvas
* https://github.com/ircart/resources
* https://gist.github.com/xon52/fb895e33d64a8d322da165d158fa11b2 / https://xon5.medium.com/flexible-canvas-grid-without-blurred-lines-907fcadf5bfc - Grid canvas draw stuff
* http://wepump.in/ascii/
* https://modern.ircdocs.horse/formatting.html#color
* https://www.mirc.com/colors.html

View File

@ -281,7 +281,8 @@ export default {
var theWidth = 0;
for (let charPos = 0; charPos <= this.asciiImport.length - 1; charPos++) {
// for (let charPos = 0; charPos <= this.asciiImport.length - 1; charPos++) {
while (asciiStringArray.length) {
let curChar = asciiStringArray[0];
// Defining a small finite state machine

View File

@ -0,0 +1,2 @@
0,1
0,1 0,4

View File

@ -0,0 +1,18 @@
 MARIOúú000 TOPú1200 LUIGIúú000 ]8;;http://www.phm.lu/PHM.lu]8;;
  _ _ 
 ÜßßÞ ÝßßÜ
 ÿÿÿÿÿÿÿÜÜÜÿÿÿÿÿÿ () () ÿÿÿÿÿÿÜÜÜÿÿÿÿÿÿÿ
 ÿÿÿÿÜÛÛÛÛÛÜÜÿÿÿÿ Üß êý §ê ßÜ ÿÿÿÿÜÜÛÛÛÛÛÜÿÿÿÿ
 ÿÿÿÜßßÛßÛßÜÜÜÿÿÿ ßßßßßßßßßßßßßß ßßßßßßßßßßßßßß ÿÿÿÜÜÜÜÿÜÿÜÜÜÿÿÿ
 ÿÿÜÛÜÿÿßÿÜÛÜÜßÿÿ  CAN YOU KICK OFF  ÿÿßßßÿßÛÜÛÛßÿÜÿÿ
 ÿÿÿßßÛÛÛÛÛÛßÿÿÿÿ  ALL THE PESTS ?  ÿÿÿÿßÛÛÛÛÛÛßßÿÿÿ
 ÿÿÜÜÛÛÛÜÿÿßÜÿÿÿÿ ÜÜÜÜ ßßßßßßßßßßßßßßßßßß ÜÜÜÜ ÿÿÿÿÜßÿÿÜÛÿÿÜÜÿÿ
 ÜÛÛÛÛÛÛÛÜÿÿÛÜÿÜÿ  PHASE 1  ÿÜÛßÿÛÛßÿÛÛÛÛÛÛÜ
 ÛÛÜÿÛÜÛÛÜÛÛÜÛÜÛÛ   ÛÛÜÛÜÛÛÜÛÛÜÛÿÜÛÛ
 ÿßÿÜÛÛÛÛÛÛÛÛÛÜßÿ ßßßßßßßßßßß [] ßßßßßßßßßßß ÿßÜÛÛÛÛÛÛÛÛÛÜÿßÿ
 ÿÿÛÛÛÛßßßßÛÛÛÛÿÿ  _ _  ÿÿÛÛÛÛßßßßÛÛÛÛÿÿ
 ÿÜÛÛÛÿÿÿÿÿÿÛÛÛÜÿ ßÞ Ýß ÿÜÛÛÛÿÿÿÿÿÿÛÛÛÜÿ
ÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁÂÁ 
Mario Bros. (arcade, wide composition)
by Philippe Majerus (www.phm.lu)

59
src/assets/spoke-test.txt Normal file
View File

@ -0,0 +1,59 @@
1,2PRIONS PRIONS PRIONS PRIONS PRIO0 'ANATOMY OF1I0A1N0FUCK1I0NIGGA'1ONS PRIONS PRIONS PRIONS6by spoke.
1,2R0AN INDIVIDUAL WHO DOES NOT WANT OTHERS TO ACHIEVE ANY LEVEL OF ESTEEM, RESPECT, DIGNITY, 1R
0,2PROFIT OR SUCCESS GREATER THAN HIS OWN. A FUCK NIGGA WILL UNDERMINE OTHERS EITHER THROUGH 1I
0,2DELIBERATE DEED OR BY WORDS, TYPICALLY IN A BACKHANDED, COVERT OR PASSIVE AGGRESSIVE MANNER
1,2N0 1N
1,2S0 8,0wwwwwwww0,2 1S
0,2 0,0 0,2
1,2P0 says the kind of fucked up 0,0 1,1 0,0 0,1 0,0 0,2 1P
1,2R0 shit that comes out of a --> 0,0 7[]0 0,2 takes up half of ENN with a 20 minute 1R
1,2I0 persons mouth when they're 1,0]0 7__0 1[0,2 <--- video of him playing video games and 1I
1,2O0 trying to burn a bridge. then 0,0 7 /1,1 7,0\0 0,2 talking about himself. 1O
1,2N0 pretends nothing ever happened0,0 7 ##0 0,2 1,0 0,2even though everyone skips it. 1N
1,2S0 as soon as its inconvenient to 0,0 7\____/ 0 0,2 1S
0,2 fight with said person. 0,0 0,2
1,2P0 0,0 0,2 1P
1,2R0 0,0 0,2 1R
1,2I0 0,0 0,2 owns loads of shirts but 1I
1,2O0 0,0 0,2 <--- only wears one when he 1O
1,2N0 drags his 'friends' 0,0 7 0 0,2 thinks he will be seen by1N
1,2S0 into every petty 0,0 7 0 7 0 0,2 more than 30 people. 1S
0,2 argument --> 0,0 7(o) (o)0 0,2
1,2P0 0,0 0,2 0,0 0,2 1P
1,2R0 0,0 0,2 0,0 0,2 1R
1,2I0 0,0 0,2 0,0 0,2 0,0 0,2 1I
1,2O0 0,0 0,2 0,0 0,2 0,0 0,2 1O
1,2N0 0,0 0,2 0,0 7 0 0,2 0,0 0,2 1N
1,2S0 0,0 0,2 0,0 0,2 0,0 0,2 <- overreacts to stupid shit
0,2 0,0 0,2 0,0 1 0 7o0 0,2 0,0 0,2 because hes too much of
1,2P0 0,0 0,2 0,0 0,14 0,0 0,14 0,0 0,2 1 0 0,0 0,2 a little bitch to say 1P
1,2R0 1,0/0 0,2 0,14 0,0 0,14 0,2 0,0 0,2 what his real issue is.1R
1,2I0 1,0/////0,2 0,0 0,2 0,14 1 /0 1|0 1o0 1|0 1\0 0,2 0,0 0,2 1I
1,2O0 1,0////0,2 0,0 0,2 0,14 1__/0 1 |0 1\__0 0,2 0,0 1 0 0,2 1O
1,2N0 1,0///0,2 0,0 0,2 0,14 1|0 0,2 1 0 0,0 0,2 1,0\\\\0,2 1N
1,2S0 0,14 1/0 10 0 0,2 0,0 0,2 1,0\\\\0,2 1S
0,2 ^ 0,14 0,2
1,2P0 | 0,14 1______0 1______0 0,2 1P
1,2R0loves dogs because he 0,14 1|______|0 1\0 1\0 0,2 <-- spams the chat with yt 1R
1,2I0expects blind loyalty 0,14 1| 0 1 0 1|0 0,2 0,14 1\'''''\0 0,2 video links, never clicks
1,2O0from people he treats 0,14 1| 0 1|0 0,2 0,14 1\0 1\0 1\0 0,2 anyone elses. 1O
1,2N0like warmed over shit.0,14 1|______|0 0,2 ^ 0,14 1\_____\0 0,2 1N
1,2S0 0,14 0,2 | 0,14 0,2 1S
0,2 0,14 0,2 shits0,14 0,2 *spoke thinks the term
1,2P 0 0,0 0,2all over 0,14 0,2 'real-nigga' is totally 1P
1,2R0 0,0 1[0 1]0 0,2anyone who 0,0 0,2 retarded and she would 1R
1,2I0 0,0 1 0 1i0 0,2 doesnt 0,0 1i0 1(0 0,2 never use it outside 1I
1,2O0 0,0 1i0 0,2 swing 0,0 1 0 0,2 of an anatomical/ 1O
0,2becomes a wedge when 0,0 1i0 0,2 from his 0,0 1i0 1i0 0,2 educational or ironic 1N
0,2things dont go his way 0,0 1i0 0,2 nutsack. 0,0 0,2 1 0 context. 1S
0,2and permanently divides --> 0,0 1i0 0,2 0,0 1i0 0,2
0,2penis pump by creating 0,0 0,1 0,0 0,2 0,1 0,0 0,2 1P
0,2a channel for fake people 0,1 X 0,2 0,1 0,2 <-- collects nike shoes using1R
0,2called #real. 0,1 X 0,2 0,1 /___ XX 0,0 0,2 money he saved from never1I
1,2O 0 0,1 0,0 0,1 0,2 0,1 sheisty 0,0 0,2 going anywhere or doing 1O
1,2N0 0,0 0,1 0,2 0,1 0,0 0,2 anything 1N
1,2S0 0,0 0,2 0,0 0,2 1S
0,2
0,2A FUCK NIGGA IS A COWARD AT HEART AND IS TOTALLY INSECURE AND THUS INCAPABLE OF GARNERING 1P
0,2THE RESPECT OF REAL NIGGAS. WHEREAS REAL NIGGAS HONOR THE LAW OF 'RESPECT-FOR-RESPECT', A 1R
0,2FUCK NIGGA DISREGARDS THIS LAW BECAUSE HE ESSENTIALLY HAS LITTLE OR NO RESPECT FOR HIMSELF.

View File

@ -132,14 +132,6 @@ export default {
watch: {
watchAsciiChange(val, old) {
this.currentAsciibirdMeta = val;
// this.ctx.width =
// val.width *
// val.blockWidth;
// this.ctx.height =
// val.height *
// val.blockHeight;
this.drawGrid();
this.redrawCanvas();
},
@ -156,7 +148,6 @@ export default {
},
redrawCanvas() {
// Clears the whole canvas
// if (this.ctx) {
this.ctx.clearRect(0, 0, 1000, 1000);
this.ctx.stroke();
@ -218,7 +209,6 @@ export default {
}
this.ctx.stroke();
// }
},
processMouseDown(e) {
// this.canvasClass(e)
@ -253,8 +243,6 @@ export default {
].bg = this.$store.getters.getBgColor;
},
cavnasMouseUp() {
// this.currentAsciibirdMeta.blocks[this.y][this.x].
this.redrawCanvas();
},
drawGrid() {