Skip to content

Commit

Permalink
p5 update (1.9.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakednous committed May 30, 2024
1 parent 816b280 commit ab3fbdb
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 30 deletions.
25 changes: 16 additions & 9 deletions layouts/shortcodes/p5-div.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
{{ $defver := `1.9.2` }}
{{ $defver := `1.9.4` }}
{{ $sketch := .Get `sketch` }}
{{ $sound := default "false" (.Get "sound") | lower }}
{{ $treegl := default "false" (.Get "treegl") | lower }}
{{ $platonic := default "false" (.Get "platonic") | lower }}
{{ $quadrille := default "false" (.Get "quadrille") | lower }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
{{ $lib3 := .Get `lib3` }}
{{ $lib4 := .Get `lib4` }}
{{ $lib5 := .Get `lib5` }}

<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js></script>
<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js></script>
{{ if isset .Params "lib1" }} <script src={{ $lib1 }}></script> {{ end }}
{{ if isset .Params "lib2" }} <script src={{ $lib2 }}></script> {{ end }}
{{ if isset .Params "lib3" }} <script src={{ $lib3 }}></script> {{ end }}
{{ if isset .Params "lib4" }} <script src={{ $lib4 }}></script> {{ end }}
{{ if isset .Params "lib5" }} <script src={{ $lib5 }}></script> {{ end }}
<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js'></script>
{{ if eq $sound "true" }}<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js'></script>{{ end }}
{{ if eq $treegl "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.treegl/p5.treegl.min.js'></script>{{ end }}
{{ if eq $platonic "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.platonic/p5.platonic.min.js'></script>{{ end }}
{{ if eq $quadrille "true" }}<script src='https://cdn.jsdelivr.net/gh/objetos/p5.quadrille.js/p5.quadrille.min.js'></script>{{ end }}
{{ if isset .Params "lib1" }}<script src={{ $lib1 }}></script>{{ end }}
{{ if isset .Params "lib2" }}<script src={{ $lib2 }}></script>{{ end }}
{{ if isset .Params "lib3" }}<script src={{ $lib3 }}></script>{{ end }}
{{ if isset .Params "lib4" }}<script src={{ $lib4 }}></script>{{ end }}
{{ if isset .Params "lib5" }}<script src={{ $lib5 }}></script>{{ end }}
<script src={{ $sketch }}></script>

<div id="{{ strings.TrimSuffix ".js" (path.Base $sketch) }}"></div>
<div id="{{ strings.TrimSuffix ".js" (path.Base $sketch) }}"></div>
13 changes: 10 additions & 3 deletions layouts/shortcodes/p5-global-iframe.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{ $defver := `1.9.2` }}
{{ $defver := `1.9.4` }}
{{ $sound := default "false" (.Get "sound") | lower }}
{{ $treegl := default "false" (.Get "treegl") | lower }}
{{ $platonic := default "false" (.Get "platonic") | lower }}
{{ $quadrille := default "false" (.Get "quadrille") | lower }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
{{ $lib3 := .Get `lib3` }}
Expand All @@ -12,8 +16,11 @@
<!DOCTYPE html>
<html>
<head>
<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js></script>
<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js'></script>
{{ if eq $sound "true" }}<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js'></script>{{ end }}
{{ if eq $treegl "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.treegl/p5.treegl.min.js'></script>{{ end }}
{{ if eq $platonic "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.platonic/p5.platonic.min.js'></script>{{ end }}
{{ if eq $quadrille "true" }}<script src='https://cdn.jsdelivr.net/gh/objetos/p5.quadrille.js/p5.quadrille.min.js'></script>{{ end }}
{{ if isset .Params "lib1" }} <script src={{ $lib1 }}></script> {{ end }}
{{ if isset .Params "lib2" }} <script src={{ $lib2 }}></script> {{ end }}
{{ if isset .Params "lib3" }} <script src={{ $lib3 }}></script> {{ end }}
Expand Down
23 changes: 15 additions & 8 deletions layouts/shortcodes/p5-iframe.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{ $defver := `1.9.2` }}
{{ $defver := `1.9.4` }}
{{ $sketch := .Get `sketch` }}
{{ $sound := default "false" (.Get "sound") | lower }}
{{ $treegl := default "false" (.Get "treegl") | lower }}
{{ $platonic := default "false" (.Get "platonic") | lower }}
{{ $quadrille := default "false" (.Get "quadrille") | lower }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
{{ $lib3 := .Get `lib3` }}
Expand All @@ -13,13 +17,16 @@
<!DOCTYPE html>
<html>
<head>
<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js></script>
<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js></script>
{{ if isset .Params "lib1" }} <script src={{ $lib1 }}></script> {{ end }}
{{ if isset .Params "lib2" }} <script src={{ $lib2 }}></script> {{ end }}
{{ if isset .Params "lib3" }} <script src={{ $lib3 }}></script> {{ end }}
{{ if isset .Params "lib4" }} <script src={{ $lib4 }}></script> {{ end }}
{{ if isset .Params "lib5" }} <script src={{ $lib5 }}></script> {{ end }}
<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js'></script>
{{ if eq $sound "true" }}<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js'></script>{{ end }}
{{ if eq $treegl "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.treegl/p5.treegl.min.js'></script>{{ end }}
{{ if eq $platonic "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.platonic/p5.platonic.min.js'></script>{{ end }}
{{ if eq $quadrille "true" }}<script src='https://cdn.jsdelivr.net/gh/objetos/p5.quadrille.js/p5.quadrille.min.js'></script>{{ end }}
{{ if isset .Params "lib1" }}<script src={{ $lib1 }}></script>{{ end }}
{{ if isset .Params "lib2" }}<script src={{ $lib2 }}></script>{{ end }}
{{ if isset .Params "lib3" }}<script src={{ $lib3 }}></script>{{ end }}
{{ if isset .Params "lib4" }}<script src={{ $lib4 }}></script>{{ end }}
{{ if isset .Params "lib5" }}<script src={{ $lib5 }}></script>{{ end }}
<script src={{ $sketch }}></script>
</head>
<body>
Expand Down
23 changes: 15 additions & 8 deletions layouts/shortcodes/p5-instance-div.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
{{ $id := .Get `id` }}
{{ $defver := `1.9.2` }}
{{ $defver := `1.9.4` }}
{{ $sound := default "false" (.Get "sound") | lower }}
{{ $treegl := default "false" (.Get "treegl") | lower }}
{{ $platonic := default "false" (.Get "platonic") | lower }}
{{ $quadrille := default "false" (.Get "quadrille") | lower }}
{{ $lib1 := .Get `lib1` }}
{{ $lib2 := .Get `lib2` }}
{{ $lib3 := .Get `lib3` }}
{{ $lib4 := .Get `lib4` }}
{{ $lib5 := .Get `lib5` }}

<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js></script>
<script src=https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js></script>
{{ if isset .Params "lib1" }} <script src={{ $lib1 }}></script> {{ end }}
{{ if isset .Params "lib2" }} <script src={{ $lib2 }}></script> {{ end }}
{{ if isset .Params "lib3" }} <script src={{ $lib3 }}></script> {{ end }}
{{ if isset .Params "lib4" }} <script src={{ $lib4 }}></script> {{ end }}
{{ if isset .Params "lib5" }} <script src={{ $lib5 }}></script> {{ end }}
<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/p5.min.js'></script>
{{ if eq $sound "true" }}<script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/{{ default $defver (.Get `ver`) }}/addons/p5.sound.min.js'></script>{{ end }}
{{ if eq $treegl "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.treegl/p5.treegl.min.js'></script>{{ end }}
{{ if eq $platonic "true" }}<script src='https://cdn.jsdelivr.net/gh/VisualComputing/p5.platonic/p5.platonic.min.js'></script>{{ end }}
{{ if eq $quadrille "true" }}<script src='https://cdn.jsdelivr.net/gh/objetos/p5.quadrille.js/p5.quadrille.min.js'></script>{{ end }}
{{ if isset .Params "lib1" }}<script src={{ $lib1 }}></script>{{ end }}
{{ if isset .Params "lib2" }}<script src={{ $lib2 }}></script>{{ end }}
{{ if isset .Params "lib3" }}<script src={{ $lib3 }}></script>{{ end }}
{{ if isset .Params "lib4" }}<script src={{ $lib4 }}></script>{{ end }}
{{ if isset .Params "lib5" }}<script src={{ $lib5 }}></script>{{ end }}

<div id="{{ $id }}"></div>
<script>
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.9.2` }}
{{ $defver := `1.9.4` }}

<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 ab3fbdb

Please sign in to comment.