April 2020
Intermediate to advanced
716 pages
18h 55m
English
The details of any VR object in the game will be updated when the user changes input values in any of the fields in the corresponding VR object form. To register this update, the GameForm that houses the forms for the VR objects will pass the handleObjectChange method to the VRObjectForm component, which will render the VR object form. This handleObjectChange method will be defined as follows:
mern-vrgame/client/game/GameForm.js:
const handleObjectChange = (index, type, name, val) => { var newGame = {...game} newGame[type][index][name] = val setGame(newGame)}
This handleObjectChange method will be used in the VRObjectFrom component to capture the changed input's value and update the corresponding field of ...
Read now
Unlock full access