Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call a function #6

Open
bknill opened this issue Mar 18, 2018 · 0 comments
Open

Call a function #6

bknill opened this issue Mar 18, 2018 · 0 comments

Comments

@bknill
Copy link

bknill commented Mar 18, 2018

Any clues how to call a function?

I'm trying something like this

const commandFunction = () => {console.log('command')}

    const command={
      command:text,
      type: 'function',
      function : commandFunction,
    }

        <Entity
          voice-command={command}
          position-curved-images={positionCurvedImage}
          primitive='a-curvedimage'
          {...geometry}
          className='clickable'
          {...{events}}
        >
        </Entity>

But get this error: Cannot read property 'executeCommand' of undefined

Uncaught TypeError: Cannot read property 'executeCommand' of undefined
at Object. (index.js:94)
at annyang.min.js:8
at Array.forEach ()
at u (annyang.min.js:8)
at z (annyang.min.js:8)
at SpeechRecognition.e.onresult

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant