Your development environment will need node.js and yarn installed.
See https://nodejs.org/en/ and https://classic.yarnpkg.com/en/docs/install for installation instructions specific to your environment.
To run these examples, you will need to generate a sandboxed sdk key for your Matterport account. See Matterport Developer Tools Pricing and Availability.
The password for the beta versions of bundle: gOJKDpxNiMCtdlnXs
Run these two commands when you first download the repo.
> yarn install
> yarn install-bundle
yarn run v1.22.4
$ yarn fetch-bundle && yarn expand-bundle
$ curl https://static.matterport.com/showcase-sdk/bundle/3.1.38.10-15-g5a5323ef0/showcase-bundle.zip -o bundle.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3108k 100 3108k 0 0 7599k 0 --:--:-- --:--:-- --:--:-- 7599k
$ yarn decompress bundle.zip --out-dir=packages/bundle
$ ...
Call this to install or update the package dependencies. It also links local packages together.
> yarn bootstrap
yarn run v1.21.1
$ lerna bootstrap
lerna notice cli v3.3.2
lerna info Bootstrapping 4 packages
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna success Bootstrapped 4 packages
✨ Done in 20.58s.
> yarn inspector
yarn run v1.22.4
$ lerna run develop --scope=inspector --stream
lerna notice cli v3.3.2
lerna info filter [ 'inspector' ]
lerna info Executing command in 1 package: "yarn run develop"
inspector: warning package.json: "inspector" is also the name of a node core module
inspector: $ webpack-dev-server
inspector: ℹ 「wds」: Project is running at http://localhost:8000/
inspector: ℹ 「wds」: webpack output is served from /
inspector: ℹ 「wds」: Content not from webpack is served from /Users/bguillermo/projects/sdk_examples/packages/inspector
> yarn vs-app
yarn run v1.22.4
$ lerna run develop --scope=vs-app --stream
lerna notice cli v3.3.2
lerna info filter [ 'vs-app' ]
lerna info Executing command in 1 package: "yarn run develop"
vs-app: $ webpack-dev-server
vs-app: ℹ 「wds」: Project is running at http://localhost:8000/
vs-app: ℹ 「wds」: webpack output is served from /
vs-app: ℹ 「wds」: Content not from webpack is served from /Users/bguillermo/projects/sdk_examples/packages/vs-app
> yarn easter
yarn run v1.22.4
$ lerna run develop --scope=easter --stream
lerna notice cli v3.3.2
lerna info filter [ 'easter' ]
lerna info Executing command in 1 package: "yarn run develop"
easter: $ webpack-dev-server
easter: ℹ 「wds」: Project is running at http://localhost:8000/
easter: ℹ 「wds」: webpack output is served from /
easter: ℹ 「wds」: Content not from webpack is served from /Users/bguillermo/projects/sdk_examples/packages/easter
> yarn rc-app
yarn run v1.22.4
$ lerna run develop --scope=rc-app --stream
lerna notice cli v3.3.2
lerna info filter [ 'rc-app' ]
lerna info Executing command in 1 package: "yarn run develop"
rc-app: $ webpack-dev-server
rc-app: ℹ 「wds」: Project is running at http://localhost:8000/
rc-app: ℹ 「wds」: webpack output is served from /
rc-app: ℹ 「wds」: Content not from webpack is served from /Users/bguillermo/projects/sdk_examples/packages/rc-app
> yarn embed-examples
yarn run v1.22.5
$ lerna run develop --scope=embed-examples --stream
lerna notice cli v3.22.1
lerna notice filter including "embed-examples"
lerna info filter [ 'embed-examples' ]
lerna info Executing command in 1 package: "yarn run develop"
embed-examples: warning package.json: No license field
embed-examples: $ webpack-dev-server
embed-examples: ℹ 「wds」: Project is running at http://localhost:8000/
embed-examples: ℹ 「wds」: webpack output is served from /
embed-examples: ℹ 「wds」: Content not from webpack is served from /Users/bguillermo/projects/sdk_examples/packages/embed-examples/dist
You will need to bootstrap after cleaning.
> yarn clean
yarn run v1.21.1
$ lerna clean --yes
lerna notice cli v3.3.2
lerna info clean removing /Users/bguillermo/projects/sdk_examples/packages/bundle/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples/packages/common/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples3/packages/core/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples3/packages/easter/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples2/packages/embed-examples/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples/packages/inspector/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples3/packages/rc-app/node_modules
lerna info clean removing /Users/bguillermo/projects/sdk_examples/packages/vs-app/node_modules
lerna success clean finished
✨ Done in 5.11s.
> yarn build-all-prod
$ webpack --mode=production
Hash: 95bb160f191dc13eb410
Version: webpack 4.18.1
Time: 1029ms
...
lerna success run Ran npm script 'build-prod' in 5 packages:
lerna success - easter
lerna success - embed-examples
lerna success - inspector
lerna success - rc-app
lerna success - vs-app
✨ Done in 53.27s.
The repository is a Lerna monorepo. This means that the package.json dependencies at the root of the repository are shared with each of the individual packages. Please keep in mind that not all root-level dependencies are used by all examples. The packages include:
frameworks: Reactjs + SDK Bundle
- virtual staging
- local webcam
- canvas
- security camera
frameworks: Reactjs + Photon SDK + SDK Embed
- an example that shows how to build a remote controlled showcase
frameworks: Reactjs + RxJS + SDK Bundle
- object placement using sdk scene files
frameworks: Reactjs + Phaser + SDK Bundle
- minigame
- reusable sdk bundle components
- matterport observable library
- showcase sdk bundle is created when running
yarn install-bundle
and used by the examples
See the MATTERPORT SAMPLE SDK CODE LICENSE AGREEMENT file for license rights and limitations for this repository.