2020-11-23 15:43:27 +00:00
|
|
|
import { ExampleBot } from '../ExampleBot';
|
|
|
|
|
import { Vector3 } from '../../lib/classes/Vector3';
|
|
|
|
|
|
|
|
|
|
class Camera extends ExampleBot
|
|
|
|
|
{
|
2022-11-04 10:16:27 +00:00
|
|
|
async onConnected(): Promise<void>
|
2020-11-23 15:43:27 +00:00
|
|
|
{
|
|
|
|
|
const height = 64;
|
|
|
|
|
this.bot.clientCommands.agent.setCamera(
|
|
|
|
|
new Vector3([128, 128, height]),
|
|
|
|
|
new Vector3([128, 128, 0]),
|
|
|
|
|
256,
|
|
|
|
|
new Vector3([-1.0, 0, 0]),
|
|
|
|
|
new Vector3([0.0, 1.0, 0]));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-04 10:16:27 +00:00
|
|
|
new Camera().run().then(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}).catch((err) =>
|
|
|
|
|
{
|
|
|
|
|
console.error(err)
|
|
|
|
|
});
|