如何设置透明背景 #5
Unanswered
singlecoder
asked this question in
Engine
Replies: 2 comments
-
设置全透明,第二步需要这样写: background.solidColor.setValue(0, 0, 0, 0); // 设置全透明 |
Beta Was this translation helpful? Give feedback.
0 replies
-
1.0 版本后,引擎初始化改为异步,且画布透明默认就是打开的,如果需要关闭,如下: const engine = await WebGLEngine.create({
canvas: "canvas",
graphicDeviceOptions:{
alpha: false,
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
第一步
在初始化引擎的时候将画布透明打开,如下:
第二步
设置背景的颜色,如下:
Beta Was this translation helpful? Give feedback.
All reactions