infamous
Version:
A CSS3D/WebGL UI library.
20 lines (12 loc) • 451 B
JavaScript
import 'element-behaviors'
import { MeshPhongMaterial } from 'three'
import BaseMaterialBehavior from './BaseMaterialBehavior'
const PhongMaterialBehavior = BaseMaterialBehavior.subclass('PhongMaterialBehavior', {
protected: {
createComponent() {
return new MeshPhongMaterial({ color: 0x00ff00 })
},
},
})
elementBehaviors.define('phong-material', PhongMaterialBehavior)
export default PhongMaterialBehavior