Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in SpriteMaterial #38

Open
garamaru opened this issue Sep 8, 2016 · 0 comments
Open

error in SpriteMaterial #38

garamaru opened this issue Sep 8, 2016 · 0 comments

Comments

@garamaru
Copy link

garamaru commented Sep 8, 2016

The function function makeTextSprite(message, opts) {[...]} gives me an error with the newest THREE.js(r80).
Something like "there is no extension for that in the material".
The following should be taken out, to still work properly with newer THREE.js-Versions:

//in the line where this is located:
var spriteMaterial = new THREE.SpriteMaterial({
map: texture//, useScreenCoordinates: false
//just commenting that out did the trick
});

Just in case someone else gets the same error.

Also 1 minor question (I don't know if this should get a separate issue):

Why can't I display "lots" of text with the makeTextSprite-function?
For example a timestamp that looks like this: "day 1, 08:00:00"
Only if I define the context like this: context.fillText(message, 0, fontsize, 256);
Also I needed to use another scaling for the sprite too:
sprite.scale.set(200, 70, 2.0);

It shows me the whole text. Otherwise it is cut off after a few digits.

Any suggestions there?

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

No branches or pull requests

1 participant