Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
This commit fixes up the JSDocs for the @amazon-sumerian-hosts/babylon package, primarily by typedefing several object structures used throughout HostObject, and standardizing the way we refer to types from external modules (AWS SDK, BabylonJS, etc). Typescript unfortunately doesn't support the external tag, and will generate nonsense from it.
Typescript is added as a dev-dependency, along with a build target that will compile definition files from the JSDoc documentation.
To add type definitions for the other submodules, a tsconfig.json file needs to be added at the root of that submodule (it can largely be copied from the tsconfig.json file defined for the @amazon-sumerian-hosts/babylon package.) Then a project reference needs to be added to the monorepo's tsconfig.json, so that the compiler knows where to find those nested tsconfig.json files.
Reviewer Testing Instructions
Run npm run compile-ts to generate the *.d.ts definition files
When the @amazon-sumerian-hosts/babylon package is then installed and imported into a Typescript project (such as one generated by the BabylonJS editor), there should be typechecking and intellisense without any further configuration needed by that project
Submission Checklist
I confirm that I have...
[x] removed hard-coded Cognito IDs
[x] manually smoke-tested the BabylonJS integration tests
[x] manually smoke-tested the BabylonJS demos
[x] manually smoke-tested the Three.js integration tests
[x] manually smoke-tested the Three.js demo
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description
This commit fixes up the JSDocs for the
@amazon-sumerian-hosts/babylon
package, primarily bytypedef
ing several object structures used throughoutHostObject
, and standardizing the way we refer to types from external modules (AWS SDK, BabylonJS, etc). Typescript unfortunately doesn't support theexternal
tag, and will generate nonsense from it.Typescript is added as a dev-dependency, along with a build target that will compile definition files from the JSDoc documentation.
To add type definitions for the other submodules, a
tsconfig.json
file needs to be added at the root of that submodule (it can largely be copied from thetsconfig.json
file defined for the@amazon-sumerian-hosts/babylon
package.) Then a project reference needs to be added to the monorepo'stsconfig.json
, so that the compiler knows where to find those nestedtsconfig.json
files.Reviewer Testing Instructions
npm run compile-ts
to generate the*.d.ts
definition files@amazon-sumerian-hosts/babylon
package is then installed and imported into a Typescript project (such as one generated by the BabylonJS editor), there should be typechecking and intellisense without any further configuration needed by that projectSubmission Checklist
I confirm that I have...
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.