suhong99 / goodluck Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://goodluck-steel.vercel.app
Home Page: https://goodluck-steel.vercel.app
구상)
각각의 구역마다 성공확률 차별화
shiba가 돌아다니면서 event를 발생
useCannon 활용하기
강화 firebase 설정하기
client side 컴퍼넌트에서도 유저 정보 가져오기
이슈를 확인해보니 chrome extension과 충돌이 일으켜서 그런 것이었다. 해당 extension오류로 extension삭제시 정상작동
#80 연관
가장 최근 20개의 강화내역 기록하기
바퀴가 작을경우 몸체가 진행시에 바닥에 부딛혀서 감속됨
힘 부족으로 언덕 못 올라가서 엔진 힘 추가..
전복되었을 때를 위한 일으키기 기능 추가
이벤트 생성하기
좌표를 통한 구분
문제점 : 점프를 한 다음에 이벤트가 발생되는 상황이 애매함. 충돌을 통해 착지를 감지해야하나??
모달을 통해 우선 이벤트가 나오게 했음.
관련 이미지, 확률 태그를 통해 모달 디자인 하기
[feat] 확률 입력 및 성공 여부 알려주는 기능 추가 ( 기본 값은 60퍼)
5월1일 초기화
3d 요소 초기 렌더링 걸릴 떄 로딩처리
필기합격^_^
가이드 내용 추가
만약 다시 보지 않기 클릭 되었을 경우 메뉴얼 생략
#92 에서 테스트 용으로 바꿨떤 이벤트 시간도 돌리기
시바 이벤트 firestore에 저장
시바 캐릭터 회전이동..
언덕, 집, 계단, 다리 다시 만들기 (혼합체로)
값, 계산, 액션으로 관심사 분리하기
현재로직 : 바라보고 있는 방향으로 전진
문제점 : 오르막길을 제대로 전진하지 못함. --> 경사 문제였음.
https://github.com/pmndrs/drei/blob/master/src/core/SpotLight.tsx
빛이 주변에 퍼지게 할려면 빛이 반사될 물체도 필요함.. 이를 위의 코드 보고 추후 반영
움직일 경우 이벤트 적용하기 (2번 채택)
const handleCollision = (e) => {
if (e.collisionFilters.bodyFilterGroup === 5) {
//code
}
};
const checkMapType = () => {
const chassisPosition = new Vector3().setFromMatrixPosition(
chassisBody.current!.matrixWorld
);
// 강 y가 1보다 작은경우 그 중에서 x가 10.5보다 크고 z가 3.5가 큰 경우는 언덕
// x가 2.5보다크면 언덕 작으면 집
};
zustand를 활용하여 이벤트 여부 전역변수 관리
공용 컴퍼넌트 모달 생성
위치를 통해서 감지를 하는데, 강 위에 떠 있는 경우가 애매함.
해결방법 : 점프 와 착지 상태를 나눈다..
점프 중일 때는 이벤트가 발생하지 않도록
착지 이후 부터 발생하도록
그런데 착지라는 정의가 애매함.. -> 충돌하였을 때를 착지로 고려..
문제점 : 각도가 죄측 90도 이동시 -파이/2 우측 90도 이동시 + 파이/2 로 회전값을 가진다.
그렇기 때문에 경계점에서 반대로 계산을 하지 않으면, 90도 이상 회전을 안함.
해결방법 :
rx >= 0 ? (ry -= delta) : (ry += delta);
경계점에서 rx의 부호가 음과 양으로 달라짐을 확인하고 이를 통해서 조건ㅁ누을 통해 계산
전체 이벤트 중 미획득 획득 구별하기
키조작 및 간단한 가이드라인 만들기
바닥에 글자로 wasd space 알려주기
카메라가 캐릭터 따라다닐떄 orbit조정가능하게|
ref의 타입 참고
이동 함수 훅으로 분리 및 2가지 방법 모두 남기기
[x] 집에 충돌체 만들기
[x] 언덕 만들기
[x] 투명 바닥만들기
[x] 투명 벽으로 감싸기
[x] 다리
62-4 버그 픽스
schteppe/cannon.js#149
function calculateNormal(v0, v1, v2) {
const vector1 = [v1[0] - v0[0], v1[1] - v0[1], v1[2] - v0[2]];
const vector2 = [v2[0] - v0[0], v2[1] - v0[1], v2[2] - v0[2]];
const normal = [
vector1[1] * vector2[2] - vector1[2] * vector2[1],
vector1[2] * vector2[0] - vector1[0] * vector2[2],
vector1[0] * vector2[1] - vector1[1] * vector2[0],
];
const length = Math.sqrt(
normal[0] * normal[0] + normal[1] * normal[1] + normal[2] * normal[2]
);
return [normal[0] / length, normal[1] / length, normal[2] / length];
}
const normals = faces.map((face) => {
const [v0, v1, v2] = face.map((index) => vertices[index]);
return calculateNormal(v0, v1, v2);
});
console.log(normals, 'normals');
해당 값을 반영했지만 충돌이 제대로 안됨
이동
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.