gaesup-world 0.9.785 → 0.9.786

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/types/gaesup/animation/actions.d.ts +6 -0
  2. package/dist/types/gaesup/animation/type.d.ts +32 -0
  3. package/dist/types/gaesup/camera/control/normal.d.ts +4 -0
  4. package/dist/types/gaesup/camera/control/orbit.d.ts +4 -0
  5. package/dist/types/gaesup/camera/index.d.ts +2 -0
  6. package/dist/types/gaesup/camera/type.d.ts +14 -0
  7. package/dist/types/gaesup/component/active/airplane/index.d.ts +2 -0
  8. package/dist/types/gaesup/component/active/airplane/type.d.ts +3 -0
  9. package/dist/types/gaesup/component/active/character/index.d.ts +8 -0
  10. package/dist/types/gaesup/component/active/character/type.d.ts +12 -0
  11. package/dist/types/gaesup/component/active/vehicle/index.d.ts +2 -0
  12. package/dist/types/gaesup/component/active/vehicle/type.d.ts +3 -0
  13. package/dist/types/gaesup/component/index.d.ts +5 -0
  14. package/dist/types/gaesup/component/inner/airplane/index.d.ts +2 -0
  15. package/dist/types/gaesup/component/inner/airplane/type.d.ts +5 -0
  16. package/dist/types/gaesup/component/inner/character/index.d.ts +2 -0
  17. package/dist/types/gaesup/component/inner/character/type.d.ts +10 -0
  18. package/dist/types/gaesup/component/inner/common/InnerGroupRef.d.ts +13 -0
  19. package/dist/types/gaesup/component/inner/common/OuterGroupRef.d.ts +4 -0
  20. package/dist/types/gaesup/component/inner/common/RigidbodyRef.d.ts +1 -0
  21. package/dist/types/gaesup/component/inner/common/calc.d.ts +7 -0
  22. package/dist/types/gaesup/component/inner/common/partsGroupRef.d.ts +10 -0
  23. package/dist/types/gaesup/component/inner/common/setGroundRay.d.ts +2 -0
  24. package/dist/types/gaesup/component/inner/common/type.d.ts +62 -0
  25. package/dist/types/gaesup/component/inner/rider/index.d.ts +10 -0
  26. package/dist/types/gaesup/component/inner/vehicle/collider.d.ts +9 -0
  27. package/dist/types/gaesup/component/inner/vehicle/index.d.ts +2 -0
  28. package/dist/types/gaesup/component/inner/vehicle/type.d.ts +5 -0
  29. package/dist/types/gaesup/component/inner/vehicle/wheels.d.ts +8 -0
  30. package/dist/types/gaesup/component/passive/airplane/index.d.ts +2 -0
  31. package/dist/types/gaesup/component/passive/airplane/type.d.ts +2 -0
  32. package/dist/types/gaesup/component/passive/character/index.d.ts +2 -0
  33. package/dist/types/gaesup/component/passive/character/type.d.ts +2 -0
  34. package/dist/types/gaesup/component/passive/type.d.ts +38 -0
  35. package/dist/types/gaesup/component/passive/vehicle/index.d.ts +2 -0
  36. package/dist/types/gaesup/component/passive/vehicle/type.d.ts +2 -0
  37. package/dist/types/gaesup/component/type.d.ts +18 -0
  38. package/dist/types/gaesup/controller/context/index.d.ts +48 -0
  39. package/dist/types/gaesup/controller/context/reducer.d.ts +12 -0
  40. package/dist/types/gaesup/controller/context/type.d.ts +39 -0
  41. package/dist/types/gaesup/controller/index.d.ts +3 -0
  42. package/dist/types/gaesup/controller/initialize/callback/index.d.ts +15 -0
  43. package/dist/types/gaesup/controller/initialize/callback/type.d.ts +23 -0
  44. package/dist/types/gaesup/controller/initialize/index.d.ts +8 -0
  45. package/dist/types/gaesup/controller/type.d.ts +102 -0
  46. package/dist/types/gaesup/gaesupProps/index.d.ts +6 -0
  47. package/dist/types/gaesup/hooks/useClicker/index.d.ts +4 -0
  48. package/dist/types/gaesup/hooks/useFocus/index.d.ts +23 -0
  49. package/dist/types/gaesup/hooks/useGaesupAnimation/index.d.ts +10 -0
  50. package/dist/types/gaesup/hooks/useGaesupController/index.d.ts +9 -0
  51. package/dist/types/gaesup/hooks/useGaesupGltf/index.d.ts +26 -0
  52. package/dist/types/gaesup/hooks/useMovePoint/index.d.ts +4 -0
  53. package/dist/types/gaesup/hooks/usePushKey/index.d.ts +3 -0
  54. package/dist/types/gaesup/hooks/useRayHit/index.d.ts +1 -0
  55. package/dist/types/gaesup/hooks/useRideable/index.d.ts +20 -0
  56. package/dist/types/gaesup/hooks/useRideable/type.d.ts +19 -0
  57. package/dist/types/gaesup/hooks/useTeleport/index.d.ts +4 -0
  58. package/dist/types/gaesup/hooks/useZoom/index.d.ts +3 -0
  59. package/dist/types/gaesup/physics/airplane/damping.d.ts +2 -0
  60. package/dist/types/gaesup/physics/airplane/direction.d.ts +2 -0
  61. package/dist/types/gaesup/physics/airplane/gravity.d.ts +2 -0
  62. package/dist/types/gaesup/physics/airplane/impulse.d.ts +2 -0
  63. package/dist/types/gaesup/physics/airplane/index.d.ts +2 -0
  64. package/dist/types/gaesup/physics/airplane/innerCalc.d.ts +2 -0
  65. package/dist/types/gaesup/physics/airplane/landing.d.ts +2 -0
  66. package/dist/types/gaesup/physics/character/direction.d.ts +5 -0
  67. package/dist/types/gaesup/physics/character/impulse.d.ts +2 -0
  68. package/dist/types/gaesup/physics/character/index.d.ts +2 -0
  69. package/dist/types/gaesup/physics/character/innerCalc.d.ts +2 -0
  70. package/dist/types/gaesup/physics/character/queue.d.ts +2 -0
  71. package/dist/types/gaesup/physics/character/stop.d.ts +2 -0
  72. package/dist/types/gaesup/physics/check/ground.d.ts +2 -0
  73. package/dist/types/gaesup/physics/check/index.d.ts +2 -0
  74. package/dist/types/gaesup/physics/check/moving.d.ts +2 -0
  75. package/dist/types/gaesup/physics/check/push.d.ts +2 -0
  76. package/dist/types/gaesup/physics/check/riding.d.ts +2 -0
  77. package/dist/types/gaesup/physics/check/rotate.d.ts +2 -0
  78. package/dist/types/gaesup/physics/index.d.ts +7 -0
  79. package/dist/types/gaesup/physics/type.d.ts +42 -0
  80. package/dist/types/gaesup/physics/vehicle/damping.d.ts +2 -0
  81. package/dist/types/gaesup/physics/vehicle/direction.d.ts +3 -0
  82. package/dist/types/gaesup/physics/vehicle/impulse.d.ts +2 -0
  83. package/dist/types/gaesup/physics/vehicle/index.d.ts +2 -0
  84. package/dist/types/gaesup/physics/vehicle/innerCalc.d.ts +2 -0
  85. package/dist/types/gaesup/physics/vehicle/landing.d.ts +2 -0
  86. package/dist/types/gaesup/tools/clicker/index.d.ts +5 -0
  87. package/dist/types/gaesup/tools/gamepad/GamePadButton.d.ts +7 -0
  88. package/dist/types/gaesup/tools/gamepad/index.d.ts +5 -0
  89. package/dist/types/gaesup/tools/gamepad/style.css.d.ts +3 -0
  90. package/dist/types/gaesup/tools/gamepad/type.d.ts +11 -0
  91. package/dist/types/gaesup/tools/minimap/index.d.ts +10 -0
  92. package/dist/types/gaesup/tools/minimap/style.css.d.ts +14 -0
  93. package/dist/types/gaesup/tools/minimap/type.d.ts +30 -0
  94. package/dist/types/gaesup/tools/rideable/index.d.ts +2 -0
  95. package/dist/types/gaesup/tools/rideable/type.d.ts +26 -0
  96. package/dist/types/gaesup/tools/shared.css.d.ts +16 -0
  97. package/dist/types/gaesup/tools/teleport/index.d.ts +2 -0
  98. package/dist/types/gaesup/tools/teleport/style.css.d.ts +1 -0
  99. package/dist/types/gaesup/tools/teleport/type.d.ts +7 -0
  100. package/dist/types/gaesup/tools/type.d.ts +2 -0
  101. package/dist/types/gaesup/utils/context.d.ts +2 -0
  102. package/dist/types/gaesup/utils/getTag.d.ts +3 -0
  103. package/dist/types/gaesup/utils/index.d.ts +3 -0
  104. package/dist/types/gaesup/utils/innerHtml.d.ts +4 -0
  105. package/dist/types/gaesup/utils/ray.d.ts +5 -0
  106. package/dist/types/gaesup/utils/ref.d.ts +2 -0
  107. package/dist/types/gaesup/utils/type.d.ts +5 -0
  108. package/dist/types/gaesup/utils/vector.d.ts +11 -0
  109. package/dist/types/gaesup/world/context/index.d.ts +5 -0
  110. package/dist/types/gaesup/world/context/reducer.d.ts +24 -0
  111. package/dist/types/gaesup/world/context/type.d.ts +182 -0
  112. package/dist/types/gaesup/world/index.d.ts +2 -0
  113. package/dist/types/gaesup/world/initalize/index.d.ts +29 -0
  114. package/dist/types/gaesup/world/type.d.ts +18 -0
  115. package/dist/types/index.d.ts +22 -0
  116. package/package.json +2 -2
@@ -0,0 +1,6 @@
1
+ import { playActionsType, subscribeActionsType } from './type';
2
+ export declare function subscribeActions({ type }: subscribeActionsType): void;
3
+ export default function playActions({ type, actions, animationRef, currentAnimation, isActive }: playActionsType): {
4
+ animationRef: import("react").Ref<import("three").Object3D<import("three").Object3DEventMap>>;
5
+ currentAnimation: string;
6
+ };
@@ -0,0 +1,32 @@
1
+ import { Ref } from 'react';
2
+ import * as THREE from 'three';
3
+ import { AnimationAction, AnimationClip, AnimationMixer, Object3D, Object3DEventMap } from 'three';
4
+ import { groundRayType } from '../controller/type';
5
+ export type Api<T extends AnimationClip> = {
6
+ ref: React.MutableRefObject<Object3D | undefined | null>;
7
+ clips: AnimationClip[];
8
+ mixer: AnimationMixer;
9
+ names: T['name'][];
10
+ actions: {
11
+ [key in T['name']]: AnimationAction | null;
12
+ };
13
+ };
14
+ export type playActionsType = {
15
+ type: 'character' | 'vehicle' | 'airplane';
16
+ currentAnimation?: string;
17
+ actions: actionsType;
18
+ animationRef: Ref<Object3D<Object3DEventMap>>;
19
+ isActive: boolean;
20
+ };
21
+ export type subscribeActionsType = {
22
+ type: 'character' | 'vehicle' | 'airplane';
23
+ groundRay: groundRayType;
24
+ animations: AnimationClip[];
25
+ };
26
+ export type actionsType = {
27
+ [x: string]: THREE.AnimationAction | null;
28
+ };
29
+ export type playResultType = {
30
+ actions: actionsType;
31
+ ref: Ref<Object3D<Object3DEventMap>>;
32
+ };
@@ -0,0 +1,4 @@
1
+ import { cameraPropType } from "../../physics/type";
2
+ import { activeStateType, cameraOptionType } from "../../world/context/type";
3
+ export declare const makeNormalCameraPosition: (activeState: activeStateType, cameraOption: cameraOptionType) => import("three").Vector3;
4
+ export default function normal(prop: cameraPropType): void;
@@ -0,0 +1,4 @@
1
+ import { cameraPropType } from "../../physics/type";
2
+ import { activeStateType, cameraOptionType } from "../../world/context/type";
3
+ export declare const makeOrbitCameraPosition: (activeState: activeStateType, cameraOption: cameraOptionType) => import("three").Vector3;
4
+ export default function orbit(prop: cameraPropType): void;
@@ -0,0 +1,2 @@
1
+ import { cameraPropType } from "../physics/type";
2
+ export default function Camera(prop: cameraPropType): void;
@@ -0,0 +1,14 @@
1
+ import * as THREE from "three";
2
+ export type cameraRayType = {
3
+ origin: THREE.Vector3;
4
+ hit: THREE.Raycaster;
5
+ rayCast: THREE.Raycaster | null;
6
+ length: number;
7
+ dir: THREE.Vector3;
8
+ position: THREE.Vector3;
9
+ intersects: THREE.Intersection<THREE.Mesh>[];
10
+ detected: THREE.Intersection<THREE.Mesh>[];
11
+ intersectObjectMap: {
12
+ [uuid: string]: THREE.Mesh;
13
+ };
14
+ };
@@ -0,0 +1,2 @@
1
+ import { activeAirplaneInnerType } from "./type";
2
+ export declare function AirplaneRef(props: activeAirplaneInnerType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { passiveAirplanePropsType } from "../../passive/airplane/type";
2
+ import { innerRefType } from "../../passive/type";
3
+ export type activeAirplaneInnerType = passiveAirplanePropsType & innerRefType;
@@ -0,0 +1,8 @@
1
+ import { controllerInnerType, refsType } from "../../../controller/type";
2
+ import { urlsType } from "../../../world/context/type";
3
+ export declare function CharacterRef({ children, props, refs, urls, }: {
4
+ children: React.ReactNode;
5
+ props: controllerInnerType;
6
+ refs: refsType;
7
+ urls: urlsType;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { RigidBodyTypeString } from "@react-three/rapier";
2
+ import * as THREE from "three";
3
+ import { controllerOptionsType } from "../../../controller/type";
4
+ export type activeCharacterPropsType = {
5
+ characterUrl: string;
6
+ position?: THREE.Vector3;
7
+ rotation?: THREE.Euler;
8
+ controllerOptions?: controllerOptionsType;
9
+ currentAnimation?: string;
10
+ children?: React.ReactNode;
11
+ rigidbodyType?: RigidBodyTypeString;
12
+ };
@@ -0,0 +1,2 @@
1
+ import { activeVehicleInnerType } from "./type";
2
+ export declare function VehicleRef(props: activeVehicleInnerType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { innerRefType } from "../../passive/type";
2
+ import { passiveVehiclePropsType } from "../../passive/vehicle/type";
3
+ export type activeVehicleInnerType = passiveVehiclePropsType & innerRefType;
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../controller/type";
2
+ export declare function GaesupComponent({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { airplaneInnerType } from "./type";
2
+ export declare function AirplaneInnerRef(props: airplaneInnerType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ridingType, rigidBodyRefType } from "../common/type";
2
+ export type airplaneUrlType = {
3
+ wheelUrl?: string;
4
+ };
5
+ export type airplaneInnerType = rigidBodyRefType & ridingType & airplaneUrlType;
@@ -0,0 +1,2 @@
1
+ import { characterInnerType } from "./type";
2
+ export declare function CharacterInnerRef(props: characterInnerType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { callbackType } from "../../../controller/initialize/callback/type";
2
+ import { groundRayType, partsType } from "../../../controller/type";
3
+ import { passiveCharacterPropsType } from "../../passive/character/type";
4
+ import { componentTypeString, innerRefType } from "../../passive/type";
5
+ export type characterInnerType = {
6
+ componentType: componentTypeString;
7
+ isActive?: boolean;
8
+ groundRay: groundRayType;
9
+ parts?: partsType;
10
+ } & passiveCharacterPropsType & innerRefType & callbackType;
@@ -0,0 +1,13 @@
1
+ import * as THREE from "three";
2
+ export declare const InnerGroupRef: import("react").ForwardRefExoticComponent<{
3
+ children?: React.ReactNode;
4
+ objectNode: THREE.Object3D;
5
+ animationRef: import("react").MutableRefObject<THREE.Object3D<THREE.Object3DEventMap>>;
6
+ nodes: {
7
+ [name: string]: THREE.Object3D<THREE.Object3DEventMap>;
8
+ };
9
+ isActive?: boolean;
10
+ ridingUrl?: string;
11
+ offset?: THREE.Vector3;
12
+ parts?: import("../../../controller/type").partsType;
13
+ } & import("./type").ridingType & import("react").RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const OuterGroupRef: import("react").ForwardRefExoticComponent<{
3
+ children: ReactNode;
4
+ } & import("react").RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ export declare const RigidBodyRef: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
@@ -0,0 +1,7 @@
1
+ import * as THREE from "three";
2
+ export declare const calcCharacterColliderProps: (characterSize: THREE.Vector3) => {
3
+ height: number;
4
+ halfHeight: number;
5
+ radius: number;
6
+ diameter: number;
7
+ };
@@ -0,0 +1,10 @@
1
+ import * as THREE from "three";
2
+ import { componentTypeString } from "../../passive/type";
3
+ export declare const PartsGroupRef: ({ url, isActive, componentType, currentAnimation, color, skeleton, }: {
4
+ url: string;
5
+ isActive: boolean;
6
+ componentType: componentTypeString;
7
+ currentAnimation: string;
8
+ color?: string;
9
+ skeleton?: THREE.Skeleton;
10
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { setGroundRayType } from "./type";
2
+ export declare function useSetGroundRay(): ({ groundRay, length, colliderRef, }: setGroundRayType) => void;
@@ -0,0 +1,62 @@
1
+ import { Collider } from "@dimforge/rapier3d-compat";
2
+ import { RigidBodyProps, RigidBodyTypeString } from "@react-three/rapier";
3
+ import { MutableRefObject, RefObject } from "react";
4
+ import * as THREE from "three";
5
+ import { callbackType } from "../../../controller/initialize/callback/type";
6
+ import { groundRayType, partsType } from "../../../controller/type";
7
+ import { urlsType } from "../../../world/context/type";
8
+ import { innerRefType, passivePropsType } from "../../passive/type";
9
+ export type characterColliderType = {
10
+ height: number;
11
+ halfHeight: number;
12
+ radius: number;
13
+ diameter: number;
14
+ };
15
+ export type InnerGroupRefType = {
16
+ children?: React.ReactNode;
17
+ objectNode: THREE.Object3D;
18
+ animationRef: MutableRefObject<THREE.Object3D<THREE.Object3DEventMap>>;
19
+ nodes: {
20
+ [name: string]: THREE.Object3D<THREE.Object3DEventMap>;
21
+ };
22
+ isActive?: boolean;
23
+ ridingUrl?: string;
24
+ offset?: THREE.Vector3;
25
+ parts?: partsType;
26
+ } & ridingType;
27
+ export type ridingType = {
28
+ isRiderOn?: boolean;
29
+ enableRiding?: boolean;
30
+ };
31
+ export type refPropsType = {
32
+ children: React.ReactNode;
33
+ urls: urlsType;
34
+ isRiderOn?: boolean;
35
+ enableRiding?: boolean;
36
+ offset?: THREE.Vector3;
37
+ name?: string;
38
+ position?: THREE.Vector3;
39
+ rotation?: THREE.Euler;
40
+ userData?: {
41
+ intangible: boolean;
42
+ };
43
+ currentAnimation?: string;
44
+ type?: RigidBodyTypeString;
45
+ };
46
+ export type setGroundRayType = {
47
+ groundRay: groundRayType;
48
+ length: number;
49
+ colliderRef: RefObject<Collider>;
50
+ };
51
+ export type rigidBodyRefType = {
52
+ name?: string;
53
+ userData?: {
54
+ intangible: boolean;
55
+ };
56
+ isActive?: boolean;
57
+ ridingUrl?: string;
58
+ groundRay?: groundRayType;
59
+ rigidBodyProps?: RigidBodyProps;
60
+ isNotColliding?: boolean;
61
+ parts?: partsType;
62
+ } & passivePropsType & innerRefType & callbackType;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ import * as THREE from "three";
3
+ export type riderRefType = {
4
+ url: string;
5
+ children?: ReactNode;
6
+ offset?: THREE.Vector3;
7
+ euler?: THREE.Euler;
8
+ currentAnimation?: string;
9
+ };
10
+ export default function RiderRef({ url, children, offset, currentAnimation, }: riderRefType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { Collider } from "@dimforge/rapier3d-compat";
2
+ import * as THREE from "three";
3
+ export declare const VehicleWheelCollider: import("react").ForwardRefExoticComponent<{
4
+ wheelUrl: string;
5
+ vehicleSize: THREE.Vector3;
6
+ } & import("react").RefAttributes<Collider>>;
7
+ export declare const VehicleCollider: import("react").ForwardRefExoticComponent<{
8
+ vehicleSize: THREE.Vector3;
9
+ } & import("react").RefAttributes<Collider>>;
@@ -0,0 +1,2 @@
1
+ import { vehicleInnerType } from "./type";
2
+ export declare function VehicleInnerRef(props: vehicleInnerType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ridingType, rigidBodyRefType } from "../common/type";
2
+ export type vehicleUrlType = {
3
+ wheelUrl?: string;
4
+ };
5
+ export type vehicleInnerType = rigidBodyRefType & ridingType & vehicleUrlType;
@@ -0,0 +1,8 @@
1
+ import { RapierRigidBody } from "@react-three/rapier";
2
+ import { RefObject } from "react";
3
+ import * as THREE from "three";
4
+ export declare function WheelsRef({ vehicleSize, rigidBodyRef, wheelUrl, }: {
5
+ vehicleSize: THREE.Vector3;
6
+ rigidBodyRef: RefObject<RapierRigidBody>;
7
+ wheelUrl: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { passiveAirplanePropsType } from "./type";
2
+ export declare function PassiveAirplane(props: passiveAirplanePropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { passivePropsType } from "../type";
2
+ export type passiveAirplanePropsType = Omit<passivePropsType, "componentType">;
@@ -0,0 +1,2 @@
1
+ import { passiveCharacterPropsType } from "./type";
2
+ export declare function PassiveCharacter(props: passiveCharacterPropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { passivePropsType } from "../type";
2
+ export type passiveCharacterPropsType = Omit<passivePropsType, "isRiding" | "enableRiding" | "componentType">;
@@ -0,0 +1,38 @@
1
+ import { Collider } from "@dimforge/rapier3d-compat";
2
+ import { CollisionEnterPayload, RapierRigidBody, RigidBodyProps, RigidBodyTypeString } from "@react-three/rapier";
3
+ import { MutableRefObject } from "react";
4
+ import * as THREE from "three";
5
+ import { controllerOptionsType, groundRayType, partsType } from "../../controller/type";
6
+ import { ridingType } from "../inner/common/type";
7
+ export type componentTypeString = "character" | "vehicle" | "airplane";
8
+ export type innerRefType = {
9
+ colliderRef: MutableRefObject<Collider>;
10
+ rigidBodyRef: MutableRefObject<RapierRigidBody>;
11
+ outerGroupRef: MutableRefObject<THREE.Group>;
12
+ innerGroupRef: MutableRefObject<THREE.Group>;
13
+ };
14
+ export type passivePropsType = {
15
+ children?: React.ReactNode;
16
+ groundRay?: groundRayType;
17
+ url: string;
18
+ ridingUrl?: string;
19
+ wheelUrl?: string;
20
+ position?: THREE.Vector3;
21
+ rotation?: THREE.Euler;
22
+ offset?: THREE.Vector3;
23
+ controllerOptions?: controllerOptionsType;
24
+ currentAnimation?: string;
25
+ rigidbodyType?: RigidBodyTypeString;
26
+ sensor?: boolean;
27
+ onIntersectionEnter?: (e: CollisionEnterPayload) => Promise<void>;
28
+ onCollisionEnter?: (e: CollisionEnterPayload) => Promise<void>;
29
+ componentType: componentTypeString;
30
+ userData?: {
31
+ intangible: boolean;
32
+ };
33
+ rigidBodyProps?: RigidBodyProps;
34
+ outerGroupProps?: THREE.Group;
35
+ innerGroupProps?: THREE.Group;
36
+ parts?: partsType;
37
+ isNotColliding?: boolean;
38
+ } & ridingType;
@@ -0,0 +1,2 @@
1
+ import { passiveVehiclePropsType } from "./type";
2
+ export declare function PassiveVehicle(props: passiveVehiclePropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { passivePropsType } from "../type";
2
+ export type passiveVehiclePropsType = Omit<passivePropsType, "componentType">;
@@ -0,0 +1,18 @@
1
+ import { ObjectMap } from "@react-three/fiber";
2
+ import { RapierRigidBody } from "@react-three/rapier";
3
+ import { RefObject } from "react";
4
+ import * as THREE from "three";
5
+ import { GLTF } from "three-stdlib";
6
+ export type GLTFResult = GLTF & {
7
+ nodes: {
8
+ [name: string]: THREE.Mesh | THREE.SkinnedMesh;
9
+ };
10
+ materials: {
11
+ [name: string]: THREE.Material | THREE.MeshStandardMaterial;
12
+ };
13
+ } & ObjectMap;
14
+ export type passiveRefsType = {
15
+ rigidBodyRef: RefObject<RapierRigidBody>;
16
+ outerGroupRef: RefObject<THREE.Group>;
17
+ innerGroupRef: RefObject<THREE.Group>;
18
+ };
@@ -0,0 +1,48 @@
1
+ import { dispatchType } from "../../utils/type";
2
+ import { gaesupControllerType } from "./type";
3
+ export declare const gaesupControllerDefault: {
4
+ airplane: {
5
+ angleDelta: import("three").Vector3;
6
+ maxAngle: import("three").Vector3;
7
+ maxSpeed: number;
8
+ accelRatio: number;
9
+ brakeRatio: number;
10
+ buoyancy: number;
11
+ linearDamping: number;
12
+ };
13
+ vehicle: {
14
+ maxSpeed: number;
15
+ accelRatio: number;
16
+ brakeRatio: number;
17
+ wheelOffset: number;
18
+ linearDamping: number;
19
+ };
20
+ character: {
21
+ walkSpeed: number;
22
+ runSpeed: number;
23
+ turnSpeed: number;
24
+ jumpSpeed: number;
25
+ linearDamping: number;
26
+ };
27
+ callbacks: {
28
+ onReady: () => void;
29
+ onFrame: () => void;
30
+ onDestory: () => void;
31
+ onAnimate: () => void;
32
+ };
33
+ refs: {
34
+ colliderRef: any;
35
+ rigidBodyRef: any;
36
+ outerGroupRef: any;
37
+ innerGroupRef: any;
38
+ characterInnerRef: any;
39
+ };
40
+ controllerOptions: {
41
+ lerp: {
42
+ cameraTurn: number;
43
+ cameraPosition: number;
44
+ };
45
+ };
46
+ };
47
+ export declare const GaesupControllerContext: import("react").Context<gaesupControllerType>;
48
+ export declare const GaesupControllerDispatchContext: import("react").Context<dispatchType<gaesupControllerType>>;
@@ -0,0 +1,12 @@
1
+ import { gaesupControllerType } from "./type";
2
+ export declare function gaesupControllerReducer(props: gaesupControllerType, action: {
3
+ type: string;
4
+ payload?: Partial<gaesupControllerType>;
5
+ }): {
6
+ airplane: import("./type").airplaneType;
7
+ vehicle: import("./type").vehicleType;
8
+ character: import("./type").characterType;
9
+ controllerOptions: import("../type").controllerOptionsType;
10
+ callbacks?: import("../initialize/callback/type").callbackType;
11
+ refs?: import("../type").refsType;
12
+ };
@@ -0,0 +1,39 @@
1
+ import { GroupProps } from "@react-three/fiber";
2
+ import * as THREE from "three";
3
+ import { dispatchType } from "../../utils/type";
4
+ import { callbackType } from "../initialize/callback/type";
5
+ import { gaesupControllerContextPropType, refsType } from "../type";
6
+ export type airplaneDebugType = {
7
+ angleDelta?: THREE.Vector3;
8
+ maxAngle?: THREE.Vector3;
9
+ buoyancy?: number;
10
+ maxSpeed?: number;
11
+ accelRatio?: number;
12
+ brakeRatio?: number;
13
+ linearDamping?: number;
14
+ };
15
+ export type vehicleDebugType = {
16
+ maxSpeed?: number;
17
+ accelRatio?: number;
18
+ brakeRatio?: number;
19
+ wheelOffset?: number;
20
+ linearDamping?: number;
21
+ };
22
+ export type characterDebugType = {
23
+ jumpSpeed?: number;
24
+ turnSpeed?: number;
25
+ walkSpeed?: number;
26
+ runSpeed?: number;
27
+ linearDamping?: number;
28
+ };
29
+ export interface airplaneType extends GroupProps, airplaneDebugType {
30
+ }
31
+ export interface vehicleType extends GroupProps, vehicleDebugType {
32
+ }
33
+ export interface characterType extends GroupProps, characterDebugType {
34
+ }
35
+ export type gaesupControllerType = gaesupControllerContextPropType & {
36
+ callbacks?: callbackType;
37
+ refs?: refsType;
38
+ };
39
+ export type gaesupDisptachType = dispatchType<gaesupControllerType>;
@@ -0,0 +1,3 @@
1
+ import { controllerType } from "./type";
2
+ export declare function GaesupController(props: controllerType): import("react/jsx-runtime").JSX.Element;
3
+ export declare function GaesupControllerInner(props: controllerType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { AnimationAction } from "three";
2
+ import { rigidBodyRefType } from "../../../component/inner/common/type";
3
+ import { componentTypeString } from "../../../component/passive/type";
4
+ import { animationTagType } from "../../type";
5
+ export default function initCallback({ props, actions, componentType, }: {
6
+ props: rigidBodyRefType;
7
+ actions: {
8
+ [x: string]: AnimationAction;
9
+ };
10
+ componentType: componentTypeString;
11
+ }): {
12
+ subscribe: ({ tag, condition, action, animationName, key, }: import("../../../world/context/type").animationAtomType) => void;
13
+ playAnimation: (tag: keyof animationTagType, key: string) => void;
14
+ dispatch: import("../../../utils/type").dispatchType<Partial<import("../../../world/context/type").gaesupWorldContextType>>;
15
+ };
@@ -0,0 +1,23 @@
1
+ import { RootState } from "@react-three/fiber";
2
+ import * as THREE from "three";
3
+ import { activeStateType, animationAtomType, animationStateType, keyControlType, statesType } from "../../../world/context/type";
4
+ export type callbackPropType = {
5
+ activeState: activeStateType;
6
+ states: statesType;
7
+ control: keyControlType;
8
+ subscribe: (props: animationAtomType) => void;
9
+ };
10
+ export type onFramePropType = callbackPropType & RootState;
11
+ export type onAnimatePropType = onFramePropType & {
12
+ actions: {
13
+ [x: string]: THREE.AnimationAction | null;
14
+ };
15
+ animationState: animationStateType;
16
+ playAnimation: any;
17
+ };
18
+ export type callbackType = {
19
+ onReady?: (prop: callbackPropType) => void;
20
+ onFrame?: (prop: onFramePropType) => void;
21
+ onDestory?: (prop: callbackPropType) => void;
22
+ onAnimate?: (prop: onAnimatePropType) => void;
23
+ };
@@ -0,0 +1,8 @@
1
+ import { groundRayType, refsType } from "../../controller/type";
2
+ import { cameraRayType } from "../../camera/type";
3
+ export default function initControllerProps(props: {
4
+ refs: refsType;
5
+ }): {
6
+ groundRay: groundRayType;
7
+ cameraRay: cameraRayType;
8
+ };