mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-15 12:53:52 +01:00
16 lines
345 B
JavaScript
16 lines
345 B
JavaScript
import {MeshPhongMaterial, FaceColors, DoubleSide} from 'three';
|
|
|
|
export function createTransparentPhongMaterial(color, opacity) {
|
|
return new MeshPhongMaterial({
|
|
vertexColors: FaceColors,
|
|
color,
|
|
transparent: true,
|
|
opacity: opacity,
|
|
shininess: 0,
|
|
depthWrite: false,
|
|
depthTest: false,
|
|
side : DoubleSide
|
|
});
|
|
}
|
|
|
|
|