# spriteJS **Repository Path**: wll_122/spriteJS ## Basic Information - **Project Name**: spriteJS - **Description**: SpriteJS 是一款由 360 奇舞团开源的跨终端 canvas/webgl 绘图库,可以基于 canvas/webgl 快速绘制结构化 UI 、动画和交互效果,并发布到任何拥有 canvas 环境的平台上(比如浏览器、小程序和 node ) - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 50 - **Created**: 2021-03-17 - **Last Updated**: 2022-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

spritejs logo

spritejs.org

[![npm status](https://img.shields.io/npm/v/spritejs.svg)](https://www.npmjs.org/package/spritejs) [![build status](https://api.travis-ci.org/spritejs/spritejs.svg?branch=master)](https://travis-ci.org/spritejs/spritejs) [![dependency status](https://david-dm.org/spritejs/spritejs.svg)](https://david-dm.org/spritejs/spritejs) [![Package Quality](http://npm.packagequality.com/shield/spritejs.svg?v=3)](http://packagequality.com/#?package=spritejs) [![Maintainability](https://api.codeclimate.com/v1/badges/8327f502ee8ba003c6b8/maintainability)](https://codeclimate.com/github/spritejs/spritejs/maintainability) [![License](https://img.shields.io/npm/l/spritejs.svg)](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](https://next.spritejs.org/#/en/guide/worker). - Work with [d3](https://github.com/d3/d3). - [Server-side rendering](https://next.spritejs.org/#/en/guide/platforms). - [Vue](http://vue.spritejs.org). ## Quick Start **SpriteJS** - spritejs.org ```html
```
Learn more at spritejs.org
## Usage In browser: ```html ``` With Node.js: ```bash npm install spritejs --save ``` ```js import * as spritejs from 'spritejs'; ``` ## 3D SpriteJSNext can render 3D elements through [3D extension library](https://github.com/spritejs/sprite-extend-3d). ```html ``` Or from NPM ```js import {Scene} from 'spritejs'; import {Cube, shaders} from 'sprite-extend-3d'; ``` ## Examples ### Basic - [Overview](http://spritejs.org/demo/) - [Sprites](http://spritejs.org/demo/#basic_sprites) - [Path & Group](http://spritejs.org/demo/#path_groups) - [Labels](http://spritejs.org/demo/#labels) - [Button](http://spritejs.org/demo/#button) - [Transforms](http://spritejs.org/demo/#transforms) - [Events](http://spritejs.org/demo/#events) - [Filters](http://spritejs.org/demo/#filters) - [Animations](http://spritejs.org/demo/#animations) - [SVG Paths](http://spritejs.org/demo/#svg_path) - [Offset API](http://spritejs.org/demo/#offset_api) ### With D3 Compatible with [d3.js](https://github.com/d3/d3). - [Bar Graph](http://spritejs.org/demo/#/d3/bar) - [Hierarchy](http://spritejs.org/demo/#/d3/hierarchy) - [Map](http://spritejs.org/demo/#/d3/map) - [Force Links](http://spritejs.org/demo/#/d3/links) ### 3D Extension - [3D Cube](http://spritejs.org/demo/#/3d/basic) - [Camera](http://spritejs.org/demo/#/3d/camera2) - [Cube Map](http://spritejs.org/demo/#/3d/cubemap) - [Physically Based Rendering](http://spritejs.org/demo/#/3d/pbr) - [Geometry](http://spritejs.org/demo/#/3d/geometry) - [Geometry Model](http://spritejs.org/demo/#/3d/geometry3) - [Model & Texture](http://spritejs.org/demo/#/3d/model_texture) - [Groups](http://spritejs.org/demo/#/3d/group3) - [Skydom](http://spritejs.org/demo/#/3d/skydom) - [Video](http://spritejs.org/demo/#/3d/video) - [Shadow](http://spritejs.org/demo/#/3d/shadow) - [Post channel](http://spritejs.org/demo/#/3d/post) - [GPGPU](http://spritejs.org/demo/#/3d/gpgpu) ### [Q-Charts](https://github.com/spritejs/q-charts) A visulization library based on spritejs. - [QCharts basic](http://spritejs.org/demo/#/qchart/basic) - [Lines](http://spritejs.org/demo/#/qchart/double_line) - [Smooth Lines](http://spritejs.org/demo/#/qchart/smooth_line) - [Lines & Bars](http://spritejs.org/demo/#/qchart/multicharts) - [Area Chart](http://spritejs.org/demo/#/qchart/area) - [Pie Chart](http://spritejs.org/demo/#/qchart/pie) - [Rose Chart](http://spritejs.org/demo/#/qchart/rose) - [Radar Chart](http://spritejs.org/demo/#/qchart/radar) - [Bubble Chart](http://spritejs.org/demo/#/qchart/bubble) ### Ecosystem & Extensions | **Project** | **Description** | | ------------------------------- | ----------------------------------- | | [sprite-vue](https://github.com/spritejs/sprite-vue)| SpriteJS for Vue.js. | | [sprite-react](https://github.com/spritejs/sprite-react)| Rendering spritejs elements with React. | | [q-charts](https://github.com/spritejs/q-charts) | A visulization library based on spritejs | | [cat-charts-vue](https://github.com/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. ![架构图](https://s0.ssl.qhres.com/static/fe2ee3b6fd1aa59f.svg) ### Build Build with NPM ```bash npm run build ``` Build Doc ```bash npm run build-doc ``` ### Tests ```bash npm test ``` # V2 [SpriteJS v2.0](https://github.com/spritejs/spritejs/tree/v2) # Compatibility Compatible for most modern browsers. You should import [babel-polyfill](https://cdn.baomitu.com/babel-polyfill) for early browers(i.e. iOS 8). ## Contributors Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): | | | | | | | | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | [
betseyliu](https://github.com/betseyliu)
[💻](https://github.com/spritejs/spritejs/commits?author=betseyliu "Code") [📖](https://github.com/spritejs/spritejs/commits?author=betseyliu "Documentation") | [
Shero0311](https://github.com/Shero0311)
[📖](https://github.com/spritejs/spritejs/commits?author=Shero0311 "Documentation") | [
有马](https://github.com/makeco)
[📖](https://github.com/spritejs/spritejs/commits?author=makeco "Documentation") [💻](https://github.com/spritejs/spritejs/commit/e2ef39bafd81ee09494f5ebbaf0f8319dbd85122 "Code")| [
文蔺](https://github.com/AngusFu)
[💻](https://github.com/spritejs/spritejs/commits?author=AngusFu "Code") [🐛](https://github.com/spritejs/spritejs/issues/30 "Bug reports") | [
蔡斯杰](https://github.com/SijieCai)
[💻](https://github.com/spritejs/sprite-core/commits?author=SijieCai "Code") [📖](https://github.com/spritejs/spritejs/commits?author=SijieCai "Documentation") | [
Shaofei Cheng](https://github.com/wintercn)
[💻](https://github.com/spritejs/sprite-core/commits?author=wintercn "Code") [📖](https://github.com/spritejs/spritejs/commits?author=wintercn "Documentation") | [
摇太阳](https://github.com/yaotaiyang)
[📖](https://github.com/spritejs/spritejs/commits?author=yaotaiyang "Documentation") | [
公子](https://github.com/lizheming)
[💻](https://github.com/spritejs/sprite-core/commits?author=lizheming "Code") | [
justemit](https://github.com/justemit)
[💻](https://github.com/spritejs/sprite-extend-shapes/commits?author=justemit "Code") [📖](https://github.com/spritejs/sprite-extend-shapes/commits?author=justemit "Documentation") [🐛](https://github.com/spritejs/sprite-core/issues/34 "Bug reports") | [
Welefen Lee](https://github.com/welefen)
[💻](https://github.com/spritejs/sprite-flex-layout "Code") | [
YUPENG12138](https://github.com/YUPENG12138)
[📖](https://github.com/spritejs/spritejs/issues/52 "Documentation")| [
xinde](https://github.com/xinde)
[🐛](https://github.com/spritejs/spritejs/issues/59 "Bug reports")| [
ggvswild](https://github.com/ggvswild)
[🐛](https://github.com/spritejs/spritejs/issues/70 "Bug reports")| [
liulinboyi](https://github.com/liulinboyi)
[💻](https://github.com/spritejs/spritejs/commits?author=liulinboyi "Code")| | [
Lulzx](https://github.com/Lulzx)
[💻](https://github.com/spritejs/sprite-core/commits?author=Lulzx "Code") | [
asidar](https://github.com/asidar)
[💻](https://github.com/spritejs/sprite-extend-shapes/commits?author=asidar "Code") | [
alphatr](https://github.com/alphatr)
[💻](https://github.com/spritejs/sprite-extend-shapes/commits?author=alphatr "Code") | [
W-Qing](https://github.com/W-Qing)
[📖](https://github.com/spritejs/spritejs/commits?author=W-Qing "Documentation") | ## Credits and Acknowledgements - [svg-path-contours](https://github.com/mattdesl/svg-path-contours) Approximates an SVG path into a discrete list of 2D contours (polylines). - [extrude-polyline](https://github.com/mattdesl/extrude-polyline) Extrudes a 2D polyline with a given line thickness and the desired join/cap types. - [triangulate-contours](https://github.com/mattdesl/triangulate-contours) Triangulates a series of contours using Tess2.js. - [OGL](https://github.com/oframe/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](LICENSE)