function test(){
document.write(`
<div>
<script>
// Set up the scene
var scene = new THREE.Scene();
// Set up the camera
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 5;
// Set up the renderer
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
// Create blue material
var blueMaterial = new THREE.MeshBasicMaterial({ color: 0x0000ff });
// Create spheres
for (var i = 0; i < 6; i++) {
var geometry = new THREE.SphereGeometry(1, 32, 32);
var sphere = new THREE.Mesh(geometry, blueMaterial);
sphere.position.x = i * 2; // Adjust spacing between spheres
scene.add(sphere);
}
// Animation function
var animate = function () {
requestAnimationFrame(animate);
// Rotate spheres
scene.children.forEach(function (child) {
if (child instanceof THREE.Mesh) {
child.rotation.x += 0.01;
child.rotation.y += 0.01;
}
});
// Render the scene
renderer.render(scene, camera);
};
// Call the animate function
animate();
</script></div>`)
}
document.write(`
<h1>!?</h1>
<div id=entermessage>
Enter What you want say:
<input style='width:25vw;' maxlength='2000' NAME="message" id="message" VALUE='' >
<button onclick='test()' class=ab-normbutton >Send Message</button>
</div>
<div id=test>
<script src="https://threejs.org/build/three.js"></script>
<script id =output></script>
</div>
</div>
`)