All Projects → spritejs → Spritejs

spritejs / Spritejs

Licence: mit
A cross platform high-performance graphics system.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Spritejs

Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-96.77%)
Mutual labels:  3d, webgl, rendering, 2d, canvas
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-97.39%)
Mutual labels:  3d, webgl, rendering, canvas
Curtainsjs
curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.
Stars: ✭ 1,039 (-77.95%)
Mutual labels:  3d, webgl, webgl2, canvas
Helixjs
A Javascript 3D game engine.
Stars: ✭ 84 (-98.22%)
Mutual labels:  3d, webgl, rendering, webgl2
Three.js
JavaScript 3D Library.
Stars: ✭ 78,237 (+1560.38%)
Mutual labels:  3d, webgl, webgl2, canvas
Picogl.js
A minimal WebGL 2 rendering library
Stars: ✭ 671 (-85.76%)
Mutual labels:  3d, webgl, webgl2
Taro
A lightweight 3D game engine for the web.
Stars: ✭ 345 (-92.68%)
Mutual labels:  3d, webgl, canvas
Webglstudio.js
A full open source 3D graphics editor in the browser, with scene editor, coding pad, graph editor, virtual file system, and many features more.
Stars: ✭ 4,508 (-4.33%)
Mutual labels:  3d, webgl, rendering
Alien.js
Future web pattern
Stars: ✭ 141 (-97.01%)
Mutual labels:  3d, webgl, canvas
React Force Graph
React component for 2D, 3D, VR and AR force directed graphs
Stars: ✭ 589 (-87.5%)
Mutual labels:  3d, webgl, canvas
Earthjs
D3 Earth JS
Stars: ✭ 128 (-97.28%)
Mutual labels:  3d, webgl, canvas
Webgl2examples
Rendering algorithms implemented in raw WebGL 2.
Stars: ✭ 353 (-92.51%)
Mutual labels:  3d, webgl, webgl2
Elm 3d Scene
A high-level 3D rendering engine for Elm, with support for lighting, shadows, and realistic materials.
Stars: ✭ 167 (-96.46%)
Mutual labels:  3d, webgl, rendering
Spector.js
Explore and Troubleshoot your WebGL scenes with ease.
Stars: ✭ 599 (-87.29%)
Mutual labels:  3d, webgl, webgl2
Layaair discard
This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script,Please use https://github.com/layabox/LayaAir instead.
Stars: ✭ 1,858 (-60.57%)
Mutual labels:  3d, webgl, canvas
Babylon.js
Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
Stars: ✭ 15,479 (+228.5%)
Mutual labels:  3d, webgl, webgl2
Jeelizglassesvtowidget
JavaScript/WebGL glasses virtual try on widget. Real time webcam experience, robust to all lighting conditions, high end 3D PBR rendering, easy to integrate, fallback to server-side rendering
Stars: ✭ 134 (-97.16%)
Mutual labels:  3d, webgl, rendering
Gcanvas
A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas
Stars: ✭ 1,705 (-63.82%)
Mutual labels:  webgl, 2d, canvas
Mesh.js
A graphics system born for visualization 😘.
Stars: ✭ 156 (-96.69%)
Mutual labels:  webgl, webgl2, canvas
Melonjs
a fresh & lightweight javascript game engine
Stars: ✭ 3,721 (-21.03%)
Mutual labels:  webgl, webgl2, canvas

spritejs logo

spritejs.org

npm status build status Package Quality Maintainability License

Spritejs is a cross platform high-performance graphics system, which can render graphics on web, node, desktop applications and mini-programs.

SpritejsNext is the new version of spritejs. It is renderer agnostic enabling the same api to render in multiple contexts: webgl2, webgl, and canvas2d.

Manipulate the sprites in canvas as you do with the DOM elements.

Features

  • Manipulate the sprites element as you do with the DOM elements.
  • Rendering by WebGL2 context.
  • Multiple layers.
  • DOM Events.
  • Object Oriented Programmed Development with ES6+.
  • OffscreenCanvas and Web Worker.
  • Work with d3.
  • Server-side rendering.
  • Vue.

Quick Start

SpriteJS - spritejs.org

<script src="https://unpkg.com/spritejs@3/dist/spritejs.min.js"></script>
<div id="container" style="width:400px;height:400px"></div>
<script>
    const imgUrl = 'https://s5.ssl.qhres2.com/static/ec9f373a383d7664.svg'
    const {Scene, Sprite} = spritejs;
    const container = document.getElementById('container');
    const paper = new Scene({
      container,
      width: 400,
      height: 400,
    })

    const sprite = new Sprite(imgUrl)
    sprite.attr({
      bgcolor: '#fff',
      pos: [0, 0],
      size: [400, 400],
      borderRadius: '200'
    })

    paper.layer().appendChild(sprite)
</script>
Learn more at spritejs.org

Usage

In browser:

<script src="https://unpkg.com/spritejs@3/dist/spritejs.min.js"></script>

With Node.js:

npm install spritejs --save
import * as spritejs from 'spritejs';

3D

SpriteJSNext can render 3D elements through 3D extension library.

<script src="https://unpkg.com/spritejs@3/dist/spritejs.es.min.js"></script>
<script src="https://unpkg.com/sprite-extend-3d/dist/sprite-extend-3d.js"></script>

Or from NPM

import {Scene} from 'spritejs';
import {Cube, shaders} from 'sprite-extend-3d';

Examples

Basic

With D3

Compatible with d3.js.

3D Extension

Q-Charts

A visulization library based on spritejs.

Ecosystem & Extensions

Project Description
sprite-vue SpriteJS for Vue.js.
sprite-react Rendering spritejs elements with React.
q-charts A visulization library based on spritejs
cat-charts-vue A visulization library based on spritejs , qcharts and Vue.

Architecture

SpritejsNext provides several kinds of basic sprite elements, which can be operated on the layer like DOM elements.

架构图

Build

Build with NPM

npm run build

Build Doc

npm run build-doc

Tests

npm test

V2

SpriteJS v2.0

Compatibility

Compatible for most modern browsers.

You should import babel-polyfill for early browers(i.e. iOS 8).

Contributors

Thanks goes to these wonderful people (emoji key):


betseyliu

💻 📖

Shero0311

📖

有马

📖 💻

文蔺

💻 🐛

蔡斯杰

💻 📖

Shaofei Cheng

💻 📖

摇太阳

📖

公子

💻

justemit

💻 📖 🐛

Welefen Lee

💻

YUPENG12138

📖

xinde

🐛

ggvswild

🐛

liulinboyi

💻

Lulzx

💻

asidar

💻

alphatr

💻

W-Qing

📖

Credits and Acknowledgements

  • svg-path-contours Approximates an SVG path into a discrete list of 2D contours (polylines).

  • extrude-polyline Extrudes a 2D polyline with a given line thickness and the desired join/cap types.

  • triangulate-contours Triangulates a series of contours using Tess2.js.

  • OGL OGL is a small, effective WebGL library aimed at developers who like minimal layers of abstraction, and are comfortable creating their own shaders.

License

MIT

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