1.1 --- a/matrix/index.html Thu Mar 14 12:51:14 2013 -0700 1.2 +++ b/matrix/index.html Thu Mar 14 21:41:18 2013 -0700 1.3 @@ -118,6 +118,8 @@ 1.4 </dd> 1.5 </dl> 1.6 1.7 + <p class='issue'>Define initial values.</p> 1.8 + 1.9 <p class='issue'> 1.10 It is doubtful that this can be very useful for authors. On the other hand, it allows scripted animations similar to the animations by CSS3 Transforms. 1.11 </p> 1.12 @@ -160,6 +162,7 @@ 1.13 </div> 1.14 <p class='issue'>Should it be postponed to avoid CSS3 Transforms dependency?</p> 1.15 <p class='issue'>Should unit-less values (like for SVG transform presentation attribute) be allowed too? <code>"translate(20,20)"</code></p> 1.16 + <p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the <code>DOMString</code> parameter does not validate to a transform list [[!CSS3-TRANSFORMS]]. 1.17 </dd> 1.18 <dt>Constructor()</dt> 1.19 <dd> 1.20 @@ -185,6 +188,7 @@ 1.21 Create an identity matrix first. An Float32array [[!TYPED-ARRAYS]] of 6 items sets the element values <code>a</code> to <code>f</code>. An array of 16 items sets the element values <code>m11</code> to <code>m44</code>. 1.22 </dd> 1.23 </dl> 1.24 + <p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the <code>Float32array</code> parameter does not consist of 6 or 16 items. 1.25 </dd> 1.26 <dt>Constructor()</dt> 1.27 <dd> 1.28 @@ -194,6 +198,7 @@ 1.29 Create an identity matrix first. An Float64array [[!TYPED-ARRAYS]] of 6 items sets the element values <code>a</code> to <code>f</code>. An array of 16 items sets the element values <code>m11</code> to <code>m44</code>. 1.30 </dd> 1.31 </dl> 1.32 + <p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the <code>Float64array</code> parameter does not consist of 6 or 16 items. 1.33 </dd> 1.34 <dt>Constructor()</dt> 1.35 <dd> 1.36 @@ -203,6 +208,7 @@ 1.37 Create an identity matrix first. A sequence of 6 items sets the element values <code>a</code> to <code>f</code>. A sequence of 16 items sets the element values <code>m11</code> to <code>m44</code>. 1.38 </dd> 1.39 </dl> 1.40 + <p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the number sequence parameter does not consist of 6 or 16 items. 1.41 </dd> 1.42 </section> 1.43 1.44 @@ -210,7 +216,7 @@ 1.45 <h3>Two-dimensional attributes</h3> 1.46 1.47 <p> 1.48 - If a <a>Matrix</a> just consists of 2D transformations the 6 values <code>a</code> to <code>f</code> can represent the transformation matrix. If the <a>Matrix</a> object is immutable, a DOMException of type <code>NoModificationAllowedError</code> must be thrown on setting the attributes. 1.49 + If a <a>Matrix</a> just consists of 2D transformations the 6 values <code>a</code> to <code>f</code> can represent the transformation matrix. If the <a>Matrix</a> object is immutable, a <var>DOMException</var> with name <code>NoModificationAllowedError</code> must be thrown on setting the attributes. 1.50 </p> 1.51 1.52 <p> 1.53 @@ -251,7 +257,7 @@ 1.54 <h3>Three-dimensional attributes</h3> 1.55 1.56 <p> 1.57 - The following attributes <code>m11</code> to <code>m44</code> represent the elements of the 4x4 matrix. The coordinates are in column-major order. If the <a>Matrix</a> object is immutable, a DOMException of type <code>NoModificationAllowedError</code> must be thrown on setting the attributes. 1.58 + The following attributes <code>m11</code> to <code>m44</code> represent the elements of the 4x4 matrix. The coordinates are in column-major order. If the <a>Matrix</a> object is immutable, a <var>DOMException</var> with name <code>NoModificationAllowedError</code> must be thrown on setting the attributes. 1.59 </p> 1.60 1.61 <dl title='partial interface Matrix' class='idl'> 1.62 @@ -381,10 +387,10 @@ 1.63 <dl class='parameters'> 1.64 <dt>double scale</dt> 1.65 <dd>Multiplier for a uniform scale transformation.</dd> 1.66 - <dt>optional double originX</dt> 1.67 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.68 - <dt>optional double originY</dt> 1.69 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.70 + <dt>optional double originX = 0</dt> 1.71 + <dd>Transformation origin on the x-axis.</dd> 1.72 + <dt>optional double originY = 0</dt> 1.73 + <dd>Transformation origin on the y-axis.</dd> 1.74 </dl> 1.75 Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = scale</code>) on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. 1.76 </dd> 1.77 @@ -393,12 +399,12 @@ 1.78 <dl class='parameters'> 1.79 <dt>double scale</dt> 1.80 <dd>Multiplier for a uniform scale transformation.</dd> 1.81 - <dt>optional double originX</dt> 1.82 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.83 - <dt>optional double originY</dt> 1.84 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.85 - <dt>optional double originZ</dt> 1.86 - <dd>Transformation origin on the z-axis. Defaulting to 0.</dd> 1.87 + <dt>optional double originX = 0</dt> 1.88 + <dd>Transformation origin on the x-axis.</dd> 1.89 + <dt>optional double originY = 0</dt> 1.90 + <dd>Transformation origin on the y-axis.</dd> 1.91 + <dt>optional double originZ = 0</dt> 1.92 + <dd>Transformation origin on the z-axis.</dd> 1.93 </dl> 1.94 Post-multiplies a uniform scale transformation (<code>m11 = m22 = m33 = scale</code>) on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. 1.95 </dd> 1.96 @@ -407,16 +413,16 @@ 1.97 <dl class='parameters'> 1.98 <dt>double scaleX</dt> 1.99 <dd>Multiplier for a non-uniform scale along the x-axis.</dd> 1.100 - <dt>optional double scaleY</dt> 1.101 - <dd>Multiplier for a non-uniform scale along the y-axis. Defaulting to 1.</dd> 1.102 - <dt>optional double scaleZ</dt> 1.103 - <dd>Multiplier for a non-uniform scale along the z-axis. Defaulting to 1.</dd> 1.104 - <dt>optional double originX</dt> 1.105 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.106 - <dt>optional double originY</dt> 1.107 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.108 - <dt>optional double originZ</dt> 1.109 - <dd>Transformation origin on the z-axis. Defaulting to 0.</dd> 1.110 + <dt>optional double scaleY = 1</dt> 1.111 + <dd>Multiplier for a non-uniform scale along the y-axis.</dd> 1.112 + <dt>optional double scaleZ = 1</dt> 1.113 + <dd>Multiplier for a non-uniform scale along the z-axis.</dd> 1.114 + <dt>optional double originX = 0</dt> 1.115 + <dd>Transformation origin on the x-axis.</dd> 1.116 + <dt>optional double originY = 0</dt> 1.117 + <dd>Transformation origin on the y-axis.</dd> 1.118 + <dt>optional double originZ = 0</dt> 1.119 + <dd>Transformation origin on the z-axis.</dd> 1.120 </dl> 1.121 Post-multiplies a non-uniform scale transformation on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. 1.122 </dd> 1.123 @@ -425,10 +431,10 @@ 1.124 <dl class='parameters'> 1.125 <dt>double angle</dt> 1.126 <dd>Rotation angle in degrees.</dd> 1.127 - <dt>optional double originX</dt> 1.128 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.129 - <dt>optional double originY</dt> 1.130 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.131 + <dt>optional double originX = 0</dt> 1.132 + <dd>Transformation origin on the x-axis.</dd> 1.133 + <dt>optional double originY = 0</dt> 1.134 + <dd>Transformation origin on the y-axis.</dd> 1.135 </dl> 1.136 Post-multiplies a rotation transformation on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. 1.137 </dd> 1.138 @@ -506,7 +512,7 @@ 1.139 <h3>Mutable transformation methods</h3> 1.140 1.141 <p> 1.142 - The following methods do modify the current matrix. If the <a>Matrix</a> object is immutable, a DOMException of type <code>NoModificationAllowedError</code> must be thrown on calling the operations below. 1.143 + The following methods do modify the current matrix. If the <a>Matrix</a> object is immutable, a <var>DOMException</var> with name <code>NoModificationAllowedError</code> must be thrown on calling the operations below. 1.144 </p> 1.145 1.146 <dl title='partial interface Matrix' class='idl'> 1.147 @@ -545,10 +551,10 @@ 1.148 <dl class='parameters'> 1.149 <dt>double scale</dt> 1.150 <dd>Multiplier for a uniform scale transformation.</dd> 1.151 - <dt>optional double originX</dt> 1.152 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.153 - <dt>optional double originY</dt> 1.154 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.155 + <dt>optional double originX = 0</dt> 1.156 + <dd>Transformation origin on the x-axis.</dd> 1.157 + <dt>optional double originY = 0</dt> 1.158 + <dd>Transformation origin on the y-axis.</dd> 1.159 </dl> 1.160 Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = scale</code>) on the current matrix with the given origin. 1.161 </dd> 1.162 @@ -557,12 +563,12 @@ 1.163 <dl class='parameters'> 1.164 <dt>double scale</dt> 1.165 <dd>Multiplier for a uniform scale transformation.</dd> 1.166 - <dt>optional double originX</dt> 1.167 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.168 - <dt>optional double originY</dt> 1.169 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.170 - <dt>optional double originZ</dt> 1.171 - <dd>Transformation origin on the z-axis. Defaulting to 0.</dd> 1.172 + <dt>optional double originX = 0</dt> 1.173 + <dd>Transformation origin on the x-axis.</dd> 1.174 + <dt>optional double originY = 0</dt> 1.175 + <dd>Transformation origin on the y-axis.</dd> 1.176 + <dt>optional double originZ = 0</dt> 1.177 + <dd>Transformation origin on the z-axis.</dd> 1.178 </dl> 1.179 Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = m33 = scale</code>) on the current matrix with the given origin. 1.180 </dd> 1.181 @@ -571,16 +577,16 @@ 1.182 <dl class='parameters'> 1.183 <dt>double scaleX</dt> 1.184 <dd>Multiplier for a non-uniform scale along the x-axis.</dd> 1.185 - <dt>optional double scaleY</dt> 1.186 - <dd>Multiplier for a non-uniform scale along the y-axis. Defaulting to 1.</dd> 1.187 - <dt>optional double scaleZ</dt> 1.188 - <dd>Multiplier for a non-uniform scale along the z-axis. Defaulting to 1.</dd> 1.189 - <dt>optional double originX</dt> 1.190 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.191 - <dt>optional double originY</dt> 1.192 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.193 - <dt>optional double originZ</dt> 1.194 - <dd>Transformation origin on the z-axis. Defaulting to 0.</dd> 1.195 + <dt>optional double scaleY = 1</dt> 1.196 + <dd>Multiplier for a non-uniform scale along the y-axis.</dd> 1.197 + <dt>optional double scaleZ = 1</dt> 1.198 + <dd>Multiplier for a non-uniform scale along the z-axis.</dd> 1.199 + <dt>optional double originX = 0</dt> 1.200 + <dd>Transformation origin on the x-axis.</dd> 1.201 + <dt>optional double originY = 0</dt> 1.202 + <dd>Transformation origin on the y-axis.</dd> 1.203 + <dt>optional double originZ = 0</dt> 1.204 + <dd>Transformation origin on the z-axis.</dd> 1.205 </dl> 1.206 Post-multiplies a non-uniform scale transformation on the current matrix with the given origin. 1.207 </dd> 1.208 @@ -589,10 +595,10 @@ 1.209 <dl class='parameters'> 1.210 <dt>double angle</dt> 1.211 <dd>Rotation angle in degrees.</dd> 1.212 - <dt>optional double originX</dt> 1.213 - <dd>Transformation origin on the x-axis. Defaulting to 0.</dd> 1.214 - <dt>optional double originY</dt> 1.215 - <dd>Transformation origin on the y-axis. Defaulting to 0.</dd> 1.216 + <dt>optional double originX = 0</dt> 1.217 + <dd>Transformation origin on the x-axis.</dd> 1.218 + <dt>optional double originY = 0</dt> 1.219 + <dd>Transformation origin on the y-axis.</dd> 1.220 </dl> 1.221 Post-multiplies a rotation transformation on the current matrix with the given origin. 1.222 </dd> 1.223 @@ -678,11 +684,11 @@ 1.224 </dd> 1.225 <dt>Float32Array toFloat32Array()</dt> 1.226 <dd> 1.227 - Returns the serialized elements of the current matrix in column-major order as Float32Array [[!TYPED-ARRAYS]]. 1.228 + Returns the serialized 16 elements <code>m11</code> to <code>m44</code> of the current matrix in column-major order as Float32Array [[!TYPED-ARRAYS]]. 1.229 </dd> 1.230 <dt>Float64Array toFloat64Array()</dt> 1.231 <dd> 1.232 - Returns the serialized elements of the current matrix in column-major order as Float64Array [[!TYPED-ARRAYS]]. 1.233 + Returns the serialized 16 elements <code>m11</code> to <code>m44</code> of the current matrix in column-major order as Float64Array [[!TYPED-ARRAYS]]. 1.234 </dd> 1.235 <dt>DecomposedMatrix decompose()</dt> 1.236 <dd>