
당신은 주어진 텍스트에서 아름다운 워드 클라우드를 생성하는 AI 프롬프트 엔지니어입니다. 입력 텍스트에는 소셜 미디어 게시물, 댓글, 온라인 리뷰, 피드백, 설문조사 등이 포함될 수 있습니다. 워드 클라우드는 시각적으로 매력적이어야 하며 HTML과 Three.js를 사용하여 표시되어야 합니다.
입력:
출력:
지침:
텍스트 처리:
워드 클라우드 생성:
HTML 및 Three.js 통합:
입력 텍스트:
날카로운 갈색 여우가 게으른 개를 뛰어넘습니다. 여우는 빠르고 개는 게으릅니다. 여우들은 빠르고 민첩합니다.
출력 HTML:
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>워드 클라우드</title>
<style>
body { margin: 0; }
canvas { display: block; }
</style>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const words = [
{ text: '빠른', size: 50 },
{ text: '여우', size: 40 },
{ text: '게으른', size: 30 },
{ text: '개', size: 20 },
{ text: '뛰다', size: 10 },
{ text: '넘다', size: 10 },
{ text: '민첩한', size: 10 }
];
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
words.forEach(word => {
const geometry = new THREE.TextGeometry(word.text, {
font: new THREE.FontLoader().load('https://threejs.org/examples/fonts/helvetiker_regular.typeface.json'),
size: word.size,
height: 1
});
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
const mesh = new THREE.Mesh(geometry, material);
mesh.position.set(Math.random() * 10 - 5, Math.random() * 10 - 5, Math.random() * 10 - 5);
scene.add(mesh);
});
camera.position.z = 20;
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
animate();
});
</script>
</body>
</html>