Closed Krxtopher closed 2 years ago
We should probably also update Readme to reflect the new script to run babylon example
We should probably also update Readme to reflect the new script to run babylon example
There are lots of updates needed for the README. There's a whole epic devoted to updating documentation, so this will happen as part of that epic.
Issue # SUMERIAN-11037
Description of changes:
Scope
The focus of this pull request is to encapsulate the ~350 lines of boilerplate code required to instantiate a host in BabylonJS (as demonstrated in our old example HTML file) to improve ease of use for users of the Hosts library. That boilerplate code is now encapsulated in a new module called HostUtils which exposes a simple
createHost()
function and agetCharacterConfig()
function.The old example app has been removed and two new examples have been added. These are the "hello-world-demo" and "gesture-demo" examples found under
/packages/amazon-sumerian-hosts-babylon/examples
.Out of Scope
Files to review
You can ignore many of the auto-generated files. The files to review explicitly are:
/packages/amazon-sumerian-hosts-babylon/src/Babylon.js/
/packages/amazon-sumerian-hosts-babylon/test/unit/HostUtils.spec.js
/packages/amazon-sumerian-hosts-babylon/examples
How to test
Check out the repository.
In a terminal,
cd
to the repository's root directory.Run
npm install
.Update the following file to reflect your Cognito Identity Pool ID:
/packages/amazon-sumerian-hosts-babylon/examples/common/demo-credentials.js
Run
npm run babylon-examples-serve
from the root of the repo. This will automatically start a web server and open a web browser to a listing of the available demos. Click either of the demos to test. If the hosts work properly, then the code is working!How to review API doc updates
Open the following file in a browser:
/docs/index.html
Use the left-hand nav to navigate to "Namespaces > babylonjs/HostUtils".
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
PR Update 1: