-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed swizzle and added more bash formatting
- Loading branch information
al1-ce
committed
Dec 1, 2022
1 parent
f252d61
commit 2df9bea
Showing
7 changed files
with
274 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env dub | ||
/+ dub.sdl: | ||
name "testfmt" | ||
dependency "sily" version="~master" | ||
+/ | ||
|
||
import std.stdio: writeln, write, readln; | ||
import sily.bashfmt; | ||
|
||
void main() { | ||
writeln("After read screen will be cleared"); | ||
write("Press enter: "); | ||
readln(); | ||
clearScreen(); | ||
writeln("You'll see this line"); | ||
writeln("You should not see this line"); | ||
eraseLines(2); | ||
writeln("And this one"); | ||
writeln("And these two lines"); | ||
writeln("Too"); | ||
eraseLines(3); | ||
writeln("And this one too"); | ||
fwriteln(FG.red, "stuff", FM.blink, "was", BG.cyan, "here", FR.fullreset); | ||
saveCursorPosition(); | ||
moveCursorUp(3); | ||
moveCursorDown(); | ||
moveCursorRight(22); | ||
moveCursorLeft(2); | ||
fwrite(BG.ltblue, "this one is written out of sequence", FR.fullreset); | ||
restoreCursorPosition(); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env dub | ||
/+ dub.sdl: | ||
name "vectortest" | ||
dependency "sily" version="~master" | ||
+/ | ||
|
||
import std.stdio: writeln; | ||
import sily.color; | ||
import sily.vector; | ||
|
||
|
||
void main() { | ||
col c = col(3, 4, 1, 2); | ||
col d = c.brga; | ||
writeln(d.toString()); | ||
vec4 v = d.asVector4f(); | ||
vec4 e = v.xyyz; | ||
writeln(e.toString()); | ||
} |