viewar-guide
Advanced tools
Comparing version 0.9.1 to 0.9.2
{ | ||
"name": "viewar-guide", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "ViewAR Guide", | ||
@@ -44,3 +44,3 @@ "main": "dist/viewar-guide.js", | ||
"webpack": "^4.30.0", | ||
"webpack-cli": "^3.3.0" | ||
"webpack-cli": "^3.3.11" | ||
}, | ||
@@ -47,0 +47,0 @@ "dependencies": { |
@@ -40,17 +40,30 @@ | ||
const hide = () => dependencies.queueSceneUpdate(() => instance.setVisible(false)) | ||
const showTalkingFace = () => dependencies.queueSceneUpdate(async() => { | ||
await setPropertyValues(instance, talking); | ||
if (instance.animations[ 'Talk' ]) { | ||
await instance.animations[ 'Talk' ].start({ time: 0, loop: true }, false) | ||
} | ||
}) | ||
const showNormalFace = () => dependencies.queueSceneUpdate(async() => { | ||
await setPropertyValues(instance, neutral) | ||
const showTalkingFace = () => { | ||
return new Promise(resolve => { | ||
dependencies.queueSceneUpdate(async() => { | ||
await setPropertyValues(instance, talking); | ||
if (instance.animations[ 'Talk' ]) { | ||
await instance.animations[ 'Talk' ].start({ time: 0, loop: true }, false) | ||
} | ||
if (instance.animations[ 'Talk' ]) { | ||
await instance.animations[ 'Talk' ].stop(); | ||
} | ||
}) | ||
resolve(); | ||
}); | ||
}); | ||
}; | ||
const showNormalFace = () => { | ||
return new Promise(resolve => { | ||
dependencies.queueSceneUpdate(async() => { | ||
await setPropertyValues(instance, neutral) | ||
if (instance.animations[ 'Talk' ]) { | ||
await instance.animations[ 'Talk' ].stop(); | ||
} | ||
resolve(); | ||
}); | ||
}); | ||
}; | ||
const setPropertyValues = (instance, properties) => { | ||
@@ -60,3 +73,3 @@ const validProperties = {}; | ||
if (instance.properties[name]) { | ||
if (instance.properties[name].options.find(option => option.key = value)) { | ||
if (instance.properties[name].options.find(option => option.key === value)) { | ||
validProperties[name] = value; | ||
@@ -63,0 +76,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
190858
2648