StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/vectorize-text/example/example-triangles.js

27 lines
727 B

"use strict"
var vectorizeText = require("../index.js")
var complex = vectorizeText("Hello world! 你好", {
triangles: true,
width: 500,
textBaseline: "top"
})
var svg = ['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="80" >']
complex.cells.forEach(function(c) {
for(var j=0; j<3; ++j) {
var p0 = complex.positions[c[j]]
var p1 = complex.positions[c[(j+1)%3]]
svg.push('<line x1="' + p0[0] + '" y1="' + p0[1] +
'" x2="' + p1[0] + '" y2="' + p1[1] +
'" stroke-width="1" stroke="black" />')
}
})
svg.push("</svg>")
if(typeof window !== "undefined") {
document.body.innerHTML = svg.join("")
} else {
console.log(svg.join(""))
}