{"id":13550561,"url":"https://github.com/lume/glas","last_synced_at":"2025-05-16T10:05:43.682Z","repository":{"id":37498346,"uuid":"188780913","full_name":"lume/glas","owner":"lume","description":"WebGL in WebAssembly with AssemblyScript","archived":false,"fork":false,"pushed_at":"2024-08-30T19:02:43.000Z","size":2070,"stargazers_count":904,"open_issues_count":34,"forks_count":46,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-05-16T10:04:26.190Z","etag":null,"topics":["3d","3d-engine","3d-game-engine","3d-graphics","assemblyscript","creative-coding","game-dev","game-development","game-engine","gamedev","games","glas","lume","three","three-js","threejs","typescript","wasm","webassembly","webgl"],"latest_commit_sha":null,"homepage":"https://lume.io","language":"TypeScript","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/lume.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2019-05-27T06:06:02.000Z","updated_at":"2025-05-05T05:08:53.000Z","dependencies_parsed_at":"2024-11-05T16:02:22.693Z","dependency_job_id":"e6e31a85-d569-4d18-82c6-f8a83d0d7f3a","html_url":"https://github.com/lume/glas","commit_stats":{"total_commits":351,"total_committers":14,"mean_commits":"25.071428571428573","dds":0.396011396011396,"last_synced_commit":"695bcd4437e957cf75f73b0ca63cb06ff67f09ed"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lume%2Fglas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lume%2Fglas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lume%2Fglas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lume%2Fglas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lume","download_url":"https://codeload.github.com/lume/glas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509476,"owners_count":22082891,"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":["3d","3d-engine","3d-game-engine","3d-graphics","assemblyscript","creative-coding","game-dev","game-development","game-engine","gamedev","games","glas","lume","three","three-js","threejs","typescript","wasm","webassembly","webgl"],"created_at":"2024-08-01T12:01:34.811Z","updated_at":"2025-05-16T10:05:43.663Z","avatar_url":"https://github.com/lume.png","language":"TypeScript","readme":"\u003c!-- # GLAS --\u003e\n\n# \u003ca href=\"//lume.io\"\u003e\u003cimg src=\"./assets/logo.svg\" width=\"200\" alt=\"LUME\" title=\"LUME\" /\u003e\u003c/a\u003e\n\n# GLAS\n\nWeb**GL** in WebAssembly with **A**ssembly**S**cript.\n\n\u003e This is a work-in-progress port of [**Three.js**](https://threejs.org), a JavaScript 3D WebGL library, into [**AssemblyScript**](https://assemblyscript.org).\n\n## Motivation\n\nIt'd be sweet to have a high-performing WebGL engine that runs in the web via\nWebAssembly and is written in a language that web developers are already\nfamiliar with:\n[JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/About_JavaScript),\nin the form of [TypeScript](http://www.typescriptlang.org/) (a\nsuperset of JavaScript with types).\n\nEnter [AssemblyScript](https://assemblyscript.org), a\ntoolchain that allows us to write a strictly-typed subset of\n[TypeScript](http://www.typescriptlang.org/) code and compile it to\n[WebAssembly](https://developer.mozilla.org/en-US/docs/WebAssembly) (an\n[assembly](https://en.wikipedia.org/wiki/Assembly_language)-like language\nrepresenting machine code) for speed.\n\n## Status\n\n![](https://github.com/lume/glas/workflows/Node%20CI/badge.svg)\n\n\u003e #### ⚠️ ALPHA STATE\n\nThe project is currently in its very early alpha stages. We have an amazing\ngroup of programmers building the initial\n[**ASWebGLue**](https://github.com/lume/ASWebGLue) library. This library allows\nAssemblyScript programs to call the browser's underlying WebGL interface. This\nis required before we are able render anything to the screen. A majority of the\nThree.js library and their unit test have been ported over.\n\nSee the current progress in the [**project\nboard**](https://github.com/lume/glas/projects) or review our\n[**issues**](https://github.com/lume/glas/issues).\n\n## Goal\n\nOur initial port project board we're tracking all the classes that need to\nbe ported. The initial goal is to reproduce the following basic Three.js\ndemo, but entirely in AssemblyScript:\n\n\u003e **Initial Goal:** https://codepen.io/trusktr/pen/EzBKYM\n\n## [Contribute](.github/CONTRIBUTING.md)\n\nA brief overview of the work consists of picking a Three.js class, translating it\nfrom _JavaScript_ (with TypeScript declaration files), and porting into _AssemblyScript_\n(effectively merging the `.js` and `.d.ts` files).\n\nMost logic can be ported unchanged, but sometimes there are features of plain\nJS that AssemblyScript does not support. For example Assembly script does not\nsupport `any` type. Three.js APIs that accept plain object literals with\narbitrary properties need to be converted into `class` structures with specific\nproperty types. Additionally unit test files also need to be ported over from\n`*.test.js` and into [**as-pect**](https://github.com/jtenner/as-pect)\n`*.spec.ts` files.\n\nIf you would like to help, awesome! We are currenty looking for help, testing,\nand feedback. Please read about how to [**contribute**](.github/CONTRIBUTING.md) or view\na detailed [**example**](.github/CONTRIBUTING.md#example-of-dev-process) of how to port some of the\ncode.\n\n## How It Works\n\nWe have an HTML page that loads the glas WebAssembly module and runs it, but so\nfar this module only instantiates an\n[`Object3D`](https://threejs.org/docs/index.html#api/en/core/Object3D) instance\nto show that we're able to run the module.\n\nLater we'll eventually connect the module to a `\u003ccanvas\u003e` element in the DOM\nand actually render something.\n\n### Build \u0026 Run\n\nTo run the example GLAS application in your browser use the following command:\n\n```sh\n# install or update dependencies\nnpm install\n\n# build and serve the project in browser\nnpm start\n```\n\nNow see the devtools console in your browser tab for some output that tell us\nthat our GLAS program has been loaded and initialized.\n\n\u003e NOTE: the project does not currently have a watch mode with automatic\n\u003e rebuild. So you will need to execute `npm run build` again and then refresh\n\u003e to see the changes.\n\nOur goal is to get GLAS distributed as a library on NPM so that you can include\ninto your own AssemblyScript application. Until this is implemented, you can\nadd your application code into the `src/as/index.ts` AssemblyScript file. This\nis currently the entry point for GLAS.\n\n### Testing\n\nUnit testing is handled by the\n[**as-pect**](https://github.com/jtenner/as-pect) test runner for\nAssemblyScript. It is based on Mocha testing API with similar `describe` and\n`it` functions, etc.\n\nTo run the tests, run the following commands in your terminal:\n\n```sh\n# run unit tests\nnpm test\n```\n\nThe console output should report which tests pass and which tests fail.\n\n## [Development](.github/DEVELOPMENT.md)\n\nIf you are interested in developing **GLAS** please read the detailed process\non our [**development page**](.github/DEVELOPMENT.md)\n","funding_links":[],"categories":["TypeScript","Projects"],"sub_categories":["WebGL"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flume%2Fglas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flume%2Fglas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flume%2Fglas/lists"}