Changes

6,130 bytes added ,  02:07, 24 November 2012
Creating page for Wii U features of Internet Browser
The <b>Internet Browser</b> is a web browser preloaded on the Wii U. It uses a version of NetFront based on the WebKit rendering engine.

== Controls ==
Under normal circumstances, the Internet Browser uses the following controls:

* Left Analog Stick: Scroll/Pan
* Left Analog Stick Click: Hide/show bottom toolbar
* Right Analog Stick: Zoom
* Right Analog Stick Click: Return to default zoom
* + button: Zoom in
* - button: Zoom out
* L button: Back to previous page
* R button: Forward to next page
* A button: Send the "Enter" key (keyCode 13)

In addition, dragging on the touch screen scrolls the window and tapping on the touch screen will click links and buttons, as is typical for touch screen browsers.

<b>TODO:</b> <i>Document ZL, ZR, X, Y, and B.</i>

== Wii U Scripting Functionality ==
In addition to W3C standard touch screen functionality, the Internet Browser exposes many Wii U input and output functions to Javascript through the <tt>wiiu</tt> object.

=== wiiu.gamepad ===
The <tt>wiiu.gamepad</tt> object allows Javascript functions to read the current state of the primary Game Pad.

<b>TODO:</b> <i>Figure out what contentX, contentY, and isDataValid are.</i>

==== Reading values ====
In order to read any values from the Wii Remote, input must first be enabled by setting <tt>wiiu.remote.isEnabled = 1</tt>.

Once enabled, the function <tt>wiiu.gamepad.update()</tt> will populate all of the properties on the <tt>wiiu.gamepad</tt> object with the current information about the sticks, accelerometers, gyroscopes, buttons, and touch screen. It is safe to invoke this function in a timer for real-time updates.

==== Touch Screen ====
The <tt>wiiu.gamepad.tpTouch</tt> variable indicates whether or not there is currently an active touch on the screen. If this variable is 1, the variables <tt>wiiu.gamepad.tpX</tt> and <tt>wiiu.gamepad.tpY</tt> track the coordinates of this touch. The Game Pad's touch screen is not multitouch.

<b>TODO:</b> <i>Document range of tpX and tpY. Determine meaning of tpValidity.</i>

==== Analog Sticks ====
The left analog stick is tracked by the <tt>wiiu.gamepad.lStickX</tt> and <tt>wiiu.gamepad.lStickY</tt> variables, and the right analog stick is tracked by the <tt>wiiu.gamepad.rStickX</tt> and <tt>wiiu.gamepad.rStickY</tt> variables. These values range from -1.0 to +1.0.

==== Buttons ====
The variable <tt>wiiu.gamepad.held</tt> is a bitmask indicating all buttons currently being depressed on the Game Pad, including the click states of the analog sticks. All buttons are represented by in this bitmask although the browser's default behaviors may cause some values to be unusable.

<b>TODO:</b> <i>Record what values in the bitmask correspond to which buttons on the Game Pad.</i>

==== Accelerometer ====
The variables <tt>wiiu.gamepad.accX</tt>, <tt>wiiu.gamepad.accY</tt>, and <tt>wiiu.gamepad.accZ</tt> are a vector showing the current acceleration forces on the Game Pad, measured in Gs. When held level and motionless, the force of gravity will cause these variables to contain the vector (0.0, -1.0, 0.0).

==== Gyroscope ====
The variables <tt>wiiu.gamepad.gyroX</tt>, <tt>wiiu.gamepad.gyroY</tt>, and <tt>wiiu.gamepad.gyroZ</tt> contain the current readings of the Game Pad gyroscopes.

<b>TODO:</b> <i>Determine range and geometric interpretation of these variables.</i>

==== Angle ====
The variables <tt>wiiu.gamepad.angleX</tt>, <tt>wiiu.gamepad.angleY</tt>, and <tt>wiiu.gamepad.angleZ</tt> contain the current angle of the Game Pad.

<b>TODO:</b> <i>Determine range and geometric interpretation of these variables.</i>

==== Direction Tracking ====
There are nine variables that tie into the Game Pad's direction tracking, organized into three triplets:
* <tt>wiiu.gamepad.dirXx</tt>, <tt>wiiu.gamepad.dirXy</tt>, <tt>wiiu.gamepad.dirXz</tt>
* <tt>wiiu.gamepad.dirYx</tt>, <tt>wiiu.gamepad.dirYy</tt>, <tt>wiiu.gamepad.dirYz</tt>
* <tt>wiiu.gamepad.dirZx</tt>, <tt>wiiu.gamepad.dirZy</tt>, <tt>wiiu.gamepad.dirZz</tt>

<b>TODO:</b> <i>Determine range and geometric interpretation of these variables. They appear to be rotation-related. Are these triplets transposed? (i.e. are they associated as (dirXx, dirYx, dirZx) instead of (dirXx, dirXy, dirXz)?)</i>

=== wiiu.remote ===
The <tt>wiiu.remote</tt> object allows Javascript functions to read the current state of the primary Wii Remote and its Motion Plus accessory.

<b>TODO:</b> <i>Determine if it's possible to read the accessories and the second through fourth Wii Remotes like the Wii's Internet Channel could.</i>

<b>TODO:</b> <i>Figure out what contentX, contentY, and isDataValid are.</i>

==== Reading values ====
In order to read any values from the Wii Remote, input must first be enabled by setting <tt>wiiu.remote.isEnabled = 1</tt>.

Once enabled, the function <tt>wiiu.remote.update()</tt> will populate all of the properties on the <tt>wiiu.remote</tt> object with the current information <i>(about what?)</i>. It is safe to invoke this function in a timer for real-time updates.

==== Buttons ====
The variable <tt>wiiu.remote.held</tt> is a bitmask indicating all buttons currently being depressed on the Wii Remote.

<b>TODO:</b> <i>Record what values in the bitmask correspond to which buttons on the Game Pad.</i>

==== Accelerometer ====
The variables <tt>wiiu.remote.accX</tt>, <tt>wiiu.remote.accY</tt>, and <tt>wiiu.remote.accZ</tt> are a vector showing the current acceleration forces on the Wii Remote, measured in Gs. When held level and motionless, the force of gravity will cause these variables to contain the vector (0.0, -1.0, 0.0).

==== D-Pad ====
<b>TODO:</b> <i>Document.</i>

==== Motion Plus ====
<b>TODO:</b> <i>Document.</i>

=== wiiu.videoplayer ===
The <tt>wiiu.videoplayer</tt> object exposes the property <tt>viewMode</tt> and the function <tt>end()</tt>.

<b>TODO:</b> <i>Figure out what this is and how to use it.</i>

=== wiiu.imageview ===
The <tt>wiiu.videoplayer</tt> object exposes the property <tt>viewMode</tt> and the functions <tt>end()</tt> and <tt>getErrorCode()</tt>.

<b>TODO:</b> <i>Figure out what this is and how to use it.</i>
51

edits