css background-image cross fade - background-image

I am working on a site that is using the nivo-slider plugin. The images in the slider cross-fade fine, but I want to add a background-image repeating pattern and also have that cross fade to another image pattern. I am restricted in that I have not been able to figure out how to add these background images as html without breaking the plugin so I am using the background-image property in css to change the background but it doesn't fade, the new background will just appear. Using css transitions does not work on css background-image and it doesn't work when I use jquery .animate or jquery fades. The closest I've come is fading out and then in, but this is not the cross-fade that I want. I haven't been able to find any javascript plugins to do it either.
So basically my question is: does anyone know how to cross-fade when changing an elements css background-image property?

I suggest two layers.
Nivo Slider
Adjacent "helper" div
We're only going to create the illusion of a crossfade.
Step one:
Layer 1 (nivo slider) fades the new background in. After it's done fading it, the background is moved to Layer 2 and removed from layer 1. The user won't see the switch as it's instantaneous.
Step two:
On the next transition, fade layer 2 out while layer 1 is fading in with the new background. Once this is done, switch the background from layer 1 to layer 2, turn layer 2 to opacity 100% and remove the background from layer 1. Again, the client-side will not see the visually switch as the appearance will look the same to them.
Rinse and Repeat.

Related

Unity UI panel transparency

I'm working on my game and I want to add an inventory type system, when I added the panel it was a little transparent while the one in the video was watching was not. I didn’t see any setting for transparency in the Unity inspector for both the canvas and the panel. The UI mode is an overlay
I didn’t try much other than clicking all the check boxes, and I was excepting for the up to be a solid color.
If you have a Canvas Group in your hierarchy, it can come from here (Alpha property).
I needed to go to colors and slide this slider all the way up or down (the slider you need to change)

Image animation problems in Unity

I state that I am not very experienced in Unity.
I am working on a project in which I have some pictures. To these images I have added an animation that modifies the viewing scale (x,y,z), in such a way as to obtain a pulsation effect. ("ImageEffectPingPong")
To these same images, however, I added another animation that when the image is clicked, a fade effect is obtained, in such a way as to make the image disappear.("fadeOut_x")
When I go to make transition one of the two animations to the animator, it works as it should. the problem is when I try to merge them.
The ImageEffectPingPong animation is set in loop, while the other is activated by setting a bool to the onclick event.
animator.SetBool($"img_{pos}",true);
This is my animator
I tried a combination like this, but when I hit the first image, the fade works, but I no longer get the "pingpong" effect I want.
So how do i get the pingpong effect and when i click on an image, the fade effect, without losing the pingpong effect on the other images?
PS: to create the first effect I created a single animation that changes the scale of each image at the same time, while for the fade effect, each image has its own animation. Images can disappear following the correct sequence.
Sorry for my bad English, I hope I have explained myself as well as possible, I remain available for any misunderstandings. thank you
in case anyone has the same problem as me, I was able to solve it by adding a layer. In the first layer I run the fade animation, while in the second the pingpong effect. It is important to set the weight of the layer.

Particles are in front of UI elements in unity

So all i'm looking for is simple. I want the UI elements such as Buttons/Logo/..etc to be in front any particle effects in the Canvas.
In the answer Here someone suggested to add a canvas component to each and every UI element I want to show in front of the particles and that work somehow the only problem in this way the buttons won't click at all.
All elements are on the default sorting layer including the particles object and the camera.
Is that hard to do that?
Please help.
set "Order in layer" of Particles to 0 and UI elements to 1 or a better way of doing this is to go to add new layers, create a foreground and background layer, set foreground to 1 and background to 0 and then change from the default layer to which ever you want in front or back.
My solution was to change the material I was using in the particle system. Change "Sprite-Default" to a material with "Rendering Mode" Opaque and "Shader" to "Standard".

Unity3D - Set a (foreground) UI layer which ignores mouse clicks?

I'm currently writing up a UI-Centric game, and I've added a small image overlay over some elements on screen. However, the problem is that now I can't click any buttons behind this overlay image, regardless of transparency etc.
Just to chance it, I set up a new layer called "noUIclick" and set it to ignore every other layer under physics settings - long shot I know, but no dice. Tried also simply swapping to 3D view and moving the overlay image back on the z-axis.
Is there any easy way to set a layer for UI components which will entirely ignore/allow for passthrough of mouseclicks onto the buttons in the background?
On the Image component, uncheck raycastTarget.

How can I create a tile, overlay for a scene in Cocos2d?

I'm new to Cocos2d, but I can't seem to find the answer to this. I want to add an image that is mostly transparent as an overlay to my application. The image is overlayed on the app, and does not respond to screen taps. All gestures should "pass through" to the application.
The overlay image should actually be tiled. It's a small image that should repeat both horizontally and vertically.
How can I do this? In fact, this is an overlay that I would like to display for the duration of the entire application-- not just one specific scene. Is there a simple way to do this?
The point of my overlay is that I'd like to create a pseudo-scan line affect for a game which has an "8-bit" tone. The scan lines will be generated by applying the overlay to the game. The overlay is non-interactive and should always exist. So, this isn't a "tile based game", but I do need a tiling affect for this functionality.
You should be able to create a layer in each scene, set the zOrder to something large so that it overlays everything else, and set its isTouchEnabled attribute to NO. You can then add whatever you want to the layer, which could be your patterned image. To change the alpha, just set the opacity attribute of your image. The only issue that I can foresee is that the overlay might disable touch events for layers below it.