mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: aiming circle
This commit is contained in:
1 parent
c039862c56
commit
7188014fbb
1 file changed
+13
-7
+13
-7
@@ -1,4 +1,6 @@
|
|||||||
import { I_HAT, J_HAT } from '@blitzkit/core';
|
import { I_HAT, J_HAT } from '@blitzkit/core';
|
||||||
|
import { Box } from '@radix-ui/themes';
|
||||||
|
import { Html } from '@react-three/drei';
|
||||||
import { useFrame, useLoader } from '@react-three/fiber';
|
import { useFrame, useLoader } from '@react-three/fiber';
|
||||||
import { clamp } from 'lodash-es';
|
import { clamp } from 'lodash-es';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
@@ -14,6 +16,7 @@ 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 { modelTransformEvent } from '../../../../../../core/blitzkit/modelTransform';
|
import { modelTransformEvent } from '../../../../../../core/blitzkit/modelTransform';
|
||||||
|
import { Var } from '../../../../../../core/radix/var';
|
||||||
import { Duel } from '../../../../../../stores/duel';
|
import { Duel } from '../../../../../../stores/duel';
|
||||||
import { TankopediaEphemeral } from '../../../../../../stores/tankopediaEphemeral';
|
import { TankopediaEphemeral } from '../../../../../../stores/tankopediaEphemeral';
|
||||||
import { TankopediaPersistent } from '../../../../../../stores/tankopediaPersistent';
|
import { TankopediaPersistent } from '../../../../../../stores/tankopediaPersistent';
|
||||||
@@ -189,22 +192,25 @@ export function SceneProps() {
|
|||||||
<arrowHelper ref={shellPathHelper} position={shellOrigin} />
|
<arrowHelper ref={shellPathHelper} position={shellOrigin} />
|
||||||
|
|
||||||
<group ref={targetCircle}>
|
<group ref={targetCircle}>
|
||||||
<mesh renderOrder={1}>
|
<mesh>
|
||||||
<sphereGeometry args={[0.1, 32, 32]} />
|
{/* <sphereGeometry args={[0.1, 32, 32]} />
|
||||||
<meshStandardMaterial
|
<meshStandardMaterial
|
||||||
depthTest={false}
|
depthTest={false}
|
||||||
depthWrite={false}
|
depthWrite={false}
|
||||||
color="red"
|
color="red"
|
||||||
/>
|
/> */}
|
||||||
</mesh>
|
|
||||||
|
|
||||||
{/* <Html center occlude={false}>
|
<Html center occlude={false}>
|
||||||
<Box
|
<Box
|
||||||
width="10em"
|
width="10em"
|
||||||
height="10em"
|
height="10em"
|
||||||
style={{ backgroundColor: 'red' }}
|
style={{
|
||||||
|
borderRadius: '50%',
|
||||||
|
border: `0.25rem dotted ${Var('gray-12')}`,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Html> */}
|
</Html>
|
||||||
|
</mesh>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<group ref={playground}>
|
<group ref={playground}>
|
||||||
|
|||||||
Reference in new issue
Block a user