From 09ffcee541214fd7caa1b1274ea7ed6b89c31c35 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Sun, 23 Oct 2016 19:08:33 -0700 Subject: [PATCH] add audio vis example --- scripts/filters.js | 2 +- src/_data/examples.json | 93 ----------------------------------------- src/_data/examples.yml | 81 +++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 94 deletions(-) delete mode 100644 src/_data/examples.json create mode 100644 src/_data/examples.yml diff --git a/scripts/filters.js b/scripts/filters.js index 9536d42a..34b81532 100644 --- a/scripts/filters.js +++ b/scripts/filters.js @@ -37,7 +37,7 @@ function convertProdToDevUrls (str) { hexo.extend.filter.register('after_render:json', function (obj, data) { var self = this; - return JSON.parse(data.text, function (key, val) { + return JSON.parse(JSON.stringify(obj), function (key, val) { return convertProdToDevUrls.bind(self)(val); }); }); diff --git a/src/_data/examples.json b/src/_data/examples.json deleted file mode 100644 index c5f8f971..00000000 --- a/src/_data/examples.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "title": "Examples", - "home": { - "section": "home", - "slug": "home", - "scene_url": "https://aframe.io/aframe/examples/animation/aframe-logo/?ui=false", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/animation/aframe-logo/index.html", - "title": "A-Frame Logo Animation" - }, - "showcase": [ - { - "section": "showcase", - "slug": "helloworld", - "scene_url": "https://aframe.io/aframe/examples/boilerplate/hello-world/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/boilerplate/hello-world/index.html", - "title": "Hello World" - }, - { - "section": "showcase", - "slug": "sky", - "scene_url": "https://aframe.io/aframe/examples/boilerplate/panorama/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/boilerplate/panorama/index.html", - "title": "360° Image" - }, - { - "section": "showcase", - "slug": "360-image-gallery", - "scene_url": "https://aframe.io/360-image-gallery-boilerplate/", - "source_url": "https://github.com/aframevr/360-image-gallery-boilerplate/blob/master/index.html", - "title": "360° Image Gallery" - }, - { - "section": "showcase", - "slug": "videosphere", - "scene_url": "https://aframe.io/aframe/examples/boilerplate/360-video/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/boilerplate/360-video/index.html", - "title": "360° Video", - "supports": { - "android": false, - "ios": false - } - }, - { - "section": "showcase", - "slug": "anime-UI", - "scene_url": "https://aframe.io/aframe/examples/showcase/anime-UI/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/showcase/anime-UI/index.html", - "title": "Anime UI" - }, - { - "section": "showcase", - "slug": "composite", - "scene_url": "https://aframe.io/aframe/examples/showcase/composite/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/showcase/composite/index.html", - "title": "Composite" - }, - { - "section": "showcase", - "slug": "curved-mockups", - "scene_url": "https://aframe.io/aframe/examples/showcase/curved-mockups/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/showcase/curved-mockups/index.html", - "title": "Curved Mockups" - }, - { - "section": "showcase", - "slug": "spheres-and-fog", - "scene_url": "https://aframe.io/aframe/examples/showcase/spheres-and-fog/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/showcase/spheres-and-fog/index.html", - "title": "Spheres & Fog" - }, - { - "section": "showcase", - "slug": "shopping", - "scene_url": "https://aframe.io/aframe/examples/showcase/shopping/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/showcase/shopping/index.html", - "title": "Shopping" - }, - { - "section": "showcase", - "slug": "warps", - "scene_url": "https://aframe.io/aframe/examples/animation/warps/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/animation/warps/index.html", - "title": "Warp" - }, - { - "section": "showcase", - "slug": "unfold", - "scene_url": "https://aframe.io/aframe/examples/animation/unfold/", - "source_url": "https://github.com/aframevr/aframe/blob/master/examples/animation/unfold/index.html", - "title": "Unfold" - } - ] -} diff --git a/src/_data/examples.yml b/src/_data/examples.yml new file mode 100644 index 00000000..1a962976 --- /dev/null +++ b/src/_data/examples.yml @@ -0,0 +1,81 @@ +title: Examples + +home: + section: home + slug: home + scene_url: https://aframe.io/aframe/examples/animation/aframe-logo/?ui=false + source_url: https://github.com/aframevr/aframe/blob/master/examples/animation/aframe-logo/index.html + title: A-Frame Logo Animation + +showcase: +- section: showcase + slug: helloworld + scene_url: https://aframe.io/aframe/examples/boilerplate/hello-world/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/boilerplate/hello-world/index.html + title: Hello World + +- section: showcase + slug: sky + scene_url: https://aframe.io/aframe/examples/boilerplate/panorama/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/boilerplate/panorama/index.html + title: 360° Image + +- section: showcase + slug: 360-image-gallery + scene_url: https://aframe.io/360-image-gallery-boilerplate/ + source_url: https://github.com/aframevr/360-image-gallery-boilerplate/blob/master/index.html + title: 360° Image Gallery + +- section: showcase + slug: videosphere + scene_url: https://aframe.io/aframe/examples/boilerplate/360-video/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/boilerplate/360-video/index.html + title: 360° Video + supports: + android: false + ios: false + +- section: showcase + slug: anime-UI + scene_url: https://aframe.io/aframe/examples/showcase/anime-UI/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/showcase/anime-UI/index.html + title: Anime UI + +- section: showcase + slug: spotify-audio-visualizer + scene_url: https://ngokevin.github.io/kframe/components/audioanalyser/examples/spotify/ + source_url: https://github.com/ngokevin/kframe/blob/6d1ac451af3040394b985e9260d8459cc01c4c0b/components/audioanalyser/examples/spotify/index.html + title: Audio Visualizer + supports: + android: false + ios: false + +- section: showcase + slug: composite + scene_url: https://aframe.io/aframe/examples/showcase/composite/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/showcase/composite/index.html + title: Composite + +- section: showcase + slug: curved-mockups + scene_url: https://aframe.io/aframe/examples/showcase/curved-mockups/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/showcase/curved-mockups/index.html + title: Curved Mockups + +- section: showcase + slug: shopping + scene_url: https://aframe.io/aframe/examples/showcase/shopping/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/showcase/shopping/index.html + title: Shopping + +- section: showcase + slug: spheres-and-fog + scene_url: https://aframe.io/aframe/examples/showcase/spheres-and-fog/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/showcase/spheres-and-fog/index.html + title: Spheres & Fog + +- section: showcase + slug: warps + scene_url: https://aframe.io/aframe/examples/animation/warps/ + source_url: https://github.com/aframevr/aframe/blob/master/examples/animation/warps/index.html + title: Warp