Change the visual indicator for the current particle system
blend mode
546960
public void updateBlendMode() {
		if (additive.isSelected()) {
			game.getSystem().setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
 		} else {
			game.getSystem().setBlendingMode(ParticleSystem.BLEND_COMBINE);
 		}
	}
574125
function adjustLuminance(rgb, lum) {
  var newRgb = {};
  newRgb.red = calculateLuminance(rgb.red, lum);
  newRgb.green = calculateLuminance(rgb.green, lum);
  newRgb.blue = calculateLuminance(rgb.blue, lum);

  return newRgb;
}
1059668
function (obj, alpha) {
					obj.css({
						visibility: alpha > 0 ? 'visible' : 'hidden'
					});
					if (alpha > 0 && alpha < 100) {
						obj.css({
							opacity: mPrecision(alpha / 100, 4)
						});
					} else if (alpha == 0 || alpha == 100) {
						obj.css({
								opacity: ''
							});
					}
				}
220951
def _change_color(self, event):
        """"""
        h = self.bar.get()
        self.square.set_hue(h)
        (r, g, b), (h, s, v), sel_color = self.square.get()
        self.red.set(r)
        self.green.set(g)
        self.blue.set(b)
        self.hue.set(h)
        self.saturation.set(s)
        self.value.set(v)
        self.hexa.delete(0, "end")
        self.hexa.insert(0, sel_color.upper())
        if self.alpha_channel:
            self.alphabar.set_color((r, g, b))
            self.hexa.insert('end',
                             ("%2.2x" % self.alpha.get()).upper())
        self._update_preview()
1264933
function( value ) {
		this.output.setGrayscale( value & 0x1 );
		this.output.setIntensity( value & 0x20, value & 0x40, value & 0x80 );

		this.sprites.toggle( value & 0x10 );
		this.sprites.toggleLeft( value & 0x4 );

		this.background.toggle( value & 0x8 );
		this.background.toggleLeft( value & 0x2 );

		this.enabled = ( this.sprites.enabled || this.background.enabled );
	}
970407
def setOverlayRenderModel(self, ulOverlayHandle, pchRenderModel):
        

        fn = self.function_table.setOverlayRenderModel
        pColor = HmdColor_t()
        result = fn(ulOverlayHandle, pchRenderModel, byref(pColor))
        return result, pColor
923986
protected void paintIndicator (Graphics2D gfx, Rectangle clip, SceneObjectIndicator tip)
    {
        if (clip.intersects(tip.getBounds())) {
            tip.paint(gfx);
        }
    }
1258771
private void adaptTabLayoutVisibility() {
        if (tabLayout != null) {
            tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
        }
    }
946804
private void adaptTitleContainerVisibility() {
        if (titleContainer != null) {
            boolean visible = isCustomTitleUsed() || !TextUtils.isEmpty(title) || icon != null;

            if (visible) {
                titleContainer.setVisibility(View.VISIBLE);
                notifyOnAreaShown(Area.TITLE);
            } else {
                titleContainer.setVisibility(View.GONE);
                notifyOnAreaHidden(Area.TITLE);
            }
        }
    }
572031
function _fnProcessingDisplay ( oSettings, bShow )
		{
			if ( oSettings.oFeatures.bProcessing )
			{
				var an = oSettings.aanFeatures.r;
				for ( var i=0, iLen=an.length ; i<iLen ; i++ )
				{
					an[i].style.visibility = bShow ? "visible" : "hidden";
				}
			}
		
			$(oSettings.oInstance).trigger('processing', [oSettings, bShow]);
		}
1275182
def setDisplayVisibility(self, bIsVisibleOnDesktop):
        """"""

        fn = self.function_table.setDisplayVisibility
        result = fn(bIsVisibleOnDesktop)
        return result
1133775
def render_particles(self):
        
        for strip_pos in range(self._start, self._end + 1):

            blended = COLORS.black

            # Render visible emitters
            if self.has_e_colors:
                for (e_pos, e_dir, e_vel, e_range,
                     e_color, e_pal) in self.emitters:
                    if e_color is not None:
                        vis = self.visibility(strip_pos, e_pos)
                        if vis > 0:
                            blended = color_blend(
                                blended,
                                color_scale(e_color, int(vis * 255)))

            # Render visible particles
            for vel, pos, stl, color, bright in self.particles:
                vis = self.visibility(strip_pos, pos)
                if vis > 0 and bright > 0:
                    blended = color_blend(
                        blended,
                        color_scale(color, int(vis * bright)))

            # Add background if showing
            if (blended == COLORS.black):
                blended = self.bgcolor

            self.color_list[strip_pos] = blended
403322
function updateControlsFade( viewer ) {
    var currentTime,
        deltaTime,
        opacity,
        i;
    if ( viewer.controlsShouldFade ) {
        currentTime = $.now();
        deltaTime = currentTime - viewer.controlsFadeBeginTime;
        opacity = 1.0 - deltaTime / viewer.controlsFadeLength;

        opacity = Math.min( 1.0, opacity );
        opacity = Math.max( 0.0, opacity );

        for ( i = viewer.controls.length - 1; i >= 0; i--) {
            if (viewer.controls[ i ].autoFade) {
                viewer.controls[ i ].setOpacity( opacity );
            }
        }

        if ( opacity > 0 ) {
            // fade again
            scheduleControlsFade( viewer );
        }
    }
}
37312
function(enabled) {
        var gl = this.context;
        if (enabled) {
            this.texture_filter = gl.NEAREST;
        } else {
            this.texture_filter = gl.LINEAR;
        }
    }
280075
function setBlendMode(mode, context) {
         context = context || this.getContext();
         this.currentBlendMode = mode;

         switch (mode) {
           case "multiply":
             context.globalCompositeOperation = "multiply";
             break;

           default:
             // normal
             context.globalCompositeOperation = "source-over";
             this.currentBlendMode = "normal";
             break;
         }
       }
69473
def change_color(self, selections, value):
        '''

        '''
        if 'atoms' in selections:
            atms = selections['atoms'].mask
            if value is None:
                #self.radii_state.array[atms] = [vdw_radii.get(t) * 0.3  for t in self.system.type_array[atms]]
                self.atom_colors.array[atms, 0:3] = [self.color_scheme.get(t, colors.deep_pink)[0:3]
                                                     for t in self.system.type_array[atms]]
            else:
                self.atom_colors.array[atms, 0:3] = value[0:3]
    
        self.atom_renderer.update_colors(self.atom_colors.array)
        self.on_atom_colors_changed()
664745
def context_changed(self, context):
        
        self._image.set_cmap(context['colormap'])
        self._image.set_clim(context['min'], context['max'])
        self._image.set_interpolation(context['interpolation'])
        self._update_indicators(context)

        self._set_view_limits()

        if self._model.index_direction is not SliceDirection.depth:
            self._image.axes.set_ylabel(context['samples_unit'])