Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)7.2k · #13409

build-wireframe-scan-reveal

Skill này làm gì

Skill này hướng dẫn agent xây dựng hiệu ứng xuất hiện 3D, trong đó một làn sóng quét qua mô hình và vẽ đường viền trước. Nó dành cho các đội muốn một phần giới thiệu kỹ thuật cho vật thể 3D.

Khi nào nên dùng

  • ✓Khi bạn muốn một mô hình 3D xuất hiện với hiệu ứng quét hoặc khảo sát.
  • ✓Khi một hiệu ứng mờ dần thông thường không thể hiện rõ hình dạng vật thể.
  • ✓Khi bạn muốn một phần mở đầu kiểu holographic cho một hero hoặc phần giới thiệu.

Liên kết skill

https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/build-wireframe-scan-reveal/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/build-wireframe-scan-reveal/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm cho sản phẩm 3D của tôi xuất hiện bằng một làn sóng quét, vẽ khung dây trước rồi đến bề mặt đặc.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent dựng phiên bản khung dây và phiên bản đặc của cùng một hình. Một làn sóng mở rộng dùng chung sẽ hiện đường viền trước rồi đến bề mặt đặc, và khung dây tạm thời được gỡ bỏ khi xong.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Build a Wireframe Scan Reveal

Make one world-space wavefront conduct both representations: draw topology at the front, hold the solid behind it, then remove the temporary cage. Reach for technical-wireframe-info-layout when wireframe is the page's permanent visual language; reach for animation-on-scroll when the conductor is DOM scroll rather than a 3D wave.

Extracted from inner-green-3d.html, where a survey pulse had to grow a procedural moss root through cards and type without reading as a circular mask.

Pair two representations

Create the solid mesh and a temporary LineSegments cage from the same source geometry. Share uScanOrigin, uScanRadius, and time between their materials. Keep both in world space; local-space distance changes when a group is scaled or nested and tears the two fronts apart.

Discard the solid beyond the front, with a lag that leaves the cage visible first:

uniform vec3 uScanOrigin;
uniform float uScanRadius;
uniform float uScanEnabled;

bool unscanned(vec3 worldPosition, float lag) {
  if (uScanEnabled < 0.5) return false;
  float wobble =
      sin(worldPosition.y * 0.011 + worldPosition.x * 0.007) * 36.0
    + sin(worldPosition.z * 0.021 + worldPosition.y * 0.013) * 17.0;
  return distance(worldPosition, uScanOrigin)
       > uScanRadius - lag + wobble;
}

// In the solid fragment shader:
if (unscanned(vWorldPosition, 520.0)) discard;

Use one origin outside the silhouette, usually low and left. A centered origin reads as a loading ring. Keep the two long sine terms; a perfectly circular front reads as a clip-path, while high-frequency noise makes the edge sparkle.

Make the cage ride the front

Measure each line fragment against the same radius:

float distanceFromOrigin = distance(vWorldPosition, uScanOrigin);
float rim = exp(-pow((distanceFromOrigin - uScanRadius) / 135.0, 2.0));
float trail = smoothstep(uScanRadius, uScanRadius - 950.0, distanceFromOrigin);
float alpha = (rim * 1.60 + trail * 0.34) * uWireOpacity;

Use additive blending, transparent: true, depthWrite: false, and a pale version of the scene accent. Keep depth testing on unless the cage must read through the object. Turning depth test off exposes the back half of dense topology and produces a bright unreadable ball.

Animate one conductor

Use the landed timing as a starting point:

parameter default failure prevented
duration 3.4 s a fast reveal reads as a flash
radius easing 1 - (1 - t)^1.35 linear travel stalls visually near the far corner
solid lag 520 world units zero lag makes wire and fill arrive as one wipe
rim width 135 units a narrow rim aliases; a wide rim becomes fog
wire trail 950 units no trail hides topology before it can be read
wire fade smoothstep(.72, 1, t) persistent cage competes with the finished surface
radius reach scene diagonal × 1.3 + 900 the far corner remains clipped after completion

Snap the cage on over the first 6% of the timeline, then fade it during the final 28%:

const e = Math.min(1, elapsed / 3.4);
scanRadius.value = easeOutPow(e) * maxRadius;
wireOpacity.value = Math.min(1, e / 0.06) * (1 - smoothstep(0.72, 1, e));

At completion, disable the discard branch, remove the cage, and dispose its geometry and material. Hiding it with opacity leaves duplicate geometry and shader work alive for the rest of the page.

Stage and size the scan

Resolve maxRadius after layout and after parent matrices update. Use a ResizeObserver, guard zero-sized roots, update the camera projection, then recompute the origin and farthest reach. A one-time measurement before fonts or layout settle leaves the last corner unrevealed.

Keep the demo's scene recognisable: grey-green field, bottom light pool, white editorial type, pale cards, and the root-shaped form. The staging belongs in the demo; the reusable skill is only the paired representations and shared conductor.

Respect motion and lifecycle

  • Under prefers-reduced-motion: reduce, render a designed diagnostic still at about 62% radius with both cage and solid visible. Let the replay control recompose that still and announce the state; do not hide the scene.
  • Clamp dt to 1/30 s. Reset the time base after a hidden tab or offscreen section resumes.
  • Pause on document.hidden and when an IntersectionObserver says the section is offscreen.
  • Cap device pixel ratio at 2.
  • Expose replay
Câu hỏi thường gặp

Vì sao hiện khung dây trước?

Nó giải thích hình dạng vật thể trước khi bề mặt đặc xuất hiện, điều này có thể có ý nghĩa hơn một hiệu ứng mờ dần đơn giản.

Có cần cuộn không?

Không. Skill này nói về hiệu ứng sóng 3D. Một skill khác bao gồm hoạt ảnh liên kết với cuộn.

Khung dây có tồn tại mãi không?

Không. Skill gỡ lớp lồng tạm sau khi hiệu ứng kết thúc, nên vật thể cuối cùng là đặc.

Chi tiết

Mô tả gốc của tác giả

Reveal Three.js geometry with an expanding world-space scan whose wire cage leads the solid surface, then burns away. Use for wireframe scanning, radial mesh reveals, survey pulses, holographic assembly, topology intros, and 3D model entrances where a plain opacity wipe does not explain the form.

repo: MengTo/Skills

Độ phổ biến

Sao GitHub
7.2k
Vị trí xếp hạng
#13409
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự