jilvin / changeShadowOfSVGElement

Change shadow of an SVG element dynamically depending on the set perspective point.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

changeShadowOfSVGElement

Codacy Badge

Change shadow of an SVG element dynamically depending on the set perspective point.

Usage

Download changeShadowOfSVGElement.js and link it to your webpage.

Syntax

changeShadowOfSVGElement(int x1, int y1, int z1, int z2, string element1Identifier, string element2Identifier);

x1, y1, z1 - coordinates of the light source.

z2 - plane of the screen.

element1Identifier - ID of the first SVG element(object).

element2Identifier - ID of the second SVG element(shadow).

See the index.html file included in the source to see the demo usage.

About

Change shadow of an SVG element dynamically depending on the set perspective point.

License:MIT License


Languages

Language:JavaScript 67.5%Language:HTML 29.0%Language:CSS 3.4%