Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ROS3D.makeColorMaterial = function(r, g, b, a) {
- var color = new THREE.Color();
- color.setRGB(r, g, b);
- if (a <= 0.99) {
- return new THREE.MeshPhongMaterial({
- color : 0x000000,
- specular : 0x666666,
- emissive : 0x000000,
- shininess : 10,
- shading: THREE.FlatShading,
- opacity : a,
- transparent : true,
- depthWrite : false,
- depthTest : true,
- //polygonOffset : true,
- //polygonOffsetUnits : -1,
- //side : THREE.DoubleSide
- });
- } else {
- return new THREE.MeshPhongMaterial({
- color : 0x000000,
- opacity : a,
- blending : THREE.NormalBlending
- });
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement