Skip to content

Commit

Permalink
import three
Browse files Browse the repository at this point in the history
  • Loading branch information
atlmtw committed Aug 5, 2021
1 parent 55d39f3 commit ee5e0ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ var createIndices = require('quad-indices')
var vertices = require('./lib/vertices')
var utils = require('./lib/utils')

var root = this

var has_require = typeof require !== 'undefined'

var THREE = root.THREE || (has_require && require('three'))
if (!THREE) throw new Error('MeshLine requires three.js')
import * as THREE from 'three'

module.exports = function createTextGeometry (opt) {
return new TextGeometry(opt)
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"quad-indices": "^2.0.1",
"three-buffer-vertex-data": "^1.0.0"
},
"peerDependencies": {
"three": ">=0.126.0"
},
"devDependencies": {
"bluebird": "^3.7.2",
"browserify": "^16.5.1",
Expand Down

0 comments on commit ee5e0ec

Please sign in to comment.