Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Tests if it's iPhone or iPad
- var isIOS = (Browser.getOption('product:platform') == 'IPHONE');
- // Tests if it's Android
- var isAndroid = (Browser.getOption('product:platform') == 'ANDROID');
- // Tests if it's Mac OSX
- var isMac = (Browser.getOption('product:platform') == 'MAC');
- // Tests if it's Windows
- var platform = Browser.getOption('product:platform');
- var isWindows = (platform == 'WIN32') || (platform == 'WIN64');
- // Tests the type of rendering engine
- var isOpenGL = (Browser.getCap(0) == 1);
- var isDirectX = (Browser.getCap(1) == 1);
- var isSoftware = (Browser.getCap(2) == 0);
- // Gets the ammount of total video memory
- var totalVideoMemory = Browser.getCap(3);
- // Gets the ammount of free video memory
- var freeVideoMemory = Browser.getCap(4);
- // Gets the ammount of free texture memory
- var freeTextureMemory = Browser.getCap(12);
- // Gets the ammount of total texture memory
- var totalTextureMemory = Browser.getCap(13);
- // Gets the ammount of free RAM
- var freeMemory = Browser.getCap(14);
- // Gets the total ammount of RAM
- var totalMemory = Browser.getCap(15);
- // Gets the ammount of used RAM
- var usedMemory = Browser.getCap(16);
- // Gets the maximum texture size in pixels the renderer can handle (horizontally)
- var maxTextureWidth = Browser.getCap(8);
- // Gets the maximum texture size in pixels the renderer can handle (vertically)
- var maxTextureHeight = Browser.getCap(9);
- // Tests if it supports alpha blending
- var canAlphaBlend = (Browser.getCap(6) == 1);
- // Tests if the renderer supports mip-mapping
- var canMipMap = (Browser.getCap(7) == 1);
- // Tests if it supports only texture whose size is a power of two.
- var onlyPowerOfTwo = (Browser.getCap(10) == 1);
- // Maximum number of lights the renderer can handle
- var maxLightsCount = Browser.getCap(11);
- // Tests if it supports RGB lighting
- var canRGBLighting = (Browser.getCap(5) == 1);
- // Opens and closes the console programatically, regardless of the "verbose VRML warnings" option in Preferences.
- Browser.showConsole();
- Browser.showConsole(true);
- Browser.showConsole(false);
Add Comment
Please, Sign In to add comment