1.0.1 • Published 5 months ago
xverse-components-model-viewer v1.0.1
API
参数名 | 类型 | 说明 | 默认值 | 是否必填 | 备注 | ||
---|---|---|---|---|---|---|---|
modelUrl | string | 模型 url | - | false | - | ||
modelBomId | string | 模型 bomId | - | false | - | ||
bgUrl | string | 查看模型的背景图片地址 | - | false | - | ||
initScaling | number | 模型初始比例,默认 1 | - | false | - | ||
maxScaling | number | 模型最大比例,默认 10 | - | false | - | ||
minScaling | number | 模型最小比例,默认 0.01 | - | false | - | ||
wheelSensitivity | number | 滑轮灵敏度,默认 0.01 | - | false | - | ||
pointerSensitivity | number | 双指灵敏度,默认 0.05 | - | false | - | ||
cameraPosition | IPosition | 相机 点位 | - | false | - | ||
cameraRotation | IRotation | 相机 角度 | - | false | - | ||
actorPosition | IPosition | 模型位置 | - | false | - | ||
actorRotation | IRotation | 模型朝向 | - | false | - | ||
mode | 'noRestriction' | 'horizontalRotateOnly' | 'verticalRotateOnly' | - | false | - | |
onLoadModel | (actorId?: string) => void | 模型加载完成事件 | - | false | - | ||
onExitModel | () => void | 退出事件 | - | false | - |