I am looking for some simple library for javascript to manage animations.
I need something realy simple, just to "parse" animation to frames. I want to handle everything by myself, i want just to know, how many frames is in animation and how to get the frame i want.
I did some digging on google, i found one which is realy nice (sprite.js) but it is too big and it will force me to rewrite my app.
Is there simple lib, or a tutorial how to work with animated images? (gif and others).
There is no straight way to get single frame from gif in JavaScript.
Related
Framework: Phaser.js version 3
Symfony 5
Langage: Javascript,
HTML5,
CSS3
Hello, I'm learning Phaser.js 3; I would like to create smooth animations (25fps) with lots of frames in my spritesheet. Is it possible to use large spritesheets to create animations without writing the name of each frame each time? If I have 230 frames, I cannot write the name of each frame... Thank you in advance for your answer
Yes it should be possible, you can generate the names with generateFrameNames or generateFrameNumbers, here is the link to the documentation, and here an example.
Or you can use a configuration file (json) to define the animations, like shown in this example.
for this there are texture packer tools, for example this one http://free-tex-packer.com/, that can help.
btw.: If you want smooth animations, and havn't created the spritesheets already, may be (spine-)bones animations might be a easy and space saving option, here is two example from the official website http://phaser.io/examples/v3/view/spine/basic-spineboy and http://phaser.io/examples/v3/view/spine/batch-test
Here a short video highlights the benefits of bones for phaser games https://www.youtube.com/watch?v=sq6mnix8eAg , it is very basic and not very technical
I am working on a desktop application with JavaFX. As seen in the image below, I have an open space for a sort of mascot character, which I hope to give simple animations to. They are simple enough that it would be possible--but incredibly hard--to make in JavaFX, but complex enough that I feel like I should use a different method. This is my first JavaFX program, so my experience level is pretty low. I am able and willing to make these animations in other software and create a gif or mp4, etc if necessary, but I'm just in the dark here. I couldn't find much documentation. Below, you can see the space I would like to fill with an animated mascot. What method would be the best for this level of animation?
I have been able to get almost everything I need into the editor, But cannot figure out how to get a collada model that was imported to play it's keyframes.
Since I am not doing loader.load (collada) blah blah like in the examples. I cannot figure out how to get the animations. Animations is always undefined, but I know keyframes exist. Any ideas?
as far as i know, animations in the editor are not fully implemented yet.
the corresponding code in the viewport is commented out (line564+)
i think your best shot is to modify the editor (and eventually create a PR) or go back to coding everything.
the editor in its current form only shows the basic functions but the code is quite well structured to allow implementing custom features.
A quick update that animations in the Three.js Editor are now supported. Below is a gif from the linked PR demonstrating usage.
I have an image of a living room, which I'm turning into a menu for a new site I'm working on. The idea is that you can click on certain items in the room, like a chair, desk, couch, etc and get taken to the desired page. I'm wondering if there is a clever way of doing this. Since the items are not simple shapes, I don't want to use a standard image map.
Thanks for you help!
I'm answering because a Google search brought me here...
Because you asked for a tool:
GIMP Has a really good Image map creation function.
Open your image in GIMP and select Filters > Web > ImageMap
From there you can create image maps by drawing on the image. Saving will generate HTML you can then tailor to your needs.
This tool looks to be a solid image mapper: http://www.image-maps.com/
I'd suggest doing this with a canvas and SVG's, it would make this quite a bit easier, and more professional.
As Korvin mentioned, doing this in SVG is probably the easiest option, because you can attach events to objects in SVG rather than having to manually specify a particular area in which to listen for events.
If you go this route, I recommend using the RaphaelJS library which has a nice syntax and the advantage of working in IE pre version 9. Here's a demo which, although it uses onmouseover instead of onclick, it might be close to what you're trying to achieve:
http://raphaeljs.com/australia.html
I am developing an application for viewing images.
I used the example of PhotoScroller Apple to implement this application.
In my application I want to be able to draw on the image.
I had the idea to put a UIView on top with transparent background and draw the lines via touch events. This solution has become very slow because the generated images are very large, around 3700x2000 pixels.
I also tried a solution with the example of Apple GLPaint that uses OpenGL, but it has a size limitation of 2048x2048 pixels.
Anyone have any idea or example of how I implement this?
I think you should try and tile your image.
One option is using CATiledLayer. Have a look at this short tutorial.
Or you could try and use CGContextDrawTiledImage to get your stuff done. Possibly this post from S.O. could help you getting started.