All Projects → Prozi → pixi-shim

Prozi / pixi-shim

Licence: other
PIXI.js Back-End "shim". For mocking Canvas in Node.js with ❤️

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pixi-shim

pixi-omber-gltf2-vector
Pixi.js library for using vector art created in Omber that's saved in glTF 2.0 format
Stars: ✭ 13 (-71.11%)
Mutual labels:  pixijs, pixi
D Zone
An ambient life simulation driven by user activity within a Discord server
Stars: ✭ 466 (+935.56%)
Mutual labels:  pixijs, pixi
pixijs-ts-boilerplate
Just another PixiJS Typescript Boilerplate with some basic functionalities
Stars: ✭ 54 (+20%)
Mutual labels:  pixijs, pixi
pixi-miniprogram
一个可运行于微信小程序的PIXI引擎,通过模拟window环境,有些功能小程序无法模拟,就直接修改了PIXI引擎代码,最终使得PIXI引擎正常运行在小程序上
Stars: ✭ 72 (+60%)
Mutual labels:  pixijs, pixi
Pixi Seed
Pixi.js project seed with ES6 and webpack
Stars: ✭ 149 (+231.11%)
Mutual labels:  pixijs, pixi
Pixi Live2d
Display live2D model as a sprite in pixi.js.
Stars: ✭ 537 (+1093.33%)
Mutual labels:  pixijs, pixi
Leaflet.pixioverlay
Bring Pixi.js power to Leaflet maps
Stars: ✭ 264 (+486.67%)
Mutual labels:  pixijs, pixi
Gown.js
UI system for pixi.js inspired by feathers-ui
Stars: ✭ 195 (+333.33%)
Mutual labels:  pixijs, pixi
Pixi.js
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
Stars: ✭ 34,982 (+77637.78%)
Mutual labels:  pixijs, pixi
React Pixi Fiber
Write PixiJS applications using React declarative style.
Stars: ✭ 568 (+1162.22%)
Mutual labels:  pixijs, pixi
Pixi Haxe
Externs of Pixi.js for Haxe
Stars: ✭ 175 (+288.89%)
Mutual labels:  pixijs, pixi
Pixi Sound
WebAudio API playback library, with filters. Modern audio playback for modern browsers.
Stars: ✭ 201 (+346.67%)
Mutual labels:  pixijs, pixi
TezActionSheet
Custom singleton actionSheet with block completion.
Stars: ✭ 18 (-60%)
Mutual labels:  singleton
data examples
An example app showing different ways to pass to and share data with widgets and pages.
Stars: ✭ 56 (+24.44%)
Mutual labels:  singleton
hookleton
globalize your React Hooks without fear using the Hookleton Pattern
Stars: ✭ 39 (-13.33%)
Mutual labels:  singleton
dotnet-design-patterns-samples
The samples of .NET design patterns
Stars: ✭ 25 (-44.44%)
Mutual labels:  singleton
design-pattern
🌴 Detail design pattern and give many demos in Java.
Stars: ✭ 28 (-37.78%)
Mutual labels:  singleton
particle-emitter
A particle system for PixiJS
Stars: ✭ 709 (+1475.56%)
Mutual labels:  pixijs
patterns
Good practices to create code in Java, open to other languages. ⚡
Stars: ✭ 14 (-68.89%)
Mutual labels:  singleton
tsdi
Dependency Injection container (IoC) for TypeScript
Stars: ✭ 50 (+11.11%)
Mutual labels:  singleton

PIXI-SHIM

PIXI.js Back-End "shim". For mocking Canvas in Node.js with ❤️

https://badge.fury.io/js/pixi-shim https://circleci.com/gh/Prozi/pixi-shim https://snyk.io/test/github/Prozi/pixi-shim

Purpouse

  1. Designed for node - it makes you run universal javascript code that is designed with pixi.js on node.js environment

  2. It is very lazy - meaning it won't load anything twice and won't attempt to load it if it's not required

  3. It wont even load itself twice - while including multiple instances of pixi.js can cause Cannot redefine property isJson Error

Lazy loading

with lazy polyfill of

  • DOM
  • Window
  • Canvas
  • PIXI
  • other polyfills (requestAnimationFrame, etc.)

Usage

require("pixi-shim");

Usage if your game/app is feature-heavy:

and it still doesn't work, you might need to

$ yarn add pixi.js-legacy

and then do

require("pixi-shim");
require("pixi.js-legacy");

Installation

$ yarn add pixi-shim

DEBUG

environment flag DEBUG enables DEBUG with progress on which polyfill have been loaded

$ DEBUG=pixi-shim node -r pixi-shim yourscript.js

Canvas.toDataURL()

a bit hackish but works, see:

Tests

Total test suites: 2
Passed test suites: 2
Done in 4.35s.
ites: 0

Total tests: 10
Passed tests: 10
Failed tests: 0

Test Suite - /home/pietal/projects/pixi-shim/index.spec.js
passed - GIVEN pixi-shim THEN requiring it doesnt throw error
passed - GIVEN pixi-shim THEN new PIXI.Application doesnt throw error
passed - GIVEN pixi-shim THEN new PIXI.Sprite from base64 image does *not* work
passed - GIVEN pixi-shim THEN toDataURL does *not* yet work
passed - GIVEN pixi-shim THEN normal PIXI gameLoop works

Test Suite - /home/pietal/projects/pixi-shim/pixi.spec.js
passed - GIVEN pixi-shim/pixi THEN requiring it doesnt throw error
passed - GIVEN pixi-shim/pixi THEN new PIXI.Application doesnt throw error
passed - GIVEN pixi-shim/pixi THEN new PIXI.Sprite from base64 image *should* work
passed - GIVEN pixi-shim/pixi THEN toDataURL *should* work with pixi.js
passed - GIVEN pixi-shim/pixi THEN normal PIXI gameLoop works

https://app.circleci.com/pipelines/github/Prozi/pixi-shim

License

MIT (c) 2020-2022 Jacek Pietal

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