Interactive Vehicle Viewer
Drop vehicle XML files or click to select
How it works
- Parse
sample_vehicle.xml - Resolve component definitions and mesh files
- Assemble each body
- Render with Three.js
ts
const vehicle = parseVehicleXml(text);
const assembler = new VehicleBodyAssembler(resolver);
for (const component of body.components ?? []) {
await assembler.appendComponent(component);
}
const object = assembler.build();INFO
For simplicity, this demo only resolves basic blocks, wedges, pyramids, and inverse pyramids. No meshes are resolved.
Sample vehicle XML
xml
<?xml version="1.0" encoding="UTF-8"?>
<vehicle data_version="3" bodies_id="1">
<authors/>
<bodies>
<body unique_id="0">
<components>
<c>
<o sc="6">
<vp x="-8" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-7" y="2"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,-1,0,1,0,1,0,0" sc="5">
<vp x="-9" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-9" y="1"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,-1,-1,0,0,0,1,0" sc="5">
<vp x="-9"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-8"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,1,0,1,0,-1,0,0" sc="5">
<vp x="-7"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-7" y="-1"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,1,1,0,0,0,1,0" sc="5">
<vp x="-7" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-8" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-9" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-5" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-4" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-3" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-4" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-4" y="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-4"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-4" y="1"/>
</o>
</c>
<c>
<o sc="6">
<vp y="2"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,1,0,1,0,-1,0,0" sc="5">
<vp x="1" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="1" y="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="1" y="1"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,1,1,0,0,0,1,0" sc="5">
<vp x="1" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp y="-2"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,-1,-1,0,0,0,1,0" sc="5">
<vp x="-1" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-1" y="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="-1" y="1"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,-1,0,1,0,1,0,0" sc="5">
<vp x="-1" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="3" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="3" y="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="3"/>
</o>
</c>
<c>
<o sc="6">
<vp x="3" y="1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="3" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="4" y="2"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,1,0,1,0,-1,0,0" sc="5">
<vp x="5" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="5" y="1"/>
</o>
</c>
<c d="02_wedge">
<o r="0,0,1,1,0,0,0,1,0" sc="5">
<vp x="5"/>
</o>
</c>
<c>
<o sc="6">
<vp x="4"/>
</o>
</c>
<c d="05_wedge_2">
<o r="0,0,-1,-1,0,0,0,1,0" sc="9">
<vp x="4" y="-1"/>
</o>
</c>
<c d="05_wedge_2" t="7">
<o r="0,0,-1,-1,0,0,0,1,0" sc="9">
<vp x="5" y="-2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="7" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="7" y="1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="7"/>
</o>
</c>
<c>
<o sc="6">
<vp x="7" y="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="7" y="-2"/>
</o>
</c>
<c d="05_wedge_2">
<o r="0,0,-1,1,0,0,0,-1,0" sc="9">
<vp x="8" y="1"/>
</o>
</c>
<c d="05_wedge_2" t="7">
<o r="0,0,-1,1,0,0,0,-1,0" sc="9">
<vp x="8"/>
</o>
</c>
<c d="05_wedge_2">
<o r="0,0,1,1,0,0,0,1,0" sc="9">
<vp x="9"/>
</o>
</c>
<c d="05_wedge_2" t="7">
<o r="0,0,1,1,0,0,0,1,0" sc="9">
<vp x="9" y="1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="10" y="1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="10" y="2"/>
</o>
</c>
<c>
<o sc="6">
<vp x="10"/>
</o>
</c>
<c>
<o sc="6">
<vp x="10" y="-1"/>
</o>
</c>
<c>
<o sc="6">
<vp x="10" y="-2"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-10" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-9" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-8" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-7" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-6" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-5" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-4" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-3" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-2" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="-1" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="1" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="2" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="3" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="4" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="5" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="6" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="7" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="8" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="9" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="10" y="-3"/>
</o>
</c>
<c>
<o bc="4091B4" sc="6">
<vp x="11" y="-3"/>
</o>
</c>
</components>
</body>
</bodies>
<logic_node_links/>
</vehicle>