From f90e551d75d9371a838fbec29278af020fe19a17 Mon Sep 17 00:00:00 2001 From: blob8108 Date: Wed, 30 Oct 2013 07:30:25 +0000 Subject: [PATCH 1/2] Add Ubuntu installation guide to Readme --- README | 9 --------- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 9 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index 29ae6ce..0000000 --- a/README +++ /dev/null @@ -1,9 +0,0 @@ -Scratch HTML5 Player - -This project aims to create a Scratch Player in HTML5. Scratch is currently implemented with Actionscript 3 and requires the Flash Player version 10.2. Since Flash does not run on iOS (iPads, iPods, etc) and newer Android devices, we would like to have an HTML5 version to display (but not edit) projects on mobile devices. Scratch projects played in the HTML5 player should look and behave as closely as possible to the way they look and behave when played by the Flash player. We will not be accepting pull requests for new features that don't already exist in the Flash based Scratch project player. - -There are a few github issues created that represent some of the missing features. At this point, the HTML5 player is about 40% complete and can run some simple projects. Running the HTML5 player on your own website, or locally, you will need to have PHP so that the proxy.php file can be used to load assets from the same domain. This is done to be compatible with Javascript security models in today's browsers. To test the HTML5 player against the Flash player you can use the compare.html web page. - -Unimplementable Features on iOS: Image effects for whirl, fisheye, mosaic, and pixelate. Sound and video input for loudness, video motion, and touching colors from the video. - -More documentation will be added as time permits. Thanks for contributing, and Scratch On! diff --git a/README.md b/README.md new file mode 100644 index 0000000..f468141 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Scratch HTML5 Player + +This project aims to create a Scratch Player in HTML5. Scratch is currently implemented with Actionscript 3 and requires the Flash Player version 10.2. Since Flash does not run on iOS (iPads, iPods, etc) and newer Android devices, we would like to have an HTML5 version to display (but not edit) projects on mobile devices. Scratch projects played in the HTML5 player should look and behave as closely as possible to the way they look and behave when played by the Flash player. We will not be accepting pull requests for new features that don't already exist in the Flash based Scratch project player. + +There are a few github issues created that represent some of the missing features. At this point, the HTML5 player is about 40% complete and can run some simple projects. + +Unimplementable Features on iOS: Image effects for whirl, fisheye, mosaic, and pixelate. Sound and video input for loudness, video motion, and touching colors from the video. + +More documentation will be added as time permits. Thanks for contributing, and Scratch On! + +## Installation + +Running the HTML5 player on your own website, or locally, you will need to have +PHP so that the `proxy.php` file can be used to load assets from the same domain. This is done to be compatible with Javascript security models in today's browsers. To test the HTML5 player against the Flash player you can use the compare.html web page. + +### Ubuntu + +If you're using Ubuntu, you can follow the following steps to set up the proxy correctly. You'll need to type the following commands in Terminal. + +Install PHP and Apache for running the proxy file: + + $ sudo apt-get install apache2 php5 + +Fork this repository on Github, and then clone it into your home folder somewhere (replacing `` with your Github username): + + $ git clone https://github.com//scratch-html5 + +We'd like to add a new localhost domain, so that we can access the player from our web browser. Something like `scratch.localhost`. Run this command to edit the `/etc/hosts` file: + + $ sudo nano /etc/hosts + +Add the following line: + + 127.0.0.1 scratch.localhost + +Use Ctrl-O, Return, Ctrl-X to quit. + +Now we want to add a new Apache configuration for the new domain. Run the following: + + $ cd /etc/apache2/sites-available/ + $ sudo nano scratch + +And type in the following, replacing `user` with your username, and making sure the `DocumentRoot` matches where you cloned the repository earlier: + + + ServerName scratch.localhost + DocumentRoot /home/user/scratch-html5 + + +Finally, run the following commands to enable the site: + + $ sudo a2ensite scratch + $ sudo service apache2 reload + +Now when you go to , the project should play. If you get a "Forbidden" error message, you may need to check the permissions of the folders that the player code is in. + +Now you can go fix bugs in the HTML5 player! From eefa922f266c0452e5d17bbd5a0505e660a365fe Mon Sep 17 00:00:00 2001 From: blob8108 Date: Wed, 30 Oct 2013 22:45:50 +0000 Subject: [PATCH 2/2] Move instructions to a separate file --- README.md | 43 +------------------------------------------ TESTING.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 TESTING.md diff --git a/README.md b/README.md index f468141..91a59a9 100644 --- a/README.md +++ b/README.md @@ -13,45 +13,4 @@ More documentation will be added as time permits. Thanks for contributing, and S Running the HTML5 player on your own website, or locally, you will need to have PHP so that the `proxy.php` file can be used to load assets from the same domain. This is done to be compatible with Javascript security models in today's browsers. To test the HTML5 player against the Flash player you can use the compare.html web page. -### Ubuntu - -If you're using Ubuntu, you can follow the following steps to set up the proxy correctly. You'll need to type the following commands in Terminal. - -Install PHP and Apache for running the proxy file: - - $ sudo apt-get install apache2 php5 - -Fork this repository on Github, and then clone it into your home folder somewhere (replacing `` with your Github username): - - $ git clone https://github.com//scratch-html5 - -We'd like to add a new localhost domain, so that we can access the player from our web browser. Something like `scratch.localhost`. Run this command to edit the `/etc/hosts` file: - - $ sudo nano /etc/hosts - -Add the following line: - - 127.0.0.1 scratch.localhost - -Use Ctrl-O, Return, Ctrl-X to quit. - -Now we want to add a new Apache configuration for the new domain. Run the following: - - $ cd /etc/apache2/sites-available/ - $ sudo nano scratch - -And type in the following, replacing `user` with your username, and making sure the `DocumentRoot` matches where you cloned the repository earlier: - - - ServerName scratch.localhost - DocumentRoot /home/user/scratch-html5 - - -Finally, run the following commands to enable the site: - - $ sudo a2ensite scratch - $ sudo service apache2 reload - -Now when you go to , the project should play. If you get a "Forbidden" error message, you may need to check the permissions of the folders that the player code is in. - -Now you can go fix bugs in the HTML5 player! +See the file `TESTING.md` for more details. diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..b44655f --- /dev/null +++ b/TESTING.md @@ -0,0 +1,45 @@ +Running the HTML5 player on your own website, or locally, you will need to have +PHP so that the `proxy.php` file can be used to load assets from the same domain. This is done to be compatible with Javascript security models in today's browsers. To test the HTML5 player against the Flash player you can use the compare.html web page. + +# Ubuntu + +If you're using Ubuntu, you can follow the following steps to set up the proxy correctly. You'll need to type the following commands in Terminal. + +Install PHP and Apache for running the proxy file: + + $ sudo apt-get install apache2 php5 + +Fork this repository on Github, and then clone it into your home folder somewhere (replacing `` with your Github username): + + $ git clone https://github.com//scratch-html5 + +We'd like to add a new localhost domain, so that we can access the player from our web browser. Something like `scratch.localhost`. Run this command to edit the `/etc/hosts` file: + + $ sudo nano /etc/hosts + +Add the following line: + + 127.0.0.1 scratch.localhost + +Use Ctrl-O, Return, Ctrl-X to quit. + +Now we want to add a new Apache configuration for the new domain. Run the following: + + $ cd /etc/apache2/sites-available/ + $ sudo nano scratch + +And type in the following, replacing `user` with your username, and making sure the `DocumentRoot` matches where you cloned the repository earlier: + + + ServerName scratch.localhost + DocumentRoot /home/user/scratch-html5 + + +Finally, run the following commands to enable the site: + + $ sudo a2ensite scratch + $ sudo service apache2 reload + +Now when you go to , the project should play. If you get a "Forbidden" error message, you may need to check the permissions of the folders that the player code is in. + +Now you can go fix bugs in the HTML5 player!