premium-3d-website
Skill này làm gì
Hướng dẫn này dạy cách xây dựng các website 3D chất lượng cao và ấn tượng. Nó tập trung vào hiệu ứng hình ảnh nâng cao, tương tác chân thực và tối ưu để chạy mượt trên mọi thiết bị.
Khi nào nên dùng
- ✓Khi tạo một website sáng tạo có yếu tố 3D.
- ✓Khi thêm các hiệu ứng hình ảnh đặc biệt như phát sáng hoặc làm mờ.
- ✓Khi muốn các vật thể 3D phản ứng khi người dùng nhấp chuột hoặc di chuột qua.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/premium-3d-website/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm sao để một khối lập phương 3D phát sáng khi chuột di qua?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Cách làm là thiết lập nền tảng cho đồ họa 3D trên trình duyệt, thêm các hiệu ứng như phát sáng và làm mờ, rồi tích hợp vật lý để vật thể phản ứng với tương tác. Hướng dẫn cũng có mẹo để tải nhanh và tối ưu cho điện thoại.
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.
Premium 3D Website
Overview
This skill provides architectural guidelines and code patterns for developing premium, high-end 3D websites. It targets developers looking to implement advanced WebGL visual effects, custom shader pipelines, interactive physics elements, and immersive page transitions while maintaining high performance.
When to Use This Skill
- Use when designing premium or award-winning creative websites with 3D elements.
- Use when integrating Three.js, React Three Fiber (R3F), or Spline with custom shaders (GLSL).
- Use when implementing post-processing effects like bloom, depth-of-field, or custom film grain.
- Use when designing interactive preloaders and high-performance asset loading strategies.
- Use when optimizing complex 3D scenes for mobile responsiveness and performance.
How It Works
Step 1: Establish the Render Loop and Scene Architecture
Setting up a robust WebGL context with proper resize handling and performance-friendly pixel ratios is crucial. Keep pixel ratios capped at a maximum of 2 to avoid rendering too many pixels on high-DPI screens.
Step 2: Implement Shader Effects and Post-Processing
Incorporate post-processing pipelines (using EffectComposer or @react-three/postprocessing) to add bloom, chromatic aberration, depth of field, or film grain. Keep pass counts low and combine custom fragment shaders to minimize draw calls.
Step 3: Integrate Interactive Physics and Motion
Utilize physics frameworks (such as Cannon.js or Rapier) or procedural spring animations to make 3D objects react to mouse hover, drag, and click inputs with organic feedback.
Step 4: Asset Pipeline and Preloader
Optimize 3D models (using Draco compression) and load them using custom loading managers. Render interactive preloaders to entertain users while heavy assets are fetched in the background.
Examples
Example 1: Custom Post-processing in React Three Fiber (R3F)
import { Canvas } from '@react-three/fiber';
import { EffectComposer, Bloom, DepthOfField, Vignette } from '@react-three/postprocessing';
export default function PremiumComposer() {
return (
<Canvas dpr={[1, 2]} gl={{ powerPreference: "high-performance", antialias: false }}>
<ambientLight intensity={0.5} />
<mesh>
<boxGeometry />
<meshStandardMaterial emissive="orange" emissiveIntensity={2.0} />
</mesh>
<EffectComposer disableNormalPass>
<DepthOfField focusDistance={0} focalLength={0.02} bokehScale={2} height={480} />
<Bloom luminanceThreshold={0.3} luminanceSmoothing={0.9} height={300} />
<Vignette eskil={false} offset={0.1} darkness={1.1} />
</EffectComposer>
</Canvas>
);
}
Example 2: Custom GLSL Shader Material for Liquid/Wavy Effects
import * as THREE from 'three';
const CustomWavyMaterial = new THREE.ShaderMaterial({
vertexShader: `
varying vec2 vUv;
uniform float uTime;
void main() {
vUv = uv;
vec3 pos = position;
pos.z += sin(pos.x * 5.0 + uTime) * 0.1;
pos.z += cos(pos.y * 5.0 + uTime) * 0.1;
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
}
`,
fragmentShader: `
varying vec2 vUv;
uniform float uTime;
uniform vec3 uColor;
void main() {
float pulse = 0.5 + 0.5 * sin(uTime + vUv.x * 10.0);
gl_FragColor = vec4(uColor * pulse, 1.0);
}
`,
uniforms: {
uTime: { value: 0.0 },
uColor: { value: new THREE.Color('#3b82f6') }
}
});
Best Practices
- ✅ Set
dpr={[1, 2]}to restrict the device pixel ratio to a maximum of 2. - ✅ Disable antialiasing on the WebGLRenderer when post-processing is active to prevent double-aliasing performance penalties.
- ✅ Bake ambient occlusion, lighting, and shadows into textures using Blender or other 3D software instead of using dynamic lights and real-time shadows.
- ✅ Use instance rendering (
THREE.InstancedMeshor R3F<Instances>) for scenes containing multiple identical meshes. - ❌ Avoid using uncompressed GLTF/OBJ models. Always compress models using Draco or Meshopt.
- ❌ Avoid real-time shadow maps (such as
THREE.DirectionalLightShadow) on mobile or low-end devices due to the heavy performance overhead.
Limitations
- This skill does not replace environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, or safety boundaries are missing.
…
Câu hỏi thường gặp
Tại sao website 3D của tôi chạy chậm trên điện thoại?
Điều này có thể xảy ra nếu website cố hiển thị quá nhiều chi tiết. Bạn nên giới hạn chất lượng hình ảnh trên thiết bị di động và tắt các hiệu ứng không cần thiết.
Làm sao để website tải nhanh hơn?
Hãy dùng “preloader” để hiển thị một thứ hấp dẫn trong lúc các file 3D nặng đang tải. Đồng thời, tối ưu mô hình 3D để chúng nhẹ hơn.
“Shader” là gì?
Shader giống như các chỉ dẫn nhỏ, cho máy tính biết cách vẽ màu sắc và hiệu ứng trên bề mặt 3D, giúp tạo ra hình ảnh độc đáo và tùy chỉnh.
Chi tiết
Mô tả gốc của tác giả
Guidelines for building premium 3D websites, focusing on custom WebGL shaders, post-processing, physics-based interactions, smooth animations, preloaders, and device optimization.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5490
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.