Skip to content
Closed
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
10 changes: 5 additions & 5 deletions css-transforms-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -769,11 +769,9 @@ Computed value: the keyword ''perspective/none'' or an absolute length
Animation type: by computed value
</pre>

Where <<length>> values must be positive.

<dl dfn-type=value dfn-for="perspective">
: <dfn><<length>></dfn>
:: Distance to the center of projection.
:: Distance to the center of projection. Negative values are invalid.

Issue: Verify that projection is the distance to the center of projection.

Expand Down Expand Up @@ -902,7 +900,7 @@ In the following <dfn export>3d transform functions</dfn>, a <<zero>> behaves th
: <span class='prod'><dfn>rotateZ()</dfn> = rotateZ( [ <<angle>> | <<zero>> ] )</span>
:: same as ''rotate3d(0, 0, 1, &lt;angle>)'', which is a 3d transform equivalent to the 2d transform ''rotate(&lt;angle>)''.
: <span class='prod'><dfn>perspective()</dfn> = perspective( <<length>> )</span>
:: specifies a <a href="#PerspectiveDefined">perspective projection matrix</a>. This matrix scales points in X and Y based on their Z value, scaling points with positive Z values away from the origin, and those with negative Z values towards the origin. Points on the z=0 plane are unchanged. The parameter represents the distance of the z=0 plane from the viewer. Lower values give a more flattened pyramid and therefore a more pronounced perspective effect. For example, a value of 1000px gives a moderate amount of foreshortening and a value of 200px gives an extreme amount. The value for depth must be greater than zero, otherwise the function is invalid.
:: specifies a <a href="#PerspectiveDefined">perspective projection matrix</a>. This matrix scales points in X and Y based on their Z value, scaling points with positive Z values away from the origin, and those with negative Z values towards the origin. Points on the z=0 plane are unchanged. The parameter represents the distance of the z=0 plane from the viewer. Lower values give a more flattened pyramid and therefore a more pronounced perspective effect. For example, a value of 1000px gives a moderate amount of foreshortening and a value of 200px gives an extreme amount. Negative values are invalid.


Transform function primitives and derivatives {#transform-primitives}
Expand Down Expand Up @@ -1265,10 +1263,12 @@ One translation unit on a matrix is equivalent to 1 pixel in the local coordinat
<img src="images/rotate3dvariables.png" alt="\newline sc = \sin (\alpha/2) \cdot \cos (\alpha/2) \newline sq = \sin^2 (\alpha/2)" width="221" height="50">

<li id="PerspectiveDefined">
A perspective projection matrix with the parameter <em>d</em> is equivalent to the matrix:
A perspective projection matrix with the parameter <em>d</em> is equivalent to the matrix

<img src="images/perspective.png" alt="\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & -1/d & 1 \end{bmatrix}" width="143" height="106">

when <em>d</em> is non-zero, and a 4x4 identity matrix when <em>d</em> is zero.

</ul>

The SVG 'transform' Attribute {#svg-transform}
Expand Down