//定义一个为白色并且是透明材质
var material = o3djs.material.createBasicMaterial(
g_pack, g_viewInfo, [1, 1, 1, 1],true);
//使用这个材质创建一个半径为30的小球
var shape = o3djs.primitives.createSphere(g_pack, material, 30, 20, 20);
var groupTransform = g_pack.createObject('Transform');
var groupTransform2 = g_pack.createObject('Transform');
groupTransform.parent = g_client.root;
groupTransform.addShape(shape);
//定义漫反色颜色为红色,透明度为0.5,其中1不透明,0完全透明
groupTransform.createParam('diffuse', 'ParamFloat4').value = [1,0,0,0.5];
groupTransform2.parent = g_client.root;
groupTransform2.translate([0, 0, 50]);
groupTransform2.addShape(shape);
groupTransform2.createParam('diffuse', 'ParamFloat4').value = [0,1,0,0.5];
var material = o3djs.material.createBasicMaterial(
g_pack, g_viewInfo, [1, 1, 1, 1],true);
//使用这个材质创建一个半径为30的小球
var shape = o3djs.primitives.createSphere(g_pack, material, 30, 20, 20);
var groupTransform = g_pack.createObject('Transform');
var groupTransform2 = g_pack.createObject('Transform');
groupTransform.parent = g_client.root;
groupTransform.addShape(shape);
//定义漫反色颜色为红色,透明度为0.5,其中1不透明,0完全透明
groupTransform.createParam('diffuse', 'ParamFloat4').value = [1,0,0,0.5];
groupTransform2.parent = g_client.root;
groupTransform2.translate([0, 0, 50]);
groupTransform2.addShape(shape);
groupTransform2.createParam('diffuse', 'ParamFloat4').value = [0,1,0,0.5];