Commit afce5021 authored by liujiangnan's avatar liujiangnan

feat

parent 91f16f00
cc.macro.ENABLE_TRANSPARENT_CANVAS = false; cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
\ No newline at end of file \ No newline at end of file
...@@ -68,14 +68,12 @@ export default class NewClass extends middleLayerBase { ...@@ -68,14 +68,12 @@ export default class NewClass extends middleLayerBase {
setVideoToBottom() { setVideoToBottom() {
const videos = cc.find("Canvas").getComponentsInChildren(cc.VideoPlayer); const videos = cc.find("Canvas").getComponentsInChildren(cc.VideoPlayer);
if (videos.length > 0) { if (videos.length > 0) {
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
for (let i = 0; i < videos.length; i++) { for (let i = 0; i < videos.length; i++) {
const video = videos[i]; const video = videos[i];
cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0); cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0);
video.stayOnBottom = true; video.stayOnBottom = true;
} }
} else { } else {
cc.macro.ENABLE_TRANSPARENT_CANVAS = false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment