njin
Engine 2D gọn nhẹ để tự tay làm game theo ý mình. Vibe coding cũng ổn luôn
Loading...
Searching...
No Matches
njin::shape3d_render Struct Tham chiếu

Component: một hình SDF (như draw_shape3d()) vẽ tại njin::transform3d của entity, trong mọi lần vẽ 3D có camera3d::entities. Tiếp...

#include <njin_3d.h>

Các thuộc tính Public

shape3d shape {}
 Loại hình và kích thước.
rgba color {1.0f, 1.0f, 1.0f, 1.0f}
 Màu.
material3d material {}
 Bề mặt, như material3d_set().
fx3d fx {}
 Nháy màu và tan biến, như fx3d_set().
bool visible = true
 Ẩn mà không cần gỡ component.

Mô tả chi tiết

Component: một hình SDF (như draw_shape3d()) vẽ tại njin::transform3d của entity, trong mọi lần vẽ 3D có camera3d::entities.

Vị trí và góc xoay lấy từ transform (shape.position và shape.rotation bị bỏ qua), nên một entity có thêm njin::body3d được vẽ đúng chỗ vật lý đặt nó.