How to use the TextGeometry function from three
Find comprehensive JavaScript three.TextGeometry code examples handpicked from public code repositorys.
GitHub: tumblr/data-lasso

29 30 31 32 33 34 35 36 37 38
var makeAxisTextGeometry = function (mappings, options) { var labelMeshes = []; _.each(mappings, function (axis, name) { var geometry = new THREE.TextGeometry(name + (axis ? ' : ' + axis : ''), { size: options.legendSize, height: textGeometryHeight, curveSegments: textCurveSegments, });
+ 3 other calls in file
GitHub: ASSERT-KTH/ci-hackathon
169 170 171 172 173 174 175 176 177 178
const threeLigth = addLigth( rgbtoHex(obj.color), toGlobalPosition(obj.relativePosition)) spotLights[ligth].obj = threeLigth; var geometry = new THREE.TextGeometry( ligth, { font: font, size: 10, height: 2, curveSegments: 12,
+ 2 other calls in file
128 129 130 131 132 133 134 135 136 137
} function drawMtext(entity, data) { var color = getColor(entity, data); var geometry = new THREE.TextGeometry(entity.text, { // font: font, size: entity.height * (4 / 5), height: 1 });
+ 3 other calls in file
GitHub: max0ne/logo_thing

205 206 207 208 209 210 211 212 213 214
if (obj3d) { applyObj3d(obj3d); } else if (text3d) { new THREE.FontLoader().load('https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/fonts/helvetiker_regular.typeface.json', (font) => { const geometry = new THREE.TextGeometry(text3d, { font, size: 100, height: 1, curveSegments: 1,
GitHub: teerzo/btx-face
1646 1647 1648 1649 1650 1651 1652 1653 1654 1655
// console.log('loader start'); loader.load('./fonts/helvetiker_regular.typeface.json', function (font) { // console.log('loader finished'); // console.log('font', font); var geometry = new THREE.TextGeometry('Teerzo', { font: font, size: 80, height: 1, curveSegments: 12,
38 39 40 41 42 43 44 45 46
height: 0, curveSegments: 1, }; const baseGeometries = [ new THREE.TextGeometry('HELLO', optTextGeometry), new THREE.TextGeometry('WORLD', optTextGeometry), ]; const geometry = new THREE.BufferGeometry(); let maxCount = 0;
GitHub: lcneves/w3d

53 54 55 56 57 58 59 60 61 62
if (!font.isFont) { fontLoader.parse(font); } var size = units.convert(object, 'font-size', 'world'); var geometry = new THREE.TextGeometry(text, { font: font, size: size, /* TODO: implement font-height as CSS property. */ height: size / FONT_SIZE_HEIGHT_RATIO,
+ 3 other calls in file
GitHub: Avnerus/ssotl

174 175 176 177 178 179 180 181 182
} function createText(text) { textGeo = new THREE.TextGeometry( text, { size: 100, height: 20, curveSegments: 4,
+ 3 other calls in file
GitHub: kyohei8/threejs-sandbox

53 54 55 56 57 58 59 60 61 62
// Start Creation of DataTexture // Could it be simplified with THREE.FBOUtils.createTextureFromData(textureWidth, textureWidth, data); ? data = new Float32Array( width * height * 3 ); var textGeo = new THREE.TextGeometry( TEXT, { size: 1, height: 0.5, curveSegments: 0,
GitHub: kyohei8/threejs-sandbox

71 72 73 74 75 76 77 78 79 80
// let width = 64, height = 64; let width = 512, height = 512; data = new Float32Array( width * height * 3 ); let textGeo = new THREE.TextGeometry( "DAT", { size: 1, height: 0.5, curveSegments: 0,
three.Vector3 is the most popular function in three (22341 examples)