This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am trying to use Three.js with three-bmfont-text to create text in 3D and give it a nice look using shaders.
I install three and three-bmfont-text through npm and import it in JS file:
import * as THREE from 'three';
const loadFont = require('load-bmfont');
const createGeometry = require('three-bmfont-text');
I run npm run dev and npm run watch and everything seems to work fine, but in chrome developer it logs the following error :
app.js:3524 Uncaught ReferenceError: THREE is not defined at Object../node_modules/three-bmfont-text/index.js
I tried to install and uninstall three and three-bmfont-text but nothing changes, what am I missing?
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/CodingHelp/...