simplefx.js
Simple Eyecandy effects: shadows, rounding etc.
Functions
Adds a shadow to element. Available options are:
- imagePath - path to directory with shadow images
- offsetX, offsetY - horizontal and vertical offset
- rightSize, bottomSize - dimensions of shadows
- rightImage, bottomImage, cornerImage - file names
OAT.SimpleFX.shadow("myDiv",{});
Creates rounded corners, using images. Available options are:
- corners - array of booleans, specifying corners to be rounded. Starting from left top clockwise.
- edges - array of booleans, specifying edges to be rounded. Starting from top clockwise.
- cornerFiles, edgeFiles - array of file names
- thickness - array of sizes, specifying thicknesses of corners. Starting from left top clockwise.
OAT.SimpleFX.roundImg("myDiv",{corners:[1,1,0,0]});
Creates rounded corners, using stacked DIVs. Available options are:
- corners - array of booleans, specifying corners to be rounded. Starting from left top clockwise.
- color, backgroundColor - colors to be used. BackgroundColor is used only for computation of antialiasing color. Defaults to 'auto' (=inherit).
- antialias - boolean value
- size - radius. Good values are 2-8.
OAT.SimpleFX.roundDiv("myDiv",{antialias:1,size:5});
Marks clicker as a button, who hides/shows target. Target may be an array of elements. Available options are:
- type - 0=only hide, 1=only show, 2=both (toggle)(
OAT.SimpleFX.shader("myDiv",["myDiv1","myDiv2"],{type:2});