mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-28 13:09:51 +01:00
fix: remove dead code
This commit is contained in:
1 parent
6bcaf685f8
commit
d07a6e954e
3 files changed
+2
-18
No files matched your search
-16
@@ -8,10 +8,6 @@ import { degToRad } from 'three/src/math/MathUtils.js';
|
|||||||
import { awaitableModelDefinitions } from '../../../../../../core/awaitables/modelDefinitions';
|
import { awaitableModelDefinitions } from '../../../../../../core/awaitables/modelDefinitions';
|
||||||
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
||||||
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment';
|
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment';
|
||||||
import {
|
|
||||||
modelTransformEvent,
|
|
||||||
type ModelTransformEventData,
|
|
||||||
} from '../../../../../../core/blitzkit/modelTransform';
|
|
||||||
import { Pose, poseEvent } from '../../../../../../core/blitzkit/pose';
|
import { Pose, poseEvent } from '../../../../../../core/blitzkit/pose';
|
||||||
import { Duel } from '../../../../../../stores/duel';
|
import { Duel } from '../../../../../../stores/duel';
|
||||||
import {
|
import {
|
||||||
@@ -253,10 +249,6 @@ export function Controls({ naked }: ControlsProps) {
|
|||||||
canvas.addEventListener('wheel', handleWheel);
|
canvas.addEventListener('wheel', handleWheel);
|
||||||
document.body.addEventListener('scroll', handleScroll);
|
document.body.addEventListener('scroll', handleScroll);
|
||||||
|
|
||||||
const sniperModeCameraOffset = new Vector3();
|
|
||||||
let pitch = 0;
|
|
||||||
let yaw = 0;
|
|
||||||
|
|
||||||
function updateCamera() {
|
function updateCamera() {
|
||||||
if (!orbitControls.current) return;
|
if (!orbitControls.current) return;
|
||||||
|
|
||||||
@@ -311,13 +303,6 @@ export function Controls({ naked }: ControlsProps) {
|
|||||||
camera.updateProjectionMatrix();
|
camera.updateProjectionMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleModelTransform(event: ModelTransformEventData) {
|
|
||||||
pitch = event.pitch;
|
|
||||||
yaw = event.yaw ?? yaw;
|
|
||||||
}
|
|
||||||
|
|
||||||
modelTransformEvent.on(handleModelTransform);
|
|
||||||
|
|
||||||
updateCamera();
|
updateCamera();
|
||||||
|
|
||||||
const unsubscribeDisplay = tankopediaEphemeralStore.subscribe(
|
const unsubscribeDisplay = tankopediaEphemeralStore.subscribe(
|
||||||
@@ -341,7 +326,6 @@ export function Controls({ naked }: ControlsProps) {
|
|||||||
window.removeEventListener('keydown', handleKeyDown);
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
canvas.removeEventListener('wheel', handleWheel);
|
canvas.removeEventListener('wheel', handleWheel);
|
||||||
document.body.removeEventListener('scroll', handleScroll);
|
document.body.removeEventListener('scroll', handleScroll);
|
||||||
modelTransformEvent.off(handleModelTransform);
|
|
||||||
};
|
};
|
||||||
}, [display === TankopediaDisplay.ShootingRange]);
|
}, [display === TankopediaDisplay.ShootingRange]);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import { Box, type BoxProps } from '@radix-ui/themes';
|
|||||||
import { forwardRef } from 'react';
|
import { forwardRef } from 'react';
|
||||||
import { Var } from '../../../../../../../../core/radix/var';
|
import { Var } from '../../../../../../../../core/radix/var';
|
||||||
|
|
||||||
const DOTS = 32;
|
// const DOTS = 32;
|
||||||
|
|
||||||
type TargetCircleProps = BoxProps & {
|
type TargetCircleProps = BoxProps & {
|
||||||
variant: 'client' | 'server';
|
variant: 'client' | 'server';
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export function TierListTile(props: TierListTileProps) {
|
|||||||
|
|
||||||
lastPosition.current = { x: event.clientX, y: event.clientY };
|
lastPosition.current = { x: event.clientX, y: event.clientY };
|
||||||
}, []);
|
}, []);
|
||||||
const handlePointerUp = useCallback((event: PointerEvent) => {
|
const handlePointerUp = useCallback(() => {
|
||||||
if (!card.current) return;
|
if (!card.current) return;
|
||||||
|
|
||||||
const cardRect = card.current.getBoundingClientRect();
|
const cardRect = card.current.getBoundingClientRect();
|
||||||
|
|||||||
Reference in new issue
Block a user