VirtualSky
A browser-based planetarium that can be customized and embedded in web pages. View as full-window. Some examples with code excerpts and some unit tests.
Author
Stuart Lowe initially developed this at Las Cumbres Observatory (LCO is a private operating foundation, building a global network of telescopes for professional research and citizen investigations) between 2010-3. He continues to maintain it in his spare time.