How to use the FontLoader function from three
Find comprehensive JavaScript three.FontLoader code examples handpicked from public code repositorys.
GitHub: cfry/dde
129 130 131 132 133 134 135 136 137 138
var sim = {} //used to store sim "global" vars sim.hi_rez = true //var THREE_font_loader = new THREE.FontLoader(); var init_simulation_done = false function init_simulation_maybe(){ if(init_simulation_done) {} else {
24
38
12
GitHub: ASSERT-KTH/ci-hackathon
152 153 154 155 156 157 158 159 160 161
position[2]*boxSize[2] - deltaZ ] } // R1 lights var fontLoader = new THREE.FontLoader(); const materials = [ new THREE.MeshBasicMaterial( { color: 0x00ff00 } ) ];
26
28
0
+ 2 other calls in file
GitHub: max0ne/logo_thing
203 204 205 206 207 208 209 210 211 212
// eslint-disable-next-line const { objUrl, mtlUrl, container, obj3d, text3d } = config; 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,
1
5
2
GitHub: teerzo/btx-face
1640 1641 1642 1643 1644 1645 1646 1647 1648 1649
this.position.set(lx, ly, lz); this.lookAt(app.camera.position); } // app.scene.add(cube); var loader = new THREE.FontLoader(); // console.log('loader start'); loader.load('./fonts/helvetiker_regular.typeface.json', function (font) { // console.log('loader finished');
1
1
0
14 15 16 17 18 19 20 21 22
canvas: canvas, }); const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(); const clock = new THREE.Clock(); const loader = new THREE.FontLoader(); camera.far = 50000; camera.setFocalLength(24);
0
0
0
GitHub: zDawnING/MyLearnWebGL
58 59 60 61 62 63 64 65 66 67
* @param {[type]} position [description] * @return {[type]} [description] */ export const createLabel = (text, position) => { // 暂时不用loader,因为地址本地不好弄 // var loader = new THREE.FontLoader(); // 这里模拟loader后的数据 let font = new THREE.Font(fontData, true); let geometry = new THREE.TextBufferGeometry(text, { font: font,
0
0
1
three.Vector3 is the most popular function in three (22341 examples)