## SurfaceStyleSpec

View Source GLViewer.ts, line 6157

### Example

    var setStyles = function(volumedata){
     var data = new $3Dmol.VolumeData(volumedata, "cube");
     viewer.addSurface("VDW", {opacity:0.85, voldata: data, volscheme: new $3Dmol.Gradient.RWB(-10,10)},{chain:'A'});
     viewer.mapAtomProperties($3Dmol.applyPartialCharges);
     viewer.addSurface($3Dmol.SurfaceType.SAS, {map:{prop:'partialCharge',scheme:new $3Dmol.Gradient.RWB(-.05,.05)}, opacity:1.0},{chain:'B'});
     viewer.addSurface($3Dmol.SurfaceType.VDW, {opacity:0.85,voldata: data, color:'red'},{chain:'C'});
     viewer.addSurface($3Dmol.SurfaceType.SAS, {opacity:0.85,voldata: data, colorscheme:'greenCarbon'},{chain:'D'});
     viewer.render();
    };
    $3Dmol.download("pdb:4DLN",viewer,{},function(){
      $.get("data/1fas.cube",setStyles);
    });

# Members

Type: `ColorSpec`

#### # color Optional

fixed coloring, overrides colorscheme

View Source GLViewer.ts, line 6183

Type: `ColorschemeSpec`

#### # colorscheme Optional

element based coloring

View Source GLViewer.ts, line 6178

Type: `number`

#### # opacity Optional

sets the transparency: 0 to hide, 1 for fully opaque

View Source GLViewer.ts, line 6173

Type: `VolumeData`

#### # voldata Optional

volumetric data for vertex coloring, can be VolumeData object or raw data if volformat is specified

View Source GLViewer.ts, line 6188

Type: `string`

#### # volformat Optional

format of voldata if not a {VolumeData} object

View Source GLViewer.ts, line 6198

Type: `Gradient`

#### # volscheme Optional

coloring scheme for mapping volumetric data to vertex color, if not a Gradient object, show describe a builtin gradient one by providing an object with gradient, min, max, and (optionally) mid fields.

View Source GLViewer.ts, line 6193