Coder Social home page Coder Social logo

kkoomen / pointless Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 84.0 9.43 MB

An endless drawing canvas desktop app made with Tauri (Rust) and React 🎨 ✍️

License: GNU General Public License v3.0

Shell 0.09% JavaScript 79.74% HTML 1.09% Rust 4.95% CSS 14.13%
canvas cross-platform desktop drawing endless linux macos react reactjs rust tauri windows

pointless's Introduction

Hi there 👋

My name is Kim. Learning Chinese since August 2017. Software engineer since 2013.

Since 2022 back at university studying Artificial Intelligence, not because of the hype, but just because it's one of the few things I haven't learned yet that I would really like to learn.

On the road to a PhD:

  • 📕 Webdevelopment (4y)
  • 📗 Software Engineering foundation year (1y)
  • 📘 Artificial Intelligence BSc (3y)
  • 📙 Pattern Recognition and Intelligent Systems MSc (2.5y)
  • 🎓 PhD

kkoomen GitHub stats

Top Langs

pointless's People

Contributors

dependabot[bot] avatar hunterchen7 avatar kkoomen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pointless's Issues

Pen support

It would be cool if there was support for wacom tablets/pens. For example, mapping buttons on the pen to the eraser. Xournal++ currently supports this as a source of inspiration:

image

(oh, unrelated but I just created an AUR package for pointless, might be cool to put in the readme: https://aur.archlinux.org/packages/pointless)

Touch support

The current touch support is poor, tested on wayland. Dragging a finger around doesn't draw a line as expected, but instead starts zooming the canvas.

Text Box support

Instead of drawing the text it would be better if we can actually just type it in some scenario

panicked at 'Failed to decompress a empty file'

error:

thread 'tokio-runtime-worker' panicked at 'Failed to decompress "/home/d/.local/share/com.pointless.app/library/73635c81-1fff-42b9-bc37-15477096a038/e1e3dc0e-2401-4df1-a4ad-176bc6d761c4.dat": Custom { kind: InvalidData, error: "Invalid Data" }', src/commands.rs:23:52
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I checked that .dat file it was empty.
after I removed that empty file error does not occur again

Transparent mode

Hey! I think it's a good idea to support a transparent mode where you can draw on a canvas that overlays the active screen.

This way we can highlight or explain something that we're seeing on the browser or somewhere else. I can say the problem or challenge might be that on macOS when an app goes to fullscreen mode, no other apps can be opened on top of that.

nested if statements in command.rs could be made more concise

These nested if statements from src-tauri/src/command.rs can be made more concise:

This one from delete_library_folder():

if folder_path_buf.exists() {
    if folder_path_buf.is_dir() {
        match fs::remove_dir_all(&folder_path_buf) {
            Ok(_) => {},
            Err(e) => eprintln!("Error removing folder {}: {:?}", folder_id, e),
        }
    }
}

can be replaced with:

if folder_path_buf.exists() && folder_path_buf.is_dir() {
    match fs::remove_dir_all(&folder_path_buf) {
        Ok(_) => {},
        Err(e) => eprintln!("Error removing folder {}: {:?}", folder_id, e),
    }
}

and this one from delete_library_paper():

if paper_filepath_buf.exists() {
    if paper_filepath_buf.is_file() {
        match fs::remove_file(&paper_filepath_buf) {
            Ok(_) => {},
            Err(e) => eprintln!("Error removing folder {}: {:?}", folder_id, e),
        }
    }
}

with:

if paper_filepath_buf.exists() && paper_filepath_buf.is_file() {
    match fs::remove_file(&paper_filepath_buf) {
        Ok(_) => {},
        Err(e) => eprintln!("Error removing folder {}: {:?}", folder_id, e),
    }
}

Image paste support

Hello,

I think image collage would be beneficial. The application is very basic and very good for creating course content and pasting an image for annotation would be a plus.

Feature request(s)

Hi, thanks for merging the custom colours PR!

I have a few more features that I'd like to implement (or help implement) for personal use, not sure which of these you would want in the app and/or if you'd prefer these to be listed in separate issues but anyway, here they are in no particular order:

  1. Some setting to toggle inverted/non-inverted scrolling for zoom
  2. Some setting to change zooming sensitivity, and some sort of resolution scaling (IMO close up scrolling feels too slow and far away scrolling feels too fast)
  3. Sometimes when I move too fast with my pen it doesn't register the stroke, it happens mostly when I'm writing.
  4. Another pen-related thing, palm rejection would be nice to have.
  5. Custom key bindings, e.g. I would like to bind a button on my pen to erase and another to select, and right-click to erase.
  6. Saving states of position/zoom on paper and last used color, would be nice to continue where I left off.
  7. Different backgrounds: lines, grids, etc.

I'll be looking into these but I just wanted to know if there's anything you'd like to implement/see implemented.

Here's what I know about each item so far:

  1. would just require multiplying event.deltaY * SCALE_FACTOR in canvasOnWheelHandler from components/Paper/index.js by +/-1 . Could be stored in a local cache, settings file, or something similar.
  2. I'll try to play around with some values to see how it feels, but this is low importance to me.
  3. I suspect it may be to do with simplifyPoints() being overzealous? But I'm not sure.
  4. There may be built-in support for Windows. It may be possible there are hardware limitations but there may be some hacky software workarounds that could kind of work. I will look into this.
  5. Something similar to 1.
  6. I'm thinking this could be saved along with the paper state, but I'm not sure if that would break anything.
  7. Repeating SVG background

Also potentially an option for cloud saving/syncing files across devices. Users would have to self-host/pay for a cloud service and manage their own API keys and whatnot.

Sorry this was kinda long! I'm trying to integrate this into my daily workflow to replace Microsoft Whiteboard.

Let me know if you have any thoughts/insights on any of these.

Error while building Pointless

Hi there, i'm currently trying to install Pointless. I'm interested in the project and i want to check it out, and maybe help in the development.
Like the ReadMe says, i run yarn install and then yarn run tauri build, at first i had to install few system libs but then when yarn was bundling, i came across this error below. I don't understant what i have to do next, i would appreciate for you to look into it. Thank you.

➜  pointless git:(master) yarn run tauri build
yarn run v1.22.19
$ tauri build
     Running beforeBuildCommand `npm run build`

> [email protected] build
> react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  109.14 kB  build/static/js/main.396e851f.js
  9.92 kB    build/static/css/main.06288039.css
  1.78 kB    build/static/js/787.8050ff47.chunk.js

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment

   Compiling pointless v0.1.0 (/home/dilec/pointless/src-tauri)
    Finished release [optimized] target(s) in 29.31s
    Bundling pointless_0.1.0_amd64.deb (/home/dilec/pointless/src-tauri/target/release/bundle/deb/pointless_0.1.0_amd64.deb)
    Bundling pointless_0.1.0_amd64.AppImage (/home/dilec/pointless/src-tauri/target/release/bundle/appimage/pointless_0.1.0_amd64.AppImage)
Error running CLI: failed to bundle project: error running appimage.sh: error running appimage.sh: `+ export ARCH=x86_64
+ ARCH=x86_64
+ mkdir -p pointless.AppDir
+ cp -r ../appimage_deb/data/usr pointless.AppDir
+ cd pointless.AppDir
++ dirname '{}'
+ find /usr/lib /usr/lib32 /usr/lib64 /usr/libexec /usr/libx32 -name WebKitNetworkProcess -exec mkdir -p . ';' -exec cp --parents '{}' . ';'
++ dirname '{}'
+ find /usr/lib /usr/lib32 /usr/lib64 /usr/libexec /usr/libx32 -name WebKitWebProcess -exec mkdir -p . ';' -exec cp --parents '{}' . ';'
++ dirname '{}'
+ find /usr/lib /usr/lib32 /usr/lib64 /usr/libexec /usr/libx32 -name libwebkit2gtkinjectedbundle.so -exec mkdir -p . ';' -exec cp --parents '{}' . ';'
+ wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64
+ chmod +x AppRun
+ cp usr/share/icons/hicolor/512x512@2x/apps/pointless.png .DirIcon
+ ln -s usr/share/icons/hicolor/512x512@2x/apps/pointless.png pointless.png
+ ln -s usr/share/applications/pointless.desktop pointless.desktop
+ cd ..
+ wget -q -4 -O linuxdeploy-plugin-gtk.sh https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
+ wget -q -4 -O linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
+ chmod +x linuxdeploy-plugin-gtk.sh
+ chmod +x linuxdeploy-x86_64.AppImage
+ OUTPUT=pointless_0.1.0_amd64.AppImage
+ ./linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir pointless.AppDir --plugin gtk --output appimage
linuxdeploy version 1-alpha (git commit ID 56760df), GitHub actions build 85 built on 2022-06-14 00:36:51 UTC
`
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


The cursor only moves during erasing

Hi, maybe i found a bug :D. When you choose the eraser, the cursor only moves during erasing. I think it would be better if the cursor moved all the time, so you can figure out precisely where to start erasing. What do you think? I have attached a video.

Peek.2022-05-17.15-23.mp4

[Feature Request] Additional Tooltips

Hi, I just noticed that the buttons for help, export and paper info have no tooltips.
I don't know if this was intentional but I thought it might be worth adding since all the other buttons have tooltips. I don't mind implementing this too if you are ok with that. The program is great so far by the way!

image

Wrong Eraser Background-color

  • Platform:Macos 11.0.1
  • Theme:Light mode
  • Details:The background color of paper is rgb(248,248,248).After using eraser,the wiping area should be also the same color but rgb(255,255,255).

main.rs file proc macro panicked

There is a problem in compiling this line of code by local cargo

error message:

proc macro panicked
message: The `distDir` configuration is set to `"../build"` but this path doesn't existrustc

Dark mode

Currently, dark mode only works when your system theme is detected to be dark. it cannot be toggled

Reduce unnecessary re-redenders

Hi @kkoomen , I noticed that in the Paper component, there are many unnecessary re-renders. Instead, we could use composition and redux to reduce the number of re-renders with selectors. We can also store coordinates on mouse movement with useRef or createRef without calling useState and call dispatch when we need. I think we can avoid rendering the toolbar, palette, library and other icons when we are moving the cursor for example.

I attach two videos to show where re-renders occur:

Peek.2022-05-13.22-38.mp4
Peek.2022-05-14.09-31.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.