Skip to content

Commit

Permalink
Spec: Add categories to the elements
Browse files Browse the repository at this point in the history
  • Loading branch information
csvurt authored and ariyapour committed Nov 9, 2015
1 parent 62d5e61 commit 4b7bb62
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 2 deletions.
69 changes: 67 additions & 2 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ <h4>Interactive elements</h4>
<h3>The root element</h3>
<section>
<h4>The <code>xml3d</code> element</h4>
<dl class='element'>
</dl>

<dl title='interface XML3DXml3dElement : HTMLElement' class='idl'>
<dt>attribute unsigned long width</dt>
Expand Down Expand Up @@ -310,6 +312,10 @@ <h4>The <code>xml3d</code> element</h4>
<h3>Scene elements</h3>
<section>
<h4>The <code>group</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#transformable-elements">Transformable element</a></dd>
</dl>
<dl title='interface XML3DGroupElement : HTMLElement' class='idl'>
<dt>attribute DOMString transform</dt>
<dd>Accepts a URI fragment referencing a <a>transform</a> element. Alternatively a transformation may be defined
Expand All @@ -335,6 +341,10 @@ <h4>The <code>group</code> element</h4>
</section>
<section>
<h4>The <code>view</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#transformable-elements">Transformable element</a></dd>
</dl>
<dl title='interface XML3DViewElement : HTMLElement' class='idl'>
<dt>attribute XML3DVec3 position</dt>
<dd>The position of the camera in world space</dd>
Expand Down Expand Up @@ -382,6 +392,11 @@ <h4>The <code>view</code> element</h4>
</section>
<section>
<h4>The <code>light</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
<dd><a href="#transformable-elements">Transformable element</a></dd>
</dl>
<p>The <span class="element-name">light</span> element defines a light source in the scene that emits light based on the light model defined by
the <a href="#attr-light-model" class="internalDFN">model</a> attribute. The light uses the <a href="h-generic-data-model">generic data model</a> to define the parameters of the referenced material model.
The coordinate system of the <span class="element-name">light</span> element defines the base coordinate system for the light. However, the final position and direction of the light source can altered by
Expand Down Expand Up @@ -421,23 +436,39 @@ <h4>The <code>light</code> element</h4>
</section>
<section>
<h4>The <code>mesh</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
<dd><a href="#transformable-elements">Transformable element</a></dd>
</dl>
</section>
<section>
<h4>The <code>model</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
<dd><a href="#transformable-elements">Transformable element</a></dd>
</dl>
</section>
</section>

<section>
<h3>Definition Areas</h3>
<section>
<h4>The <code>defs</code> element</h4>
<dl class='element'>
</dl>
</section>
</section>

<section>
<h3>Property elements</h3>
<section>
<h4>The <code>material</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
</dl>
<p>A material describes the surface shading of an object. Materials are defined using a <span class="element-name">material</span>
element and then
referenced by the <a href="#dfn-material-property" class="internalDFN">material</a> property on a given <a href="#scene-elements">scene
Expand Down Expand Up @@ -481,14 +512,22 @@ <h4>The <code>transform</code> element</h4>
<h3>Data and dataflow elements</h3>
<section>
<h4>The <code>data</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
</dl>
<dl title='interface XML3DDataElement : HTMLElement' class='idl'>
<dt>attribute DOMString script</dt>
<dd>The <code>script</code> IDL attribute must reflect the <a href="#attr-material-script" class="internalDFN">script</a> content attribute.</dd>
</dl>
</section>
<section>
<h4>The <code>float</code>, <code>float2</code>, <code>float3</code>, <code>float4</code>, and
<code>float4x4</code> elements</h4>
<h4>The <code>float</code>, <code>float2</code>, <code>float3</code>, <code>float4</code>, and
<code>float4x4</code> elements</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#value-elements">Value element</a></dd>
</dl>
<p>The <code>float*</code> elements hold a space separated list of floating point values. The tag name determines how this data is interpreted, ie. a <code>float2</code> element
will interpret the data as an array of 2D vectors while a <code>float4x4</code> element will interpret it as an array of 4x4 matrices. </p>

Expand All @@ -512,6 +551,10 @@ <h4>The <code>float</code>, <code>float2</code>, <code>float3</code>, <code>floa
</section>
<section>
<h4>The <code>int</code> and <code>int4</code> elements</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#value-elements">Value element</a></dd>
</dl>
<p>The <code>int*</code> elements hold a space separated list of integer values. The tag name determines how this data is interpreted, ie. an <code>int4</code> element
will interpret the data as an array of 4-component integer vectors. </p>
<dl title='interface XML3DValueElement : HTMLElement' class='idl'>
Expand All @@ -532,6 +575,10 @@ <h4>The <code>int</code> and <code>int4</code> elements</h4>
</section>
<section>
<h4>The <code>bool</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#value-elements">Value element</a></dd>
</dl>
<p>The <code>bool</code> element holds a space separated list of boolean values. The values may be given in string form (<code>true/false</code>) or as integers (<code>1/0</code>). </p>

<dl title='interface XML3DValueElement : HTMLElement' class='idl'>
Expand All @@ -552,6 +599,10 @@ <h4>The <code>bool</code> element</h4>
</section>
<section>
<h4>The <code>texture</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#value-elements">Value element</a></dd>
</dl>
<section>
<dl title="enum WrapMode" class="idl">
<dt>clamp</dt>
Expand Down Expand Up @@ -603,19 +654,33 @@ <h4>The <code>texture</code> element</h4>
</section>
<section>
<h4>The <code>dataflow</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
</dl>
</section>
</section>

<section>
<h3>Assets</h3>
<section>
<h4>The <code>asset</code> element</h4>
<dl class='element'>
</dl>
</section>
<section>
<h4>The <code>assetdata</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
</dl>
</section>
<section>
<h4>The <code>assetmesh</code> element</h4>
<dl class='element'>
<dt>Categories:</dt>
<dd><a href="#data-elements">Data element</a></dd>
</dl>
</section>
</section>

Expand Down
37 changes: 37 additions & 0 deletions spec/xml3d-spec.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,40 @@ div.attributes table tr:nth-child(2n) {
div.attributes table th {
font-weight: bold;
}

/* Element blocks with Categories list */
section h4 {
position: relative;
top: 0;
left: 0;
z-index: 4;
}

.element {
background: #F4F4FA;
color: black;
margin: 0 0 1em 0.15em;
padding: 0 1em 0.25em 0.75em;
border-left: solid #9999FF 0.25em;
position: relative;
z-index: 2;
}

.element:before {
position: absolute;
top: 0;
left: -1.15em;
height: 2em;
width: 0.9em;
background: #F4F4FA;
content: ' ';
border-style: none none solid solid;
border-color: #9999FF;
border-width: 0.25em;
}

h4 + .element, h4 + div + .element {
margin-top: -2.9em;
padding-top: 2em;
}
/* /Element blocks with Categories list */

0 comments on commit 4b7bb62

Please sign in to comment.