user3354059
user3354059

Reputation: 402

How do you put image/texture on part of a geometry in three.js?

I have created a simple sphere in three.js using SphereGeometry and MeshPhongMaterial to give it a static color. I am wondering how I can overlay an image that only takes up a small portion of the sphere. I am aware of ways to wrap an entire texture around an object, but not how to just put it in one spot.

Upvotes: 2

Views: 1486

Answers (1)

StrandedKitty
StrandedKitty

Reputation: 302

You can use THREE.DecalGeometry, which allows to project textures/images onto any THREE.Mesh.

Example

Upvotes: 2

Related Questions