gaesup-world 0.0.4 → 0.0.6
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.
- package/dist/examples/select/App.d.ts +2 -0
- package/dist/examples/select/App.js +6 -0
- package/dist/examples/select/global.css.d.ts +1 -0
- package/dist/examples/select/global.css.js +71 -0
- package/dist/examples/select/main.d.ts +1 -0
- package/dist/examples/select/main.js +6 -0
- package/dist/examples/select/platform/ControlledInput.d.ts +1 -0
- package/dist/examples/select/platform/ControlledInput.js +40 -0
- package/dist/examples/select/platform/DynamicPlatforms.d.ts +8 -0
- package/dist/examples/select/platform/DynamicPlatforms.js +48 -0
- package/dist/examples/select/platform/FloatMove.d.ts +14 -0
- package/dist/examples/select/platform/FloatMove.js +60 -0
- package/dist/examples/select/platform/Floor.d.ts +1 -0
- package/dist/examples/select/platform/Floor.js +7 -0
- package/dist/examples/select/platform/RigidObjects.d.ts +1 -0
- package/dist/examples/select/platform/RigidObjects.js +7 -0
- package/dist/examples/select/platform/RoughPlane.d.ts +1 -0
- package/dist/examples/select/platform/RoughPlane.js +20 -0
- package/dist/examples/select/platform/Slopes.d.ts +1 -0
- package/dist/examples/select/platform/Slopes.js +27 -0
- package/dist/examples/select/platform/style.css.d.ts +1 -0
- package/dist/examples/select/platform/style.css.js +11 -0
- package/dist/examples/select/src/index.d.ts +5 -0
- package/dist/examples/select/src/index.js +139 -0
- package/dist/examples/select/src/keyboardMap/character.d.ts +8 -0
- package/dist/examples/select/src/keyboardMap/character.js +18 -0
- package/dist/examples/select/src/keyboardMap/vehicle.d.ts +4 -0
- package/dist/examples/select/src/keyboardMap/vehicle.js +8 -0
- package/dist/examples/select/src/style.css.d.ts +35 -0
- package/dist/examples/select/src/style.css.js +81 -0
- package/dist/src/gaesup/animation/actions.d.ts +8 -0
- package/dist/src/gaesup/animation/actions.js +100 -0
- package/dist/src/gaesup/animation/index.d.ts +1 -0
- package/dist/src/gaesup/animation/index.js +1 -0
- package/dist/src/gaesup/camera/cameraCollisionDetecter.d.ts +4 -0
- package/dist/src/gaesup/camera/cameraCollisionDetecter.js +50 -0
- package/dist/src/gaesup/camera/control/map.d.ts +2 -0
- package/dist/src/gaesup/camera/control/map.js +5 -0
- package/dist/src/gaesup/camera/control/normal.d.ts +2 -0
- package/dist/src/gaesup/camera/control/normal.js +9 -0
- package/dist/src/gaesup/camera/control/orbit.d.ts +2 -0
- package/dist/src/gaesup/camera/control/orbit.js +18 -0
- package/dist/src/gaesup/camera/index.d.ts +8 -0
- package/dist/src/gaesup/camera/index.js +69 -0
- package/dist/src/gaesup/camera/type.d.ts +17 -0
- package/dist/src/gaesup/camera/type.js +1 -0
- package/dist/src/gaesup/component/Airplane.d.ts +5 -0
- package/dist/src/gaesup/component/Airplane.js +14 -0
- package/dist/src/gaesup/component/Character.d.ts +5 -0
- package/dist/src/gaesup/component/Character.js +13 -0
- package/dist/src/gaesup/component/Vehicle.d.ts +5 -0
- package/dist/src/gaesup/component/Vehicle.js +15 -0
- package/dist/src/gaesup/component/gltf/AirplaneGltf.d.ts +2 -0
- package/dist/src/gaesup/component/gltf/AirplaneGltf.js +13 -0
- package/dist/src/gaesup/component/gltf/CharacterGltf.d.ts +14 -0
- package/dist/src/gaesup/component/gltf/CharacterGltf.js +46 -0
- package/dist/src/gaesup/component/gltf/VehicleGltf.d.ts +2 -0
- package/dist/src/gaesup/component/gltf/VehicleGltf.js +13 -0
- package/dist/src/gaesup/component/gltf/WheelJoint.d.ts +4 -0
- package/dist/src/gaesup/component/gltf/WheelJoint.js +21 -0
- package/dist/src/gaesup/component/gltf/index.d.ts +4 -0
- package/dist/src/gaesup/component/gltf/index.js +4 -0
- package/dist/src/gaesup/component/gltf/type.d.ts +10 -0
- package/dist/src/gaesup/component/gltf/type.js +1 -0
- package/dist/src/gaesup/component/index.d.ts +5 -0
- package/dist/src/gaesup/component/index.js +5 -0
- package/dist/src/gaesup/component/ref/airplane.d.ts +16 -0
- package/dist/src/gaesup/component/ref/airplane.js +46 -0
- package/dist/src/gaesup/component/ref/character.d.ts +20 -0
- package/dist/src/gaesup/component/ref/character.js +56 -0
- package/dist/src/gaesup/component/ref/index.d.ts +3 -0
- package/dist/src/gaesup/component/ref/index.js +3 -0
- package/dist/src/gaesup/component/ref/vehicle.d.ts +24 -0
- package/dist/src/gaesup/component/ref/vehicle.js +41 -0
- package/dist/src/gaesup/component/setInit.d.ts +3 -0
- package/dist/src/gaesup/component/setInit.js +10 -0
- package/dist/src/gaesup/controller/context/index.d.ts +40 -0
- package/dist/src/gaesup/controller/context/index.js +53 -0
- package/dist/src/gaesup/controller/context/reducer.d.ts +14 -0
- package/dist/src/gaesup/controller/context/reducer.js +21 -0
- package/dist/src/gaesup/controller/context/type.d.ts +52 -0
- package/dist/src/gaesup/controller/context/type.js +1 -0
- package/dist/src/gaesup/controller/index.d.ts +2 -0
- package/dist/src/gaesup/controller/index.js +74 -0
- package/dist/src/gaesup/controller/type.d.ts +124 -0
- package/dist/src/gaesup/controller/type.js +1 -0
- package/dist/src/gaesup/gaesupProps/index.d.ts +7 -0
- package/dist/src/gaesup/gaesupProps/index.js +67 -0
- package/dist/src/gaesup/index.d.ts +8 -0
- package/dist/src/gaesup/index.js +8 -0
- package/dist/src/gaesup/initial/callback/index.d.ts +2 -0
- package/dist/src/gaesup/initial/callback/index.js +51 -0
- package/dist/src/gaesup/initial/callback/type.d.ts +33 -0
- package/dist/src/gaesup/initial/callback/type.js +1 -0
- package/dist/src/gaesup/initial/controller/index.d.ts +29 -0
- package/dist/src/gaesup/initial/controller/index.js +126 -0
- package/dist/src/gaesup/initial/controller/initDebug.d.ts +24 -0
- package/dist/src/gaesup/initial/controller/initDebug.js +110 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/airplane.d.ts +2 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/airplane.js +25 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/character.d.ts +2 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/character.js +30 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/gltf.d.ts +14 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/gltf.js +71 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/index.d.ts +6 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/index.js +16 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/vehicle.d.ts +2 -0
- package/dist/src/gaesup/initial/gaesupWorld/collider/vehicle.js +40 -0
- package/dist/src/gaesup/initial/gaesupWorld/index.d.ts +33 -0
- package/dist/src/gaesup/initial/gaesupWorld/index.js +76 -0
- package/dist/src/gaesup/initial/gaesupWorld/type.d.ts +28 -0
- package/dist/src/gaesup/initial/gaesupWorld/type.js +1 -0
- package/dist/src/gaesup/initial/index.d.ts +3 -0
- package/dist/src/gaesup/initial/index.js +3 -0
- package/dist/src/gaesup/physics/airplane/currentSetting.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/currentSetting.js +23 -0
- package/dist/src/gaesup/physics/airplane/damping.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/damping.js +4 -0
- package/dist/src/gaesup/physics/airplane/direction.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/direction.js +60 -0
- package/dist/src/gaesup/physics/airplane/gravity.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/gravity.js +9 -0
- package/dist/src/gaesup/physics/airplane/impulse.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/impulse.js +15 -0
- package/dist/src/gaesup/physics/airplane/index.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/index.js +14 -0
- package/dist/src/gaesup/physics/airplane/turn.d.ts +2 -0
- package/dist/src/gaesup/physics/airplane/turn.js +5 -0
- package/dist/src/gaesup/physics/character/accelaration.d.ts +2 -0
- package/dist/src/gaesup/physics/character/accelaration.js +10 -0
- package/dist/src/gaesup/physics/character/currentSetting.d.ts +2 -0
- package/dist/src/gaesup/physics/character/currentSetting.js +23 -0
- package/dist/src/gaesup/physics/character/damping.d.ts +2 -0
- package/dist/src/gaesup/physics/character/damping.js +4 -0
- package/dist/src/gaesup/physics/character/direction.d.ts +24 -0
- package/dist/src/gaesup/physics/character/direction.js +65 -0
- package/dist/src/gaesup/physics/character/impulse.d.ts +2 -0
- package/dist/src/gaesup/physics/character/impulse.js +12 -0
- package/dist/src/gaesup/physics/character/index.d.ts +2 -0
- package/dist/src/gaesup/physics/character/index.js +18 -0
- package/dist/src/gaesup/physics/character/jump.d.ts +2 -0
- package/dist/src/gaesup/physics/character/jump.js +11 -0
- package/dist/src/gaesup/physics/character/stabilizing.d.ts +2 -0
- package/dist/src/gaesup/physics/character/stabilizing.js +4 -0
- package/dist/src/gaesup/physics/character/turn.d.ts +2 -0
- package/dist/src/gaesup/physics/character/turn.js +6 -0
- package/dist/src/gaesup/physics/check/ground.d.ts +2 -0
- package/dist/src/gaesup/physics/check/ground.js +13 -0
- package/dist/src/gaesup/physics/check/index.d.ts +2 -0
- package/dist/src/gaesup/physics/check/index.js +10 -0
- package/dist/src/gaesup/physics/check/moving.d.ts +2 -0
- package/dist/src/gaesup/physics/check/moving.js +17 -0
- package/dist/src/gaesup/physics/check/rotate.d.ts +2 -0
- package/dist/src/gaesup/physics/check/rotate.js +8 -0
- package/dist/src/gaesup/physics/check/slope.d.ts +2 -0
- package/dist/src/gaesup/physics/check/slope.js +22 -0
- package/dist/src/gaesup/physics/index.d.ts +2 -0
- package/dist/src/gaesup/physics/index.js +45 -0
- package/dist/src/gaesup/physics/type.d.ts +25 -0
- package/dist/src/gaesup/physics/type.js +1 -0
- package/dist/src/gaesup/physics/vehicle/currentSetting.d.ts +2 -0
- package/dist/src/gaesup/physics/vehicle/currentSetting.js +23 -0
- package/dist/src/gaesup/physics/vehicle/damping.d.ts +2 -0
- package/dist/src/gaesup/physics/vehicle/damping.js +6 -0
- package/dist/src/gaesup/physics/vehicle/direction.d.ts +2 -0
- package/dist/src/gaesup/physics/vehicle/direction.js +32 -0
- package/dist/src/gaesup/physics/vehicle/impulse.d.ts +2 -0
- package/dist/src/gaesup/physics/vehicle/impulse.js +26 -0
- package/dist/src/gaesup/physics/vehicle/index.d.ts +2 -0
- package/dist/src/gaesup/physics/vehicle/index.js +12 -0
- package/dist/src/gaesup/physics/vehicle/turn.d.ts +2 -0
- package/dist/src/gaesup/physics/vehicle/turn.js +5 -0
- package/dist/src/gaesup/styles.css.d.ts +2 -0
- package/dist/src/gaesup/styles.css.js +24 -0
- package/dist/src/gaesup/tools/context.d.ts +4 -0
- package/dist/src/gaesup/tools/context.js +3 -0
- package/dist/src/gaesup/tools/gameboy/GameBoyButton.d.ts +7 -0
- package/dist/src/gaesup/tools/gameboy/GameBoyButton.js +22 -0
- package/dist/src/gaesup/tools/gameboy/default.d.ts +3 -0
- package/dist/src/gaesup/tools/gameboy/default.js +3 -0
- package/dist/src/gaesup/tools/gameboy/index.d.ts +6 -0
- package/dist/src/gaesup/tools/gameboy/index.js +21 -0
- package/dist/src/gaesup/tools/gameboy/style.css.d.ts +40 -0
- package/dist/src/gaesup/tools/gameboy/style.css.js +87 -0
- package/dist/src/gaesup/tools/gameboy/type.d.ts +7 -0
- package/dist/src/gaesup/tools/gameboy/type.js +1 -0
- package/dist/src/gaesup/tools/gamepad/GamePadButton.d.ts +4 -0
- package/dist/src/gaesup/tools/gamepad/GamePadButton.js +25 -0
- package/dist/src/gaesup/tools/gamepad/default.d.ts +3 -0
- package/dist/src/gaesup/tools/gamepad/default.js +3 -0
- package/dist/src/gaesup/tools/gamepad/index.d.ts +1 -0
- package/dist/src/gaesup/tools/gamepad/index.js +30 -0
- package/dist/src/gaesup/tools/gamepad/style.css.d.ts +15 -0
- package/dist/src/gaesup/tools/gamepad/style.css.js +68 -0
- package/dist/src/gaesup/tools/gamepad/type.d.ts +8 -0
- package/dist/src/gaesup/tools/gamepad/type.js +1 -0
- package/dist/src/gaesup/tools/index.d.ts +2 -0
- package/dist/src/gaesup/tools/index.js +44 -0
- package/dist/src/gaesup/tools/joystick/default.d.ts +43 -0
- package/dist/src/gaesup/tools/joystick/default.js +65 -0
- package/dist/src/gaesup/tools/joystick/index.d.ts +2 -0
- package/dist/src/gaesup/tools/joystick/index.js +138 -0
- package/dist/src/gaesup/tools/joystick/style.css.d.ts +3 -0
- package/dist/src/gaesup/tools/joystick/style.css.js +46 -0
- package/dist/src/gaesup/tools/joystick/type.d.ts +28 -0
- package/dist/src/gaesup/tools/joystick/type.js +1 -0
- package/dist/src/gaesup/tools/jumpPoint/index.d.ts +1 -0
- package/dist/src/gaesup/tools/jumpPoint/index.js +14 -0
- package/dist/src/gaesup/tools/jumpPoint/style.css.d.ts +2 -0
- package/dist/src/gaesup/tools/jumpPoint/style.css.js +32 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/constant.d.ts +402 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/constant.js +122 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/default.d.ts +11 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/default.js +13 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/index.d.ts +1 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/index.js +68 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/style.css.d.ts +3 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/style.css.js +46 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/type.d.ts +31 -0
- package/dist/src/gaesup/tools/keyBoardToolTip/type.js +1 -0
- package/dist/src/gaesup/tools/minimap/default.d.ts +8 -0
- package/dist/src/gaesup/tools/minimap/default.js +8 -0
- package/dist/src/gaesup/tools/minimap/index.d.ts +1 -0
- package/dist/src/gaesup/tools/minimap/index.js +57 -0
- package/dist/src/gaesup/tools/minimap/style.css.d.ts +9 -0
- package/dist/src/gaesup/tools/minimap/style.css.js +135 -0
- package/dist/src/gaesup/tools/minimap/type.d.ts +24 -0
- package/dist/src/gaesup/tools/minimap/type.js +1 -0
- package/dist/src/gaesup/tools/pushKey/index.d.ts +3 -0
- package/dist/src/gaesup/tools/pushKey/index.js +29 -0
- package/dist/src/gaesup/tools/reducer.d.ts +11 -0
- package/dist/src/gaesup/tools/reducer.js +24 -0
- package/dist/src/gaesup/tools/style.css.d.ts +3 -0
- package/dist/src/gaesup/tools/style.css.js +31 -0
- package/dist/src/gaesup/tools/type.d.ts +26 -0
- package/dist/src/gaesup/tools/type.js +1 -0
- package/dist/src/gaesup/utils/constant.d.ts +1 -0
- package/dist/src/gaesup/utils/constant.js +1 -0
- package/dist/src/gaesup/utils/index.d.ts +3 -0
- package/dist/src/gaesup/utils/index.js +3 -0
- package/dist/src/gaesup/utils/ray.d.ts +7 -0
- package/dist/src/gaesup/utils/ray.js +6 -0
- package/dist/src/gaesup/utils/ref.d.ts +2 -0
- package/dist/src/gaesup/utils/ref.js +16 -0
- package/dist/src/gaesup/utils/vector.d.ts +8 -0
- package/dist/src/gaesup/utils/vector.js +22 -0
- package/dist/src/gaesup/world/context/index.d.ts +5 -0
- package/dist/src/gaesup/world/context/index.js +128 -0
- package/dist/src/gaesup/world/context/reducer.d.ts +27 -0
- package/dist/src/gaesup/world/context/reducer.js +24 -0
- package/dist/src/gaesup/world/context/type.d.ts +123 -0
- package/dist/src/gaesup/world/context/type.js +1 -0
- package/dist/src/gaesup/world/index.d.ts +2 -0
- package/dist/src/gaesup/world/index.js +7 -0
- package/dist/src/gaesup/world/type.d.ts +9 -0
- package/dist/src/gaesup/world/type.js +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/styles/constants/boxshadow.css.d.ts +9 -0
- package/dist/src/styles/constants/boxshadow.css.js +9 -0
- package/dist/src/styles/constants/constant.css.d.ts +77 -0
- package/dist/src/styles/constants/constant.css.js +79 -0
- package/dist/src/styles/constants/direction.css.d.ts +160 -0
- package/dist/src/styles/constants/direction.css.js +166 -0
- package/dist/src/styles/constants/flex.css.d.ts +61 -0
- package/dist/src/styles/constants/flex.css.js +66 -0
- package/dist/src/styles/constants/gradient.css.d.ts +8 -0
- package/dist/src/styles/constants/gradient.css.js +8 -0
- package/dist/src/styles/constants/grid.css.d.ts +55 -0
- package/dist/src/styles/constants/grid.css.js +19 -0
- package/dist/src/styles/constants/palette.css.d.ts +77 -0
- package/dist/src/styles/constants/palette.css.js +80 -0
- package/dist/src/styles/constants/translate.css.d.ts +563 -0
- package/dist/src/styles/constants/translate.css.js +131 -0
- package/dist/src/styles/global.css.d.ts +1 -0
- package/dist/src/styles/global.css.js +68 -0
- package/dist/src/styles/recipe/base.css.d.ts +22 -0
- package/dist/src/styles/recipe/base.css.js +21 -0
- package/dist/src/styles/recipe/button.css.d.ts +61 -0
- package/dist/src/styles/recipe/button.css.js +107 -0
- package/dist/src/styles/recipe/index.css.d.ts +4167 -0
- package/dist/src/styles/recipe/index.css.js +110 -0
- package/dist/src/styles/recipe/input.css.d.ts +21 -0
- package/dist/src/styles/recipe/input.css.js +32 -0
- package/dist/src/styles/sprinkles/color.css.d.ts +764 -0
- package/dist/src/styles/sprinkles/color.css.js +60 -0
- package/dist/src/styles/sprinkles/direction.css.d.ts +1047 -0
- package/dist/src/styles/sprinkles/direction.css.js +35 -0
- package/dist/src/styles/sprinkles/display.css.d.ts +208 -0
- package/dist/src/styles/sprinkles/display.css.js +24 -0
- package/dist/src/styles/sprinkles/fontSize.css.d.ts +529 -0
- package/dist/src/styles/sprinkles/fontSize.css.js +31 -0
- package/dist/src/styles/sprinkles/grid.css.d.ts +462 -0
- package/dist/src/styles/sprinkles/grid.css.js +24 -0
- package/dist/src/styles/sprinkles/index.css.d.ts +1 -0
- package/dist/src/styles/sprinkles/index.css.js +11 -0
- package/dist/src/styles/sprinkles/margin.css.d.ts +2212 -0
- package/dist/src/styles/sprinkles/margin.css.js +39 -0
- package/dist/src/styles/sprinkles/padding.css.d.ts +2212 -0
- package/dist/src/styles/sprinkles/padding.css.js +39 -0
- package/dist/src/styles/sprinkles/position.css.d.ts +48 -0
- package/dist/src/styles/sprinkles/position.css.js +13 -0
- package/dist/src/styles/sprinkles/size.css.d.ts +43 -0
- package/dist/src/styles/sprinkles/size.css.js +32 -0
- package/dist/src/styles/theme.css.d.ts +62 -0
- package/dist/src/styles/theme.css.js +75 -0
- package/package.json +3 -4
- package/src/gaesup/component/gltf/type.ts +2 -1
- package/src/gaesup/controller/context/index.ts +3 -4
- package/src/gaesup/controller/context/reducer.ts +1 -1
- package/src/gaesup/controller/type.ts +4 -5
- package/src/gaesup/gaesupProps/index.tsx +1 -1
- package/src/gaesup/initial/gaesupWorld/collider/gltf.ts +6 -5
- package/src/gaesup/initial/gaesupWorld/index.ts +2 -1
- package/src/gaesup/tools/gameboy/GameBoyButton.tsx +3 -2
- package/src/gaesup/tools/gameboy/style.css.ts +2 -2
- package/src/gaesup/tools/gamepad/GamePadButton.tsx +5 -4
- package/src/gaesup/tools/gamepad/index.tsx +4 -3
- package/src/gaesup/tools/gamepad/style.css.ts +2 -2
- package/src/gaesup/tools/joystick/default.ts +2 -2
- package/src/gaesup/tools/joystick/style.css.ts +1 -1
- package/src/gaesup/tools/jumpPoint/index.tsx +3 -2
- package/src/gaesup/world/context/index.ts +9 -0
- package/src/gaesup/world/context/type.ts +2 -0
- package/src/styles/constants/boxshadow.css.ts +0 -489
- package/src/styles/constants/grid.css.ts +1 -1
- package/src/styles/constants/palette.css.ts +3 -236
- package/src/styles/global.css.ts +1 -1
- package/src/styles/recipe/base.css.ts +17 -17
- package/src/styles/recipe/button.css.ts +5 -5
- package/src/styles/recipe/index.css.ts +5 -5
- package/src/styles/recipe/input.css.ts +1 -1
- package/src/styles/sprinkles/color.css.ts +5 -5
- package/src/styles/sprinkles/direction.css.ts +1 -1
- package/src/styles/sprinkles/fontSize.css.ts +1 -1
- package/src/styles/sprinkles/grid.css.ts +5 -2
- package/src/styles/sprinkles/index.css.ts +10 -10
- package/src/styles/sprinkles/margin.css.ts +1 -1
- package/src/styles/sprinkles/padding.css.ts +1 -1
- package/src/styles/sprinkles/size.css.ts +1 -1
- package/tsconfig.json +14 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { globalStyle } from "@vanilla-extract/css";
|
|
2
|
+
import { vars } from "../../src/styles/theme.css";
|
|
3
|
+
globalStyle(":root", {
|
|
4
|
+
background: vars.themes.background,
|
|
5
|
+
color: vars.themes.text.normal,
|
|
6
|
+
});
|
|
7
|
+
globalStyle("html", {
|
|
8
|
+
boxSizing: "border-box",
|
|
9
|
+
fontSize: "62.5%",
|
|
10
|
+
maxWidth: "100%",
|
|
11
|
+
overflowX: "hidden",
|
|
12
|
+
padding: 0,
|
|
13
|
+
});
|
|
14
|
+
globalStyle("body", {
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
position: "fixed",
|
|
17
|
+
margin: 0,
|
|
18
|
+
padding: 0,
|
|
19
|
+
});
|
|
20
|
+
globalStyle("*, *::before, *::after", {
|
|
21
|
+
boxSizing: "border-box",
|
|
22
|
+
});
|
|
23
|
+
globalStyle("a", {
|
|
24
|
+
cursor: "pointer",
|
|
25
|
+
textDecoration: "none",
|
|
26
|
+
color: "inherit",
|
|
27
|
+
});
|
|
28
|
+
globalStyle("input, input:focus", {
|
|
29
|
+
border: "none",
|
|
30
|
+
borderRight: "0px",
|
|
31
|
+
borderTop: "0px",
|
|
32
|
+
borderLeft: "0px",
|
|
33
|
+
borderBottom: "0px",
|
|
34
|
+
outline: "none",
|
|
35
|
+
WebkitAppearance: "none",
|
|
36
|
+
MozAppearance: "none",
|
|
37
|
+
appearance: "none",
|
|
38
|
+
});
|
|
39
|
+
globalStyle("button, button:focus", {
|
|
40
|
+
border: "none",
|
|
41
|
+
outline: "none",
|
|
42
|
+
});
|
|
43
|
+
globalStyle("input::-ms-clear", {
|
|
44
|
+
display: "none",
|
|
45
|
+
});
|
|
46
|
+
globalStyle('input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button', {
|
|
47
|
+
WebkitAppearance: "none",
|
|
48
|
+
MozAppearance: "none",
|
|
49
|
+
appearance: "none",
|
|
50
|
+
});
|
|
51
|
+
globalStyle('input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear', {
|
|
52
|
+
display: "none",
|
|
53
|
+
});
|
|
54
|
+
// 스크롤
|
|
55
|
+
globalStyle("::-webkit-scrollbar", {
|
|
56
|
+
width: "1.8rem",
|
|
57
|
+
});
|
|
58
|
+
globalStyle("::-webkit-scrollbar-thumb", {
|
|
59
|
+
background: vars.gradient.purple,
|
|
60
|
+
borderRadius: "1rem",
|
|
61
|
+
border: "0.4rem solid transparent",
|
|
62
|
+
backgroundClip: "padding-box",
|
|
63
|
+
});
|
|
64
|
+
globalStyle("::-webkit-scrollbar-track", {
|
|
65
|
+
WebkitBackdropFilter: "blur(10px)",
|
|
66
|
+
backdropFilter: "blur(10px)",
|
|
67
|
+
});
|
|
68
|
+
globalStyle("input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active", {
|
|
69
|
+
transition: "background-color 10000s",
|
|
70
|
+
WebkitTextFillColor: "black !important",
|
|
71
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./style.css";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ReactDOM from "react-dom/client";
|
|
4
|
+
import App from "./App";
|
|
5
|
+
import "./style.css";
|
|
6
|
+
ReactDOM.createRoot(document.getElementById("root")).render(_jsx(React.StrictMode, { children: _jsx(App, {}) }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ControlledInput: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { useEffect, useRef, useState } from "react";
|
|
25
|
+
import * as style from "./style.css";
|
|
26
|
+
export var ControlledInput = function (props) {
|
|
27
|
+
var value = props.value, onChange = props.onChange, rest = __rest(props, ["value", "onChange"]);
|
|
28
|
+
var _a = useState(null), cursor = _a[0], setCursor = _a[1];
|
|
29
|
+
var ref = useRef(null);
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
var input = ref.current;
|
|
32
|
+
if (input)
|
|
33
|
+
input.setSelectionRange(cursor, cursor);
|
|
34
|
+
}, [ref, cursor, value]);
|
|
35
|
+
var handleChange = function (e) {
|
|
36
|
+
setCursor(e.target.selectionStart);
|
|
37
|
+
onChange && onChange(e);
|
|
38
|
+
};
|
|
39
|
+
return (_jsx("input", __assign({ ref: ref, value: value, onChange: handleChange }, rest, { className: style.input })));
|
|
40
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Text } from "@react-three/drei";
|
|
4
|
+
import { useFrame } from "@react-three/fiber";
|
|
5
|
+
import { CuboidCollider, CylinderCollider, RigidBody, } from "@react-three/rapier";
|
|
6
|
+
import { useMemo, useRef } from "react";
|
|
7
|
+
import GaeSupProps from "../../../src/gaesup/gaesupProps";
|
|
8
|
+
import { Qt, V3 } from "../../../src/gaesup/utils/vector";
|
|
9
|
+
export default function DynamicPlatforms() {
|
|
10
|
+
var sideMovePlatformRef = useRef(null);
|
|
11
|
+
var verticalMovePlatformRef = useRef(null);
|
|
12
|
+
var rotatePlatformRef = useRef(null);
|
|
13
|
+
var rotationDrumRef = useRef(null);
|
|
14
|
+
// Initializ animation settings
|
|
15
|
+
var dynamic = useMemo(function () {
|
|
16
|
+
return {
|
|
17
|
+
time: null,
|
|
18
|
+
X: V3(1, 0, 0),
|
|
19
|
+
Y: V3(0, 1, 0),
|
|
20
|
+
Qt: Qt(),
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
useFrame(function (state) {
|
|
24
|
+
var _a, _b, _c, _d, _e;
|
|
25
|
+
dynamic.time = state.clock.elapsedTime;
|
|
26
|
+
var time = dynamic.time, Qt = dynamic.Qt, X = dynamic.X, Y = dynamic.Y;
|
|
27
|
+
if (dynamic.time) {
|
|
28
|
+
// Move platform
|
|
29
|
+
(_a = sideMovePlatformRef.current) === null || _a === void 0 ? void 0 : _a.setNextKinematicTranslation({
|
|
30
|
+
x: 5 * Math.sin(time / 2) - 12,
|
|
31
|
+
y: -0.5,
|
|
32
|
+
z: -10,
|
|
33
|
+
});
|
|
34
|
+
// Elevate platform
|
|
35
|
+
(_b = verticalMovePlatformRef.current) === null || _b === void 0 ? void 0 : _b.setNextKinematicTranslation({
|
|
36
|
+
x: -25,
|
|
37
|
+
y: 2 * Math.sin(time / 2) + 2,
|
|
38
|
+
z: 0,
|
|
39
|
+
});
|
|
40
|
+
(_c = verticalMovePlatformRef.current) === null || _c === void 0 ? void 0 : _c.setNextKinematicRotation(Qt.setFromAxisAngle(Y, time * 0.5));
|
|
41
|
+
// Rotate platform
|
|
42
|
+
(_d = rotatePlatformRef.current) === null || _d === void 0 ? void 0 : _d.setNextKinematicRotation(Qt.setFromAxisAngle(Y, time * 0.5));
|
|
43
|
+
// Rotate drum
|
|
44
|
+
(_e = rotationDrumRef.current) === null || _e === void 0 ? void 0 : _e.setNextKinematicRotation(Qt.setFromAxisAngle(X, time * 0.5));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return (_jsxs(GaeSupProps, { text: "dynamic", jumpPoint: true, position: [-10, 0, -10], children: [_jsxs(RigidBody, { type: "kinematicPosition", ref: sideMovePlatformRef, colliders: false, children: [_jsx(Text, { scale: 0.5, color: "black", maxWidth: 10, textAlign: "center", position: [0, 2.5, 0], children: "Kinematic Moving Platform" }), _jsx(CuboidCollider, { args: [2.5, 0.1, 2.5] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [5, 0.2, 5] }), _jsx("meshStandardMaterial", { color: "moccasin" })] })] }), _jsxs(RigidBody, { type: "kinematicPosition", position: [-25, 0, 0], ref: verticalMovePlatformRef, colliders: false, children: [_jsx(Text, { scale: 0.5, color: "black", maxWidth: 10, textAlign: "center", position: [0, 2.5, 0], rotation: [0, Math.PI / 2, 0], children: "Kinematic Elevating Platform" }), _jsx(CuboidCollider, { args: [2.5, 0.1, 2.5] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [5, 0.2, 5] }), _jsx("meshStandardMaterial", { color: "moccasin" })] })] }), _jsxs(RigidBody, { type: "kinematicPosition", position: [-25, -0.5, -10], ref: rotatePlatformRef, colliders: false, children: [_jsx(Text, { scale: 0.5, color: "black", maxWidth: 10, textAlign: "center", position: [0, 2.5, 0], children: "Kinematic Rotating Platform" }), _jsx(CuboidCollider, { args: [2.5, 0.1, 2.5] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [5, 0.2, 5] }), _jsx("meshStandardMaterial", { color: "moccasin" })] })] }), _jsx(Text, { scale: 0.5, color: "black", maxWidth: 10, textAlign: "center", position: [-15, 2.5, -15], children: "Kinematic Rotating Drum" }), _jsx(RigidBody, { colliders: false, type: "kinematicPosition", position: [-15, -1, -15], ref: rotationDrumRef, children: _jsxs("group", { rotation: [0, 0, Math.PI / 2], children: [_jsx(CylinderCollider, { args: [5, 1] }), _jsxs("mesh", { receiveShadow: true, children: [_jsx("cylinderGeometry", { args: [1, 1, 10] }), _jsx("meshStandardMaterial", { color: "moccasin" })] })] }) })] }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ray, RayColliderToi } from "@dimforge/rapier3d-compat";
|
|
2
|
+
import * as THREE from "three";
|
|
3
|
+
export type rayType = {
|
|
4
|
+
origin: THREE.Vector3;
|
|
5
|
+
dir: THREE.Vector3;
|
|
6
|
+
offset: THREE.Vector3;
|
|
7
|
+
springDir: THREE.Vector3;
|
|
8
|
+
velocity: THREE.Vector3;
|
|
9
|
+
hit: RayColliderToi | null;
|
|
10
|
+
parent: THREE.Object3D | null;
|
|
11
|
+
rayCast: Ray | null;
|
|
12
|
+
length: number;
|
|
13
|
+
};
|
|
14
|
+
export default function FloatMove(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useFrame } from "@react-three/fiber";
|
|
3
|
+
import { CuboidCollider, RigidBody, useRapier, vec3, } from "@react-three/rapier";
|
|
4
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
5
|
+
import GaeSupProps from "../../../src/gaesup/gaesupProps";
|
|
6
|
+
export default function FloatMove() {
|
|
7
|
+
// Preset
|
|
8
|
+
var cuboidColliderRef = useRef(null);
|
|
9
|
+
var rigidBodyRef = useRef(null);
|
|
10
|
+
var _a = useRapier(), rapier = _a.rapier, world = _a.world;
|
|
11
|
+
var ray = useMemo(function () {
|
|
12
|
+
return {
|
|
13
|
+
origin: vec3(),
|
|
14
|
+
dir: vec3({ x: 0, y: -1, z: 0 }),
|
|
15
|
+
offset: vec3(),
|
|
16
|
+
springDir: vec3(),
|
|
17
|
+
velocity: vec3(),
|
|
18
|
+
hit: null,
|
|
19
|
+
parent: null,
|
|
20
|
+
rayCast: null,
|
|
21
|
+
length: 0.8,
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
ray.rayCast = new rapier.Ray(ray.origin, ray.dir);
|
|
25
|
+
var movingDir = 1;
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
if (rigidBodyRef.current) {
|
|
28
|
+
rigidBodyRef.current.setEnabledRotations(false, true, false, false);
|
|
29
|
+
rigidBodyRef.current.setEnabledTranslations(true, true, false, false);
|
|
30
|
+
}
|
|
31
|
+
}, []);
|
|
32
|
+
useFrame(function () {
|
|
33
|
+
// Ray cast for moving platform
|
|
34
|
+
if (rigidBodyRef.current && ray.rayCast && cuboidColliderRef.current) {
|
|
35
|
+
ray.origin.set(rigidBodyRef.current.translation().x, rigidBodyRef.current.translation().y, rigidBodyRef.current.translation().z);
|
|
36
|
+
ray.hit = world.castRay(ray.rayCast, ray.length, false, undefined, undefined, cuboidColliderRef.current, rigidBodyRef.current);
|
|
37
|
+
// Apply moving velocity to the platform
|
|
38
|
+
if (rigidBodyRef.current.translation().x > 10) {
|
|
39
|
+
movingDir = -1;
|
|
40
|
+
}
|
|
41
|
+
else if (rigidBodyRef.current.translation().x < -5) {
|
|
42
|
+
movingDir = 1;
|
|
43
|
+
}
|
|
44
|
+
if (movingDir > 0) {
|
|
45
|
+
rigidBodyRef.current.setLinvel(ray.velocity.set(2, rigidBodyRef.current.linvel().y, 0), false);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
rigidBodyRef.current.setLinvel(ray.velocity.set(-2, rigidBodyRef.current.linvel().y, 0), false);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Ray for moving platform
|
|
52
|
+
if (ray.hit && rigidBodyRef.current) {
|
|
53
|
+
if (ray.hit.collider.parent()) {
|
|
54
|
+
var floatingForceMove = 2.5 * (0.8 - ray.hit.toi) - rigidBodyRef.current.linvel().y * 0.15;
|
|
55
|
+
rigidBodyRef.current.applyImpulse(vec3().set(0, floatingForceMove, 0), true);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return (_jsx(GaeSupProps, { text: "moving", jumpPoint: true, position: [0, 5, -17], children: _jsxs(RigidBody, { mass: 1, colliders: false, ref: rigidBodyRef, children: [_jsx(CuboidCollider, { args: [1.25, 0.1, 1.25], ref: cuboidColliderRef }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [2.5, 0.2, 2.5] }), _jsx("meshStandardMaterial", { color: "#d8fff6", transparent: true, opacity: 0.8 })] })] }) }));
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Floor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Grid, MeshReflectorMaterial } from "@react-three/drei";
|
|
4
|
+
import { RigidBody } from "@react-three/rapier";
|
|
5
|
+
export default function Floor() {
|
|
6
|
+
return (_jsxs(_Fragment, { children: [_jsx(Grid, { renderOrder: -1, position: [0, -0.8, 0], infiniteGrid: true, cellSize: 1, cellThickness: 1, sectionSize: 5, sectionThickness: 1.5, sectionColor: "#212121", fadeDistance: 300 }), _jsxs(RigidBody, { type: "fixed", children: [_jsxs("mesh", { receiveShadow: true, position: [0, -3.5, 0], children: [_jsx("boxGeometry", { args: [300, 5, 300] }), _jsx("meshStandardMaterial", { color: "lightblue" })] }), _jsxs("mesh", { receiveShadow: true, position: [0, -0.9, 0], rotation: [-Math.PI / 2, 0, 0], children: [_jsx("planeGeometry", { args: [300, 300] }), _jsx(MeshReflectorMaterial, { mirror: 0, blur: [300, 100], resolution: 2048, mixBlur: 1, mixStrength: 80, roughness: 1, depthScale: 1.2, minDepthThreshold: 0.4, maxDepthThreshold: 1.4, color: "#212121", metalness: 0.5 })] })] })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function RigidObjects(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { BallCollider, CuboidCollider, CylinderCollider, RigidBody, } from "@react-three/rapier";
|
|
4
|
+
import GaeSupProps from "../../../src/gaesup/gaesupProps";
|
|
5
|
+
export default function RigidObjects() {
|
|
6
|
+
return (_jsxs(GaeSupProps, { text: "RigidObjects", jumpPoint: true, position: [15, 1, 2], children: [_jsx(RigidBody, { position: [15, 1, 2], children: _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [0.5, 0.5, 0.5] }), _jsx("meshStandardMaterial", { color: "lightsteelblue" })] }) }), _jsx(RigidBody, { position: [15.1, 0, 2], children: _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [0.5, 0.5, 0.5] }), _jsx("meshStandardMaterial", { color: "lightsteelblue" })] }) }), _jsxs(RigidBody, { position: [15, 0, 0], colliders: false, children: [_jsx(CuboidCollider, { args: [0.5, 0.5, 0.5] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [1, 1, 1] }), _jsx("meshStandardMaterial", { color: "lightsteelblue" })] })] }), _jsxs(RigidBody, { position: [15, 0, -2], colliders: false, children: [_jsx(CuboidCollider, { args: [1.5 / 2, 1.5 / 2, 1.5 / 2] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [1.5, 1.5, 1.5] }), _jsx("meshStandardMaterial", { color: "lightsteelblue" })] })] }), _jsxs(RigidBody, { position: [15, 0, -5], colliders: false, children: [_jsx(CuboidCollider, { args: [1, 1, 1] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [2, 2, 2] }), _jsx("meshStandardMaterial", { color: "lightsteelblue" })] })] }), _jsxs(RigidBody, { colliders: false, position: [15, 5, -10], children: [_jsx(CylinderCollider, { args: [0.03, 2.5], position: [0, 0.25, 0] }), _jsx(BallCollider, { args: [0.25] }), _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("cylinderGeometry", { args: [2.5, 0.2, 0.5] }), _jsx("meshStandardMaterial", { color: "lightsteelblue" })] })] })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function RoughPlane(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useGLTF } from "@react-three/drei";
|
|
4
|
+
import { RigidBody } from "@react-three/rapier";
|
|
5
|
+
import { useEffect } from "react";
|
|
6
|
+
import * as THREE from "three";
|
|
7
|
+
import GaeSupProps from "../../../src/gaesup/gaesupProps";
|
|
8
|
+
import { S3 } from "../../../src/gaesup/utils/constant";
|
|
9
|
+
export default function RoughPlane() {
|
|
10
|
+
var roughPlane = useGLTF(S3 + "/roughPlane.glb");
|
|
11
|
+
useEffect(function () {
|
|
12
|
+
roughPlane.scene.traverse(function (child) {
|
|
13
|
+
if (child instanceof THREE.Mesh &&
|
|
14
|
+
child.material instanceof THREE.MeshStandardMaterial) {
|
|
15
|
+
child.receiveShadow = true;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, []);
|
|
19
|
+
return (_jsx(GaeSupProps, { text: "RoughPlane", jumpPoint: true, position: [10, -1, 10], children: _jsx(RigidBody, { type: "fixed", colliders: "trimesh", children: _jsx("primitive", { object: roughPlane.scene }) }) }));
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Slopes(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Html, useGLTF } from "@react-three/drei";
|
|
4
|
+
import { RigidBody } from "@react-three/rapier";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import * as THREE from "three";
|
|
7
|
+
import GaeSupProps from "../../../src/gaesup/gaesupProps";
|
|
8
|
+
import { S3 } from "../../../src/gaesup/utils/constant";
|
|
9
|
+
import { ControlledInput } from "./ControlledInput";
|
|
10
|
+
export default function Slopes() {
|
|
11
|
+
// Load models
|
|
12
|
+
var slopes = useGLTF(S3 + "/slopes.glb");
|
|
13
|
+
var _a = useState(25), angle = _a[0], setAngle = _a[1];
|
|
14
|
+
var rigidBodyRef = useRef(null);
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
// Receive Shadows
|
|
17
|
+
slopes.scene.traverse(function (child) {
|
|
18
|
+
if (child instanceof THREE.Mesh &&
|
|
19
|
+
child.material instanceof THREE.MeshStandardMaterial) {
|
|
20
|
+
child.receiveShadow = true;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}, []);
|
|
24
|
+
return (_jsxs(GaeSupProps, { text: "Slopes", jumpPoint: true, position: [-15, -0.8, 15], children: [_jsx(RigidBody, { type: "fixed", colliders: "hull", ref: rigidBodyRef, rotation: [-(angle * Math.PI) / 180, 0, 0], children: _jsxs("mesh", { receiveShadow: true, castShadow: true, children: [_jsx("boxGeometry", { args: [10, 1, 10] }), _jsx("meshBasicMaterial", { transparent: true, opacity: 0.9 })] }) }), _jsx(Html, { zIndexRange: [1, 0], children: _jsx(ControlledInput, { type: angle, onChange: function (e) {
|
|
25
|
+
return setAngle(e.target.value);
|
|
26
|
+
}, value: angle }) })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const input: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
export var input = style([
|
|
3
|
+
{
|
|
4
|
+
width: "20rem",
|
|
5
|
+
borderRadius: "1rem",
|
|
6
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
7
|
+
padding: "1rem 2rem",
|
|
8
|
+
color: "white",
|
|
9
|
+
boxShadow: "0 0 1rem rgba(0, 0, 0, 0.5)",
|
|
10
|
+
},
|
|
11
|
+
]);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Environment, KeyboardControls } from "@react-three/drei";
|
|
15
|
+
import { Canvas } from "@react-three/fiber";
|
|
16
|
+
import { Physics } from "@react-three/rapier";
|
|
17
|
+
import { useState } from "react";
|
|
18
|
+
import { isMobile } from "react-device-detect";
|
|
19
|
+
import GaesupController from "../../../src/gaesup/controller";
|
|
20
|
+
import GaeSupTools from "../../../src/gaesup/tools";
|
|
21
|
+
import { S3 } from "../../../src/gaesup/utils/constant";
|
|
22
|
+
import GaesupWorld from "../../../src/gaesup/world";
|
|
23
|
+
import FloatMove from "../platform/FloatMove";
|
|
24
|
+
import Floor from "../platform/Floor";
|
|
25
|
+
import RigidObjects from "../platform/RigidObjects";
|
|
26
|
+
import RoughPlane from "../platform/RoughPlane";
|
|
27
|
+
import * as style from "./style.css";
|
|
28
|
+
import { button } from "./style.css";
|
|
29
|
+
export var keyboardMap = [
|
|
30
|
+
{ name: "forward", keys: ["ArrowUp", "KeyW"] },
|
|
31
|
+
{ name: "backward", keys: ["ArrowDown", "KeyS"] },
|
|
32
|
+
{ name: "leftward", keys: ["ArrowLeft", "KeyA"] },
|
|
33
|
+
{ name: "rightward", keys: ["ArrowRight", "KeyD"] },
|
|
34
|
+
{ name: "space", keys: ["Space"] },
|
|
35
|
+
{ name: "shift", keys: ["Shift"] },
|
|
36
|
+
{ name: "keyZ", keys: ["KeyZ"] },
|
|
37
|
+
];
|
|
38
|
+
export default function Selected() {
|
|
39
|
+
var CHARACTER_URL = "./gaesupyee.glb";
|
|
40
|
+
var AIRPLANE_URL = "./airplane.glb";
|
|
41
|
+
var VEHICLE_URL = S3 + "/kart2.glb";
|
|
42
|
+
var _a = useState({
|
|
43
|
+
type: "character",
|
|
44
|
+
controller: isMobile ? "joystick" : "joystick",
|
|
45
|
+
}), mode = _a[0], changeMode = _a[1];
|
|
46
|
+
var _b = useState({
|
|
47
|
+
cameraType: "perspective",
|
|
48
|
+
controlType: "orbit",
|
|
49
|
+
}), camera = _b[0], changeCamera = _b[1];
|
|
50
|
+
return (_jsxs(GaesupWorld, { debug: true, mode: __assign({}, mode), url: {
|
|
51
|
+
characterUrl: CHARACTER_URL,
|
|
52
|
+
vehicleUrl: VEHICLE_URL,
|
|
53
|
+
airplaneUrl: AIRPLANE_URL,
|
|
54
|
+
}, children: [_jsx(GaeSupTools, {}), _jsxs("div", { className: style.mainButtonContainer, children: [_jsx("button", { className: button({
|
|
55
|
+
selected: mode.type === "character",
|
|
56
|
+
}), onClick: function () {
|
|
57
|
+
return changeMode(function (mode) { return ({
|
|
58
|
+
type: "character",
|
|
59
|
+
controller: mode.controller,
|
|
60
|
+
}); });
|
|
61
|
+
}, children: "CHARACTER" }), _jsx("button", { className: button({
|
|
62
|
+
selected: mode.type === "vehicle",
|
|
63
|
+
}), onClick: function () {
|
|
64
|
+
return changeMode(function (mode) { return ({
|
|
65
|
+
type: "vehicle",
|
|
66
|
+
controller: mode.controller,
|
|
67
|
+
}); });
|
|
68
|
+
}, children: "VEHICLE" }), _jsx("button", { className: button({
|
|
69
|
+
selected: mode.type === "airplane",
|
|
70
|
+
}), onClick: function () {
|
|
71
|
+
return changeMode(function (mode) { return ({
|
|
72
|
+
type: "airplane",
|
|
73
|
+
controller: mode.controller,
|
|
74
|
+
}); });
|
|
75
|
+
}, children: "AIRPLANE" }), _jsx("button", { className: button({
|
|
76
|
+
selected: camera.controlType === "normal",
|
|
77
|
+
}), onClick: function () {
|
|
78
|
+
return changeCamera(function () { return ({
|
|
79
|
+
cameraType: "perspective",
|
|
80
|
+
controlType: "normal",
|
|
81
|
+
}); });
|
|
82
|
+
}, children: "NORMAL" }), _jsx("button", { className: button({
|
|
83
|
+
selected: camera.controlType === "orbit" &&
|
|
84
|
+
camera.cameraType === "perspective",
|
|
85
|
+
}), onClick: function () {
|
|
86
|
+
return changeCamera(function () { return ({
|
|
87
|
+
cameraType: "perspective",
|
|
88
|
+
controlType: "orbit",
|
|
89
|
+
}); });
|
|
90
|
+
}, children: "ORBIT" }), _jsx("button", { className: button({
|
|
91
|
+
selected: camera.cameraType === "orthographic",
|
|
92
|
+
}), onClick: function () {
|
|
93
|
+
changeCamera(function () { return ({
|
|
94
|
+
cameraType: "orthographic",
|
|
95
|
+
controlType: "orbit",
|
|
96
|
+
}); });
|
|
97
|
+
}, children: "MAP" }), !isMobile && (_jsx("button", { className: button({
|
|
98
|
+
selected: mode.controller === "keyboard",
|
|
99
|
+
}), onClick: function () {
|
|
100
|
+
changeMode(function (mode) { return ({
|
|
101
|
+
type: mode.type,
|
|
102
|
+
controller: "keyboard",
|
|
103
|
+
}); });
|
|
104
|
+
}, children: "\uD0A4\uBCF4\uB4DC" })), _jsx("button", { className: button({
|
|
105
|
+
selected: mode.controller === "joystick",
|
|
106
|
+
}), onClick: function () {
|
|
107
|
+
changeMode(function (mode) { return ({
|
|
108
|
+
type: mode.type,
|
|
109
|
+
controller: "joystick",
|
|
110
|
+
}); });
|
|
111
|
+
}, children: "\uC870\uC774\uC2A4\uD2F1" }), _jsx("button", { className: button({
|
|
112
|
+
selected: mode.controller === "gameboy",
|
|
113
|
+
}), onClick: function () {
|
|
114
|
+
changeMode(function (mode) { return ({
|
|
115
|
+
type: mode.type,
|
|
116
|
+
controller: "gameboy",
|
|
117
|
+
}); });
|
|
118
|
+
}, children: "\uAC8C\uC784\uBCF4\uC774" })] }), _jsxs(Canvas, { shadows: true, dpr: [1, 2], style: { width: "100dvw", height: "100dvh" }, children: [_jsx(Environment, { background: true, preset: "sunset", blur: 0.8 }), _jsx("directionalLight", { castShadow: true, "shadow-normalBias": 0.06, position: [20, 30, 10], intensity: 0.5, "shadow-mapSize": [1024, 1024], "shadow-camera-near": 1, "shadow-camera-far": 50, "shadow-camera-top": 50, "shadow-camera-right": 50, "shadow-camera-bottom": -50, "shadow-camera-left": -50 }), _jsx("ambientLight", { intensity: 0.5 }), _jsxs(Physics, { debug: true, children: [_jsx(KeyboardControls, { map: keyboardMap, children: _jsx(GaesupController, { isRider: mode.type === "vehicle" ? true : false, cameraMode: __assign({}, camera), orthographicCamera: {
|
|
119
|
+
zoom: 80,
|
|
120
|
+
}, groupProps: {
|
|
121
|
+
rotation: [0, Math.PI, 0],
|
|
122
|
+
}, onAnimate: function (_a) {
|
|
123
|
+
var control = _a.control, states = _a.states, playAnimation = _a.playAnimation;
|
|
124
|
+
var keyZ = control.keyZ;
|
|
125
|
+
if (keyZ) {
|
|
126
|
+
states.isAnimationOuter = true;
|
|
127
|
+
playAnimation("greet");
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
states.isAnimationOuter = false;
|
|
131
|
+
}
|
|
132
|
+
} }) }), _jsx(RoughPlane, {}), _jsx(RigidObjects, {}), _jsx(FloatMove, {}), _jsx(Floor, {})] })] }), _jsx(GaeSupTools, { keyboardToolTip: {
|
|
133
|
+
keyBoardMap: keyboardMap,
|
|
134
|
+
keyBoardLabel: {
|
|
135
|
+
keyZ: "GREET",
|
|
136
|
+
space: "JUMP",
|
|
137
|
+
},
|
|
138
|
+
} })] }));
|
|
139
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var characterKeyboardMap = [
|
|
2
|
+
{ name: "forward", keys: ["ArrowUp", "KeyW"] },
|
|
3
|
+
{ name: "backward", keys: ["ArrowDown", "KeyS"] },
|
|
4
|
+
{ name: "leftward", keys: ["ArrowLeft", "KeyA"] },
|
|
5
|
+
{ name: "rightward", keys: ["ArrowRight", "KeyD"] },
|
|
6
|
+
{ name: "jump", keys: ["Space"] },
|
|
7
|
+
{ name: "run", keys: ["Shift"] },
|
|
8
|
+
{ name: "greet", keys: ["KeyZ"] },
|
|
9
|
+
];
|
|
10
|
+
export var vehicleKeyboardMap = [
|
|
11
|
+
{ name: "forward", keys: ["ArrowUp", "KeyW"] },
|
|
12
|
+
{ name: "backward", keys: ["ArrowDown", "KeyS"] },
|
|
13
|
+
{ name: "leftward", keys: ["ArrowLeft", "KeyA"] },
|
|
14
|
+
{ name: "rightward", keys: ["ArrowRight", "KeyD"] },
|
|
15
|
+
{ name: "space", keys: ["Space"] },
|
|
16
|
+
{ name: "shift", keys: ["Shift"] },
|
|
17
|
+
{ name: "keyZ", keys: ["KeyZ"] },
|
|
18
|
+
];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var vehicleKeyboardMap = [
|
|
2
|
+
{ name: "forward", keys: ["ArrowUp", "KeyW"] },
|
|
3
|
+
{ name: "backward", keys: ["ArrowDown", "KeyS"] },
|
|
4
|
+
{ name: "leftward", keys: ["ArrowLeft", "KeyA"] },
|
|
5
|
+
{ name: "rightward", keys: ["ArrowRight", "KeyD"] },
|
|
6
|
+
{ name: "brake", keys: ["Space"] },
|
|
7
|
+
{ name: "accel", keys: ["Shift"] },
|
|
8
|
+
];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const blackHanSans: string;
|
|
2
|
+
export declare const main: string;
|
|
3
|
+
export declare const mainButtonContainer: string;
|
|
4
|
+
export declare const button: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
5
|
+
selected: {
|
|
6
|
+
true: {
|
|
7
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
8
|
+
boxShadow: "0 0 1rem rgba(5,222,250,1)";
|
|
9
|
+
color: "black";
|
|
10
|
+
":hover": {
|
|
11
|
+
boxShadow: "0 0 2rem rgba(5,222,250,1)";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
character: {
|
|
16
|
+
true: {
|
|
17
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
+
boxShadow: "0 0 1rem rgba(5,222,250,1)";
|
|
19
|
+
color: "black";
|
|
20
|
+
":hover": {
|
|
21
|
+
boxShadow: "0 0 2rem rgba(5,222,250,1)";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
control: {
|
|
26
|
+
true: {
|
|
27
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
boxShadow: "0 0 1rem rgba(245,177,97,1)";
|
|
29
|
+
color: "black";
|
|
30
|
+
":hover": {
|
|
31
|
+
boxShadow: "0 0 2rem rrgba(245,177,97,1)";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}>;
|