GithubHelp home page GithubHelp logo

Missing object fields about bevy_tiled HOT 2 CLOSED

stararawn avatar stararawn commented on July 18, 2024
Missing object fields

from bevy_tiled.

Comments (2)

dmtaub avatar dmtaub commented on July 18, 2024

Really interesting post -- I was literally just thinking about this problem and wondering about why we can't easily impl a trait on the tiled::Object that would provide methods to provide what we want to use.

I don't see how mirroring more properties represents a breaking change? That seems to be in keeping with the current library design, and I'm happy to include that commit if you need it.

I've been racking my brain to figure out how to retain the structure and API for tiled:: objects but add our own methods and extend them. Unfortunately, it seems like that approach isn't very Rusty. The only idea I had for a while is to clone the whole tiled::object, but it seems inefficient. Also, now I need the Tile/Tileset data, too, and that approach would start giving us multiple copies of those objects, which is even worse!

I'm starting to think the the best solution is a set of methods through the toplevel Map object that composes the tiled:: and crate:: objects in a convenient way...

from bevy_tiled.

rparrett avatar rparrett commented on July 18, 2024

For anyone else observing or landing here, the previously mentioned change set was merged (#57) as a bandaid while larger api changes are considered.

from bevy_tiled.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.