Skip to content

Commit

Permalink
1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed May 29, 2023
1 parent 9cede73 commit 4604734
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mie is great for embedding p5.js sketches on your own website.

Example use: https://p5play.org/learn/sprite.html
Demo: https://p5play.org/learn/sprite.html

## Usage

Expand All @@ -15,6 +15,12 @@ Load the Ace editor and mie in your HTML:
<script src="https://quinton-ashley.github.io/mie/mie.js"></script>
```

Or use [mie](https://www.npmjs.com/package/@qashto/mie) via npm:

```bash
npm i @qashto/mie
```

Add p5.js scripts to your page and they will be embedded in an editor with an instanced preview of the sketch auto-playing by default.

```html
Expand Down
5 changes: 4 additions & 1 deletion mie.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ mie.load = () => {
logo.className = 'mie-logo';
title.append(logo);
let span = document.createElement('span');
span.innerHTML += props.name || props.title || 'sketch';
let name;
if (props.id) name = props.id.replace(/-/g, ' ');
else name = props.name || props.title || 'sketch';
span.innerHTML += name;
title.append(span);
mini.append(title);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "quinton-ashley",
"name": "@qashto/mie",
"version": "1.0.5",
"version": "1.0.6",
"description": "mini editor for embedding p5.js sketches",
"license": "GPL-3.0-only",
"main": "mie.js",
Expand Down

0 comments on commit 4604734

Please sign in to comment.