erkie / erkie.github.com Goto Github PK
View Code? Open in Web Editor NEWAdding asteroids to any site on the web
Home Page: http://erkie.github.com/
Adding asteroids to any site on the web
Home Page: http://erkie.github.com/
Blow up any page with this bookmarklet. FOR MARKETERS: Please, if you're using the code for a marketing campaign, attribute it to us properly, the creators. Not just in code. We have put in a lot of work for this and it would really help us. Created by Rootof Creations HB <rootof.com> The code is in asteroids.js, and if you feel like pushing any updates it would really help if you updated the asteroids.min.js to match your commit. LICENSE: This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.
Invoke the bookmarklet
Wait in sadness as the ship never shows up
Open the developer console and witness:
Uncaught TypeError: Object #<an SVGAnimatedString> has no method 'indexOf'
addClass
updateEnemyIndex
Asteroids
(anonymous function)
(anonymous function)
Inspired by Anders Bjarby
when activated on a give page, join with other people that are also viewing the page with asteroid activated
Click on the New Asteroids bookmarklet, press esc to cancel, and click again. Nothing will happen.
The escape key doesn't work in Safari 5.1 on Lion to exit the applet. It seems clicking around on the page sometimes helps escape to work.
Additionally, the app store ad at the top of the page doesn't dismiss after a successful exit.
Nothing happens when it is brought up except when it is used to create a new tab. chrome element/resource explorer is claiming there is an uncaught exception in the 'tagname.toUpperCase' function, saying tag name has no toUpperCase function.
If you start the script in a particular browser size, it seems if resizing the browser doesn't quite carry over -- it'll remember that smaller size and wrap around within those smaller constraints even though the actual window is bigger.
I would say, personally, this is a game changer.
Letting asteroids roam a website is a really good idea and I'm surprised it hasn't caught on like it should. Maybe there's a marketing issue here? I would suggest SEM, like AdWords, to spread the word.
Again, like it a lot.
github likes to have a README file so it can show it on the main project page. A simple description and license text would be nice.
Used to work great in Safari OS X v4.0.5 (4531.22.7) but just tried it and it now yields the error:
"TypeError: Result of expression 'stylesheet.styleSheet' [undefined] is not an object."
The console also states that the error is on line 25 of asteroids.min.js
FYI: For comparison, the version on the Kottke blog (where I originally found this great script) does still work in Safari as they are serving up a local copy of an older version there.
Hello there,
I have managed to change the ship shape to an arrow by editing the playerVerts, however, when the game initializes, the shape is in a wrong angle (pointing to the left), could you please tell me which line I need to edit?
Regards
James
Fly Erkie (hold Up). Let go. Watch him decelerate.
Now fly Erkie, and then start holding Left or Right continuously.
A. Let go of Up. Note Erkie starts spinning in place.
B. Keep holding Up. Note Erkie will indefinitely travel in approximately his previous direction of travel.
I would not expect A and B to have vastly different outcomes. I would expect that, in B, the ship would fly in circles, approximately in place.
I love this shit but it would be very handy if I can add a specific class to elements so that they cannot be destroyed.
Let's list indestructible objects that you find.
I noticed:
Hi there, great stuff!
Unfortunately, the ship color (transparent with black border) makes it invisible in black backgrounds... It could be white with black border instead ;-)
This is great, but it would be even better if I could launch some missiles to destroy Flash elements.
If you run the bookmarklet multiple times on the same page, you'll get multiple ships. Actually quite fun to do (they get out of sync pretty quickly, mayhem ensues)! However, each instance also gets a scoreboard and they all stack up into an unreadable mess of text :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.