I need to some extra functionalities to a website regarding image handling.
The user must be able to pane, zoom and rotate images on a image gallery.
Is there any free javascript library/framework that handles this actions?
Raphaël—JavaScript Library
is a good one
Raphaël is a small JavaScript library
that should simplify your work with
vector graphics on the web. If you
want to create your own specific chart
or image crop and rotate widget, for
example, you can achieve it simply and
easily with this library.
Raphaël uses the SVG W3C
Recommendation and VML as a base for
creating graphics. This means every
graphical object you create is also a
DOM object, so you can attach
JavaScript event handlers or modify
them later. Raphaël’s goal is to
provide an adapter that will make
drawing vector art compatible
cross-browser and easy.
loupe.js has an excellent zoom functionality.
http://www.pixastic.com/ --> looks real nice, I am just curious about other opinions as this is an area I am new at.
Related
A diagram tool in html 5 with drag and drop functionality including the connectors.
consider a drawing tool with rectangle circle and a data store getting connected through arrows on mouse clicks and then generating a XML file for the same.
I will recommend you to use SVG, which specification is accessible here; along with DOM & CSS
[EDIT]
Why not Canvas & its 2D API? Because the export to (png, ...) is not as efficient and powerful as SVG. After all, it's just a modeling tool
The OP may want to try gojs.
gojs is a sophisticated JavaScript library for drawing diagrams utilising the html canvas, available from http://www.nwoods.com/products/gojs/. It is not a 'free' product but there is a free-to-use trial version that is fully functional save for displaying a watermark on the diagram.
It abstracts from primitive drawing operations to a much higher level and offers many diagram type (org charts, flow diagrams, etc, etc) that are quick to create and live rather than simply being drawings. It uses a model-view approach to diagramming which is very productive. It supports drag and drop within diagrams and from a palette of components.
Their support is good too.
I have no relationship to the vendor, other than being a happy customer.
I'm searching for a JS framework that is compatible with CreateJS and KineticJS to create tooltips on a canvas.
I'm making an app that uses both CreateJSs and KineticJS and I want to draw tooltips on both of them (without using two libraries).
Thank you.
There are dozens (if not hundreds) of tooltip scripts out there—just ask google!
I assume that since you want to support both createJS and kineticJS that you must have already coded the trigger that requests a tooltip.
With that in mind, here is one tooltip library: http://www.opentip.org/documentation.html
It’s open-source so you can use/modify it freely.
It’s controlled by javascript so you have createJS/kineticJS independence while still working in JS.
It uses html canvas to display the tip so customizations should be familiar to you.
The tip-canvas is temporary and it floats so it should not interfere with your main canvas.
It allows you to offset the tooltip, so your code can exactly position the tip as you need.
I want to make an online card-making application. It should basically allow users to place available images into the template of the card, write text on it and decorate it - basic card customization. What javascript graphics library would be useful for this project ? Finally I would like to have a high resolution/vector image as the output which can be printed easily.
Raphael is great for SVG, etc. http://raphaeljs.com
To have a high resolution/vector image, you have to work with SVG (Scalable Vector Graphics), so far the web browser only support this. There are two ways you can do these.
Looking up for canvas libraries. I prefer Raphael as it supports SVG and animations as well.
With HTML5 and its Canvas features also you can create such system.
I´m thinking on coding a couple of examples for my Computational Geometry class (2D), I want to use html5 and javascript.
Can anyone recommend a javascript library or does html5 has everything I need to start?
I will be mostly working with points and lines, but it would be nice to have something that draws a Cartesian plane as a reference and maybe some data structures ready to use.
JSXGraph
Specifically focuses on dynamic geometry and functions visualization. Comes from the academia. Authors – a German university.
Uses SVG (with fallback to Canvas and VML for IE). Works on iOS and Android.
The API is a very abstracted SVG API. It operates on figures and groups of figures, tangents, hyperbolae &c.
Has nice documentation.
SVG is not considered part of HTML5, but it's worth looking at. It's flexible, ubiquitous and, I think, vector graphics is a better option for geometry than bitmaps (Canvas).
I think either raphael should be useful:
Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and rotate widget, for example, you can achieve it simply and easily with this library.
http://raphaeljs.com/
or processing.js
Processing.js is the sister project of the popular Processing visual programming language, designed for the web. Processing.js makes your data visualizations, digital art, interactive animations, educational graphs, video games, etc. work using web standards and without any plug-ins.
http://processingjs.org/
Your best bet is to use <canvas> and explore the API. It should have the basic primitives you need.
I can recommend EaselJS because I used it many times to quickly create dynamic drawings, such as triangles, circles, arcs etc. I was even writing a simple draw-with-text tool for students, called Geodrafter.
However, if you want to add e. g. sliders and have a dynamic environment (easily dragging points, for instance), then JSXGraph is a better choice since they provide a variety of components for this. The gallery in their wiki give some good ideas.
And as said above: JSXGraph is based on vector graphics, which will always produce exact graphics. EaselJS is based on canvas and can lead to blurry lines.
I want to write some animation with html5 canvas element. I found that there are some js libraries that help to leverage canvas functionality. For example KineticJS, FabricJS. But I don't know which library to use.
What is pros and cons when using this libraries? Or may be you know even better implementation?
edit
I'm going to create something similar to static picture, but with piece оf animation. For example floating clouds on the sky, flower where you can tear off a petal and throw it. May be some animation with sun. This is general description, hope this helps.
There is Processing.js, which is a port of Processing for Java. Processing.js is ideal for 2d images.
Raphaël uses svg to draw images, which results in more compatibility.
For 3d there is Three.js, which uses both canvas and webgl.
There are a lot of different libraries around, you should first find out what you want to draw.
http://javascript.open-libraries.com/utilities/drawing/10-best-javascript-drawing-and-canvas-libraries/
cgSceneGraph is a javascript animation framework providing a full animation engine with timelines, animation keys, ...
It also provides helper methods to easily add animations on every attribute of an element.
The example on the home page of the website is exactly what you talk about, so it should fit your need :)
For simple animations forget the canvas and use position: absolute div elements with background image that you can move around with CSS transform translate3d and scale3d.