Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Example for Sprite #216

Open
nickpolet opened this issue Mar 2, 2018 · 1 comment
Open

Example for Sprite #216

nickpolet opened this issue Mar 2, 2018 · 1 comment

Comments

@nickpolet
Copy link

nickpolet commented Mar 2, 2018

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

image

Not sure if that is related at all?

@supromikali
Copy link

supromikali commented Dec 5, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants