Notice: file_put_contents(): Write of 6105 bytes failed with errno=28 No space left on device in /var/www/tgoop/post.php on line 50

Warning: file_put_contents(): Only 12288 of 18393 bytes written, possibly out of free disk space in /var/www/tgoop/post.php on line 50
NEXT CODE@nextcode1 P.220
NEXTCODE1 Telegram 220
سورس کد کره 👇


<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>کره زمین</title>
<style>
body, html {
margin: 0; padding: 0; overflow: hidden;
background: black;
height: 100vh;
display: flex; justify-content: center; align-items: center;
}
#container {
width: 500px;
height: 500px;
}
</style>
</head>
<body>
<div id="container"></div>

<script src="https://photo2.tgoop.com/u/cdn.jsdelivr.net/npm/three@0.153.0/build/three.min.js"></script>

<script>
const container = document.getElementById('container');
const scene = new THREE.Scene();

const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 1000);
camera.position.z = 3;

const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(500, 500);
container.appendChild(renderer.domElement);

const ambientLight = new THREE.AmbientLight(0xffffff, 0.7);
scene.add(ambientLight);

const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);
directionalLight.position.set(5, 3, 5);
scene.add(directionalLight);

const geometry = new THREE.SphereGeometry(1, 64, 64);
const loader = new THREE.TextureLoader();

const earthTexture = loader.load('https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg');

const bumpTexture = loader.load('https://raw.githubusercontent.com/turban/webgl-earth/master/images/elev_bump_4k.jpg');

const material = new THREE.MeshPhongMaterial({
map: earthTexture,
bumpMap: bumpTexture,
bumpScale: 0.05,
shininess: 10
});

const earth = new THREE.Mesh(geometry, material);
scene.add(earth);

let isDragging = false;
let previousMousePosition = { x: 0, y: 0 };
let rotation = { x: 0, y: 0 };

renderer.domElement.addEventListener('mousedown', function(e) {
isDragging = true;
previousMousePosition = { x: e.clientX, y: e.clientY };
});

renderer.domElement.addEventListener('mouseup', function() {
isDragging = false;
});

renderer.domElement.addEventListener('mousemove', function(e) {
if (isDragging) {
const deltaMove = {
x: e.clientX - previousMousePosition.x,
y: e.clientY - previousMousePosition.y
};
rotation.y += deltaMove.x * 0.005;
rotation.x += deltaMove.y * 0.005;
rotation.x = Math.min(Math.max(rotation.x, -Math.PI / 2), Math.PI / 2);
previousMousePosition = { x: e.clientX, y: e.clientY };
}
});

let autoRotateSpeed = 0.002;

function animate() {
requestAnimationFrame(animate);
if (!isDragging) {
rotation.y += autoRotateSpeed;
}
earth.rotation.y = rotation.y;
earth.rotation.x = rotation.x;
renderer.render(scene, camera);
}

animate();
</script>
</body>
</html>


اگه خوب هست ری اکشن بدید
3👍1



tgoop.com/nextcode1/220
Create:
Last Update:

سورس کد کره 👇


<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>کره زمین</title>
<style>
body, html {
margin: 0; padding: 0; overflow: hidden;
background: black;
height: 100vh;
display: flex; justify-content: center; align-items: center;
}
#container {
width: 500px;
height: 500px;
}
</style>
</head>
<body>
<div id="container"></div>

<script src="https://photo2.tgoop.com/u/cdn.jsdelivr.net/npm/three@0.153.0/build/three.min.js"></script>

<script>
const container = document.getElementById('container');
const scene = new THREE.Scene();

const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 1000);
camera.position.z = 3;

const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(500, 500);
container.appendChild(renderer.domElement);

const ambientLight = new THREE.AmbientLight(0xffffff, 0.7);
scene.add(ambientLight);

const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);
directionalLight.position.set(5, 3, 5);
scene.add(directionalLight);

const geometry = new THREE.SphereGeometry(1, 64, 64);
const loader = new THREE.TextureLoader();

const earthTexture = loader.load('https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg');

const bumpTexture = loader.load('https://raw.githubusercontent.com/turban/webgl-earth/master/images/elev_bump_4k.jpg');

const material = new THREE.MeshPhongMaterial({
map: earthTexture,
bumpMap: bumpTexture,
bumpScale: 0.05,
shininess: 10
});

const earth = new THREE.Mesh(geometry, material);
scene.add(earth);

let isDragging = false;
let previousMousePosition = { x: 0, y: 0 };
let rotation = { x: 0, y: 0 };

renderer.domElement.addEventListener('mousedown', function(e) {
isDragging = true;
previousMousePosition = { x: e.clientX, y: e.clientY };
});

renderer.domElement.addEventListener('mouseup', function() {
isDragging = false;
});

renderer.domElement.addEventListener('mousemove', function(e) {
if (isDragging) {
const deltaMove = {
x: e.clientX - previousMousePosition.x,
y: e.clientY - previousMousePosition.y
};
rotation.y += deltaMove.x * 0.005;
rotation.x += deltaMove.y * 0.005;
rotation.x = Math.min(Math.max(rotation.x, -Math.PI / 2), Math.PI / 2);
previousMousePosition = { x: e.clientX, y: e.clientY };
}
});

let autoRotateSpeed = 0.002;

function animate() {
requestAnimationFrame(animate);
if (!isDragging) {
rotation.y += autoRotateSpeed;
}
earth.rotation.y = rotation.y;
earth.rotation.x = rotation.x;
renderer.render(scene, camera);
}

animate();
</script>
</body>
</html>


اگه خوب هست ری اکشن بدید

BY NEXT CODE


Share with your friend now:
tgoop.com/nextcode1/220

View MORE
Open in Telegram


Telegram News

Date: |

The creator of the channel becomes its administrator by default. If you need help managing your channel, you can add more administrators from your subscriber base. You can provide each admin with limited or full rights to manage the channel. For example, you can allow an administrator to publish and edit content while withholding the right to add new subscribers. How to Create a Private or Public Channel on Telegram? Find your optimal posting schedule and stick to it. The peak posting times include 8 am, 6 pm, and 8 pm on social media. Try to publish serious stuff in the morning and leave less demanding content later in the day. With the “Bear Market Screaming Therapy Group,” we’ve now transcended language. Invite up to 200 users from your contacts to join your channel
from us


Telegram NEXT CODE
FROM American