GithubHelp home page GithubHelp logo

What is the goal of glas? about glas HOT 3 CLOSED

lume avatar lume commented on May 22, 2024
What is the goal of glas?

from glas.

Comments (3)

trusktr avatar trusktr commented on May 22, 2024

At the moment the first goals were to port Three.js to AS, and get it to run the demo that is detailed here:

https://docs.google.com/document/d/1CojZ_Rry3a1rQnXf8KJcSiOGodTP905CVRsU-uiWQjo/edit?usp=sharing

As a first pass, we're just copying both source and test files, and not modifying logic or making performance improvements.

This i our first time using AS, so it is a learning experience.

We would love to have performance improvements, but it will be nice to do this after the initial porting, so we can weigh the difference (not only in performance, but in type safety and maintainability).

For instance, Matrix4 would be much better off as a single heap allocation, so that copying can just be a single memory.copy() function call

We hadn't thought about any of that. We're literally just porting the code as verbatim as we can, but inevitably a few things had to be changed to make it compile in AS (f.e. convert object literals to class instances).

there are runtime checks for each set and get to validate the indexes don't go out of bounds

This seems like a good feature. I value performance, but at the same time I'd like for people to be able to easily understand the code and not make mistakes.

Many of the changes that you describe probably won't impact end-users, but they might make the code more difficult understand (further away from) JavaScript. I'd like for people to open any file, and propose changes using basic JavaScript knowledge (with only few tweaks needed like classes instead of object literals).


If we, for example, store matrix values as properties, how would code that needs to iterate on the values look like? Will it still be a regular for loop? Can someone make a mistake and go out of bounds?

How does it affect intellisense?

from glas.

trusktr avatar trusktr commented on May 22, 2024

Closing, but we can keep discussing here.

from glas.

jtenner avatar jtenner commented on May 22, 2024

Make it work first with a fully functional test suite, then refactor to make faster

from glas.

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.