# withAlpha not working in sandcastle demo (nor in my code)

**URL:** <https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244>\
**Category:** CesiumJS\
**Created:** [May 7, 2019, 3:47am UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244 "2019-05-07T03:47:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinfl](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/justinfl/32/3476_2.png) [@justinfl](https://community.cesium.com/u/justinfl)\
**Post date:** [May 7, 2019, 3:47am UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/1 "2019-05-07T03:47:49Z")

</div>

**1. A concise explanation of the problem you’re experiencing.**

In my code and in the polygon sandcastle tutorial, any polygon that has a withAlpha transparency setting is not being displayed at all

**2. This is straight from the sandcastle demo**

**This Displays Fine**

var orangePolygon = viewer.entities.add({

name : ‘Orange polygon with per-position heights and outline’,

polygon : {

hierarchy : Cesium.Cartesian3.fromDegreesArrayHeights([-108.0, 25.0, 100000,

-100.0, 25.0, 100000,

-100.0, 30.0, 100000,

-108.0, 30.0, 300000]),

extrudedHeight: 0,

perPositionHeight : true,

material : Cesium.Color.ORANGE,

outline : true,

outlineColor : Cesium.Color.BLACK

**This Doesn’t**

var orangePolygon = viewer.entities.add({

name : ‘Orange polygon with per-position heights and outline’,

polygon : {

hierarchy : Cesium.Cartesian3.fromDegreesArrayHeights([-108.0, 25.0, 100000,

-100.0, 25.0, 100000,

-100.0, 30.0, 100000,

-108.0, 30.0, 300000]),

extrudedHeight: 0,

perPositionHeight : true,

material : Cesium.Color.ORANGE.withAlpha(0.5),

outline : true,

outlineColor : Cesium.Color.BLACK

}

**4. The Cesium version you’re using, your operating system and browser.**

My code worked fine in two weeks ago so perhaps an issue with the latest release? Are others having this issue? I’m running on win 7 in Chrome.

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [May 7, 2019, 9:57pm UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/2 "2019-05-07T21:57:06Z")

</div>

Can you test this Sandcastle:

> **[Cesium Sandcastle](https://sandcastle.cesium.com/index.html?src=Cylinders%20and%20Cones.html)**
>
> The Cesium Sandcastle provides an interactive environment for testing Cesium code.

Do you see a green cylinder on the right? Then test the same Sandcastle in 1.56:

[https://cesiumjs.org/releases/1.56/Apps/Sandcastle/index.html?src=Cylinders%20and%20Cones.html](https://cesiumjs.org/releases/1.56/Apps/Sandcastle/index.html?src=Cylinders%20and%20Cones.html)

Do you see a green cylinder on the right?

If the answer is no to both, then this might be an issue with the version of Chrome. There’s some more details on this issue here: [https://github.com/AnalyticalGraphicsInc/cesium/issues/7798](https://github.com/AnalyticalGraphicsInc/cesium/issues/7798)

Can you tell me what Chrome version you’re using? And what graphics card you have?

---

<div class="post-metadata">

**Author:** ![justinfl](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/justinfl/32/3476_2.png) [@justinfl](https://community.cesium.com/u/justinfl)\
**Post date:** [May 8, 2019, 5:04am UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/3 "2019-05-08T05:04:39Z")

</div>

Thanks for the links, very helpful. For me the issue is with polygons and cylinders…and possibly other shapes i haven’t tested. The odd thing is i didn’t change a thing about my setup and all of a sudden it stopped working.

That said, I’ve isolated the issue to chrome (win 7). I started having the issue with Chrome 74.3729.108 and updated to 74.3729.131 (latest) but still had the issue. Note that I’m running chrome on a mac via the latest version of parallels. I see the red triangle, but only the frame outline of the cylinder. I tried attaching a picture. I used the withAlpha functionality last on April 23 in sandcastle with chrome (win) …108 and it worked fine.

I didn’t think it possible but both links worked fine with IE, Safari, and the Chrome (v …131) for mac (10.14.3).

I have a standard issue mid-2014 MacBook Pro (Intel Iris 1536 MB)

![alphaTest.JPG](https://global.discourse-cdn.com/cesium/original/2X/6/62c0f0959a8244670dbfd9d3875d721d6f0e8cb3.jpeg)

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [May 9, 2019, 4:21pm UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/4 "2019-05-09T16:21:59Z")

</div>

Thanks for helping us isolate this to Chrome! Just to confirm, you’re seeing NO translucent green in both of the Sandcastle links I posted in Chrome, but you DO see green in both sandcastle links in other browsers?

---

<div class="post-metadata">

**Author:** ![Bart](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@Bart](https://community.cesium.com/u/Bart)\
**Post date:** [May 9, 2019, 4:37pm UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/5 "2019-05-09T16:37:28Z")

</div>

I can confirm the additional behavior from the GitHub [issue 7798](https://github.com/AnalyticalGraphicsInc/cesium/issues/7798#issuecomment-490970752)

A user with a Dell Windows 7 non-touchscreen laptop is seeing no fills on any kind of polygon in the Sandcastle demos, beginning with Chrome 74 and including beta 75. Firefox works normally.

---

<div class="post-metadata">

**Author:** ![justinfl](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/justinfl/32/3476_2.png) [@justinfl](https://community.cesium.com/u/justinfl)\
**Post date:** [May 10, 2019, 1:32am UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/6 "2019-05-10T01:32:43Z")

</div>

correct. And to be clear wrt chrome, i see no green in chrome for windows. I do see green in chrome for mac.

---

<div class="post-metadata">

**Author:** ![justinfl](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/justinfl/32/3476_2.png) [@justinfl](https://community.cesium.com/u/justinfl)\
**Post date:** [May 10, 2019, 1:33am UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/7 "2019-05-10T01:33:23Z")

</div>

oh and it’s also happening with my polylines that have a glow property

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [June 13, 2019, 3:52pm UTC](https://community.cesium.com/t/withalpha-not-working-in-sandcastle-demo-nor-in-my-code/8244/8 "2019-06-13T15:52:25Z")

</div>

Looks like it was a Chrome issue after all, and it should be fixed with the next version of Chrome. See: [https://github.com/AnalyticalGraphicsInc/cesium/issues/7798#issuecomment-501556152](https://github.com/AnalyticalGraphicsInc/cesium/issues/7798#issuecomment-501556152)
