Coder Social home page Coder Social logo

onejs's Introduction

ONEJS

WebGL UI Toolkit and Javascript superset - UNDER HEAVY DEVELOPMENT, DO NOT USE, WILL CHANGE A LOT!

OneJS aims to bridge the gap between the GPU and your JS code by unifying the types between the languages, and adding a host of features to JS, a small subset of which is:

  • Type-inferenced GLSL-like typesystem, so you can use vec2 x; float y; struct t{ float x, y} and typed arrays
  • Compiler always runs in browser to support runtime shader compilation and metaprogramming (unlike coffeescript)
  • Compile time module system (necessary for type support)
  • Full ES6 featureset minus generator expressions
  • ES7 await keyword
  • User code runs in a worker, render code runs in the main browser thread; it has an out-of-process DOM.
  • Metaprogramming and symbolic assignment syntax x = :y+1 and x:y+1 are the same. x is now the AST node of y+1
  • Backwards compatible with JS with the following changes:
    Use of label: syntax is re-purposed for 'symbolic assignment', labels will get another syntax
  • Finally safe to not use semicolons in your code: x\n(t || 2) or x\n[1,2] are no longer calls/indexes. OneJS tries to deliver all the niceties of coffeescript but keeping backwards compatibility with JS code. So optional commas and string interpolation and tons more.

OneJS aims to be compatible with all current day webbrowsers that support webGL and workers, and also run on nodejs. Including now iOS8 and Android. It is a new dawn for the web!

Run it (use node 0.11 or higher, check out the use of await, ah its nice to live in the future)

node --harmony one_node.js app_server.n

open in browser: http://localhost:2000#tests/jsconf

http://localhost:2000#tests/framebuf

etc.

(onejs apps are served using the #hash)

Sofar you can find the same files accessible as: http://hello.onejs.io using the subdomain name

OneJS is currently getting a fully fledged UI kit, and a live code editor is well under way.

onejs's People

Contributors

onejsdev avatar

Watchers

 avatar  avatar

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.