Giter VIP home page Giter VIP logo

Comments (6)

c-zhuo avatar c-zhuo commented on June 24, 2024

含有白色背景的图,加上hasAlpha: true属性试试
Easycanvas.webglShapes.custom({ ... , hasAlpha: true});

文档貌似忘了提这一块,后续补上。

from easycanvas.

cyitianyou avatar cyitianyou commented on June 24, 2024

按照您说的,我更新了一下demo,好像还是不生效
代码还是在原地址: https://cyitianyou.github.io/easycanvas-demo/demo.html

from easycanvas.

c-zhuo avatar c-zhuo commented on June 24, 2024

好的,等下班有空了我查查哈

from easycanvas.

cyitianyou avatar cyitianyou commented on June 24, 2024

感谢!那您先忙!
另外还得再咨询一下您,Easycanvas有提供整个界面保存成图片的API吗?
我试过$app.$dom.toBlob或者$app.pause(); $app.$dom.toBlob 得到的都是一张空白的图片

from easycanvas.

cyitianyou avatar cyitianyou commented on June 24, 2024

您好!白色背景的问题解决了,是我自己的问题!
我把背景图和组件图的z坐标都设置成0了,可能会相互影响,我把组件图的z坐标设为1,再加上您说的hasAlpha: true属性就可以了!
再次感谢您的支持!

from easycanvas.

c-zhuo avatar c-zhuo commented on June 24, 2024

好的,都是0的情况下确实有个bug,这个下个版本会修复。
保存成图片,可以对canvas用toDataURL这个API,是浏览器提供的API。

from easycanvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.