a:6:{s:9:"#provides";s:20:"dojox.gfx3d.gradient";s:9:"#resource";s:17:"gfx3d/gradient.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:18:"dojox.gfx3d.vector";}i:1;a:2:{i:0;s:6:"common";i:1;s:18:"dojox.gfx3d.matrix";}}s:20:"dojox.gfx3d.gradient";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:7:{s:5:"model";a:2:{s:4:"type";s:26:"dojox.gfx3d.lighting.Model";s:7:"summary";s:11:"color model";}s:8:"material";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:25:"defines visual properties";}s:6:"center";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:31:"center of the cylinder's bottom";}s:6:"radius";a:2:{s:4:"type";s:6:"Number";s:7:"summary";s:22:"radius of the cylinder";}s:4:"from";a:2:{s:4:"type";s:6:"Number";s:7:"summary";s:24:"from position in radians";}s:2:"to";a:2:{s:4:"type";s:6:"Number";s:7:"summary";s:24:"from position in radians";}s:6:"matrix";a:2:{s:4:"type";s:20:"dojox.gfx3d.Matrix3D";s:7:"summary";s:109:"the cumulative transformation matrix tolerance: Number: tolerable diffirence in colors between gradient steps";}}s:6:"source";s:1006:" var m = dojox.gfx3d.matrix, v = dojox.gfx3d.vector, mx = m.normalize(matrix), f = m.multiplyPoint(mx, radius * Math.cos(from) + center.x, radius * Math.sin(from) + center.y, center.z), t = m.multiplyPoint(mx, radius * Math.cos(to) + center.x, radius * Math.sin(to) + center.y, center.z), c = m.multiplyPoint(mx, center.x, center.y, center.z), step = (to - from) / N, r = dist(f, t) / 2, mod = model[material.type], fin = material.finish, pmt = material.color, colors = [{offset: 0, color: mod.call(model, v.substract(f, c), fin, pmt)}]; for(var a = from + step; a < to; a += step){ var p = m.multiplyPoint(mx, radius * Math.cos(a) + center.x, radius * Math.sin(a) + center.y, center.z), df = dist(f, p), dt = dist(t, p); colors.push({offset: df / (df + dt), color: mod.call(model, v.substract(p, c), fin, pmt)}); } colors.push({offset: 1, color: mod.call(model, v.substract(t, c), fin, pmt)}); return {type: "linear", x1: 0, y1: -r, x2: 0, y2: r, colors: colors};";s:7:"summary";s:32:"calculate a cylindrical gradient";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:3:"mod";}}}s:11:"dojox.gfx3d";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}