Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let image = 'some base64 string';
- //like
- //data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAAGUExURcPDw/////joICQAAAASSURBVAjXY2AAgfr///8PTgIAnnZsBQ0uHE0AAAAASUVORK5CYII=
- let geometry = new THREE.SphereGeometry( 0.4, 32, 16 );
- let texture = new THREE.TextureLoader().load( image );
- let material = new THREE.MeshPhongMaterial({
- map: texture,
- });
- let mesh = new THREE.Mesh( geometry, material );
Add Comment
Please, Sign In to add comment