Changes

686 bytes added ,  22:39, 2 April 2023
m
Update link to ImageShare
Line 456: Line 456:  
| 9 || Start
 
| 9 || Start
 
|-
 
|-
| 10 || Unknown
+
| 10 || Unused
 
|-
 
|-
| 11 || Unknown
+
| 11 || Unused
 
|-
 
|-
 
| 12 || Up
 
| 12 || Up
Line 469: Line 469:  
|}
 
|}
   −
Each number is 0 while its associated button is not pressed, and 1 while the button is pressed.
+
Each button's value is 0 while the button is not pressed, and 1 while the button is pressed.
   −
The two unknown button numbers may have been intended for the Home and Power buttons, but they are always 0, even if the web browser is used while the Home and/or Power buttons are pressed.
+
Based on the Gamepad API's specifications, buttons 10 and 11 are reserved for left stick presses and right stick presses respectively, which the 3DS does not support.
    
==== Notes ====
 
==== Notes ====
Line 481: Line 481:  
* Favicons can be changed using Javascript, but they become unchangeable once the document's <em>readystatechange</em> event finishes firing with a ready state of "complete".
 
* Favicons can be changed using Javascript, but they become unchangeable once the document's <em>readystatechange</em> event finishes firing with a ready state of "complete".
 
* Focusing on text-editable elements via Javascript will always open the keyboard.
 
* Focusing on text-editable elements via Javascript will always open the keyboard.
 +
* Webpage content is usually rendered at 30 FPS despite the <code>webkitRequestAnimationFrame</code> function allowing code to run at a rate of 60 FPS.
 +
** As a result, display-related routines may only show half of their intended updates.
 +
** This issue can be mitigated by rendering on every other frame. However, various factors (such as touchscreen input and sleep mode) make this fairly inconsistent.
    
== Old3DS browser ==
 
== Old3DS browser ==
Line 878: Line 881:  
* HTML5Test.com say that Drag and drop is supported but it's not (code on WebKit is ready, but it's not implemented on interface of browser)
 
* HTML5Test.com say that Drag and drop is supported but it's not (code on WebKit is ready, but it's not implemented on interface of browser)
 
* Webpages are rendered with the RGB565 color format.
 
* Webpages are rendered with the RGB565 color format.
** Most RGB colors on the web are specified in RGB8 format, but the 2D canvas <code>setFillColor</code> and <code>setStrokeColor</code> functions accept RGB565 colors when provided with parameters for red, green, blue, and alpha, respectively.
      
==Tips==
 
==Tips==
Line 884: Line 886:  
=== Detect User Agent ===
 
=== Detect User Agent ===
   −
To detect if the user agent is Nintendo 3DS Browser :
+
To detect if the user agent is the Nintendo 3DS Internet Browser (not including mobile site mode):
    
  <script type="text/javascript">
 
  <script type="text/javascript">
     if (navigator.userAgent.indexOf('Nintendo 3DS') == -1) { //If the UserAgent is not "Nintendo 3DS"
+
     if(navigator.userAgent.indexOf("Nintendo 3DS") == -1) { // If the user agent does not contain "Nintendo 3DS"
         location.replace('http://www.3dbrew.org'); //Redirect to an other page
+
         location.replace("http://www.3dbrew.org"); // Redirect to another page
 
     }
 
     }
 
  </script>
 
  </script>
   −
* You can check <em>navigator.platform=="Nintendo 3DS"</em> as well.
+
* You can check using <code>navigator.platform.indexOf("Nintendo 3DS") > -1</code> as well.
 +
* The New 3DS Internet Browser's "Request Mobile Sites" setting affects the user agent. To detect if the New 3DS Internet Browser is being used with this option enabled, use <code>screen.pixelDepth == 16 && navigator.platform == "iPhone"</code>.
 +
** This relies on the fact that the internet browser renders its webpages in 16-bit color, which is (hopefully?) not possible with a real iPhone.
 +
** Keep in mind that the previous browser-detection examples do not account for this setting.
    
=== Scrolling ===
 
=== Scrolling ===
Line 978: Line 983:  
<!-- If you have a website that demonstrates these techniques, place it here! -->
 
<!-- If you have a website that demonstrates these techniques, place it here! -->
 
* [http://www.nintendo.com/3ds/internetbrowser/bookmarks Nintendo 3DS Bookmarks]: This is the first bookmark pre-installed in the browser.
 
* [http://www.nintendo.com/3ds/internetbrowser/bookmarks Nintendo 3DS Bookmarks]: This is the first bookmark pre-installed in the browser.
* [https://imgsharetool.herokuapp.com ImageShare]: Image uploader for the 3DS ([https://github.com/corbindavenport/image-share source code])
+
* [http://theimageshare.com ImageShare]: Image uploader for the 3DS ([https://github.com/corbindavenport/imageshare source code])
 
* [http://3ds.andysmith.co.uk/jFox.html jFox] (Short URL: http://bit.ly/iB7FqW)
 
* [http://3ds.andysmith.co.uk/jFox.html jFox] (Short URL: http://bit.ly/iB7FqW)
 
* [http://ditto3d.com/3ds Ditto3D (Dead Link)] (Short URL: http://bit.ly/oVreWA)
 
* [http://ditto3d.com/3ds Ditto3D (Dead Link)] (Short URL: http://bit.ly/oVreWA)