examples
examples copied to clipboard
Add an [Edit in Codepen] button for all examples.
The editor in the pixijs.io doesn't allow the user to save its modifications. Writing a pen from scratch is a bit difficult because of the dependencies. So in the PR I add a button [Edit in codepen] on all examples after the source just next to the download button.
Here is an example of a generated pen: https://codepen.io/paganaye/pen/mdwrZbY?editors=001
The pen is quite rich, it contains
- A title contains the section and the example name.
- a link to the original page.
- plugin and picture dependencies
- tags for PixiJs and used plugins
Also also added an npm 'dev-server' script entry to start a dev server for convenience.
Maybe a link to the playground would be better? 🤔
I prefer codepen and jsfiddle over pixiplayground. The latter does not have auth so playgrounds are mutable by other people. In general, would discourage this for most things other than throw away experiments.
Maybe a link to the playground would be better?
It would be good too. Codepen or JsFiddle are used a lot. The advantage is the free advertising. My guess is that it would generate more forked examples and showcase the PixiJS project to more people.
Posting a couple of pictures to show what it looks like:
First the button:
and then in code pen
I have never made a public pull request. Do you need anything from me?
I'm going to close this PR. We are going to archive this repo and redirect people to https://pixijs.com/examples. Since we are now integrated with CodeSandbox on the main site, we don't think we need an explicit button.
Thanks for the awesome suggestion.