fable-compiler/samples-pixi

Name: samples-pixi

Owner: Fable

Description: Pixi samples for Fable

Created: 2017-09-28 11:55:59.0

Updated: 2017-12-29 12:29:47.0

Pushed: 2017-11-20 23:35:13.0

Homepage: http://fable.io/samples-pixi/

Size: 9294

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Samples-pixi

Libraries

Bindings & samples for Pixi.js related libraries including:

Pixi-particles

Pixi-Particles

Pixi-particles's really easy to use and there's a great online editor to configure your particle effects easily

Go to the src/particles folder to have a go. And make changes to the json located under public/img/emitter.json to see what you can do with particles.

Pixi-Sound

We also support Pixi-Sound, the official pixi sound API.

Go to the src/sound folder to see a sample in action.

Animatejs Tweening

Animejs

We support Animejs for all your tweenings!

Go to the src/animejs folder to see a sample in action.

Samples

We've got you covered with 19 straight to the point samples which are either ports from the PixiJS official ones or original ones.

Original samples
Dragon Particle

DragonParticle

Learn how to move a particle emitter around som SVG shape like our Fable Dragon!

You'll know how to:

Source code can be found here

Game of Cogs

Game of cogs

Learn how to make a complete mini game:

Source code can be found here

How to build and run the samples

Any modification you do to the F# code will be reflected in the web page after saving. If you want to write JS files to disk instead of using the development server, run dotnet fable yarn-build.

How to add a new sample

Webpack configuration

Pixi requires to set additional externals to work with webpack. Like this:

ternals: {
"PIXI": "PIXI",
"PIXI.extras": "PIXI.extras",
"PIXI.loaders": "PIXI.loaders",
"PIXI.settings": "PIXI.settings",
"PIXI.filters": "PIXI.filters",
"PIXI.interaction": "PIXI.interaction",
"PIXI.mesh": "PIXI.mesh",
"PIXI.particles": "PIXI.particles",
"PIXI.sound": "PIXI.sound"

Would you stumble on errors like this: Module not found: Error: Can't resolve 'PIXI.xxx' in ..., just add the module to the Webpack config.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.