Parsing 3D XML Tile Info
I am recreating a game (using only web languages, mind you), and for each room I have the XML for the tile placement. Parsing the XML doesn't produce the correct result, as there are not only X & Y coordinates, but also a Z.
XML Excerpt:
<NODE CLASS="tile" REF="80" X="216" Y="144" Z="38" />
<NODE CLASS="tile" REF="81" X="240" Y="144" Z="38" />
<NODE CLASS="tile" REF="82" X="264" Y="144" Z="38" />
<NODE CLASS="tile" REF="83" X="288" Y="144" Z="38" />
<NODE CLASS="tile" REF="84" X="312" Y="144" Z="30" />
<NODE CLASS="tile" REF="85" X="336" Y="144" Z="30" />
You can see the result of parsing this here: http://openvmk.com/parsexml.php (the tiles aren't even close to their correct positions)
The original XML is here: http://openvmk.com/banquet.xml
开发者_StackOverflowI need to know how to implement the Z using HTML/CSS or JavaScript (jQuery).
I need to know how to implement the Z using HTML/CSS or JavaScript (jQuery).
Assuming that "Z" is the stacking order for when tiles overlap, you're looking for the z-index
property.
More information is here: https://developer.mozilla.org/en/Understanding_CSS_z-index
精彩评论