Update/Updated Generative Design Examples (#774)
* replaced () with {} to fix implicit return error * added first version of fetching generative-design examples * ignore local testing files * formatting * updated examples-gg-latest * updated examples-gg-latest.js - data files not served via rawgit - hallelujah! - added jquery * updated p5 version * refactoring and code cleanup * added comment * comment out link to svgFiles - unused * moved commented code * fixed conflicts * linted examples-gg-latest * changed branch ref to master * rm spaces * updated url links with https for jquery and set branch to dev-updates for testing * changed branched ref to master * removed console.log of response.data to prevent logging user data to console * fixed linting error * updated p5 version from 0.7.1 to 0.7.2
This commit is contained in:
parent
b68e3a79fd
commit
5bcb5119e3
1 changed files with 9 additions and 12 deletions
|
@ -21,16 +21,13 @@ const defaultHTML =
|
||||||
`<!DOCTYPE html>
|
`<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.dom.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.sound.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.sound.min.js"></script>
|
||||||
|
|
||||||
<!-- Generative Design Dependencies here -->
|
<!-- Generative Design Dependencies here -->
|
||||||
<!-- GG Bundled -->
|
<!-- GG Bundled -->
|
||||||
<script src=
|
<script src="https://raw.githack.com/generative-design/Code-Package-p5.js/${branchName}/libraries/gg-dep-bundle/gg-dep-bundle.js"></script>
|
||||||
"https://rawgit.com/generative-design/Code-Package-p5.js/${branchName}/libraries/gg-dep-bundle/gg-dep-bundle.js">
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Opentype -->
|
<!-- Opentype -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/opentype.js/0.7.3/opentype.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/opentype.js/0.7.3/opentype.min.js"></script>
|
||||||
<!-- Rita -->
|
<!-- Rita -->
|
||||||
|
@ -38,7 +35,7 @@ const defaultHTML =
|
||||||
<!-- Chroma -->
|
<!-- Chroma -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.6/chroma.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.6/chroma.min.js"></script>
|
||||||
<!-- Jquery -->
|
<!-- Jquery -->
|
||||||
<script src="http://code.jquery.com/jquery-3.3.1.min.js"
|
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
@ -432,10 +429,10 @@ function getAllSketchContent(newProjectList) {
|
||||||
console.log(sketchFile.name);
|
console.log(sketchFile.name);
|
||||||
// https://cdn.rawgit.com/opensourcedesign/fonts/2f220059/gnu-freefont_freesans/FreeSans.otf?raw=true
|
// https://cdn.rawgit.com/opensourcedesign/fonts/2f220059/gnu-freefont_freesans/FreeSans.otf?raw=true
|
||||||
// "https://raw.githubusercontent.com/generative-design/Code-Package-p5.js/gg4editor/01_P/P_3_2_1_01/data/FreeSans.otf",
|
// "https://raw.githubusercontent.com/generative-design/Code-Package-p5.js/gg4editor/01_P/P_3_2_1_01/data/FreeSans.otf",
|
||||||
const rawGitRef = `https://cdn.rawgit.com/${newProject.files[i].url.split('.com/')[1]}`;
|
const rawGitRef = `https://raw.githack.com/${newProject.files[i].url.split('.com/')[1]}`;
|
||||||
sketchFile.content = rawGitRef;
|
sketchFile.content = rawGitRef;
|
||||||
sketchFile.url = rawGitRef;
|
sketchFile.url = rawGitRef;
|
||||||
|
// https://raw.githack.com/generative-design/Code-Package-p5.js/master/libraries/gg-dep-bundle/gg-dep-bundle.js
|
||||||
// replace ref in sketch.js ==> should serve from the file?
|
// replace ref in sketch.js ==> should serve from the file?
|
||||||
// newProject.files[1].content = newProject.files[1].content.replace(`'data/${sketchFile.name}'`, `'${rawGitRef}'`);
|
// newProject.files[1].content = newProject.files[1].content.replace(`'data/${sketchFile.name}'`, `'${rawGitRef}'`);
|
||||||
resolve(newProject);
|
resolve(newProject);
|
||||||
|
|
Loading…
Reference in a new issue