Code Monkey home page Code Monkey logo

Comments (4)

jakubfiala avatar jakubfiala commented on July 26, 2024

Hi there @MisterDA, thanks for submitting your question! This is a very interesting proposition, I think both techniques you mention are sensible. I guess it depends on your use case. Capturing the stream would allow you to broadcast anything that happens to the canvas (not just Atrament drawing), and crucially, the timing would be much more precise. With compression I think the bandwidth also wouldn't be a huge issue.

On the other hand, sending the stroke data would let you save the state on the client's device, allowing you to replay the drawing step by step or even modifying it.

If you can share more about your project, I'd be happy to think about it a bit more :)

from atrament.

MisterDA avatar MisterDA commented on July 26, 2024

On the other hand, sending the stroke data would let you save the state on the client's device, allowing you to replay the drawing step by step or even modifying it.

Does Atrament have a "real time" event watcher that would allow sending the drawing moves as they are made?

If you can share more about your project, I'd be happy to think about it a bit more :)

Of course, I’d like to do a simple online Pictionary :) Atrament seems the nicest sketchpad lib out there.

from atrament.

jakubfiala avatar jakubfiala commented on July 26, 2024

Amazing! Atrament does indeed support stroke recording, see the section on Programmatic Drawing in the README. Let me know if you have any further questions :)

from atrament.

jakubfiala avatar jakubfiala commented on July 26, 2024

closing this as it seems the question has been answered πŸ™

from atrament.

Related Issues (20)

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.