English | 中文
This project includes both client-side rendering and server-side rendering methods. For client-side rendering, refer to client-render-demo, and for server-side rendering, refer toserver-render-demo
client-render-demo: Client-side rendering exampleserver-render-demo: Server-side rendering example
Chrome
Copy the project code to your local machine.
-
Open the
client-render-demodirectory. -
Start a local server in this directory.
-
Open the
index.htmlfile in your browser. If you are using a local server, you can do this by visitinghttp://localhost:3000/index.html. -
Copy the corresponding 3D model data to the local
modelfolder and modify themeta.jsoncontent in the model folder according to the model name.Directory structure for the
modelfiles:model ├── action │ ├── listening.json │ ├── kending.json │ └── ... ├── config.json ├── meta.json └── model.glbModify the meta.json file based on the actual model name:
{ "modelPath": "model.glb", "actionPaths": [ "action/listening.json", "action/kending.json", ... ], "configPath": "config.json" }If the downloaded model does not have a
config.jsonfile, you need to remove theconfigPathconfiguration item from themeta.jsonfile. -
Add the execution URL parameters, for example:
http://localhost:3000/index.html?virtualmanKey=xxxx&sign=xxxx&config=xxxx.
virtualmanKey: Unique identifier for the image. You can obtain this value by getting the key and following the specified steps.sign: Signature. Please note that URL encoding is not required here. This can also be obtained by visitinggetting the key.
- Open the
server-render-demodirectory. - Start a local server in this directory.
- Open the
index.htmlfile in your browser. If you are using a local server, you can do this by visitinghttp://localhost:3000/index.html. - Add the execution URL parameters, for example:
http://localhost:3000/index.html?virtualmanKey=xxxx&sign=xxxx.
virtualmanKey: Unique identifier for the image. You can obtain this value by getting the key and following the specified steps.sign: Signature. Please note that URL encoding is not required here. This can also be obtained by visiting getting the key。
If you need to enable ASR, you need to add the secretId, secretKey, and appId parameters in the URL parameters.
