VRObjectForm component

The VRObjectForm component will render the input fields to modify an individual VR object's details, which is added to the answerObjects and wrongObjects arrays of the game in the GameForm component:

It may start with a blank VR object or load an existing VR object's details in componentDidMount.

mern-vrgame/client/game/VRObjectForm.js:

state = {      objUrl: '', mtlUrl: '',      translateX: 0, translateY: 0, translateZ: 0,       rotateX: 0, rotateY: 0, rotateZ: 0,      scale: 1, color:'white'} 

In componentDidMount, the state will be set with details of the vrObject passed as a prop from the GameForm component.

mern-vrgame/client/game/VRObjectForm.js ...

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.