새로운 Sprite2D 인스턴스를 생성합니다.
RedGPU 렌더링 컨텍스트
Optional
material: any스프라이트에 적용할 머티리얼 (옵션)
그림자 캐스팅 여부
메시의 디스플레이스먼트 텍스처
이 객체의 모델 행렬입니다. 위치, 회전, 스케일 변환에 사용됩니다.
Retrieves the GPU device associated with the current instance.
The GPU device.
스프라이트의 높이를 반환합니다.
현재 높이 값
자식 객체의 개수를 반환합니다.
자식 수
설정된 부모 객체값을 반환합니다.
Retrieves the UUID of the object.
The UUID of the object.
스프라이트의 너비를 반환합니다.
현재 너비 값
Fires the dirty listeners list.
Optional
resetList: boolean = falseIndicates whether to reset the dirty listeners list after firing.
Optional
targetY: numberOptional
targetZ: numberOptional
y: numberOptional
y: numberOptional
z: numberOptional
rotationY: numberOptional
rotationZ: numberOptional
y: numberOptional
y: numberOptional
z: number스프라이트의 크기를 설정합니다.
설정할 너비 값
Optional
height: number설정할 높이 값 (옵션, 생략 시 너비와 같은 값 사용)
두 인덱스의 자식 객체 위치를 서로 바꿉니다.
첫 번째 인덱스
두 번째 인덱스
2D 스프라이트 렌더링을 위한 클래스
Sprite2D는 2D 게임이나 UI 요소를 렌더링하기 위한 클래스입니다. 평면 지오메트리를 기반으로 하며, 너비와 높이를 동적으로 조절할 수 있습니다
아래는 Sprite2D의 구조와 동작을 이해하는 데 도움이 되는 추가 샘플 예제 목록입니다.
See