Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Made a bunch of clean up changes #1

Merged
merged 4 commits into from
Apr 30, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 0 additions & 234 deletions api/blackberry_bbdoc.js

This file was deleted.

14 changes: 13 additions & 1 deletion api/audio.js → api/html5_audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

/**
* @toc {User Interface} HTML5 Audio
* @toc {Media} HTML5 Audio
* @PB10
* @BB60+
* @class audio
* The audio tag defines sound, such as music or other audio streams.
* <p/>
Expand All @@ -26,6 +28,8 @@
audio ={

/**
* @PB10
* @BB60+
* @description The autoplay attribute specifies that the audio will start playing as soon as it is ready.
* <p/>
* If this attribute is present the audio will autoplay.
Expand All @@ -50,6 +54,8 @@ audio ={


/**
* @PB10
* @BB60+
* @description The controls attribute specifies that the browser should provide playback controls for the audio.
* <p>
* When this attribute is set, it specifies that no scripted controls are set, and the browser should use its default controls.
Expand All @@ -76,6 +82,8 @@ audio ={


/**
* @PB10
* @BB60+
* @description The loop attribute specifies that the audio will start over again, every time it is finished.
* <p>
* If this attribute is present the audio will loop.
Expand All @@ -99,6 +107,8 @@ audio ={
loop ,

/**
* @PB10
* @BB60+
* @description The preload attribute specifies if the audio should be loaded when the page loads.
* <p/> This attribute is ignored if autoplay is present.
* syntax :
Expand All @@ -124,6 +134,8 @@ audio ={
preload : ,

/**
* @PB10
* @BB60+
* @description The src attribute specifies the URL of the audio to play.
* <p/>The audio can also be set using the <source> tag.
* <p>
Expand Down
79 changes: 5 additions & 74 deletions api/DeviceMotion.js → api/html5_deviceMotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/**
* @toc {System} Acceleration
* @toc {Accelerometer} Acceleration
* @PB10
*Acceleration data is given in meters per second squared and uses the body axes defined in the device orientation event. Acceleration data (without the effect of gravity) cannot be provided when there is a lack of a gyroscope.
*Implementations that are unable to provide acceleration data without the effect of gravity may instead supply the acceleration including the effect of gravity.
Expand Down Expand Up @@ -46,7 +46,8 @@ Acceleration={
};

/**
**@toc {User Interface} HTML5 RotationRate
* @toc {Accelerometer} RotationRate
* @PB10
*Represents the Angular velocity of the motion.
*The orientation of the device is given in terms of the transfromation from a coordinate frame fixed on the Earth to a coordinate frame fixed in the device.
*The Earth coordinate frame is a 'East, North, Up' frame at the user's location. It has the following 3 axes, where the ground plane is tangent to the WGS 84 spheroid at the user's location.
Expand Down Expand Up @@ -77,7 +78,8 @@ RotationRate={
};

/**
*@toc {User Interface} HTML5 DeviceMotionEvent
* @toc {Accelerometer} DeviceMotionEvent
* @PB10
*This event provides direct access to motion data from an accelerometer and gyroscope. The three pieces of data provided are the acceleration, acceleration including gravity and rotation rate. <br>Because our hardware currently does not have a gyroscope, not all interfaces of this event are available to us (acceleration without gravity and rotation rate.)<br>
*@class
*@property {Acceleration} acceleration The acceleration provided by the acceleration property is that of the body and hence excludes the effect of gravity.
Expand All @@ -101,75 +103,4 @@ DeviceMotionEvent={
interval:,
};

/**
*The orientation of the device is given in terms of the transfromation from a coordinate frame fixed on the Earth to a coordinate frame fixed in the device.
*The Earth coordinate frame is a 'East, North, Up' frame at the user's location. It has the following 3 axes, where the ground plane is tangent to the WGS 84 spheroid at the user's location.
*<ul>
*<li>East (X) is in the ground plane, perpendicular to the North axis and positive towards the East.</li>
*<li>North (Y) is in the ground plane and positive towards True North (towards the North Pole).</li>
*<li>Up (Z) is perpendicular to the ground plane and positive upwards.</li>
*</ul>
*For a mobile device, the device coordinate frame has the following 3 axes. The axes are defined relative to the standard orientation of the screen,
*typically portrait, when slide-out keyboards are not deployed. If the orientation of the screen changes when the device is rotated or a slide-out keyboard is deployed,
*this does not affect the orientation of the coordinate frame relative to the device. Users wishing to detect these changes in screen orientation may be able to do so with the existing orientationchange event.
*<ul>
*<li>x is in the plane of the screen and is positive towards the right hand side of the screen.</li>
*<li>y is in the plane of the screen and is positive towards the top of the screen.</li>
*<li>z is perpendicular to the screen, positive out of the screen.</li>
*</ul>
*The transformation from the Earth frame to the device frame is expressed in terms of 3 rotations,
*specified in the device frame. Rotations use the right-hand convention: positive rotation around an axis is clockwise when viewed along the positive direction of the axis.
Starting with the two frames aligned, the rotations are applied in the following order:
<ol>
<li>
<p>Rotate the device frame around its z axis by alpha degrees, with alpha in [0, 360).</p>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">
<img src="images/playbook_flat.png"/>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">Device in the initial position, with Earth (XYZ) and body (xyz) frames aligned.</div>
</div>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">
<img src="images/playbook_rotate_alpha.png"/>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">Device rotated through angle alpha about z axis, with previous locations of x and y axes shown as x0 and y0.</div>
</div>
</li>
<li>
<p>Rotate the device frame around its x axis by beta degrees, with beta in [-180, 180).</p>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">
<img src="images/playbook_rotate_beta.png"/>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">Device rotated through angle beta about new x axis, with previous locations of y and z axes shown as y0</div>
</div>
</li>
<li>
<p>Rotate the device frame around its y axis by gamma degrees, with gamma in [-90, 90).</p>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">
<img src="images/playbook_rotate_gamma.png"/>
<div style="display: inline-block;width: 350px;margin-right: 20px;font-size: small;">Device rotated through angle gamma about new y axis, with previous locations of x and z axes shown as x0</div>
</div>
</li>
</ol>
Thus the angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''. <a href="http://en.wikipedia.org/wiki/Euler_angles">[EULERANGLES]</a>

Note that this choice of angles follows mathematical convention, but means that alpha is in the opposite sense to a compass heading.
*@class
*@property {Number} alpha Angular displacement of the device frame around its z axis by alpha degrees.
*@property {Number} beta Angular displacement of the device frame around its x axis by beta degrees.
*@property {Number} gamma Angular displacement of the device frame around its y axis by gamma degrees.
*@property {Boolean} absolute Implementations that are unable to provide absolute values for the three angles may instead provide values relative to some arbitrary orientation, as this may still be of utility. In this case, the absolute property should be set to false. Otherwise, the absolute property should be set to true.
*@property {Boolean} compassCalibrated Implementations should set the compassCalibrated property to true if the compass is correctly calibrated. Otherwise, the compassCalibrated property should be set to false. This may imply that user action, such as performing a manual calibration procedure, is required.
*@example
*window.addEventListener("deviceorientation", function(event) {
* var Alpha = "The rotation around the Z axis is :" +event.alpha;
* var Beta = "The rotation around the X axis is :" +event.beta;
* var Gamma = "The rotation around the Y axis is :" +event.gamma;
* alert(Alpha+"\n"+Beta+"\n"+Gamma);
* &#47;&#47 A device lying flat on a horizontal surface with the top of the screen pointing West has the following orientation:
* &#47;&#47 {alpha: 90, beta: 0, gamma: 0}
*}, true);
*/
DeviceOrientationEvent={
alpha:,
beta:,
gamma:,
absolute:,
compassCalibrated:
}
File renamed without changes.
Loading