Bindings & samples for Pixi.js related libraries including:
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 underpublic/img/emitter.json
to see what you can do with particles.
We also support Pixi-Sound, the official pixi sound API.
Go to the
src/sound
folder to see a sample in action.
We support Animejs for all your tweenings!
Go to the
src/animejs
folder to see a sample in action.
We've got you covered with 19 straight to the point samples which are either ports from the PixiJS official ones or original ones.
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
Learn how to make a complete mini game:
Source code can be found here
yarn install
dotnet restore
cd src
dotnet fable yarn-start
localhost:8080/[EXAMPLE]
(e.g. http://localhost:8080/basic
) or just select a sample in the list at http://localhost:8080/
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
.
public/samples.json5
: id, title and descriptionsrc
directory and another one to public
. The first one will contain the F# (and maybe JS) source files, while the second contains the public assets for the sample (like index.html, images, etc).Fable.Samples.sln
solution: dotnet sln add src/mySample/mySample.fsproj
. Important: the name of your fsproj file must be the same you use for your folder to allow for automatic build.(folder greatProject
-> greatProject.fsproj
)dotnet restore
Pixi requires to set additional externals to work with webpack. Like this:
externals: {
"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.