Git Product home page Git Product logo

aery's Introduction

aery's People

Contributors

iiyese avatar itsdoot avatar mrchantey avatar nakedible avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aery's Issues

other library relations impl

It's cool to see people working on library relations, have you seen https://github.com/BoxyUwU/librelations its out of date but relies on a fork of bevy_ecs to allow for despawning entities to also despawn the targets of their relations. I don't do anything with bevy anymore these days, best of luck with your relations impl and hope my previous impl might be interesting to you

Allow derive(Relation) to work with generic ZST relations

The derive macro currently doesn't support generic ZSTs, leaving me to do this instead:

pub struct Multiply<C: Composite>(PhantomData<fn(C)>);

impl<C: Composite> Relation for Multiply<C> {
   const CLEANUP_POLICY: CleanupPolicy = CleanupPolicy::Orphan;
   const EXCLUSIVE: bool = true;
   const SYMMETRIC: bool = false;
}

Inverse WorldQuery filter of Participates

Rather than filtering by entities who are part of a relation, I want to filter by entities who are not involved in the relation.

Effectively, this:

#[derive(WorldQuery)]
pub struct Abstains<R: Relation> {
    // is not a host nor a target of relation R
    filter: (Without<Participant<R>>, Without<RootMarker<R>>),
}

Implement RelationsItem methods for Option<&RelationsItem> as well

Looking for these methods implemented on Option<&RelationsItem<'_, RS>> as well:

aery/src/operations.rs

Lines 68 to 96 in 271fd49

impl<RS: RelationSet> RelationsItem<'_, RS> {
pub fn iter_hosts<R: Relation>(&self) -> EdgeIter<'_> {
let _ = R::ZST_OR_PANIC;
self.edges.edges.iter_hosts::<R>()
}
pub fn iter_targets<R: Relation>(&self) -> EdgeIter<'_> {
let _ = R::ZST_OR_PANIC;
self.edges.edges.iter_targets::<R>()
}
}
impl<R: RelationSet> CheckRelations for RelationsItem<'_, R> {
fn has_host(
&self,
relation: impl Into<crate::Var<crate::relation::RelationId>>,
host: impl Into<crate::Var<Entity>>,
) -> bool {
self.edges.edges.has_host(relation, host)
}
fn has_target(
&self,
relation: impl Into<crate::Var<crate::relation::RelationId>>,
target: impl Into<crate::Var<Entity>>,
) -> bool {
self.edges.edges.has_target(relation, target)
}
}

I've run into this need a decent bit in my current project, and can't seem to implement iter_hosts/iter_targets as an extension myself since EdgeIter is currently private.

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.