added detector code for webgl