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-demo
directory. - Start a local server in this directory.
- Open the
index.html
file 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&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.config
: The address to get the model structure, used to generate the specific model data address.
Note: The config parameter is a URL address used to get the JSON file of the model structure. This JSON file contains detailed information about the model, used to generate the specific model data address.
Example:
Config address: http://example.com/meta.json
Config file content:
{
"modelPath": "model.glb",
"actionPaths": [
"action/tanshou.json",
"action/appearance.json",
"action/bow_and_bow.json",
"action/juyoushou.json",
"action/juzuoshou.json",
"action/kending.json",
"action/listening.json",
"action/admission.json"
],
"configPath": "config.json"
}
Model configuration directory structure
http://example.com/meta.json
: Model configuration datahttp://example.com/model.glb
: Model datahttp://example.com/action/tanshou.json
: Action datahttp://example.com/config.json
: Image initialization position and angle
- Open the
server-render-demo
directory. - Start a local server in this directory.
- Open the
index.html
file 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.