Skip to content

Instantly share code, notes, and snippets.

@RSpace
Last active January 3, 2016 10:57
Show Gist options
  • Save RSpace/04d18756a7accfe0de58 to your computer and use it in GitHub Desktop.
Save RSpace/04d18756a7accfe0de58 to your computer and use it in GitHub Desktop.
MeetupVR - Members.js
class Members extends Component {
render () {
let members = this.props.members
if (this.props.vrMode) {
return (
<Entity>
{members.map(this.renderMember.bind(this))}
</Entity>
)
} else {
return (
<div className="members-container">
{members.map(this.renderMember.bind(this))}
</div>
)
}
}
renderMember (member, index) {
let position = circularPositionFromIndex(index, boxSize)
return (
<Member key={index} id={member.get('id')} name={member.get('name')} photoUrl={member.get('photo_url')}
type={member.get('type')}
width={boxSize} height={boxSize} depth={boxSize}
position={position}
index={index}
onClick={this.props.onAvatarClicked}
vrMode={this.props.vrMode} />
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment