Skip to content

error in SpriteMaterial #38

Open
Open

Description

@garamaru

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions