Created
March 10, 2016 18:47
-
-
Save AndrewRayCode/dbfccea1816f81e9b77c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import React, { PropTypes, Component } from 'react'; | |
| import React3 from 'react-three-renderer'; | |
| import { Shrink } from '../'; | |
| import THREE from 'three'; | |
| export default class CreatePreviewObject extends Component { | |
| static propTypes = { | |
| createType: PropTypes.string.isRequired, | |
| createPreviewPosition: PropTypes.object.isRequired, | |
| createPreviewRotation: PropTypes.object.isRequired, | |
| time: PropTypes.number.isRequired, | |
| gridScale: PropTypes.object.isRequired, | |
| shaders: PropTypes.object.isRequired, | |
| assets: PropTypes.object.isRequired, | |
| chapterEntities: PropTypes.object | |
| } | |
| constructor( props, context ) { | |
| super( props, context ); | |
| } | |
| render() { | |
| const { createType } = this.props; | |
| if( createType ) { | |
| if( createType === 'grow' ) { | |
| return <group />; | |
| } else { | |
| return <Shrink />; | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or 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
| import React, { Component } from 'react'; | |
| import React3 from 'react-three-renderer'; | |
| export default class Shrink extends Component { | |
| constructor( props, context ) { | |
| super( props, context ); | |
| } | |
| render() { | |
| return <group />; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment