-
-
Save AndrewRayCode/06a05b8a533d4b41d425ec86fbffa66f to your computer and use it in GitHub Desktop.
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
shouldComponentUpdate( nextProps ) { | |
const { group, } = this.refs; | |
if( group ) { | |
if( nextProps.position ) { | |
group.position.copy( nextProps.position ); | |
} | |
if( nextProps.rotation ) { | |
group.rotation.copy( nextProps.rotation ); | |
} | |
if( nextProps.quaternion ) { | |
group.quaternion.copy( nextProps.quaternion ); | |
} | |
if( nextProps.scale ) { | |
group.scale.copy( nextProps.scale ); | |
} | |
if( nextProps.materialIds !== this.props.materialIds ) { | |
this._updateMaterials( nextProps.materialIds ); | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment