AFRAME - Can a cursor work with both gazing and clicking? - cursor

It seems like when you set fuse = "true", a cursor becomes tied to gazing and no longer reads mouse clicks. Isn't there a way to have both options, gazing and clicking both triggering the same events?

The cursor component always reads mouse clicks, even if fuse is set: https://github.com/aframevr/aframe/blob/master/src/components/cursor.js#L61
If you want to point your cursor directly on the object, like a 2D web page, see https://github.com/mayognaise/aframe-mouse-cursor-component

Yes cursor can work with both gazing and clicking.
The following code can be written fir clicking,
<a-scene cursor="rayOrigin: mouse"></a-scene>
& then the camera entity contain within the a-scene should have cursor entity which triggers fuse, like
<a-cursor geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03" material="color: black; shader: flat"></a-cursor>
Ofcourse there will be fusing parameter added in it.

Related

React/Material-ui : Make dialog not change when mobile keyboard is brought up

I have a dialog that contains a few text fields where the user can provide input, like this.
The problem im having is that whenever the user clicks on one of the textfields , the mobile keyboard messes everything up. It looks like this:
I want to have the dialog remain the same - as in, it shouldnt shrink and force the user to scroll down to see the full dialog. I tried using the FullscreenDialog-component, but the problem remains the same - the mobile keyboard just shrinks it and makes it scrollable for some reason. Is there any way to fix this?
EDIT I found a way to sort-of fix this, at least temporarily - add a minHeight to the bodyStyle in the dialog and the keyboard won't overwrite it. Obviously you have to move the dialog up so that the keyboard doesn't block it when it appears :)
I've experienced a similar problem but the solution may not help in every situation.
In my case, the main <Paper /> component height was set to window.innerHeight and another <Paper /> component inside it was set to about window.innerHeight * 0.6. I use this and not simply a CSS unit 'vh' since it compensates for the URL bar.
In the nested paper, I had a <TextField /> and the same problem you described occurred. The solution is basically to listen to onresize event since it fires when the keyboard opens, then you simply use the maxheight of all those measures.
To make it perfect you may want to respect device rotation since it really does require you to use the new height, and of course make sure the component is positioned correctly.

Attached a pop up to a cursor, now buttons aren't working on UI in Flash CS6

I have a small pop up balloon that I coded to look like it's coming off of the cursor. It moves along with the cursor and looks fine.
The problem I have run into, though, is that the buttons I have created no longer work when the cursor is over them. When the balloon pop up is not attached to the cursor, the buttons work fine...the Hover state for the button appears as it should and the cursor turns into the hand/pointed finger icon. When I attached the cursor bubble, however, nothing seems to work with the button.
Here is what I have for code:
stage.addEventListener(MouseEvent.MOUSE_MOVE,follow);
function follow(E:MouseEvent){
cursorbubble.x = mouseX;
cursorbubble.y = mouseY;
}
What do I need to do?
Thanks.
Ok, not sure if this was all that mattered, but it looks like the pop up bubble attached to the cursor was getting in the way of the stage recognizing the cursor was within/over a button. I offset the pop up bubble by about 20 px and now everything works as expected.

Animation with display flex

When I open the item-accordion I have used the animation .But the item-accordion has the image that is wrap in the multiple row using display flex property of the CSS3. Whenever I open the accordion the extra content is displayed on the right during transition.So can anyone suggest what can be done to solve it?And this happens when width of the content is small
Another problem is i have used the animate-repeat animation to delete the item.But when i open the item-accordion the animation is applied to them also hence animating the image as a list.
.list .item-accordion {
-webkit-transition:0.09s all linear ;
transition: 0.09s all linear;
}
This is the animation I am using.
The demo of the code is over here:
http://plnkr.co/edit/FnQVCYrSGOlpk5wNxAZ6?p=preview
I have had similar issues when having to meet complex animation requirements. I have used greensock for more complex animations but that doesn't seem to be needed here. The general concept is that you are going to want to animate something but change/alter the properties before and after the animation has completed. You are going to have to be using a few callback promises to run additional animation after the first part of the animation has completed or do some manual calculations and adjust properties before starting or ending.
Angular Animate
Ionic Animate
It seems like ionic is allowing for onStart and onEnd callbacks. I would hide or force certain properties onStart and reset them onEnd so that you can get around what you are trying to work with. If you are not wanting to work with a fixed width or height you are going to have to grab window/screen size and so some basic calculations based on that. So you would get your window size set the size based on the window for the animation then reset back to auto when completed.

In powerpoint how do I go about having looping animations?

I'm trying to animate a button so that if it is clicked, a picture will appear, but when it is clicked again, the picture will disappear- I want this to continue to happen indefinitely- I feel like this can easily be written with a macro, but I want to avoid unnecessary over-complicating of things. I tried to add in click animations but it will only appear and then disappear
Instead of using animations, you can toggle the transparency of the image between 0 (totally transparent) and 1 (totally solid) when click happens to achieve disappearing and appearing.

Hiding a component within a Border-Layout region programatically

I have a border Layout with let's say two regions; center and west. The westregion is added with the splitter param and is collapsible. Now I have a toolbar from which I want to hide/show the west region. I've solved this by calling the toggleTargetCmp() method of the splitter. Well I know, this is a private method and should not be used, but I found no other way to archive this. So far so good. All this works.
But now I want to hide the splitter & placeholder (I fetch the placeholder ownet by using the getCollapseTarget() method of the splitter) if the button in the toolbar gets clicked. I tried it with setVisible(false) which works for the splitter but it didn't work well for the placeholder... after a deeper look onto the placeholder instance I can tell that it is set to hidden: true but it uses the hideMode: 'offsets' by default plus hiddenAnchestor: false which is not documented in the API.
Based on the API docu for hideMode I tried to set it to 'display'
before calling setVisible(false) without any luck, the placeholder still stays visible.
So how can I hide the placholder, too. Or is there even a better way to archive this?
Have you tried hide method? It works exactly as you describe - hides region and splitter.
In my project I do it like this:
panel.hide();
where panel is one of borderPanel items.

Resources