Skip to content

Commit 3943ab6

Browse files
committed
Bug fix
1 parent 7c089b7 commit 3943ab6

File tree

6 files changed

+48
-35
lines changed

6 files changed

+48
-35
lines changed

example/src/App.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ const App = () => {
1212
anchorVert={CENTER}
1313
width={80}
1414
fontSize={50}
15-
textColor={[.1, .1, .1, 1]}
16-
backgroundColor={[1.0, .8, .8, 1]}
17-
borderColor={[.7, 0, .7, 1]}
18-
borderWidth={20}
19-
borderRadius={50}
15+
textColor={0x0E0E0E}
16+
backgroundColor={'hsl(0, 100%, 50%)'}
17+
backgroundAlpha={.8}
18+
borderColor={'skyblue'}
19+
borderAlpha={.9}
20+
borderWidth={5}
21+
borderRadius={10}
2022
borderSmoothing={0.1}
21-
borderBuffer={30}
23+
borderBuffer={3}
2224
/>
2325
</Suspense>
2426
</Canvas>

example/src/index.css

Lines changed: 0 additions & 14 deletions
This file was deleted.

example/src/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import './index.css'
2-
31
import React from 'react'
42
import ReactDOM from 'react-dom'
53
import App from './App'

src/styles.module.css

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/text/Text.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const RIGHT = 'right'
3333
* anchorVert, anchorHorz: The anchor point of the text object that will be placed at the placement point - defaults to the center
3434
* positionVert, positionHorz: Percentage of viewport between the anchor and the top/left - defaults to the center of the viewport
3535
*/
36-
const Text = ({
36+
export const Text = ({
3737
text = '',
3838
width = 100,
3939
alignment = CENTER,
@@ -67,7 +67,7 @@ const Text = ({
6767
])
6868

6969
// Texture Data
70-
const texture = useLoader(THREE.TextureLoader, textureData)
70+
const { texture } = useLoader(THREE.TextureLoader, textureData)
7171

7272
// Uniforms for shader
7373
const uniforms = useMemo(() => {
@@ -199,5 +199,3 @@ const Text = ({
199199
</mesh>
200200
)
201201
}
202-
203-
export default Text

xnode_modules/indexes-of/test.js

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)