What is this?
Browser Ponies lets you place ponies on websites (see the ponies here). You can create a bookmarklet which adds your favourite ponies to any website.
This is a reimplementation of Desktop Ponies in JavaScript. It doesn't behave exactly like the original but is close enough (no games and no cursor avoidance etc.).
Browser Ponies work best with Google Chrome, but they also work okay in Mozilla Firefox.
The artwork used is from the Ponychan fork of Desktop Ponies, My Little Pony: Friendship Is Magic is © by Hasbro and Lauren Faust.
Short URL
You can put ponies on a website by simply putting "https://browser.pony.house/everywhere.html#" in front of the URL of the website. So e.g. "example.com" becomes "https://browser.pony.house/everywhere.html#example.com".
Note that not all websites allow embedding in an iframe (which is used here). E.g. Google does not work.
Debug Mode
You need insert the Url Parameter BrowserPoniesDebug=true inside the url to enable console debug.
Make a Bookmarklet
Choose your ponies belown and then drag this link into your Bookmark Toolbar:
Click it whenever you feel a website needs more ponies.
You can also bookmark the control links above in order to have control over ponies on any website. However, the Toggle ponies in background function needs special support by the website in order to work.
px | |||
px |
Change settings and choose your ponies
(Your browser supports HTML 5 Audio.) | |
% | |||
% | |||
sec |
- Alicorns ×
- Alternate Art ×
- Breezies ×
- Colts ×
- Earth Ponies ×
- Fillies ×
- Foals ×
- Main Ponies ×
- Mares ×
- Non-Ponies ×
- Pegasi ×
- Pets ×
- Stallions ×
- Supporting Ponies ×
- Unicorns ×
- Random Pony
- Perfect Pace
- A.K. Yearling
- Ace
- Adagio Dazzle
- Ahuizotl
- Allie Way
- Aloe
- Angel
- Apple Bloom
- Apple Bumpkin
- Apple Fritter
- Apple Split
- Applejack
- Archer
- Aria Blaze
- Aunt Orange
- Babs Seed
- Beauty Brass
- Beauty Shock
- Berry Punch
- Biff
- Big Mac
- Big McIntosh
- Bittersweet
- Blossomforth
- Blues
- Bon-Bon
- Bow Hothoof
- Boxxy Brown
- Braeburn
- Bulk Biceps
- Button Mash
- Caesar
- Candy Mane
- Caramel
- Carrot Top
- Changeling
- Cheerilee
- Cheese Sandwich
- Cherry Berry
- Cloakseller
- Cloud Kicker
- Cloudchaser
- Cloudy Quartz
- Coco Pommel
- Coriander Cumin
- Countess Coloratura
- Cranky
- Daisy
- Daring Do
- Davenport
- Derpy Hooves
- Diamond Mint
- Diamond Tiara
- Dinky Hooves
- Discord
- Doctor Horse
- Doctor Whooves
- Donny
- Donut Joe
- Double Diamond
- Dr. Caballeron
- Dumb-Bell
- Elsie
- Fancypants
- Featherweight
- Fiddlesticks
- Fido
- Fili-Second
- Filly Applejack
- Filly Fluttershy
- Filly Pinkie Pie
- Filly Rainbow Dash
- Filly Rarity
- Filly Twilight Sparkle
- Filthy Rich
- Fire Soul
- Flam
- Flash Sentry
- Fleetfoot
- Fleur de lis
- Flim
- Flitter
- Flurry Heart
- Flutterbat
- Fluttershy
- Frederic Horseshoepin
- Fresh Coat
- Gilda
- Ginger Snap
- Gizmo
- Goldie Delicious
- Grace Manewitz
- Grampa Gruff
- Granny Smith
- Greta
- Gummy
- Gustave le Grand
- Gustysnows
- Hayseed Turnip Truck
- Henchpony #1
- Henchpony #2
- Henchpony #3
- Henchpony #4
- Henchpony #5
- Hoity-Toity
- Hoops
- Horte Cuisine
- Hum Drum
- Igneous Rock
- Iron Will
- Jasmine Leaf
- Jeff The Dude Letrotski
- Jesús Pezuña
- King Sombra
- King Thorax
- Lady Justice
- Laid-back Mule
- Leadwing
- Lemon Hearts
- Lightning Bolt
- Lightning Dust
- Lily
- Lily Longsocks
- Limestone Pie
- Little Strongheart
- Lotus
- Lyra
- Mane-iac
- Manticore
- Marble Pie
- Masked Matter-Horn
- Matilda
- Maud Pie
- Mayor Mare
- Minuette
- Miss Smith
- Mistress Mare-velous
- Mjolna
- Moondancer
- Moonlight Raven
- Mr Breezy
- Mr Cake
- Mr Greenhooves
- Mr Shy
- Mrs Cake
- Mrs Shy
- Mrs Sparkle
- Ms Harshwhinny
- Ms Peachbottom
- Mysterious Mare Do Well
- Neon Lights
- Nerdy Delegate
- Night Glider
- Night Light
- Nightmare Moon
- Nurse Redheart
- Nurse Snowheart
- Nurse Sweetheart
- Nurse Tenderheart
- Nursery Rhyme
- Ocellus
- Octavia
- Opalescence
- Owlowiscious
- Parasprite
- Parcel Post
- Party Favor
- Pear Butter
- Philomena
- Photo Finish
- Pinkamena Diane Pie
- Pinkie Pie
- Pipsqueak
- Plaid Stripes
- Pokey Pierce
- Police Pony
- Pound Cake
- Prince Blueblood
- Princess Cadance
- Princess Celestia
- Princess Ember
- Princess Luna
- Princess Twilight Sparkle
- Pumpkin Cake
- Queen Chrysalis
- Quiet Gestures
- Radiance
- Rainbow Blaze
- Rainbow Dash
- Rainbowshine
- Raindrops
- Rarity
- Raritys Father
- Raritys Mother
- Raven
- Rogue
- Roseluck
- Rover
- Royal Guard
- Royal Night Guard
- Ruby Pinch
- Rumble
- Saddle Rager
- Saffron Masala
- Sapphire Shores
- Scootaloo
- Score
- Screw Loose
- Screwball
- Sea Swirl
- Seabreeze
- Shadowbolt
- Sheriff Silverstar
- Shining Armor
- Shoeshine
- Shopkeeper
- Silver Shill
- Silver Spoon
- Silverspeed
- Sindy
- Sir Colton Vines
- Slendermane
- Smolder
- Smooze
- Snails
- Snips
- Soarin
- Soigne Folio
- Sonata Dusk
- Songbird Serenade
- Sourpuss
- Sparkler
- Sphinx
- Spike
- Spitfire
- Spoiled Rich
- Spot
- Starlight Glimmer
- Stella
- Stellar Eclipse
- Steven Magnet
- Stormy Flare
- Sugar Belle
- Sunburst
- Sunset Shimmer
- Sunshine Smiles
- Suri Polomare
- Surprise
- Svengallop
- Sweetie Belle
- Tank
- Tealove
- Tempest Shadow
- Thunderclap
- Thunderlane
- Tirek
- Toe-Tapper
- Torch Song
- Tree Hugger
- Trenderhoof
- Trixie
- Trouble Shoes
- Truffle Shuffle
- Twilight Sparkle
- Twinkleshine
- Twist
- Uncle Orange
- Vinyl Scratch
- Violet
- Walter
- Whoa Nelly
- Wild Fire
- Winona
- Withers
- Written Script
- Zapp
- Zecora
- Zephyr Breeze
- Zipporwhill
- Zipporwhills Father
Feedback
Send me feedback via email, tweet me or write a bug report.
Advanced User Stuff
Browser Support
Firefox has a bug concerning the animation speed of animated GIFs (I tried to work around this by shortening all effect durations when using Firefox). Also I found no way to control the animation playback of individual images in Firefox, which sometimes causes animation errors (when a effect is shown twice both effect animations are synchronized).
In Internet Explorer I managed to control GIF animation playback using iframes, but you can't make them transparent and border less. In Chrome iframes do not suffer from this limitation.
Toggle ponies in background
In order to support the Toggle ponies in background function websites need to define a special function called toggleBrowserPoniesToBackground. This function changes the z-index of everything that should appear in front of the ponies. The ponies have a z-index of 9000000 + distance from top window border to bottom of the pony. The speak bubbles have a z-index of 9009000 (I assumed noone has a screen higher than 9000 pixels).
For instance, this webpage defines the toggleBrowserPoniesToBackground function like so:
function toggleBrowserPoniesToBackground () { var main = document.getElementById('main'); if (main.style.zIndex === '') { main.style.zIndex = '100000000'; } else { main.style.zIndex = ''; } }
In addition to that it defines these style rules:
#main { position: relative; background: rgba(255, 255, 255, 0.8); border: 5px solid rgba(163, 204, 222, 0.8); }
Using your own ponies
If you want to use your own ponies you can convert the INI files to JavaScript using the tools below. Just load the INI files, fix the filenames/URLs if needed and generate the JavaScript. The resulting pony script will use the settings from above except for which pony is loaded.
Note: This currently only works with Firefox and Chrome. Opera does currently not support files being dropped (so click to use the file open dialog) and Internet Explorer currently cannot read files at all in JavaScript (probably in version 10 it will be able to do that).
Your Ponies:
As a next step you may need to adapt the URLs of the images and sounds to where they really are hosted. If they are hosted on some web server with the files of each pony in a seperate distinct directory you just need to change the base URL to the location of said directory. Don't forget the / (slash) at the end of the base URL and please note that the web is case sensitive. This means the file names as they are on the server have to exactly the ones defined here.
If the files are all at some more or less random location, you need to adapt all the URLs individually. In this case just enter an absolute URL in the URL fields of each file. If the URL of an file is absolute the base URL will be ignored.
As a third option you can also embed the files directly in the generated script. Note that this encodes the whole files into data URLs, which might cause the generated script to be a lot bigger than the sum size of all the files. Also Internet Explorer does not support data URLs of the length of 2048 characters, and the pony sprites are usually an order of magnitude bigger than that.
Your Interacions:
Then put the contents of the text area above into a file called e.g. "your-ponies.js" and host it somewhere on the web. You can then embed your ponies on your web site by adding this code somewhere in the HTML code of your web site (I recommend somewhere between <head> and </head>):
<script type="text/javascript" src="https://browser.pony.house/js/browserponies.js"></script> <script type="text/javascript" src="http://example.org/your-ponies.js"></script>
Of course you need to replace http://example.org/your-ponies.js with the URL where you really host the file.
If you want to you can also copy the browserponies.js file and serve it yourself. This server here does not have the best uptime so you might want to do that.
API
You can also use the official API to create your own features in BrowserPonies.
The entire API is stored in BrowserPonies.api
and BrowserPonies.Util
.
The information here is for advanced users, so I recommend that you skip this part of the page.
Demo
You can run the official demos that are already installed on this page. Even if the user defines that ponies cannot be controlled on the website, you can access your browser's console and activate it manually.
BrowserPonies.api.getDemoGamepad(ponyIndex, startByGamepad)
There is a pre-configured gamepad script in the BrowserPonies API, and using this script you will get access to your pony API along with this gamepad. The script will return the "start" function and the "apiInstance" that stores the API of your pony.
BrowserPonies.api.getInstanceController(ponyIndex)
The script will return the "apiInstance" that stores the API of your pony. But you will have to manually write the script that starts your API, usually following these instructions:
tinyPony.start();
tinyPony.setBehavior('stand');
tinyPony.setFacingRight(false);
Tick
I always recommend you run everything from the BrowserPonies API inside these ticks as they are respecting the FPS setting of BrowserPonies.
BrowserPonies.api.addTick(callback)
You just need to add the callback for it to start running along with BrowserPonies. This function will always return to Tick Id to you have the possibility to remove it when you want to uninstall the code.
BrowserPonies.api.removeTick(tickId)
Use the Tick Id here to completely uninstall your script.
Instances List
You can always have full control of the list of ponies running in BrowserPonies through this API. You just need to know the pony index that is running to access it completely by the API.
BrowserPonies.api.getInstance(ponyIndex)
If you know the exact Index of a pony instance, you just need to put the index here to get it instantly.
BrowserPonies.api.getInstances(filterCallback)
If you want to get the list of all instances, use this script. You will get the complete list of all ponies in the original index. But remember that if you use the "filterCallback", these index will not match the "getInstance" functions.
Pony Instance (tinyPony)
An interface for interacting with a virtual pony instance. TinyPony API allows controlling movement, behaviors, speech, and state management.
Methods
- isDead() - Returns
Boolean
. Checks if the pony instance is removed from BrowserPonies API. - getInstance() - Returns
Object
. Retrieves the pony instance. - getName() - Returns
String
. Gets the pony's name. - addTick(callback) - Adds a tick event.
- removeTick(tickId) - Removes a tick event.
- setFacingRight(isFacingRight) - Updates the pony's facing direction.
- forceBehaviorMoves(forceBehaviorMoves) - Enables/disables forced behavior movements.
- setBehavior(behaviorName, breaklink) - Sets a behavior.
- hasBehavior(behaviorName) - Checks if the pony has a behavior.
- getBehavior(behaviorName) - Retrieves a behavior object.
- speakRandom(speakProbability, startTime) - Makes the pony speak randomly.
- speak(speakData, forceSpeak, startTime) - Makes the pony speak.
- teleport(cords) - Teleports the pony to given coordinates.
- move(cords) - Moves the pony.
- start() - Starts the API, enabling manual control.
- stop() - Stops the API, reverting to AI control.
Usage Example
const tinyPony = BrowserPonies.api.getInstanceController(0);
tinyPony.start();
tinyPony.setBehavior('stand');
console.log(tinyPony.getName());
tinyPony.speak({ text: "Hello!" });
tinyPony.move({ x: 100, y: 200 });
Download
You can download the source without images/sounds here:
browser-ponies-source.zip
Or with images/sounds:
browser-ponies-plus-resources.zip
Note that none of the images are made by me. They simply are the images of the Ponychan fork of Desktop Ponies. Go there for a full list of art credits. The only changes I made are fixes to the file names, because the web is case sensitive.
A git repository can be found here:
https://github.com/JasminDreasond/New-Browser-Ponies
The OLD git repository can be found here:
https://github.com/panzi/Browser-Ponies
License
The code of this software is licensed under the MIT license. This applies to all JavaScript files (except ponybase.js), HTML, CSS, unix shell script and Python files in this project. The license does not apply to any pony images, *.ini files (or files compiled from these INI files) or sound files. These files are copied from Desktop Ponies. The images and INI files are under various licenses (mostly CC BY-NC-SA 3.0).
Copyright © 2011-2013 Mathias Panzenböck
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.