- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Changing three.js background to transparent or another color in HTML
If you want a transparent background in three.js, you need a pass in the alpha parameter to the WebGLRenderer constructors in the below-given code −
var renderer = new THREE.WebGLRenderer( {alpha: true } ); // You can leave the clear color at the defaultvalue. renderer.setClearColor( 0x000000, 0 ); //default
However, to set the background color,
renderer.setClearColor(0xb0f442 );
- Related Articles
- How to set background color in HTML?
- Changing the background color of a tkinter window using colorchooser module
- How to display the background color of an element in HTML?
- Changing color randomly in JavaScript
- How to create a semi-transparent background in Canva?
- How to make a background 20% transparent on Android
- How to make a background 25% transparent on Android?
- How to make a background 25% transparent on iOS
- How to set background color in jQuery?
- How to make the marker face color transparent without making the line transparent in Matplotlib?
- How to add background color to headers or footers in an Excel sheet while printing
- Turn transparent pixels to a specified color and make opaque pixels transparent with CSS
- How to change JFrame background color in Java
- How to change axes background color in Matplotlib?
- Add hover color to background color of the table row in Bootstrap

Advertisements