All Projects → Zubnix → Skia Wasm Port

Zubnix / Skia Wasm Port

Licence: mit
Port of the Skia drawing library to wasm, for use in javascript (node & browser)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Skia Wasm Port

Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (+16.03%)
Mutual labels:  webgl, rendering, html5
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-6.11%)
Mutual labels:  webgl, rendering, html5
Webworldwind
The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.
Stars: ✭ 628 (+379.39%)
Mutual labels:  webgl, browser, html5
Helixjs
A Javascript 3D game engine.
Stars: ✭ 84 (-35.88%)
Mutual labels:  webgl, rendering
Ip Kvm Interface
DIY IP-KVM for Remote Desktop Access
Stars: ✭ 62 (-52.67%)
Mutual labels:  browser, html5
Noduino
JavaScript and Node.js Framework for controlling Arduino with HTML and WebSockets
Stars: ✭ 1,202 (+817.56%)
Mutual labels:  browser, html5
Bimserver Nodejs
OpenSouce BIMServer NodeJs
Stars: ✭ 28 (-78.63%)
Mutual labels:  webgl, html5
Phenomenon
⚡️ A fast 2kB low-level WebGL API.
Stars: ✭ 1,551 (+1083.97%)
Mutual labels:  webgl, rendering
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+7725.95%)
Mutual labels:  webgl, rendering
Percy
Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
Stars: ✭ 1,856 (+1316.79%)
Mutual labels:  wasm, browser
Foster Ts
A WebGL + TypeScript 2D Game framework with a Scene>Entity>Component model.
Stars: ✭ 112 (-14.5%)
Mutual labels:  webgl, html5
Curtainsjs
curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.
Stars: ✭ 1,039 (+693.13%)
Mutual labels:  webgl, html5
Minipaint
online image editor
Stars: ✭ 1,014 (+674.05%)
Mutual labels:  browser, html5
Front End Resource Collection
前后端日常总结
Stars: ✭ 82 (-37.4%)
Mutual labels:  browser, html5
Playcanvas Spine
Plugin component for PlayCanvas which enables support for Spine animations.
Stars: ✭ 32 (-75.57%)
Mutual labels:  webgl, html5
React 3d Viewer
A 3D model viewer component based on react.js 一个基于react.js的组件化3d模型查看工具
Stars: ✭ 100 (-23.66%)
Mutual labels:  webgl, html5
Battery.js
A tiny wrapper for the HTML5 Battery Status API.
Stars: ✭ 111 (-15.27%)
Mutual labels:  browser, html5
Phaser Kinetic Scrolling Plugin
Kinetic Scrolling plugin for Canvas using Phaser Framework
Stars: ✭ 117 (-10.69%)
Mutual labels:  webgl, html5
Wxinlineplayer
🤟Super fast H.264/H.265 FLV player
Stars: ✭ 873 (+566.41%)
Mutual labels:  webgl, wasm
Pixi.js
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
Stars: ✭ 34,982 (+26603.82%)
Mutual labels:  webgl, rendering

This project has been superseded by Google's CanvasKit

skia-wasm-port

Port of the Skia drawing library to wasm, for use in node & browser.

Skia is the drawing library used by Chrome and Firefox to provide the actual rendering of web pages.

Goal

The goal of this project is to make skia available to Javascript without the need to rely on native code. The end result would be a library able to do fast complex 2d drawings in both node & the browser.

State

Currently a limited set of skia functions are defined (wip), so the library is not very usable yet. You do get a static archive that contains all llvm bitcode needed to generate the final wasm, as well as a script to generate this llvm bitcode from Skia sources. This library will become usable as soon as enough bindings are defined.

An example is currently available under example_star.js that can be run with node. Running in the browser is also possible if the png file saving is adjusted accordingly. The example exactly matches the one found on the Skia website.

example_star.js demonstrates path rendering:

alt text

example_gradient.js demonstrates gradient shader:

alt text

example_text.js demonstrates font rendering:

alt text

WebGL

Skia WASM can also run in the browser while utilizing a WebGL accelerated back-end. This however requires some modifications to the existing Skia code, which is expected to be implemented upstream in the future. The provided Skia bitcode in this repository includes the needed WebGL changes. More information can be found here

A WebGL port of the Skia SDL example can be found in docs/webgl.js. You can try it out here. If the page fails to load, try disabling any adblocker.

Defining bindings

Bindings are defined using Embind. Currently defined bindings live in skia_bindings.cpp.

Building Bindings

This library requires git lfs

Make sure you have the emscripten sdk installed. Current code has been tested on the linux-incoming-64bit version.

Make sure you define the correct paths in build_bindings.sh and run build_bindings.sh. You should get a skia.js and a skia.wasm file. To test the build, simply run example_star.js.

Building Skia bitcode

Clone the official Skia git repository and copy over the build_skia_wasm_bitcode.sh script together with the wasm_compatible_build.patch, then simply execute bash build_skia_wasm_bitcode.sh. Make sure you define the correct paths in the build script!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].