Lines Matching refs:edge

75           var edge = new Object;  variable
77 edge.startX = firstPoint.anchor[0];
78 edge.startY = firstPoint.anchor[1];
80 edge.endX = lastPoint.anchor[0];
81 edge.endY = lastPoint.anchor[1];
83 var normalX = -(edge.endY - edge.startY);
84 var normalY = edge.endX - edge.startX;
90 edge.normalX = normalX;
91 edge.normalY = normalY;
102 totalX += edge.endX;
103 totalY += edge.endY;
105 var width = edge.endX - edge.startX;
106 var height = edge.endY - edge.startY;
108 edge.centerX = edge.endX - (width / 2);
109 edge.centerY = edge.endY - (height / 2);
111 tile.edges.push(edge);
143 var edge = tile.edges[y];
146 edge.startX -= tile.xOffset;
147 edge.startY -= tile.yOffset;
148 edge.endX -= tile.xOffset;
149 edge.endY -= tile.yOffset;
150 edge.centerX -= tile.xOffset;
151 edge.centerY -= tile.yOffset;
157 if (Math.abs(edge.centerX - tile.centerX) >
158 Math.abs((edge.centerX + edge.normalX) - tile.centerX)) {
159 edge.normalX *= -1;
160 edge.normalY *= -1;
163 if (Math.abs(edge.centerY - tile.centerY) >
164 Math.abs((edge.centerY + edge.normalY) - tile.centerY)) {
165 edge.normalX *= -1;
166 edge.normalY *= -1;
171 edge.normalY *= -1;
172 edge.startY = tileSizeY - edge.startY;
173 edge.endY = tileSizeY - edge.endY;
174 edge.centerY = tileSizeY - edge.centerY;
176 outputString += x + ":" + Math.floor(edge.startX) + "," +
177 Math.floor(edge.startY) + ":" + Math.floor(edge.endX) + "," +
178 Math.floor(edge.endY) + ":" + edge.normalX + "," + edge.normalY +
225 var edge = tile.edges[y];
227 lineArray[y] = Array(offsetX + edge.startX, offsetY + edge.startY);
237 var edge = tile.edges[y];
240 (edge.normalX * (tileSizeX / 2)));
242 (edge.normalY * (tileSizeY / 2)));
264 centerArray[0] = new Array(offsetX + edge.centerX - 1,
265 offsetY + edge.centerY - 1);
266 centerArray[1] = new Array(offsetX + edge.centerX - 1,
267 offsetY + edge.centerY + 1);
268 centerArray[2] = new Array(offsetX + edge.centerX + 1,
269 offsetY + edge.centerY + 1);
270 centerArray[3] = new Array(offsetX + edge.centerX + 1,
271 offsetY + edge.centerY - 1);