adamsky / globe Goto Github PK
View Code? Open in Web Editor NEWInteractive ASCII globe generator
License: GNU General Public License v3.0
Interactive ASCII globe generator
License: GNU General Public License v3.0
As reported on reddit by dd-pardal.
That's great. I don't know if it's just me, but when I pan the globe up, the code panics:
It seems like it's trying to get the character for an absurdly high luminance.
I'm using 64-bit Windows.
thread 'main' panicked at 'index out of bounds: the len is 18 but the index is 18446744073709551615', globe\src\lib.rs:141:43
Using Debian 10 "Buster" and rustc 1.41.1.
I get the following errors during build:
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/feck/.cargo/registry/src/github.com-1ecc6299db9ec823/crossterm-0.18.2/src/event/filter.rs:16:9
|
16 | matches!(*event, InternalEvent::CursorPosition(_, _))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/feck/.cargo/registry/src/github.com-1ecc6299db9ec823/crossterm-0.18.2/src/event/filter.rs:26:9
|
26 | matches!(*event, InternalEvent::Event(_))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
error: could not compile `crossterm`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `globe-cli v0.1.2`, intermediate artifacts can be found at `/tmp/cargo-install6pFxn7`
Caused by:
build failed
Then the process does not complete.
This may be an issue with an out-of-date rust compiler in the Debian repos, or it may lie elsewhere. Unfortunately my Rust knowledge is non-existent, so I cannot probe any deeper.
Not sure how this would work yet, but I think it's worth investigating.
I have successfully installed globe since I can use the globe -i
command, but when I use globe -s
it just gives me this error:
thread 'main' panicked at 'Original console mode not set', C:\Users\Owner\.cargo\registry\src\github.com-1ecc6299db9ec823\crossterm-0.17.7\src\event\sys\windows.rs:38:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Can't be compiled. Aborts with error E0599.
At PCLinux with Rust v.1.62.1.
Here's console's output:
>
.
.
.
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:54:18
|
54 | .about("Interactive mode (input enabled)"),
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:61:18
|
61 | .about("Screensaver mode (input disabled)"),
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:67:18
|
67 | .about("Refresh rate in frames per second")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:76:18
|
76 | .about("Starting globe rotation speed")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:85:18
|
85 | .about("Starting camera rotation speed")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:94:18
|
94 | .about("Starting camera zoom")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:103:18
|
103 | .about("Target focusing animation speed")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:112:18
|
112 | .about("Starting location coordinates")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:121:18
|
121 | .about("Enable displaying the night side of the globe"),
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:127:18
|
127 | .about("Display a built-in globe template")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:136:18
|
136 | .about("Apply custom texture from file")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:143:18
|
143 | .about("Apply custom night side texture from file")
| ^^^^^ method not found in `Arg<'_>`
error[E0599]: no method named `about` found for struct `Arg` in the current scope
--> /home/giorgos/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:151:18
|
151 | .about("Read coordinates from stdin and display them on the globe"),
| ^^^^^ method not found in `Arg<'_>`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `globe-cli` due to 13 previous errors
error: failed to compile `globe-cli v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installuZ1iAV`
>
This is a fun one.
So basically a sort of raycast. This would enable modification of the texture based on the position of the pointer, making it possible to, for example, highlight regions of the map as they are clicked/hovered over.
The way globe-cli
handles dynamic scaling could probably be improved.
What number for camera rotation spin would equal real-time?
Hi, this seems like a nice application. I think it's quite a cool novelty and I enjoy using it for fun.
As of the 0.2.0 release however; I have become very upset due to one thing:
- changed default Earth texture (now includes New Zealand)
I think this is absolute rubbish. Any good map is known to not include New Zealand.
At least a new branch with the non-New-Zealand map texture would be much appreciated.
Thank you for your time,
-Toy
Here's a crazy idea. The library could support setting labeled markers that would continuously point to the selected location as the globe is rotated. It could look something like this:
Gotham City ::..::::::
________________________ :g@OOOOOOO:::@ @
\ @@OOOO OOOO ::' @@ @@
\@@@O:OO.@O . o ' @@@@@@@@
:@\@@ @@o ::: : @ @o @@@@OO
:OO@@@@@@Y ::: ::. oo@@O @OOw
::OO@@@@ .::.:: .::@OO:@@@..OOO@
::O@@@ ::::::: ::::...OO:o OO OO
::@::@:::::: ::::: OOOOOOOOOOO:@
::::@:@@ :: ::::::OOOOOOOOO@@ :
::: @@@ ::: :::::@@@@@@@@@@O::
:::@@@@@@::. :::::@::@@@@O::
:::@@@@@@@OO:::: ::::@@OO:
:::O@@@OO ::: ::::OOO:
:O@@@:: ::: ::::::
::::::::::
same error in:
cargo 1.69.0 (6e9a83356 2023-04-12)
rustc 1.69.0 (84c898d65 2023-04-16)
and:
rustc 1.70.0 (90c541806 2023-05-31)
cargo 1.70.0 (ec8a8a0ca 2023-04-25)
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:54:18
|
50 | / Arg::new("interactive")
51 | | .short('i')
52 | | .long("interactive")
53 | | .display_order(0)
54 | | .about("Interactive mode (input enabled)"),
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:61:18
|
57 | / Arg::new("screensaver")
58 | | .short('s')
59 | | .long("screensaver")
60 | | .display_order(1)
61 | | .about("Screensaver mode (input disabled)"),
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:67:18
|
64 | / Arg::new("refresh_rate")
65 | | .short('r')
66 | | .long("refresh-rate")
67 | | .about("Refresh rate in frames per second")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:76:18
|
73 | / Arg::new("globe_rotation")
74 | | .short('g')
75 | | .long("globe-rotation")
76 | | .about("Starting globe rotation speed")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:85:18
|
82 | / Arg::new("cam_rotation")
83 | | .short('c')
84 | | .long("cam-rotation")
85 | | .about("Starting camera rotation speed")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:94:18
|
91 | / Arg::new("cam_zoom")
92 | | .short('z')
93 | | .long("cam-zoom")
94 | | .about("Starting camera zoom")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:103:18
|
100 | / Arg::new("focus_speed")
101 | | .short('f')
102 | | .long("focus-speed")
103 | | .about("Target focusing animation speed")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:112:18
|
109 | / Arg::new("location")
110 | | .short('l')
111 | | .long("location")
112 | | .about("Starting location coordinates")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:121:18
|
118 | / Arg::new("night")
119 | | .short('n')
120 | | .long("night")
121 | | .about("Enable displaying the night side of the globe"),
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:127:18
|
124 | / Arg::new("template")
125 | | .short('t')
126 | | .long("template")
127 | | .about("Display a built-in globe template")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:136:18
|
134 | / Arg::new("texture")
135 | | .long("texture")
136 | | .about("Apply custom texture from file")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:143:18
|
141 | / Arg::new("texture_night")
142 | | .long("texture-night")
143 | | .about("Apply custom night side texture from file")
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
error[E0599]: no method named about
found for struct Arg
in the current scope
--> /home/nadim/.cargo/registry/src/github.com-1ecc6299db9ec823/globe-cli-0.2.0/src/main.rs:151:18
|
148 | / Arg::new("pipe")
149 | | .short('p')
150 | | .long("pipe")
151 | | .about("Read coordinates from stdin and display them on the globe"),
| | -^^^^^ method not found in Arg<'_>
| |_________________|
|
For more information about this error, try rustc --explain E0599
.
error: could not compile globe-cli
due to 13 previous errors
After running cargo run -- -i
to try the Globe, I exited by hitting q
. After that, mouse clicks input some serious garbage in my terminal :
$ 0;110;32M32;110;32M32;110;32M32;109;32M32;109;33M32;108;33M32;108;33M32;108;33M32;107;34M32;106;34M32;106;34M32;105;34M32;104;35M32;103;35M32;102;35M32;100;35M32;99;35M32;97;35M32;95;34M32;93;34M32;90;34M32;88;33M32;85;32M32;82;31M32;79;31M32;77;30M32;74;29M32;72;28M32;70;27M32;68;26M32;67;25M32;66;25M32;65;24M32;65;24M32;65;24M32;65;23M32;65;23M32;65;23M32;65;23M32;66;23M32;66;23M32;66;23M0;66;23m2;86;14M2;86;14m
Reproduced on Konsole and Yakuake, with and without tmux
. To solve it, exitting the shell is necessary.
I've noticed a general issue with ncurses applications where they do not always exist gracefully. Once you Ctrl-C from the applciation, typing into the shell shows nothing and pressing enter shifts the prompt to the right. Usually requires one to just close that terminal and open another one. Is there a way for globe to exit curses in a way as to return the terminal to its original state?
Both texture size and palette are currently hardcoded into the library. They should instead be based on the actual Texture
being used by the Globe
.
Why not make Texture
into a struct with it's own palette
and a get_size
method. This way setting a custom texture for Globe
would work as expected for textures with different sizes and composed of different characters.
It would be nice to have more planets available.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.