Skip to content

Make it possible to configure the background to be transparent #874

Closed

Description

@ethanny2

Sorry if this is not a relevant question but I couldn't find anything regarding this topic on the documentation/Internet. Is it possible to set the background-color attribute of to transparent/ none? It appears to default to a white background if the CSS string is not parsed correctly.

Activity

  1. forresto commented on Nov 5, 2019

    @forresto

    Demo PR here, but it's WIP: #268 ... conversation: #182

  2. cdata commented on Nov 5, 2019

    @cdata
    Contributor

    @ethanny2 yes, we would like for this to be possible. It's a trickier problem than it seems, because it requires that we enable alpha: true when creating the WebGL context, which in turn can have negative consequences for alpha blending in the scene.

    So, all that to say I think we should support this but it needs to be opt-in.

  3. changed the title [-]Possible to set Transparent/ No background color for <model-viewer>?[/-] [+]Make it possible to configure the background to be transparent[/+] on Nov 5, 2019
  4. added this to the milestone on Nov 5, 2019
  5. pushmatrix commented on Dec 4, 2019

    @pushmatrix
    Contributor

    To add another usecase for this, Shopify allows merchants to specify the background colour over the model-viewer. However the poster image always gets generated with a white background. So if the background colours are different, you'll notice it when it transitions from poster -> 3D. It would be nice if we could generate the poster image as a png with a transparent background, that way we could seamlessly transition to the 3D model regardless of background color.

  6. matiasnombarasco commented on Dec 18, 2019

    @matiasnombarasco

    Having this feature will help us a lot, currently, I haven't found any walkaround this behavior, so I can't this web component.

  7. modified the milestones: , on Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions