Skip to content

Commit

Permalink
p5 1.8.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
nakednous committed Nov 3, 2023
1 parent c790895 commit daf8722
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions content/docs/shortcodes/p5/div.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ p5 `div` [shortcodes](https://gohugo.io/content-management/shortcodes/) embed [p
# p5-div

```html
{{</* p5-div ver="1.7.0" sketch="/path/to/sketch.js" lib1="https://cdntolib1/lib1.js" */>}}
{{</* p5-div ver="1.8.0" sketch="/path/to/sketch.js" lib1="https://cdntolib1/lib1.js" */>}}
```

All parameters are optional but `sketch`. Default values are shown in the above snippet but for `libs*`. Up to `lib5` libs may be specified.
Expand All @@ -27,7 +27,7 @@ Look at [this](https://mathworld.wolfram.com/ScintillatingGridIllusion.html) and
# p5-instance-div

```html
{{</* p5-instance-div id="sketchid" ver="1.7.0" lib1="https://cdntolib1/lib1.js" >}}
{{</* p5-instance-div id="sketchid" ver="1.8.0" lib1="https://cdntolib1/lib1.js" >}}
// inline sketch code
{{< /p5-instance-div */>}}
```
Expand Down
12 changes: 6 additions & 6 deletions content/docs/shortcodes/p5/iframe.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ p5 `iframe` [shortcodes](https://gohugo.io/content-management/shortcodes/) embed
# p5-iframe

```html
{{</* p5-iframe ver="1.7.0" sketch="/path/to/sketch.js" lib1="https://cdntolib1/lib1.js" width="800" height="600" */>}}
{{</* p5-iframe ver="1.8.0" sketch="/path/to/sketch.js" lib1="https://cdntolib1/lib1.js" width="800" height="600" */>}}
```

All parameters are optional but `sketch`. Default values are shown in the above snippet but for `libs*`. Up to `lib5` libs may be specified.
Expand Down Expand Up @@ -51,7 +51,7 @@ Example took from the [p5 examples](https://p5js.org/examples/sound-sound-effect
# p5-global-iframe

```html
{{</* p5-global-iframe id="sketchid" ver="1.7.0" lib1="https://cdntolib1/lib1.js" width="800" height="600" >}}
{{</* p5-global-iframe id="sketchid" ver="1.8.0" lib1="https://cdntolib1/lib1.js" width="800" height="600" >}}
// inline sketch code
{{< /p5-global-iframe */>}}
```
Expand Down Expand Up @@ -146,18 +146,18 @@ Look at [this reference](https://michaelbach.de/ot/mot-breathingSquare/) for an
The `p5-widget` [shortcode](https://gohugo.io/content-management/shortcodes/) embed [p5.js](https://p5js.org/) code within an [p5-widget](https://toolness.github.io/p5.js-widget/).

```html
{{</* p5-widget autoplay=true height="400" width="400" ver="1.7.0" >}}
{{</* p5-widget autoplay=true height="400" width="400" ver="1.8.0" >}}
// inline sketch code
{{< /p5-widget */>}}
```

All parameters are optional. Default `ver` is `1.7.0`. For example:
All parameters are optional. Default `ver` is `1.8.0`. For example:

## Widget example

{{< details title="p5-widget markdown" open=false >}}
{{< highlight html >}}
{{</* p5-widget autoplay=true height="400" width="400" ver="1.7.0" >}}
{{</* p5-widget autoplay=true height="400" width="400" ver="1.8.0" >}}
function setup() {
createCanvas(300, 300);
}
Expand All @@ -169,7 +169,7 @@ function draw() {
{{< /highlight >}}
{{< /details >}}

{{< p5-widget autoplay=true height="400" width="400" ver="1.7.0" >}}
{{< p5-widget autoplay=true height="400" width="400" ver="1.8.0" >}}
function setup() {
createCanvas(300, 300);
}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/p5-div.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $defver := `1.7.0` }}
{{ $defver := `1.8.0` }}
{{ $sketch := .Get `sketch` }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/p5-global-iframe.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $defver := `1.7.0` }}
{{ $defver := `1.8.0` }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
{{ $lib3 := .Get `lib3` }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/p5-iframe.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $defver := `1.7.0` }}
{{ $defver := `1.8.0` }}
{{ $sketch := .Get `sketch` }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/p5-instance-div.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $id := .Get `id` }}
{{ $defver := `1.7.0` }}
{{ $defver := `1.8.0` }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
{{ $lib3 := .Get `lib3` }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/p5-widget.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $defver := `1.7.0` }}
{{ $defver := `1.8.0` }}

<script src="//toolness.github.io/p5.js-widget/p5-widget.js"></script>
{{ with .Get "lib1" }}<script src="{{ . }}"></script>{{ end }}
Expand Down

0 comments on commit daf8722

Please sign in to comment.