Skip to content

Commit

Permalink
Use require instead of import (for three-bmfont-text) and set global …
Browse files Browse the repository at this point in the history
  • Loading branch information
markyou committed May 21, 2018
1 parent 31bcd9b commit 346bdb8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions expo/src/components/Graph/gl/GraphTextMeshFactory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import createGeometry from "three-bmfont-text";
import { PixelRatio } from "react-native";

import { THREE, createTextureAsync } from "./helpers";
// Use require instead of import (for three-bmfont-text) and set global THREE due to: https://github.com/Jam3/three-bmfont-text/issues/13
const THREE = require("three");
const { PixelRatio } = require("react-native");
const { createTextureAsync } = require("./helpers");
const createGeometry = require("three-bmfont-text");

// Create .fnt from .ttf
// http://www.angelcode.com/products/bmfont/
Expand Down

0 comments on commit 346bdb8

Please sign in to comment.