update canvas-triangle.js