Skip to content

Commit 70b681a

Browse files
committed
2009-10-30 dino@apple.com
- perspective now takes a Length value - described what the reverse face of a transformed element should look like
1 parent 3689792 commit 70b681a

File tree

3 files changed

+75
-25
lines changed

3 files changed

+75
-25
lines changed

css3-3d-transforms/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2009-10-30 dino@apple.com
2+
3+
- perspective now takes a Length value
4+
- described what the reverse face of a transformed element should look like

css3-3d-transforms/Overview.html

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121

2222
<h1>CSS 3D Transforms Module Level 3</h1>
2323

24-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 14 April 2009</h2>
24+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 31 October
25+
2009</h2>
2526

2627
<dl>
2728
<dt>This version:
2829

2930
<dd> <a
30-
href="http://www.w3.org/TR/2009/ED-css3-3d-transforms-20090414">http://dev.w3.org/csswg/css3-3d-transforms/</a>
31-
<!--http://www.w3.org/TR/2009/WD-css3-3d-transforms-20090414-->
31+
href="http://www.w3.org/TR/2009/ED-css3-3d-transforms-20091031">http://dev.w3.org/csswg/css3-3d-transforms/</a>
32+
<!--http://www.w3.org/TR/2009/WD-css3-3d-transforms-20091031-->
3233

3334
<dt>Latest version:
3435

@@ -111,6 +112,9 @@ <h2 class="no-num no-toc" id=status>Status of this document</h2>
111112
W3C Patent Policy</a>.</p>
112113
<!--end-status-->
113114

115+
<p> The <a href=ChangeLog>list of changes made to this specification</a>
116+
are available.
117+
114118
<h2 class="no-num no-toc" id=contents>Table of contents</h2>
115119
<!--begin-toc-->
116120

@@ -147,17 +151,20 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
147151
<li><a href="#animation"><span class=secno>9 </span> Transitions and
148152
animations between transform values </a>
149153

150-
<li><a href="#dom-interfaces"><span class=secno>10 </span> DOM Interfaces
154+
<li><a href="#rendering-3d"><span class=secno>10 </span> Rendering in 3d
155+
</a>
156+
157+
<li><a href="#dom-interfaces"><span class=secno>11 </span> DOM Interfaces
151158
</a>
152159
<ul class=toc>
153-
<li><a href="#cssmatrix-interface"><span class=secno>10.1 </span> 10.1
160+
<li><a href="#cssmatrix-interface"><span class=secno>11.1 </span> 10.1
154161
CSSMatrix </a>
155162

156-
<li><a href="#csstransformvalue-interface"><span class=secno>10.2
163+
<li><a href="#csstransformvalue-interface"><span class=secno>11.2
157164
</span> 10.2 CSSTransformValue </a>
158165
</ul>
159166

160-
<li><a href="#references"><span class=secno>11 </span>References</a>
167+
<li><a href="#references"><span class=secno>12 </span>References</a>
161168
<ul class=toc>
162169
<li class=no-num><a href="#normative-references">Normative
163170
references</a>
@@ -426,7 +433,7 @@ <h2 id=perspective-property><span class=secno>5 </span> The <span
426433
<p> The <span class=prop-name>&lsquo;<code class=property><a
427434
href="#perspective">perspective</a></code>&rsquo;</span> property applies
428435
the same transform as the <span
429-
class=prop-value>perspective(&lt;number&gt;)</span> transform function,
436+
class=prop-value>perspective(&lt;length&gt;)</span> transform function,
430437
except that it applies only to the positioned or transformed children of
431438
the element, not to the transform on the element itself.
432439

@@ -450,7 +457,7 @@ <h2 id=perspective-property><span class=secno>5 </span> The <span
450457
<tr>
451458
<td> <em>Value:</em>
452459

453-
<td> none | &lt;number&gt;
460+
<td> none | &lt;length&gt;
454461

455462
<tr>
456463
<td> <em>Initial:</em>
@@ -759,7 +766,7 @@ <h2 id=transform-functions><span class=secno>8 </span> The Transformation
759766
the skew on the Y axis. If the second parameter is not given then a value
760767
of 0 is used for the Y angle (ie. no skew on the Y axis).
761768

762-
<dt> <span class=prop-value>perspective(&lt;number&gt;)</span>
769+
<dt> <span class=prop-value>perspective(&lt;length&gt;)</span>
763770

764771
<dd> specifies a perspective projection matrix. This matrix maps a
765772
<em>viewing cube</em> onto a pyramid whose base is infinitely far away
@@ -770,11 +777,11 @@ <h2 id=transform-functions><span class=secno>8 </span> The Transformation
770777
viewer). The <em>depth</em>, given as the parameter to the function,
771778
represents the distance of the z=0 plane from the viewer. Lower values
772779
give a more flattened pyramid and therefore a more pronounced perspective
773-
effect. The value is given in pixels, so a value of 1000 gives a moderate
774-
amount of foreshortening and a value of 200 gives an extreme amount. The
775-
matrix is computed by starting with an identity matrix and replacing the
776-
value at row 3, column 4 with the value -1/depth. The value for depth
777-
must be greater than zero, otherwise the function is invalid.
780+
effect. For example, a value of 1000px gives a moderate amount of
781+
foreshortening and a value of 200px gives an extreme amount. The matrix
782+
is computed by starting with an identity matrix and replacing the value
783+
at row 3, column 4 with the value -1/depth. The value for depth must be
784+
greater than zero, otherwise the function is invalid.
778785
</dl>
779786
<!-- ======================================================================================================= -->
780787

@@ -863,13 +870,29 @@ <h2 id=animation><span class=secno>9 </span> Transitions and animations
863870
</ul>
864871
<!-- ======================================================================================================= -->
865872

866-
<h2 id=dom-interfaces><span class=secno>10 </span> DOM Interfaces</h2>
873+
<h2 id=rendering-3d><span class=secno>10 </span> Rendering in 3d</h2>
874+
875+
<p> Since CSS only describes a flat rendering model, without perspective,
876+
and where everything faces the viewer front on, once three-dimensional
877+
transforms are supported it is necessary to describe how an element should
878+
be drawn in different orientations.
879+
880+
<p> While CSS specifies a rendering order for properties, such as
881+
background, border and content, this rendering order does not imply any
882+
three-dimensional structure. That is, if an element is rotated so that its
883+
back face is facing the user, it will appear like a mirrored version of
884+
the front face. In other words, the transforms are applied to the rendered
885+
version of the elements, as if the element is rendered into an offscreen
886+
buffer, and that buffer is transformed and composited onto the page.</p>
887+
<!-- ======================================================================================================= -->
888+
889+
<h2 id=dom-interfaces><span class=secno>11 </span> DOM Interfaces</h2>
867890

868891
<p> This section describes the interfaces and functionality added to the
869892
DOM to support runtime access to the functionality described above.</p>
870893
<!-- ============================================================ -->
871894

872-
<h3 id=cssmatrix-interface><span class=secno>10.1 </span> 10.1 CSSMatrix</h3>
895+
<h3 id=cssmatrix-interface><span class=secno>11.1 </span> 10.1 CSSMatrix</h3>
873896

874897
<dl>
875898
<dt> <b>Interface <i><a id=DOM-CSSMatrix
@@ -1241,7 +1264,7 @@ <h3 id=cssmatrix-interface><span class=secno>10.1 </span> 10.1 CSSMatrix</h3>
12411264
</dl>
12421265
<!-- ============================================================ -->
12431266

1244-
<h3 id=csstransformvalue-interface><span class=secno>10.2 </span> 10.2
1267+
<h3 id=csstransformvalue-interface><span class=secno>11.2 </span> 10.2
12451268
CSSTransformValue</h3>
12461269

12471270
<dl>
@@ -1366,7 +1389,7 @@ <h3 id=csstransformvalue-interface><span class=secno>10.2 </span> 10.2
13661389
functions listed in the <code><a href="#effects">transform</a></code>
13671390
property.
13681391

1369-
<h2 id=references><span class=secno>11 </span>References</h2>
1392+
<h2 id=references><span class=secno>12 </span>References</h2>
13701393

13711394
<h3 class=no-num id=normative-references>Normative references</h3>
13721395
<!--begin-normative-->
@@ -1428,7 +1451,7 @@ <h2 class=no-num id=property-index>Property index</h2>
14281451
<tr valign=baseline>
14291452
<td><a class=property href="#perspective">perspective</a>
14301453

1431-
<td>none | &lt;number&gt;
1454+
<td>none | &lt;length&gt;
14321455

14331456
<td>none
14341457

css3-3d-transforms/Overview.src.html

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ <h2 class="no-num no-toc" id="abstract">Abstract</h2>
5555
<h2 class="no-num no-toc" id="status">Status of this document</h2>
5656
<!--status-->
5757

58+
<p>
59+
The <a href="ChangeLog">list of changes made to this specification</a> are
60+
available.
61+
</p>
5862

5963
<h2 class="no-num no-toc" id="contents">Table of contents</h2>
6064
<!--toc-->
@@ -369,7 +373,7 @@ <h2 id="perspective-property">
369373
<p>
370374
The <span class="prop-name">'perspective'</span> property applies the
371375
same transform as the <span
372-
class="prop-value">perspective(&lt;number&gt;)</span> transform
376+
class="prop-value">perspective(&lt;length&gt;)</span> transform
373377
function, except that it applies only to the positioned or transformed
374378
children of the element, not to the transform on the element itself.
375379
<p>
@@ -396,7 +400,7 @@ <h2 id="perspective-property">
396400
<em>Value:</em>
397401
</td>
398402
<td>
399-
none | &lt;number&gt;
403+
none | &lt;length&gt;
400404
</td>
401405
</tr>
402406
<tr>
@@ -758,7 +762,7 @@ <h2 id="transform-functions">
758762
value of 0 is used for the Y angle (ie. no skew on the Y axis).
759763
</dd>
760764
<dt>
761-
<span class="prop-value">perspective(&lt;number&gt;)</span>
765+
<span class="prop-value">perspective(&lt;length&gt;)</span>
762766
</dt>
763767
<dd>
764768
specifies a perspective projection matrix. This matrix maps a <em>viewing cube</em> onto a pyramid whose
@@ -767,8 +771,8 @@ <h2 id="transform-functions">
767771
window used for rendering the webpage between the viewer's position and a point at a distance of
768772
infinity from the viewer). The <em>depth</em>, given as the parameter to the function, represents the
769773
distance of the z=0 plane from the viewer. Lower values give a more flattened pyramid and
770-
therefore a more pronounced perspective effect. The value is given in pixels, so a value of 1000
771-
gives a moderate amount of foreshortening and a value of 200 gives an extreme amount. The matrix
774+
therefore a more pronounced perspective effect. For example, a value of 1000px
775+
gives a moderate amount of foreshortening and a value of 200px gives an extreme amount. The matrix
772776
is computed by starting with an identity matrix and replacing the value at row 3, column 4 with
773777
the value -1/depth. The value for depth must be greater than zero, otherwise the function is invalid.
774778
</dd>
@@ -877,6 +881,25 @@ <h2 id="animation">
877881
</li>
878882
</ul>
879883

884+
<!-- ======================================================================================================= -->
885+
<h2 id="rendering-3d">
886+
Rendering in 3d
887+
</h2>
888+
<p>
889+
Since CSS only describes a flat rendering model, without perspective, and where everything
890+
faces the viewer front on, once three-dimensional transforms are supported it is necessary
891+
to describe how an element should be drawn in different orientations.
892+
</p>
893+
894+
<p>
895+
While CSS specifies a rendering order for properties, such as background, border and content,
896+
this rendering order does not imply any three-dimensional structure. That is, if an element
897+
is rotated so that its back face is facing the user, it will appear like a mirrored version
898+
of the front face. In other words, the transforms are applied to the rendered version
899+
of the elements, as if the element is rendered into an offscreen buffer, and that buffer is
900+
transformed and composited onto the page.
901+
</p>
902+
880903
<!-- ======================================================================================================= -->
881904
<h2 id="dom-interfaces">
882905
DOM Interfaces

0 commit comments

Comments
 (0)