Skip to content

Three.js

案列资源

透明背景

js
const scene = new THREE.Scene();
scene.background = null; // 将背景设置为null即可实现透明
const renderer = new THREE.WebGLRenderer({ 
    antialias: true,
    alpha: true  // 启用alpha通道
});