examples icon indicating copy to clipboard operation
examples copied to clipboard

Add an [Edit in Codepen] button for all examples.

Open paganaye opened this issue 2 years ago • 5 comments

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.

paganaye avatar Sep 06 '21 00:09 paganaye

Maybe a link to the playground would be better? 🤔

miltoncandelero avatar Sep 06 '21 12:09 miltoncandelero

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.

bigtimebuddy avatar Sep 06 '21 13:09 bigtimebuddy

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.

paganaye avatar Sep 06 '21 21:09 paganaye

Posting a couple of pictures to show what it looks like: First the button: image and then in code pen image

paganaye avatar Sep 12 '21 21:09 paganaye

I have never made a public pull request. Do you need anything from me?

paganaye avatar Sep 22 '21 20:09 paganaye

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.

bigtimebuddy avatar Sep 06 '23 15:09 bigtimebuddy