Created
March 25, 2016 12:28
-
-
Save Colmea/2de32fd83493b282d98b to your computer and use it in GitHub Desktop.
Timber component class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Timber extends React.Component { | |
[..] | |
render() { | |
const {component} = this.props; | |
return ( | |
<mesh | |
position={new THREE.Vector3(component.position.x/100, component.position.y/100, component.position.z/100)} | |
ref="component3D" | |
> | |
<extrudeGeometry | |
name={component.id} | |
settings={this.extrudeSettings} | |
> | |
<shape points={this.shapePoints} /> | |
</extrudeGeometry> | |
<materialResource resourceId={'timberMaterial'} /> | |
</mesh> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment