l3d_rs #16
holg
started this conversation in
Show and tell
l3d_rs
#16
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
l3d_rs
- A Rust Library for Handling L3D Filesl3d_rs
is a Rust library designed to read, parse, and manipulate.l3d
files, which are ZIP containers that include structured XML files along with other assets such as geometries. This library provides functionality to deserialize.l3d
files into usable Rust structures, serialize them back to XML, and perform JSON conversions for flexibility.(https://github.com/globallightingdata/l3d)
Features
.l3d
Files: Extract and parse.l3d
ZIP containers..l3d
files..l3d
content to/from both XML and JSON formats.Installation
Add
l3d_rs
to yourCargo.toml
dependencies:Usage
Reading an
.l3d
FileYou can read and deserialize an
.l3d
file (which is a ZIP container) into the Luminaire struct.Serializing to XML
Once you've loaded the
.l3d
file, you can serialize the data back into XML:Serializing to JSON
You can also serialize the luminaire data into
JSON
for easy integration with web or other systems:Deserializing from JSON
You can deserialize JSON data back into the Luminaire structure, allowing for easy round-tripping between JSON and XML formats:
Beta Was this translation helpful? Give feedback.
All reactions