You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm currently working on an application which should draw multiple ellipses one on on top of the other, each with its own outline.
However, when ellipses collide, the collided section's translucency (alpha levels) increase until the terrain is hidden.
Screenshot:
I have found a solution to this problem (And am aware that the solution is already implemented with other geometric shapes, e.g rectangle and circle), but it required:
Returning the custom blending mode when translucency is true, instead of the hardcoded ALPHA_BLEND.
(Code section: )
/**
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
*
* @returns {Object} The render state.
*/
Appearance.prototype.getRenderState = function() {
var translucent = this.isTranslucent();
var rs = clone(this.renderState, false);
if (translucent) {
rs.depthMask = false;
rs.blending = BlendingState.**CUSTOM_BLEND**;
} else {
rs.depthMask = true;
}
return rs;
};
After the change :
An option to pass a custom blending state would be a better solution to the problem.
However, this is not the optimal solution since it fixates the alpha levels of the collided section.
The text was updated successfully, but these errors were encountered:
Hi,
I'm currently working on an application which should draw multiple ellipses one on on top of the other, each with its own outline.
However, when ellipses collide, the collided section's translucency (alpha levels) increase until the terrain is hidden.
Screenshot:
I have found a solution to this problem (And am aware that the solution is already implemented with other geometric shapes, e.g rectangle and circle), but it required:
(Code section: )
After the change :
An option to pass a custom blending state would be a better solution to the problem.
However, this is not the optimal solution since it fixates the alpha levels of the collided section.
The text was updated successfully, but these errors were encountered: