Coder Social home page Coder Social logo

sirnewton01 / 9webdraw Goto Github PK

View Code? Open in Web Editor NEW
32.0 5.0 1.0 110 KB

Connect to plan9 using your web browser with a rich draw terminal

License: ISC License

C 2.86% Makefile 0.22% Shell 0.16% HTML 2.29% CSS 0.45% JavaScript 94.02%
plan9 9front

9webdraw's Introduction

9webdraw

9webdraw is a Web draw(3) server for Plan 9, using the HTML5 canvas element. This will allow anyone with a fully featured web browser to connect to your server and have something that resembles a draw terminal.

NOTE: This is highly experimental and may not work very well at this stage.

Roadmap:

  • Make it work for most built-in applications and rio
  • Stabilize
  • Enhance performance
  • Add some form of authentication (probably just basic)
  • Create a file transfer (in and out) part of the filesystem
  • Add fullscreen mode
  • Add sound
  • Create a protocol for rendering 3D graphics and video
  • Create a mobile-centric environment

Prerequisites

  • Plan 9 ( or 9 Front ), of course!
  • The Weebsocket 9P-over-WebSocket bridge.
  • A modern web browser supporting:
    • Binary-mode WebSockets
    • HTML5 Canvas
    • Pointer Lock

Building

% mk install

will install the web application to /usr/web/9wd/.

Note that on 9front you may need to copy latin1.h from the bell labs distribution to your /sys/src/9/port so that it will compile.

Running

% ip/httpd/httpd -w /usr/web/9wd

Then connect with your web browser to http://servername/9wd/9wd.html If you are running in a VM you may need to forward the port 80 to something you can connect.

Using

By default, the weebsocket server will run acme, which mostly works. You can try running rio by recompiling weebsocket to launch it instead. Note that rio is not currently working very well.

You can use the usual gestures within the canvas. Lock your cursor into the canvas by double-clicking on it. The scroll wheel sends the scroll events.

Debugging

Debugging is accomplished using the web browser developer console (ctrl-shift-i). Note that each /dev/draw operation is logged there along with links to the DOM canvas objects. The canvas objects are mostly hidden using a style at the top of the HTML. You can modify display: none; to display: block; so you can see the images and the changes made to them at the bottom of the page.

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.