mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: remove dead code
This commit is contained in:
1 parent
e8dd26b2ba
commit
ba656eb603
1 file changed
-16
-16
@@ -4,7 +4,6 @@ import { invalidate, useThree } from '@react-three/fiber';
|
|||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import { PerspectiveCamera, Vector3 } from 'three';
|
import { PerspectiveCamera, Vector3 } from 'three';
|
||||||
import { OrbitControls as OrbitControlsClass } from 'three-stdlib';
|
import { OrbitControls as OrbitControlsClass } from 'three-stdlib';
|
||||||
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';
|
||||||
@@ -20,11 +19,6 @@ const poseDistances: Record<Pose, number> = {
|
|||||||
|
|
||||||
const modelDefinitions = await awaitableModelDefinitions;
|
const modelDefinitions = await awaitableModelDefinitions;
|
||||||
|
|
||||||
const ARCADE_MODE_DISTANCE = 19;
|
|
||||||
// const ARCADE_MODE_ANGLE = Math.PI / 8;
|
|
||||||
const ARCADE_MODE_ANGLE = degToRad(10);
|
|
||||||
const ARCADE_MODE_FOV = 54;
|
|
||||||
|
|
||||||
interface ControlsProps {
|
interface ControlsProps {
|
||||||
naked?: boolean;
|
naked?: boolean;
|
||||||
autoRotate?: boolean;
|
autoRotate?: boolean;
|
||||||
@@ -41,7 +35,6 @@ export function Controls({
|
|||||||
distanceScale = 1,
|
distanceScale = 1,
|
||||||
}: ControlsProps) {
|
}: ControlsProps) {
|
||||||
const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation();
|
const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation();
|
||||||
const display = TankopediaEphemeral.use((state) => state.display);
|
|
||||||
const duelStore = Duel.useStore();
|
const duelStore = Duel.useStore();
|
||||||
const tankopediaEphemeralStore = TankopediaEphemeral.useStore();
|
const tankopediaEphemeralStore = TankopediaEphemeral.useStore();
|
||||||
const camera = useThree((state) => state.camera as PerspectiveCamera);
|
const camera = useThree((state) => state.camera as PerspectiveCamera);
|
||||||
@@ -96,15 +89,6 @@ export function Controls({
|
|||||||
gunHeight + (naked ? 10 : 2),
|
gunHeight + (naked ? 10 : 2),
|
||||||
-13,
|
-13,
|
||||||
).multiplyScalar(distanceScale);
|
).multiplyScalar(distanceScale);
|
||||||
const protagonistGunOriginOnlyY = new Vector3(
|
|
||||||
0,
|
|
||||||
protagonistTurretModelDefinition.gun_origin.y,
|
|
||||||
0,
|
|
||||||
);
|
|
||||||
const shellOrigin = protagonistHullOrigin
|
|
||||||
.clone()
|
|
||||||
.add(protagonistTurretOrigin)
|
|
||||||
.add(protagonistGunOriginOnlyY);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!orbitControls.current || !doAutoRotate) return;
|
if (!orbitControls.current || !doAutoRotate) return;
|
||||||
|
|||||||
Reference in new issue
Block a user