Loading...
Loading...
Lưới ảnh WebGL (Three.js) cuộn/kéo VÔ HẠN qua coordinate-wrapping — kéo hoặc cuộn dịch một offset ảo, vị trí mesh tính lại bằng modulo nên lưới trông vô hạn dù chỉ có N×N tile thật tồn tại. Gọi khi user nói "lưới ảnh vô hạn", "infinite scroll grid webgl", "draggable image wall", "poster wall cuộn vô hạn", hoặc /infinite-webgl-grid. KHÁC `skills/threejs-particle-morph` (particle rời rạc HỘI TỤ thành 1 ảnh theo tiến độ scroll, có "đích" cố định — đây là LƯỚI tile duyệt liên tục, không có đích) và KHÁC `skills/blur` (chuyển ảnh nọ sang ảnh kia trên 1 plane, không phải duyệt lưới nhiều ảnh).
npx skill4agent add rheinmir/setup infinite-webgl-gridRheinmir/uiux-assetthreejs-particle-morphbluroffset ảo (kéo/cuộn/inertia) → mỗi mesh cố định: wrap(localX - offset.x) → vị trí hiển thị → chỉ số tile ảo đổi → đổi material.map từ pool texture cố định| Field | Required? | Ý nghĩa | |
|---|---|---|---|
| In | ảnh/nội dung + màu | không | thiếu → demo tự vẽ placeholder canvas, chạy offline |
| In | ràng buộc dự án: được kéo lib/file ngoài không | có | được → bản gốc; không → |
| In | | không | tham số khởi tạo |
| Out | file | có | giữ comment ghi công dòng đầu nếu là bản gốc |
| Out | bằng chứng verify Playwright | có | ảnh trước/giữa/sau khi kéo 4 hướng + console sạch |
gridSize=7material.mappoolSizewheelpointermove{ passive: false }preventDefault()preventDefault()touch-action: nonepreventDefaultPerspectiveCameraplaywright-verifyassets/assets/file://touch-action: nonethreejs-particle-morphblur| Step | Type | Inputs | Action | Outputs/exit | Failure/next |
|---|---|---|---|---|---|
| W01 | judgment | yêu cầu | Xác nhận đúng skill (lưới duyệt vô hạn, không có đích) và chọn bản gốc hay | nguồn đã chọn | không được kéo lib ngoài → B01 |
| W02 | effect | pen gốc | Mở link chạy xem hiệu ứng → copy nguyên file | file trong dự án | — |
| W03 | judgment | file đã copy | Chỉ sửa nội dung/ảnh/màu | file đã adapt | — |
| W04 | effect | file | Chạy local qua HTTP, không | trang chạy | lỗi asset → kiểm lại đường dẫn |
| W05 | deterministic | trang | Verify bằng | ảnh + console sạch | lỗi → sửa, lặp W04 |
Rheinmir/uiux-asset.html_assets/file://git clone --depth 1 https://github.com/Rheinmir/uiux-asset| Pen gốc — tác giả | Link |
|---|---|
| Infinite Scrollable and Draggable WebGL Grid — ReGGae | chạy · code |
| Infinite 3D Poster Scroll Wall — photodow | chạy · code |
| Infinite Scrolling with Image Cards — jkantner | chạy · code |
assets/| ID | Kind | Guard | Hành vi | Skip / failure | Rejoin |
|---|---|---|---|---|---|
| B01 | conditional_required | dự án KHÔNG được kéo lib ngoài | dùng | — | W04 |
| B02 | user_optional | cần hiệu ứng chiều sâu | đổi Ortho sang | — | W05 |
| B03 | conditional_required | cần nhiều ảnh khác nhau hơn số tile hiển thị | dùng texture atlas (đổi UV offset) thay vì tăng | — | W05 |
infinite-3d-poster-scroll-wall.htmlRheinmir/uiux-assetassets/demo.jswheel{ passive: false }preventDefault()touch-action: noneassets/demo.htmlassets/demo.cssassets/demo.jsgridSizetileSizegappoolSizeInfiniteGrid_drawPlaceholder()THREE.TextureLoadergridSize × gridSizePlaneGeometryoffset.x/offset.ylocalX/localYwrap(localX - offset.x)wrap(raw) = ((raw + half) % full + full) % full - halffull = gridSize*pitchhalf = full/2material.mapwrapped_position + offsetpitchpoolSizeTHREE.TextureLoader<canvas>canvas.toDataURL()THREE.TextureLoader.load(dataUrl)velocityoffset += velocity; velocity *= damping (0.92)destroy()