Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Repository files navigation

Bot API

import{Vector3}from'three'import{EtherealEngineBot}from'@ir-engine/ir-bot/src/bot'import{BotHooks}from'@ir-engine/ir-bot/src/bot/enums/BotHooks'constmaxTimeout=10*1000constbot=newEtherealEngineBot({name: 'bot-1',headless: false,verbose: false})constvector3=newVector3()constdomain=process.env.APP_HOSTconstlocationName='test'constsqrt2=Math.sqrt(2)describe('My Bot Tests',()=>{beforeAll(async()=>{awaitbot.launchBrowser()awaitbot.enterLocation(`https://${domain}/location/${locationName}`)awaitbot.delay(1000)awaitbot.runHook(BotHooks.InitializeBot)},maxTimeout)afterAll(async()=>{awaitbot.delay(1000)awaitbot.quit()},maxTimeout)test('Can spawn in the world',async()=>{expect(vector3.copy(awaitbot.runHook(BotHooks.GetPlayerPosition)).length()).toBeLessThan(sqrt2*2)// sqrt2 * 2 is the default size of our spawn area})})

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages