Skip to content

Commit b1d8fc9

Browse files
committed
[css-transforms-2] Add ''perspective(none)''.
This adds the ''none'' argument to the ''perspective()'' function, equivalent to infinity. Fixes w3c#6488.
1 parent 2a72f82 commit b1d8fc9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

css-transforms-2/Overview.bs

+7-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Terminology {#terminology}
122122
''rotateY(0)'',
123123
''rotateZ(0)''
124124
and ''matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)''.
125-
A special case is perspective: ''perspective(infinity)''.
125+
A special case is perspective: ''perspective(none)''.
126126
The value of m<sub>34</sub> becomes infinitesimal small
127127
and the transform function is therefore assumed to be equal to the identity matrix.
128128

@@ -983,7 +983,7 @@ In the following <dfn export>3d transform functions</dfn>, a <<zero>> behaves th
983983
:: same as ''rotate3d(0, 1, 0, &lt;angle>)''.
984984
: <span class='prod'><dfn>rotateZ()</dfn> = rotateZ( [ <<angle>> | <<zero>> ] )</span>
985985
:: same as ''rotate3d(0, 0, 1, &lt;angle>)'', which is a 3d transform equivalent to the 2d transform ''rotate(&lt;angle>)''.
986-
: <span class='prod'><dfn>perspective()</dfn> = perspective( <<length [0,∞]>> )</span>
986+
: <span class='prod'><dfn>perspective()</dfn> = perspective( <<length [0,∞]>> | ''none'' )</span>
987987
:: 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.
988988

989989
If the depth value is less than ''1px'',
@@ -1378,9 +1378,12 @@ One translation unit on a matrix is equivalent to 1 pixel in the local coordinat
13781378
</div>
13791379

13801380
<li id="PerspectiveDefined">
1381-
A perspective projection matrix with the parameter <em>d</em> is equivalent to the matrix:
1381+
A perspective projection matrix with the parameter <var>d</var> is equivalent to the matrix:
13821382

1383-
$$\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & -1/d & 1 \end{bmatrix}$$
1383+
$$\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & -1/d & 1 \end{bmatrix}$$
1384+
1385+
If the parameter <var>d</var> is ''none'' it is treated as infinity
1386+
(and the resulting matrix is the identity matrix).
13841387

13851388
</ul>
13861389

0 commit comments

Comments
 (0)