question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Relativity Component

See original GitHub issue

On A-Frame an entity is relative to its parent. If you move the parent entity, the child moves as well. That’s great. But I think it would be great if there was a way to specify an entity to be relative to another entity, that is not necessarily its parent. Even to be relative to the screen. Here’s a code snippet to show what I mean:

<a-entity id="entity1" position="0 0 0">
	<a-entity id="entity2" relative = ""></a-entity> <!-- "" or "#entity1" would make it relative to "entity1". This is the way it already works, so the relative component would have "" as the default value -->
	<a-entity id="entity3" relative = "#entity4"></a-entity> <!-- This makes "entity3" relative to "entity4", not "entity1" -->
	<a-entity id="entity5" relative = "#entity1 #entity4" relativeWeight = "0.5 0.5"></a-entity> <!-- This makes "entity5" half influenced by "entity1" and half by "entity4". But it could have other values like "0.8 0.2" or "1 0"(80% affected by entity1 and 20% by entity 4, then 100% affected by entity1 and 0% by entity4) -->
</a-entity>

<a-entity id="entity4" position="0 1 0">
</a-entity>

<a-entity id="entity6" relative="Screen"> <!-- I was thinking of some special values, like "Screen", "TopScreen", "BottomScreen", to make elements be relative to the center of the screen, top, bottom, etc.  -->
</a-entity>

<a-entity id="entity7" relative="#entity5"> <!-- This entity is relative to entity5, which in turn is relative to both entity1 and entity4. In practice, this makes entity7 be indirectly affected by entity1 and entity4 as well because of entity5. -->
</a-entity>

Of course, you would then be able to animate the relativeWeight component to smoothly transition an entity’s relativity to another entity.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
diarmidmackenziecommented, Sep 20, 2021

This component is available to solve this problem: https://github.com/diarmidmackenzie/screen-display#blend-transforms

2reactions
dmarcoscommented, Feb 12, 2021

@marcusx2 A-Frame is a community effort. I recommend joining the Slack and Discord channels and engage with other A-Framers. Super nice folks there to ask questions and share your needs. There might be existing components with the same or similar functionality you need. if something you think is not covered is a also great opportunity to participate. The community will appreciate.

Your suggestions are great. Just A-Frame core only delivers the basics to get your application started. It’s deliberately kept small to keep the code quality high and distribute the maintenance burden. We rely on the component community to supply more advanced features. A nice tip is to search for a-frame on npm. Thanks for understanding.

Looking forward to seeing what you make.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced functionality for the application framework
Relativity applications have two groups of components: Hosted components - are installed for the entire instance of Relativity. These include, resource files, ...
Read more >
Additional Forms API objects
Represents the event names used in the Relativity Forms API. popupControlApi object. Provides functionality for closing and accessing properties of a pop-up ...
Read more >
User Guide - Relativity Documentation
You can navigate tabs using the following features. ... Within the password request email, click Reset Password or enter the full URL into ......
Read more >
Expanding your Relativity environment
Use the following additional features and tools to expand your Relativity environment. Agents; Analytics servers; Dedicated web servers; SQL Server failover ...
Read more >
Create an application in Relativity
In the Relativity UI, you can create Relativity Dynamic Objects (RDOs), views, layouts, choices, tabs, and fields for inclusion in your application. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found