You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applying color to text doesn't seem to work. In my case, I was trying to set my text color to white using the fill attribute, with the value either "0xfff" or "white".
Another issue is that when fill is an array, it only accepts numbers
Work around for me: <Text text={Some text} x={10} y={10} style={ new PIXI.TextStyle({ fontSize: 24, fill: 'white', // doesnt work // @ts-ignore _fill: ['#ffffff', '#00ff99'], // work pretty well }) } />
The workaround works well for development, but it has issues when compiling, making it unfeasible to use in production.
Checking validity of types .Failed to compile.
./src/components/Galeria/BallTree/index.tsx:22:5
Type error: Object literal may only specify known properties, but '_fill'
does not exist in type 'Partial<TextStyleOptions>'. Did you mean to write
'fill'?
Current Behavior
Applying color to text doesn't seem to work. In my case, I was trying to set my text color to white using the
fill
attribute, with the value either "0xfff" or "white".Another issue is that when
fill
is an array, it only accepts numbersExpected Behavior
Text should render color as the setting
Steps to Reproduce
Here is my sample code written in Typescript:
Here is the result:
Environment
@pixi/react
version: ^7.1.2pixi.js
version: ^8.1.0React
version: 18.0.0ReactDOM
version: 18.0.0Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: