Neon animation is deprecated in polymer 2.0 so Does that mean we should stop using neon-animated-pages? - polymer-2.x

Under the changes in Polymer 2.0 section of the README, it states this element is now deprecated.Neon Animation Update
Does that mean we should stop using neon-animated-pages?
If web animation api is replacement then how use "shared
Transition" in it.
Neon animation divided into 2 part
animation effect (deprecated)
animation behaviour (deprecated..?)
Is Neon-animation-behaviour is also deprecated..?

About two month ago Polymer released an article regarding the neon animation.
To sum it up:
They are not planning on maintaining the package anymore.
If you are using Polymer elements that are depending on neon-animation they will replace them for you.
If you're using neon-animation directly, you should start planning to eventually move off it.
For new projects the recommended approach would be to use
CSS Keyframe Animations
Web Animations API
CSS Transitions
I in person would go with css transitions to achieve a page-transition but thats definitely just one way to do it.You can find how to use CSS transitions here.
Some nice examples of page transitions can be found here.

Related

Gradient slider in React Native?

Is it possible to implement slider with static gradient track in React Native using any 3rd party library or what-soever?
Illustrative image from Google:
Right now I'm using sldier from #react-native-community/slider, but it doesn't seem to support gradient slider track? I can customize minimumTrackTintColor and maximumTrackTintColor, but I would like to have static gradient track independent of the indicator position. I have looked into other 3rd party slider libraries as well, but encountered the same problem.
So, is there any way in any library to achieve this in React Native?
I dont think any package upfront gives this functionality, but you can always use linear-gradient. this library, make a view with. gradient like that, and on top of that, by using position:'relative' make a cursor and slide it by using rn-draggable . You will need to work out on that, but you can create a new functionality , and maybe publish it so that it can be used by others in future.
Hopeit helps.feel free for doubts
Inspired from what #Gaurav_Roy answered above, in the end, I achieved what I wanted with react-native-gesture-responder . I positioned my custom gradient slider track and slider dot as images and used createResponder from the library to capture user interactions with the slider dot. Then calculated the distance between dot position and track edges to get the value.

ReactJS - is there any recommended way to games (2D Tile Maps)

We are doing a small mobile game with react-native. But now we are not sure if react-native is a good choice for what we wanted to create.
Our game is simply just working with tiles in a not that small "map". Lets say its 1000 x 1000 Tiles so at the end 1.000.000 Tiles.
1) Our first try was to render 1 Mio. Components - which ended bad. Even 100 x 100 is like impossible to render with react-native.
2) We ended up to add some logic which renders just tiles inside the view. But when doing any action (and new tiles get rendered) the app is laggy as hell.
3) So we made sure no Tile get ever recreated and instead we just changed props so the tile change the position instead of being recreated. This ended up also in a laggy as hell experience (even when its like 20 Tiles just changing the prop).
After these we decided that React-Native has no nice performance for what we wanted to create: A big tile map with some interactions.
4) So we were thinking of using canvas for drawing the tiles in our react-native app, but it seems that this is also not the common way. We've found some canvas packages for react-native but these are just adding a few components which are useless for our project - with these components we would also end up by rendering components like . But the goal would be to have one ref where we can use the canvas benefits.
So - if react-native is too laggy for doing stuff like this in his own way and canvas is not useable as it is in web what would be the recommended way to solve a project like this ? Or is the answer maybe that react-native is the wrong system to solve a project like this ? Any suggestions ?
IMHO, I will never recommend react-native to make a game like you are describing (with tilemap), less-UI-focused games like poker, trading cards is totally fine though.
But you are likely rendering thousands of tiles without any clipping? How about try to enable View clipping? See removeClippedSubviews here: https://facebook.github.io/react-native/docs/view.html
If you still want to push with react-native, I suggest using plugins like this: https://github.com/ProjectSeptemberInc/gl-react-native
The purpose is to have an OpenGL ES canvas to accelerate your game rendering.
Otherwise, for 2D games, cocos2d-js seems fit to you (it seems your background is javascript), although it will requires some compiler knowledge to get the game actually running on mobile device. The other solution would be Unity 3D (2D is completely find with this engine). Each engine has their own pros/cons, so I would suggest you to try both at basic level to see which one is more suitable.

Apply tint filter to object with code in Animate CC

I'm using Animate CC 2015 and publishing to Canvas.
Can anyone tell me how to apply a tint to an object on my timeline?
The object has been placed there manually and has an instance name. I simply want to change it from white to red using code that runs in the first frame.
On a related note, do you know of a good JS language reference for Animate CC? I always seem to end up on Actionscript references or the CreateJS site which doesn't cater well for stuff that is created manually on the timeline.
Cheers
Have you applied a tint already in Animate? Filters in Canvas are particularly expensive, so by default, Animate will cache items that have filters applied. You have a few options:
Every frame, cache the symbol again. This can be very expensive, but it will work.
Instead of transitioning a single filter, cross-fade between a filtered and non-filtered object. This looks very similar (especially with a tint), and has no performance concerns.
As for JavaScript reference, what exactly are you looking for? Mozilla's MDN reference tends to be the goto place for our team when it comes to raw JavaScript. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
Cheers.

Non-linear property interpolation for interactive transitions

In the implementation of an interactive transition, I'd like to mimic the animated transition that uses the non-linear easing functions. After searching around CA, it looks like interpolation machinery is all hidden behind private APIs.
Is there a way to leverage Core Animation to do the grunt work for me?
Do I need to roll my own value interpolation?
Is there some existing open source lib that does this?
It turns out that instead of manually modifying all the properties myself, I can schedule the animation normally, then set the layer speed to 0 and control the progress using the layer's timeOffset property. Given the animation duration is 1 second, the percentComplete maps directly to the timeOffset.
I've learned this from the iOS Core Animation: Advanced Techniques by Nick Lockwood.

Objective-C, Methods for animating gui

I've created many types of interfaces using the Cocoa API — some of them using documented basic animation techniques and others simply by experimenting (such as placing an animated .gif inside an NSImage class) — which had somewhat catastrophic consequences. The question I have is what is the correct or the most effective way to create an animated and dynamic GUI so that it runs optimally and properly?
The closest example I can think of that would use a similar type of animation would be something one might see done in flash on any number of interactive websites or interfaces. I'm sure flash can be used in a Cocoa app, although if there is a way to achieve a similar result without re-inventing the wheel, or having to use 3rd party SDKs, I would love to get some input. Keep in mind I'm not just thinking of animation for games, iOS, etc. — I'm most interested in an animated GUI for Mac OS X, and making it 'flow' as one might interact in it.
If u wish to add many graphics animations, then go for OpenGLES based xcode project for iOS. That helps u to reduce performance problem. You can render each of the frames in gif as 2D texture.
I would recommend that you take a look at Core Animation. It is Apples framework for hardware accelerated animations for both OS X and iOS. It's built for making animated GUIs.
You can animate the property changes for things like position, opacity, color, transforms etc and also animate gradients with CAGradientLayer and animate non-rectagunal shapes using CAShapeLayer and a lot of other things.
A good resource to get you started is the Core Animation Programming Guide.