style: fix background image jumping around

This commit is contained in:
Youwen Wu 2024-03-18 21:54:41 -07:00
parent 63bfcaba4c
commit a3e2a0612d
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 16 additions and 4 deletions

View file

@ -93,6 +93,9 @@
/* hide scrollbar */ /* hide scrollbar */
-ms-overflow-style: none; -ms-overflow-style: none;
scrollbar-width: none; scrollbar-width: none;
background-position: top right;
width: 65vw;
height: 100vw;
} }
.infotainment-container::-webkit-scrollbar { .infotainment-container::-webkit-scrollbar {

View file

@ -1,3 +1,11 @@
<!--
@component
Visualization scene for the robot.
1:28in scale
aka 1:0.71m scale
-->
<script lang="ts"> <script lang="ts">
import { T, useTask } from '@threlte/core' import { T, useTask } from '@threlte/core'
import { Grid } from '@threlte/extras' import { Grid } from '@threlte/extras'
@ -15,7 +23,7 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const SPEED_MULTIPLIER = 4 const SPEED_MULTIPLIER = 1.408
const axis = new Vector3(0, 1, 0) const axis = new Vector3(0, 1, 0)
const follow = (delta: number) => { const follow = (delta: number) => {
@ -105,6 +113,7 @@
/* TODO: standardize a scale (meters : grid lengths) so we can have /* TODO: standardize a scale (meters : grid lengths) so we can have
accurate positioning of sensor detected objects */ accurate positioning of sensor detected objects */
// update position data for robot model // update position data for robot model
// Speed is reported in
$mesh.position.x += $mesh.position.x +=
$telemetryReadonlyStore['chassis-y-speed'] * delta * SPEED_MULTIPLIER $telemetryReadonlyStore['chassis-y-speed'] * delta * SPEED_MULTIPLIER
$mesh.position.z += $mesh.position.z +=
@ -135,10 +144,10 @@
<T.AmbientLight color={'#f0f0f0'} intensity={0.1} /> <T.AmbientLight color={'#f0f0f0'} intensity={0.1} />
<RobotDecimated <RobotDecimated
scale={[10, 10, 10]} scale={[9, 9, 9]}
position.y={0} position.y={0}
position.x={-3} position.x={-2.8}
position.z={3} position.z={2.8}
on:create={({ ref }) => { on:create={({ ref }) => {
// @ts-expect-error // @ts-expect-error
mesh.set(ref) mesh.set(ref)