diff --git a/src/core/Text.tsx b/src/core/Text.tsx index b51266fd0..65fdbcc19 100644 --- a/src/core/Text.tsx +++ b/src/core/Text.tsx @@ -1,4 +1,6 @@ import * as React from 'react' +// @ts-ignore +import { Text as TextMeshImpl, preloadFont } from 'troika-three-text' import { ReactThreeFiber, useThree } from '@react-three/fiber' import { suspend } from 'suspend-react' import { ForwardRefComponent } from '../helpers/ts-utils' @@ -54,10 +56,6 @@ export const Text: ForwardRefComponent = /* @__PURE__ */ React.forwa }: Props, ref: React.ForwardedRef ) => { - // https://github.com/pmndrs/drei/issues/1725 - // https://github.com/pmndrs/drei/issues/1840 - const { Text: TextMeshImpl, preloadFont } = suspend(async () => import('troika-three-text'), []) - const invalidate = useThree(({ invalidate }) => invalidate) const [troikaMesh] = React.useState(() => new TextMeshImpl())