Waypoints position and rotation are empty from the scene api - archilogic

io3d.scene.getAframeElements api returns the waypoints
<a-entity tour-waypoint="TOP VIEW" io3d-uuid="2c0c947b-5135-456d-9626-8c80778b9dd5" position="" rotation="" scale="" visible=""></a-entity>
The position and rotation are empty. How can I get the pose data for each waypoints ?

Took us a while to figure this one out, sorry for the delay.
First things first, it worked with A-Frame just fine as this glitch demonstrates. The fact that the position and rotation don't show up in source code doesn't mean they don't work.
The reason for that is that A-Frame turns the attribute values into objects and objects aren't displayed in HTML sourcecode as (per standard) attribute values have to be strings. The fact that they aren't is not caused by us but by A-Frame and is, in fact, not a problem normally - it's the opposite as it is an optimisation.
Now you might want to show the information as part of an HTML dump (e.g. by displaying innerHTML in a textarea, then this is a problem.
That problem can be overcome by calling flushToDOM on the elements, like in this glitch. This affects all dynamically created A-Frame elements, not only 3d.io elements, by the way - you see this with the box element.
I hope this answers your question?

Related

Focus Indicator is Covered Up by Navigation Bar

I am working on a page where there are two rows in the header.
The first row has a "My Account" icon, Company Logo, and Logout.
The second row has a navigation bar.
When the Focus Ring/Focus Indicator highlights an item on the first row, the bottom of the focus ring is cut off by the navigation bar in the second row.
I am not allowed to change the spacing of the elements on the DOM.
Is there a way I can change the layering so that all of the elements on the page are not changed in size or location, but the Focus Ring is not cut off by the navigation bar?
The site built with React.
I've tried googling a number of things, but haven't turned up much specific to this issue.
I'm a little new to programming (my first job, first year). I'm not totally sure where to even start.
You are looking for z-index. The second element is positioned in front of the first element and so it covers the focus indicator.
This allows you to specify how far 'forward' elements are on the page.
Assuming nothing is using fixed or absolute position within the <div>s you are working on this should solve your issue.
i.e.
<div class="container">
<div id="behind" z-index="1"></div>
<div id="infront" z-index="0"></div> <!--The z-index is not really needed here so try without it first, it is to illustrate that the item in front at the moment should have a lower z-index than the one at the back-->
</div>
You may need to play with the z-index in order to get this to work (you can go to 999999 without a problem, but try and use as low a number as possible).
You may also have to fiddle with heights of elements if the site is poorly designed but without a code example I can only offer general advice and gotcha's
Without a code example it is difficult to suggest a solution, but it sounds like your two rows are overlapping, and thereby hiding part of the focus indicator.
Three different solutions come to mind,
Change the height and placement of the two rows to avoid the overlap in the first place
Try using the CSS z-index property to control which element is rendered foremost
Using the CSS outline-offset property, with a negative value, i.e. -5px, to shrink the focus indicator and hopefully making it visible

How should I add animation in this case?

I've modeled using helixtoolkit which is done in a wpf user control library and hosted on ElementHost. I decided to do this because my model is fairly simple (just a stick element with lineVisual3d and bunch of small spheres).
Now I want to animate it and everything I find related to animation seems too complicated for what I'm trying to accomplish. I've seen storyboard being suggested as well as transform methods.
What I have is a 3D line connected by a bunch of points3D and I want to translate them only by a series of values at a fixed time increment.
I did this in a 2D graph using a timer for winform and even a forloop did the trick.
However, I'm not sure how to do the same for a 3D line element. I was thinking that since I have a simple structure simply redrawing it would suffice.
But my problem is I want to add a slider which acts in pretty much the same way as a video player, it will increment itself as the animation runs, I want to also be able to freeze it at any point in time and use the slider to go to any point in time much like how a video player works.
My biggest question here is how do I use a slider to control the animation. Again, this animation will simply be a bunch of values that I want to translate the stick element by(a series of points).
I've already got the values but I want to add an animation for these values at every increment while being able to control it using a slider.
--I will post any code if necessary, not posting any right now because I dont know what would help explain the question better
You can use TranslationTransform3D and apply the transform onto the 3D Model

Looping Scroll View in react native

I'm trying to create a scroll view that keeps on repeating its elements. Let's say it has 10 elements, so after the 10th element, the 1st element would show up and so on, infinitely.
NOTE: I'm not talking about infinite scrolling to load more elements. Just a cyclic structure in scroll view.
The solution that came to my mind is that a normal scroll view with those 10 elements, and every time I reach the end and invoke onEndReached, it will append those 10 elements ahead of it and give it an illusion that it actually is cyclic or looping nature. Only problem is that it doesn't sound efficient, like, storing duplicate elements on and on, every time you reach the end, into the data array. Is there any better solution possible?
There is a library called react-native-snap-carousel here in the GitHub that represents a rich carousel. Maybe you can get better ideas.
Another issues in the solution that you mentioned is when you go to the first of the scroll view, then duplication won't solve any problem.
EDIT 1:
Another library is react-native-swiper.

AngularJS Dynamic Slider Control

I am working on a project that requires a slider control that corresponds to an image and or a multitude of div objects. The spacing of the slider is irregular (the steps could be [1,4,7,13,14,16...]). Also the steps will correspond to specific spots on an image and or to a specific div object. The perfect slider would be dynamic and re-size with the screen but that may be actually impossible.
The hard part is that I am unable to use JQueryUI, instead I am limited to using controls that work with AngularJS.
I have been looking for hours and cannot find anything that would be a good starting point. So my question is whether anyone has found a good slider control to use with AngularJS?
This one fits some of your criteria
angularjs-slider

Textured resizable buttons with Core Image filter and appearance proxy iOS

The app I'm writing involves buttons that have a slight noise filter texture, which can be any size. For a standard button I'd simply use resizableImageWithCapInsets: but due to the texture, this causes unusual artefacts to appear on the resulting button.
A solution I have in mind, is to use the Core Image monochrome filter combined with the random noise filter to add the noise texture to a plain image. In theory this works, and in practice this has been shown to work (One example here) but these are all in cases where the button size is known at the point of invoking the CI code.
What I'm looking to do, is use the appearance proxies, so across the app I can simply set the style of UIBarButtonItems for instance.
Is there a way I can apply these CI filters to the buttons through the appearance proxies or isn't this possible? Would something like a category on UIImage to add noise work? I'm not entirely sure at which point the appearance proxy would actually invoke that code.
Any help is appreciated
OK So I finally solved it but found out some stuff on the way.
It seems you can create a category on UIImage and use that in the appearance proxy. I created a category to add noise, and it seemed to partly work, but I couldn't get it looking how I wanted as it wasn't quite rendering properly, but in the process of coding this discovered another method
resizableImageWithCapInsets:resizingMode:
Because the texture I was dealing with was simply noise, it could be tiled, so rather than the image now being stretched, the centre of the image is instead tiled which gives me the appearance I needed :)

Resources