Three.js:多个渲染器中的透明对象(WebGLRenderer + CSS3DRenderer)

时间:2015-11-30 19:31:23

标签: javascript html5 three.js

如果您能帮我解决我的示例中的透明度问题,我将非常感激:http://jsfiddle.net/Mihails/oL0uwtvs/2

private static IConfigurableHttpClientInitializer GetInstalledApplicationCredentials()
{
string serviceAccountEmail = "xxxxxxxx";

X509Certificate2 certificate;
using (Stream stream = new FileStream(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "path.p12"), FileMode.Open, FileAccess.Read))
{
    using (MemoryStream ms = new MemoryStream())
    {
        stream.CopyTo(ms);
        certificate = new X509Certificate2(ms.ToArray(), "notasecret", X509KeyStorageFlags.Exportable);
    }
}

ServiceAccountCredential credential = new ServiceAccountCredential(
    new ServiceAccountCredential.Initializer(serviceAccountEmail)
    {
        Scopes = new[] {
            StorageService.Scope.DevstorageFullControl
    },
}.FromCertificate(certificate));

return credential;
}

        private static StorageService GetStoreageService()
    {
        var service = new StorageService(
            new BaseClientService.Initializer()
            {
                HttpClientInitializer = GetInstalledApplicationCredentials(),
                ApplicationName = "app"
            }
        );

        return service;
    }

public static byte[] DownloadAudio(string fileName)
    {
        var service = GetStoreageService();

        var req = service.Objects.Get(bucketName, fileName);
        var readobj = req.Execute();

        var downloader = new MediaDownloader(service);

        using (var ms = new MemoryStream())
        {
            downloader.Download(readobj.MediaLink, ms);

            return ms.ToArray();
        }
    }

请参阅:Issue details

主要挑战:

  • 多个渲染器
    • WebGLRenderer:main三个场景(网格,骨骼,动画等)
    • CSS3DRenderer:这将包含CSS3DObjects(div,iframes,嵌入视频,像GIF等html元素)。
  • 所有对象都是透明的

非常感谢和最诚挚的问候,

0 个答案:

没有答案