GithubHelp home page GithubHelp logo

lume / glas Goto Github PK

View Code? Open in Web Editor NEW
847.0 42.0 42.0 2.02 MB

WebGL in WebAssembly with AssemblyScript

Home Page: https://lume.io

License: MIT License

JavaScript 37.08% TypeScript 62.68% HTML 0.23%
assemblyscript typescript webgl 3d 3d-graphics 3d-engine 3d-game-engine glas webassembly wasm

glas's Introduction

LUME

A toolkit that simplifies the creation of rich and interactive 2D or 3D experiences.

Home  ·  Documentation  ·  Examples  ·  Forum  ·  Chat  ·  Source

npm install lume

Features

LUME is composed of several packages that can be used individually, or together as a whole:

lume - HTML elements for rich graphics

HTML elements for easily defining rich and interactive 2D or 3D applications powered by CSS3D, WebGL, or a combination of both.

This package uses and re-exports features from the below packages.

@lume/element - System for defining HTML elements

This is a web component system that allows you to create new, fast, and performant HTML elements in a simple way. It provides the foundation for LUME's HTML elements, and a standard pattern for building new elements that extend the features of LUME.

element-behaviors - Mix functionalities onto HTML elements

This allows you to augment HTML elements with features called "behaviors" that are similar to custom elements: each behavior is defined as a class that has the same lifecycle methods as custom elements. The difference is that an unlimited number of behaviors can be associated with an element.

glas - WebGL engine written in AssemblyScript (WIP)

This is a WebGL engine with the consistent performance of WebAssembly, written in AssemblyScript (a TypeScript-to-WebAssembly compiler).

LUMECraft

LUMECraft is a collection of applications made with LUME, showing what LUME can do, and serving as forkable starting points for further customization.

first-person-shooter - First-person shooter game

A first-person shooter game foundation made with LUME, Solid.js, and Meteor.

Getting involved

There are various ways to get involved!

  • Visit the documentation and make something awesome!
  • Submit fixes or new features to any packages or the website! See the contributing guide.
  • Discuss LUME, get help, or help others in the forums or on our Discord chat server.

Status

tests

glas's People

Contributors

corruptedzulu avatar data-ux avatar dependabot[bot] avatar gitter-badger avatar jbbe avatar jtenner avatar k-rawson avatar mbmcmullen27 avatar romdotdog avatar stevugnin avatar trusktr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glas's Issues

Mesh

  • updateMorphTargets()

LightShadow

Constructed, but not used, so closing this and leaving it commented out.

What is the goal of glas?

I would love to help reduce heap allocations and speed up the matrix math/copying, but I don't know the reasons for the code choices?

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. Also, SIMD can also be used to speed up calculations. This might require that float math should probably be done in f32 to reduce memory usage and increase the number of SIMD lanes that can be used.

Using an Array<f64> is slower because it requires 2 additional heap allocations, and there are runtime checks for each set and get to validate the indexes don't go out of bounds. You can use unchecked(expression) but that still doesn't produce optimal code.

Even the clone() methods should ultimately result in a single function call to a custom clone(pointer) call and then cloning its children combined with a couple of store operations.

All of the generated TypeScript currently can compile to JavaScript. Is this a requirement for the project? If not, I would love to hammer away at a ton of optimizations for you and explain all of them.

PerspectiveCamera

  • constructor
  • updateProjectionMatrix
  • updateMatrixWorld
  • updateMatrix

Should Use `asconfig.js` file instead of cli within `package.json`

This is a more maintainable way to create multiple compile time configurations. This will also allow us to more easily configure out table import and exports. see this page for more information on the compiler options and implementation of the configuration file. Might also want to looking at implementing a dev and production build targets

ESLint

Prettier is good at formatting. But it leaves open for contributions and tests to be deployed without respecting project rules.

I propose to add and configure ESLint to include our project rules and add no-var-keyword rules and also ES5 rules about comma.

npm install fail

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/...

Incomplete Build Process

Need to finish creating a working build process that is able to compile and build the project to be tested in an example web application by using npm run start. This requires making sure that aswebglue imports into the project before using rollup to generate a javascript module that can be loaded by an html page with live-server

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.