解析 3D XML 平铺信息
我正在重新创建一个游戏(请注意,仅使用网络语言),对于每个房间,我都有用于放置图块的 XML。解析 XML 不会产生正确的结果,因为不仅有 X & Y 坐标,也是 Z 坐标。
XML 摘录:
<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" />
您可以在此处查看解析结果:http://openvmk.com/parsexml.php(图块甚至没有接近其正确位置)
原始 XML 位于:http://openvmk.com/banquet.xml
我需要知道如何使用 HTML/CSS 或 JavaScript (jQuery) 实现 Z。
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
I need to know how to implement the Z using HTML/CSS or JavaScript (jQuery).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设“Z”是图块重叠时的堆叠顺序,您正在寻找 <代码>z-index 属性。
更多信息如下:https://developer.mozilla.org/en/Understand_CSS_z-index
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