Javascript 更改曲面图vis.js的颜色?

Javascript 更改曲面图vis.js的颜色?,javascript,html,vis.js,Javascript,Html,Vis.js,我目前正在尝试使用vis.js进行graph 3d plot,但经过多次尝试后,我无法找到更改曲面类型颜色的正确方法。我使用了以下代码。还有其他更好的图书馆吗?或任何其他直接方式使用三个js并实现相同的显示 var options = { width: '100%', height: '100%', style: 'surface', showPerspective: true, showGrid: true, showShadow: false, keepAspec

我目前正在尝试使用vis.js进行graph 3d plot,但经过多次尝试后,我无法找到更改曲面类型颜色的正确方法。我使用了以下代码。还有其他更好的图书馆吗?或任何其他直接方式使用三个js并实现相同的显示

var options = {
  width: '100%',
  height: '100%',
  style: 'surface',
  showPerspective: true,
  showGrid: true,
  showShadow: false,
  keepAspectRatio: true,
  verticalRatio: 0.5,
  /*
   * style : { surfaceColor : "#ff9900" },
   */
  cameraPosition: {
    horizontal: 0.9,
    vertical: 0.4,
    distance: 2.8
  }
};

while (lx <= lengthX) {
  while (lz < lengthZ) {
    var r = this[type](lx, lz);
    data.add({
      id: counter++,
      x: r[0],
      z: r[1],
      y: r[2],
      style: 1
    });
    lz += asZ;
    lz = this.precisionRound(lz, 2);
  }
  lz = 0;
  lx += asX;
  lx = this.precisionRound(lx, 2);
}
我使用以下选项:

var options = {
layout: {
    randomSeed: undefined,
    improvedLayout:true,
    hierarchical: {
      enabled:false,
      levelSeparation: 150,
      nodeSpacing: 100,
      treeSpacing: 20,
      blockShifting: true,
      edgeMinimization: true,
      parentCentralization: true,
      direction: 'UD',        // UD, DU, LR, RL
      sortMethod: 'hubsize'   // hubsize, directed
    }
  },
physics: {
        fit: true,
        stabilization: {
            enabled: false
        },
    },
edges:{
    color: 'black',
    length: 100,
    font: '16px tahoma #ff0000',
    scaling:{
      label: false,
    },
    shadow: true,
    smooth: true,
  },
nodes: {},
interaction: {
        multiselect: false,
        navigationButtons: true,
        selectable: true,
        selectConnectedEdges: true,
        tooltipDelay: 100,
        zoomView: true
    }
  };