Download
IvanK.js is open source, but it was not meant to be developed by a huge community. It is very light and simple library and it should remain so. New features should be added very sparingly. If you want to make a "big extension", like particle systems, bitmap filters, animation libraries, game engines etc., you can build it on top of IvanK. I am looking forward to see what you can do!
You can download current library from links below, or you can directly link your app to the latest version.
<script type="text/javascript" src="http://lib.ivank.net/ivank.js"></script>
Versions
- Version 1.2 - 1. 11. 2016
- When window.devicePixelRatio is larger than 1, antialiasing will be disabled. It should increase FPS on high-resolution screens without ruining the quality too much. Results on Nexus 7 II (1920 x 1200 pixels): all tested games jumped from 30-40 fps to smooth 60 fps. Similar results came in on Apple Macbook.
- Version 1.1 - 5. 7. 2014
- Mouse events work correctly with respect to 3D transformations
- DisplayObject.getRect and getBounds work correctly with respect to 3D
- DisplayObject.width and height - access and edit the size of bounding rectangle
- Support for an old Typed Array specification (no Uint8ClampedArray) - IvanK.js works perfectly in IE 11
- Bug fix - keyboard events are supported inside IFRAME
- Bug fix - black countours in bitmaps and text removed
- Version 1.0 - 14. 3. 2014
- TextField is selectable and editable now - check the demo
- ivank.text.TextField.selectable, type, background, border properties implemented
- ivank.display.BitmapData.setPixel, setPixel32, getPixel, getPixel32 implemented (works very fast)
- BitmapData optimized - you can load, read and write into it without creating a stage
- ivank.display.Graphics optimized (by recycling triangles) - clearing and redrawing is faster now
- Version 0.9 - 9. 11. 2013
- ivank.display.Graphics class completely remade - now it behaves exactly like in Flash
- Graphics can fill polygons or curved shapes
- connected lines in Graphics have the proper "sharp" edge
- number of vertices in Graphics.drawTriangles and drawTriangles3D is unlimited now (it used to be 216)
- support for high DPI displays - now pixel means real pixel (not "point")
- ivank.geom.Point and Rectangle extended, so it has all features from Flash
- ivank.events.TouchEvent implemented - now you can access multiple touches (demo)
- Version 0.8 - 1. 6. 2013
- 3D features - DisplayObject.z, scaleZ, rotationX, rotationY, rotationZ
- Graphics.drawTriangles3D() for drawing complex 3D objects
- DisplayObject.transform to access transformations as matrices + ivank.geom.Transform
- hierarchical affine 3D geometry transformations
- hierarchical affine 4D color transformations
- DisplayObject.blendMode implemented + ivank.display.BlendMode
- MBitmap, DisplayObject.GetWidth, GetHeight, SetWidth and SetHeight removed. Use .getRect(this) instead.
- Version 0.72 - 16. 2. 2013
- MouseEvent.MIDDLE_CLICK, RIGHT_CLICK and other mouse events implemented
- massive optimization of lines (moveTo/lineTo), rendering lines is about 30 times faster now
- improved support for touchscreen devices
- Version 0.7 - 9. 11. 2012
- DisplayObject.getBounds(), getRect(), globalToLocal(), localToGlobal() implemented
- DisplayObject.hitTestPoint(), hitTestObject() implemented
- IvanK uses setters / getters now. Many "paradoxes" have disappeared
- TextField.setText() changed to text, setArea() changed to width, height
- Graphics.drawEllipse(x, y, w, h) implemented
- Graphics.drawRoundRect(x, y, w, h, ew, eh) implemented
- BitmapData.getPixels(rect, buff) - buff parameter is optional now
- Version 0.69 - 18. 9. 2012
- reimplemented system of MouseEvents
- InteractiveObject totally reimplemented
- mouse events are "bubbling", like in flash
- MouseEvent.CLICK event implemented
- Stage.focus implemented - KeyboardEvents are dispatched on focus
- BitmapData.frames removed - class is more transparent now
- MBitmap reimplemented - now you can "slice" BitmapData horizontally and vertically
- minor optimization - rendering is now 15% faster
- reimplemented system of MouseEvents
- Version 0.67 - 25. 8. 2012
- low-level access to BitmapData - see the plasma demo
- empty(w, h) - creates an empty BitmapData (filled with 0x00000000)
- setPixels(rect, arr) - change the pixels in area defined by rect
- getPixels(rect, arr) - copy the pixels from area to "arr"
- BitmapData now has a loader property, which dispatches Event.COMPLETE when loaded
- BitmapData.draw(o) implemented - now you can draw any DisplayObject into BitmapData
- giving the TextField more Flash behavior. Wrapping words is now possible.
- added TextFormatAlign class, which stores string constants for alignment.
- new properties of TextFormat - "align" and "leading".
- low-level access to BitmapData - see the plasma demo
- Version 0.65 - 20. 7. 2012
- optimization of all drawing methods of Graphics ("recycling" objects and GPU buffers)
- EventDispatcher.addEventListener2(t, f, o) - specify an object, on which "f" will be called
- Stage is now transparent by default
- Version 0.61 - 1. 6. 2012
- optimization of Circles and Rectangles
- Graphics.curveTo(...) implemented - quadratic Bézier curve
- Graphics.cubicCurveTo(...) implemented - cubic Bézier curve
- TextFormat.bold + italic implemented - for bold and italic text
- Re-implemented lines - now, lines are drawn using 2 triangles
- Version 0.50 - 15. 3. 2012
- Keyboard Events added - dispatched only on Stage
- minor performance improvements
- Version 0.40 - 4. 3. 2012
- improvements in Graphics class
- Graphics.beginBitmapFill() implemented - now you can use bitmap for filling shapes
- Graphics.drawTriangles() implemented - see Adobe's documentation
- Graphics.drawRect() and drawCircle() reimplemented using drawTriangles()
- Version 0.25 - 18. 2. 2012
- improved support for mobile devices - standard HTML5 moblie events implemented
- moving the webpage is turned off when touching and dragging on application's area
- Version 0.21 - 7. 2. 2012
- DisplayObject.buttonMode implemented - changes the cursor when you roll over it
- DisplayObject.stage implemented - access to the main stage
- ADDED_TO_STAGE, REMOVED_FROM_STAGE events implemented on DisplayObject
- Version 0.2 - 30. 1. 2012
- First version.
Source code
You can download source code here - ivank.zip.
Licence
IvanK is released "as is" under MIT licence. It is free to use for everybody for any (including commercial) purposes.