react-three-renderer
react-three-renderer copied to clipboard
Example for Sprite
Hey,
I don't really like using this place for help and not bugs etc... but I'm really struggling get a sprite to display. Does someone have an example of working with a simple sprite?
Currently I have something similar to:
<sprite visible={true} position={new THREE.Vector3(0, 0, 0)} key={"sprite_" + index}>
<spriteMaterial side={THREE.DoubleSide} color={0xffffff}>
<texture url={element.image} />
</spriteMaterial>
</sprite>
I don't get any errors, but the sprite doesn't appear at all. The url is a valid url and works fine on a meshBasicMaterial on a plane.
Any help would be great.
------- EDIT -------
I get an error in chrome console that mentions:
THREE.WebGLRenderer: Texture marked for update but image is incomplete
Not sure if that is related at all?
There is an example of sprite use with react-three-renderer in this stackoverflow question, maybe it could be helpful somehow
https://stackoverflow.com/questions/39236107/sprite-labels-with-react-three-renderer-mvce-included