This is the source code for Unraveling the JPEG, an interactive exploration of how to decode a JPEG image that was published in the first issue of the Parametric Press.
You can append the query parameter
?imageSrc=https://urlToImage.jpg to the article, and it will refresh and load a version of the article using that image instead of the cat picture. It should work as long as the server allows cross origin requests.
The easiest way to put your own image in the article is to upload it to Imgur and add the link to it as a query parameter. You can then share this link with anyone to essentially have your own custom version of the article!
For example, I can go to this photo of a fox on Unplash, right click and "copy image location", then put that URL in a query parameter. This link will then load the article with the fox image in all the interactive diagrams.
To run the article locally, make sure you have NodeJS and NPM installed. Then clone or download this repository.
idyllglobally (only need to do this once):
npm install -g idyll
- Install local dependencies:
idyll --template _local.htmlin the root of this project.