{"id":15724226,"url":"https://github.com/codeation/canvas","last_synced_at":"2025-03-31T01:14:04.846Z","repository":{"id":167198496,"uuid":"641495251","full_name":"codeation/canvas","owner":"codeation","description":"WebAssembly impress terminal, a part of GUI library","archived":false,"fork":false,"pushed_at":"2025-03-05T07:34:10.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-05T08:32:09.569Z","etag":null,"topics":["go-wasm","gui-library","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-16T15:30:17.000Z","updated_at":"2025-03-05T07:34:14.000Z","dependencies_parsed_at":"2024-01-26T12:54:21.362Z","dependency_job_id":"b83d7591-3c2d-4ecd-8843-cd140d6d3e87","html_url":"https://github.com/codeation/canvas","commit_stats":null,"previous_names":["codeation/canvas"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Fcanvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Fcanvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Fcanvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Fcanvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeation","download_url":"https://codeload.github.com/codeation/canvas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399798,"owners_count":20770908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-wasm","gui-library","webassembly"],"created_at":"2024-10-03T22:15:37.731Z","updated_at":"2025-03-31T01:14:04.827Z","avatar_url":"https://github.com/codeation.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebAssembly impress terminal\n\nThis is a part of cross-platform GUI Library for Go. See https://github.com/codeation/impress\n\nThe WebAssembly terminal is a tool for using the browser as a GUI canvas.\n\nReasons to have a browser version for a GUI app:\n\n- Access from anywhere to view some of the data created on the desktop.\n- Demonstration of desktop GUI application.\n- Periodically launched application with a graphical interface without installation on computer.\n\n## Hello world\n\n\u003cimg src=\"https://codeation.github.io/images/canvas_small.png\" width=\"675\" height=\"445\" /\u003e\n\nSource:\n\n```\npackage main\n\nimport (\n    \"image\"\n    \"image/color\"\n\n    \"github.com/codeation/impress\"\n    \"github.com/codeation/impress/event\"\n\n    _ \"github.com/codeation/impress/canvas\"\n)\n\nfunc main() {\n    app := impress.NewApplication(image.Rect(0, 0, 480, 240), \"Hello World Application\")\n    defer app.Close()\n\n    font := app.NewFont(15, map[string]string{\"family\": \"Verdana\"})\n    defer font.Close()\n\n    w := app.NewWindow(image.Rect(0, 0, 480, 240), color.RGBA{240, 240, 240, 255})\n    defer w.Drop()\n\n    w.Text(\"Hello, world!\", font, image.Pt(200, 100), color.RGBA{0, 0, 0, 255})\n    w.Line(image.Pt(200, 120), image.Pt(300, 120), color.RGBA{255, 0, 0, 255})\n    w.Show()\n    app.Sync()\n\n    for {\n        e := \u003c-app.Chan()\n        if e == event.DestroyEvent || e == event.KeyExit {\n            break\n        }\n    }\n}\n```\n\nTo run :\n\n```\ngit clone https://github.com/codeation/canvas.git\ncd canvas\ncp \"$(go env GOROOT)/misc/wasm/wasm_exec.js\" .\nGOOS=js GOARCH=wasm go build -o main.wasm ./cmd/\ngo run ./examples/wasm\n```\n\nTo see results, open `http://localhost:8080/` in you browser. Please, try with Brave or Chrome browser.\n\n## Project State\n\n### Notes\n\n- The performance of the browser will not be enough for the regular use.\n- This project is still in the early stages of development and is not yet in a usable state.\n- The project was tested on Debian 12.9 with Brave browser (Version 1.71.123 Chromium: 130.0.6723.116).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeation%2Fcanvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeation%2Fcanvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeation%2Fcanvas/lists"}