GithubHelp home page GithubHelp logo

ptzagk / examples-15 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from assemblyscript/examples

0.0 0.0 0.0 555 KB

A collection of AssemblyScript examples.

Home Page: https://assemblyscript.org

TypeScript 44.34% HTML 27.69% JavaScript 21.29% Rust 6.67%

examples-15's Introduction

AssemblyScript Examples

Actions Status

Instructions

This repository contains one example per directory. All examples can be obtained by cloning the repository:

$> git clone https://github.com/AssemblyScript/examples.git
$> cd examples

Afterwards, select the example you'd like to run and follow the instructions in its README file.

Low-level perspective

The following examples make use of AssemblyScript's low-level capabilities, i.e. to essentially write WebAssembly with a nicer syntax.

  • Conway's Game Of Life (demo)
    An implementation of the game of life with slight modifications. Updates an image buffer in memory, that is then presented on a canvas.

  • Mandelbrot Set (demo)
    Computes 2048 offsets of a color gradient in memory, line by line, and presents the set using the gradient's actual colors, as computed on the JavaScript side, on a canvas.

  • Interference effect (demo)
    Colin Eberhardt's and Ben Smith's WebAssembly interference effect, if it was written in AssemblyScript.

High-level perspective

These examples cover slightly higher level aspects, like working with managed objects or interfacing with them.

  • N-body system (demo)
    This is actually a benchmark - visualizing it just so happened.

  • Loader
    Utilizes the loader to perform various common tasks on the WebAssembly/JavaScript boundary, like passing along strings and arrays between both worlds.

Libraries

Various WebAssembly or AssemblyScript features as a library.

  • i64
    Exposes WebAssembly's i64 operations to JavaScript using 32-bit integers (low and high bits).

  • libm
    Exposes AssemblyScript's math routines for double and single precision as a library.

Features

General examples showing how to utilize specific AssemblyScript features.

  • Browser SDK (demo)
    Shows how to use the browser SDK to run the AssemblyScript compiler in the browser.

  • Compiler transforms
    An example of using compiler transforms to hook into the compilation process.

Additional resources

  • Wasm By Example
    A concise, hands-on introduction to WebAssembly using code snippets and annotated example programs. If you "learn best by doing", or just need a good starting point for a concept, this is the place for you.

  • Built with AssemblyScript
    A list of more sophisticated open source projects using AssemblyScript.

examples-15's People

Contributors

dcodeio avatar maxgraey avatar rottencandy 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.