lume / glas

WebGL in WebAssembly with AssemblyScript
https://lume.io
MIT License
887 stars 45 forks source link

npm install fail #4

Closed liveme closed 4 years ago

liveme commented 5 years ago

It make an error when I run npm install: npm ERR! code 1 npm ERR! Command failed: git checkout runtime npm ERR! error: pathspec 'runtime' did not match any file(s) known to git.

Using yarn install also prompts for failure: error Couldn't find match for "runtime" in "refs/heads/2.4.2,refs/heads/asc_to_devDep,refs/heads/fix_ts_output,refs/heads/greenkeeper/ts-jest-24.1.0,refs/heads/greenkeeper/ts-jest-pin-24.0.2,refs/heads/master,refs/heads/v2.2.1,refs/heads/v2.3.2,refs/heads/v2.3.3,refs/heads/v2.4.1.0,refs/pull/100/head,refs/pull/...

trusktr commented 5 years ago

Hello! @jtenner, author of as-pect has since deleted the runtime branch from as-pect, which this is depending on in package.json.

By the way, this project doesn't render anything on the screen yet (that's what we're aiming for of course). It currently runs unit tests for the classes we've finished so far. But it would be great if you want to contribute. Thanks for checking it out!


If I don't get to it first, @jtenner, would you be open to make a PR to bring this up to date with as-pect from NPM? I'd like to swing back to this soon after some other stuff in my life calms down.

Or @liveme, if you'd like to give it a try, glas needs to be updated to using these packages:

@as-pect/cli @as-pect/core @as-pect/assembly assemblyscript/assemblyscript
jtenner commented 5 years ago

I switched to a mono repo to get more organized about how aspect worked. I could probably help with a pull request if you needed it.

trusktr commented 5 years ago

That would be great! I'm sure the changes aren't much, but you'd know best. What was working before was npm install && npm test.

jtenner commented 5 years ago

This is unfortunate. When I tried to run latest AssemblyScript and latest @as-pect/cli together, I found a compile-time error.

ERROR TS2339: Property 'dataLength' does not exist on type '~lib/arraybuffer/ArrayBufferView'.

   if (actual.dataLength != expected.dataLength) {
              ~~~~~~~~~~
 in node_modules/@as-pect/assembly/assembly/internal/comparison/arrayComparison.ts(49,13)

ERROR TS2339: Property 'dataLength' does not exist on type '~lib/arraybuffer/ArrayBufferView'.

   if (actual.dataLength != expected.dataLength) {
                                     ~~~~~~~~~~
 in node_modules/@as-pect/assembly/assembly/internal/comparison/arrayComparison.ts(49,36)

This is going to take some time and an update. Sorry for the trouble.

trusktr commented 4 years ago

@jtenner Just gave it a shot, and everything is working! Nice! :godmode:

I've updated assemblyscript and as-pect, and added continuous integration (too easy with GitHub Actions).

Not sure how the build passed though, as the CI pull request doesn't have the updated dependencies. Hmmm, well let me get the first PR merged.

trusktr commented 4 years ago

Alright @liveme, it is good to go. npm install should work and npm test should pass. There's nothing to see yet, but so far 61 unit tests should pass.

If you'd like to grab any class from the Three.js repository along with its unit tests, and port it to AssemblyScript, that'd be awesome.

It'll be some time before it renders anything. The hardest part will be porting over WebGLRenderer and making JS glue code so that it can tell the JS (WebGL API) what to render in the DOM <canvas> element.

At present, the WebGLRenderer class contains the <canvas> element, but this is not yet possible in WebAssembly, so instead it will need to contain a render command list, and that list will be passed to the JavaScript side, where the <canvas> WebGL context can be accessed.

munrocket commented 3 years ago

npm install gives an error with node 12.

(node:53821) ExperimentalWarning: The ESM module loader is experimental.
internal/modules/run_main.js:54
    internalBinding('errors').triggerUncaughtException(

If you get this error update node to 14.x