MapControls similar to OrbitControls, this control is intended for transforming a camera over a map from bird's eye perspective, but uses a specific preset for mouse/touch interaction and disables screen space panning by default.
<script setup>
import { MapControls } from "@tresjs/cientos"
</script>
<template>
<TresCanvas clear-color="#82DBC5">
<TresPerspectiveCamera :position="[3, 3, 3]" />
<MapControls />
<Box :scale="2">
<TresMeshToonMaterial color="orange" />
</Box>
<TresAmbientLight />
<TresDirectionalLight :position="[0, 2, 4]" />
<TresGridHelper />
</TresCanvas>
</template>
| Prop | Description | Default |
|---|---|---|
| makeDefault | If true, the controls will be set as the default controls for the scene. | false |
| camera | The camera to control. | undefined |
| domElement | The dom element to listen to. | undefined |