Filter
Exclude
Time range
-
Near
South America is waking up to the destruction of left-wing policies. L'Amérique du Sud se réveille à la destruction des politiques de gauche. @visegrad24 #SouthAmerica #MoveRight #NoMoreLeftists
South America made a major shift towards right-wing/conservative governments in the past year, with Bolivia, Chile, and Honduras electing right-wing candidates. It is speculated that Brazil and Colombia may be next in electing right-wing leaders, which would make nearly all of South America right-wing/conservative as opposed to left-wing/socialist/communist.
3
32
Every startup guru says - "Move fast and break things." I watched that advice break creators at billion dollar scale. Zyaku says - Move right. Fix things. Protect people. → zyaku.com #Zyaku #Founder #CEO #MoveRight #GlobalTech #BuildInPublic
1
2
29
If you see lights flashing, we’re not batting our eyelashes at you. That “woo-woo” is not a whistle. That’s the Siren. Sirens= EMERGENCY when you see them move to the right. ➡️❤️🚒 #MoveRight #WSFire
1
2
13
968
Replying to @AntiLeftMemes
HE YES, I WOULD SUPPORT IT and I would moveright out of here. I would love to watch the LUCIFERIAN MARXISTS suffer as the whole place collapsed... I'm planning the getaway from here as we speak.
1
2
1 Dec 2025
If you're traveling 95 S/B in front of the mall, please #moveright to avoid the accident. The left two lanes are blocked. #slowdown
1
13
2,177
13 Oct 2025
Video i made of this code below sped up 2x to some kind of space-like song: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Ethereal Quantum Skybox</title> <link rel="icon" href="data:,"> <!-- Favicon 404 fix --> <style> body { margin: 0; overflow: hidden; background: #000; } canvas { display: block; } </style> <script src="cdnjs.cloudflare.com/ajax/li…"></script> <script src="unpkg.com/three@0.134.0/exam…"></script> <script src="unpkg.com/three@0.134.0/exam…"></script> <script src="unpkg.com/three@0.134.0/exam…"></script> <script src="unpkg.com/three@0.134.0/exam…"></script> <script src="unpkg.com/three@0.134.0/exam…"></script> <script src="unpkg.com/three@0.134.0/exam…"></script> </head> <body oncontextmenu="return false;"> <!-- Disable right-click pop-ups --> <script> // Ensure Three.js is loaded if (typeof THREE === 'undefined' || typeof THREE.EffectComposer === 'undefined') { console.error('Three.js or post-processing libraries failed to load. Check your internet connection or CDN.'); alert('Three.js or post-processing libraries not loaded. Please check your connection or contact support.'); } else { // Main scene setup const mainScene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true }); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // Environment map scene setup const envScene = new THREE.Scene(); const cubeRenderTarget = new THREE.WebGLCubeRenderTarget(512, { format: THREE.RGBFormat, generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter }); const cubeCamera = new THREE.CubeCamera(1, 1000, cubeRenderTarget); cubeCamera.position.copy(camera.position); // Add lighting for cosmic ambiance const pointLight = new THREE.PointLight(0x00ffff, 0.8, 100); // Cyan light pointLight.position.set(0, 5, 0); envScene.add(pointLight); const ambientLight = new THREE.AmbientLight(0x100010, 0.2); // Subtle purple ambient mainScene.add(ambientLight); // Dynamic skybox with enhanced GLSL nebula shader const skyboxGeometry = new THREE.BoxGeometry(100, 100, 100); const skyboxMaterial = new THREE.ShaderMaterial({ uniforms: { time: { value: 0.0 }, resolution: { value: new THREE.Vector2(window.innerWidth, window.innerHeight) } }, vertexShader: ` varying vec2 vUv; varying vec3 vNormal; void main() { vUv = uv; vNormal = normalize(position); gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } `, fragmentShader: ` uniform float time; uniform vec2 resolution; varying vec2 vUv; varying vec3 vNormal; // Simple noise function float noise(vec3 p) { return fract(sin(dot(p, vec3(127.1, 311.7, 74.7))) * 43758.5453); } // Perlin noise (3D) float perlin(vec3 p) { vec3 i = floor(p); vec3 f = fract(p); vec3 u = f * f * (3.0 - 2.0 * f); return mix(mix(mix(noise(i vec3(0.0, 0.0, 0.0)), noise(i vec3(1.0, 0.0, 0.0)), u.x), mix(noise(i vec3(0.0, 1.0, 0.0)), noise(i vec3(1.0, 1.0, 0.0)), u.x), u.y), mix(mix(noise(i vec3(0.0, 0.0, 1.0)), noise(i vec3(1.0, 0.0, 1.0)), u.x), mix(noise(i vec3(0.0, 1.0, 1.0)), noise(i vec3(1.0, 1.0, 1.0)), u.x), u.y), u.z); } // Layered noise for nebula depth float fbm(vec3 p) { float v = 0.0; float a = 0.5; vec3 shift = vec3(100.0); for (int i = 0; i < 6; i) { v = a * perlin(p); p = p * 2.0 shift; a *= 0.5; } return v; } // Twinkling stars float twinklingStars(vec3 dir) { float density = (abs(dir.y) > 0.9) ? 0.005 : 0.001; // More on ceiling/floor float star = noise(dir * 200.0); star = smoothstep(0.99, 1.0, star); star *= sin(time * 3.0 noise(dir * 10.0) * 6.28) * 0.5 0.5; return star * density * 100.0; } // Comet effect vec3 cometColor = vec3(1.0, 0.8, 0.4); // Warm comet tail float comet(vec3 dir) { float t = mod(time * 0.5, 6.28); vec3 cometPos = sin(t) * vec3(1.0, 0.0, 0.0) cos(t) * vec3(0.0, 1.0, 0.0) sin(t * 0.5) * vec3(0.0, 0.0, 1.0); cometPos = normalize(cometPos) * 50.0; vec3 cometDir = normalize(cometPos); float dist = length(cross(dir, cometDir)); float length = 0.3; float brightness = smoothstep(0.05, 0.0, dist) * (1.0 - smoothstep(0.0, length, dot(dir, cometDir - dir))); return brightness; } // Enhanced nebula with ray marching hint vec3 nebula(vec3 dir) { float density = 0.0; vec3 p = dir * 10.0 time * 0.03; // Simulate depth density = fbm(p) * 0.6; density = fbm(p * 2.0 vec3(1.0, 1.0, 1.0)) * 0.3; // Layered detail vec3 color = mix(vec3(0.0, 0.1, 0.2), vec3(0.3, 0.1, 0.5), density); // Blue to purple gradient color = vec3(0.2, 0.0, 0.3) * smoothstep(0.4, 0.7, fbm(p * 4.0)); // Deeper hues return color * 0.4; } void main() { vec3 dir = normalize(vNormal); vec3 color = nebula(dir); // Primary nebula effect color = twinklingStars(dir) * vec3(1.0, 0.9, 0.7); // Warm stars color = comet(dir) * cometColor; // Glowing comet gl_FragColor = vec4(color, 1.0); } `, side: THREE.BackSide, transparent: true }); const envSkybox = new THREE.Mesh(skyboxGeometry, skyboxMaterial); envScene.add(envSkybox); // Add to envScene for reflections const mainSkybox = new THREE.Mesh(skyboxGeometry, skyboxMaterial.clone()); // Clone for mainScene mainScene.add(mainSkybox); // Add to mainScene for visible background // Reflective mirror squares const mirrorCount = 200; const mirrorGroup = new THREE.Group(); const mirrorGeometry = new THREE.PlaneGeometry(0.5, 0.5); let mirrorMaterial = new THREE.MeshBasicMaterial({ color: 0xffffff, envMap: null, // Applied later side: THREE.DoubleSide, transparent: true, opacity: 0.9 }); for (let i = 0; i < mirrorCount; i ) { const mirror = new THREE.Mesh(mirrorGeometry, mirrorMaterial); mirror.position.set((Math.random() - 0.5) * 20, (Math.random() - 0.5) * 20, (Math.random() - 0.5) * 20); mirror.userData.velocity = new THREE.Vector3((Math.random() - 0.5) * 0.02, (Math.random() - 0.5) * 0.02, (Math.random() - 0.5) * 0.02); mirrorGroup.add(mirror); } mainScene.add(mirrorGroup); // Add to mainScene // Cosmic particle dust const particleCount = 1000; const particleGeometry = new THREE.BufferGeometry(); const particlePositions = new Float32Array(particleCount * 3); for (let i = 0; i < particleCount; i ) { particlePositions[i * 3] = (Math.random() - 0.5) * 100; particlePositions[i * 3 1] = (Math.random() - 0.5) * 100; particlePositions[i * 3 2] = (Math.random() - 0.5) * 100; } particleGeometry.setAttribute('position', new THREE.BufferAttribute(particlePositions, 3)); const particleMaterial = new THREE.PointsMaterial({ color: 0x00ffff, // Cyan for cosmic glow size: 0.15, transparent: true, blending: THREE.AdditiveBlending, opacity: 0.7 }); const particles = new THREE.Points(particleGeometry, particleMaterial); mainScene.add(particles); // Post-processing for bloom/glow const composer = new THREE.EffectComposer(renderer); const renderPass = new THREE.RenderPass(mainScene, camera); composer.addPass(renderPass); const bloomPass = new THREE.UnrealBloomPass(new THREE.Vector2(window.innerWidth, window.innerHeight), 1.8, 0.4, 0.9); bloomPass.threshold = 0.2; bloomPass.strength = 1.5; bloomPass.radius = 0.6; composer.addPass(bloomPass); // Candelabras with candles on skybox walls const candelabraCount = 6; const candelabraGroup = new THREE.Group(); const candleGeometry = new THREE.CylinderGeometry(0.1, 0.1, 0.5, 8); const flameGeometry = new THREE.ConeGeometry(0.2, 0.4, 8); for (let i = 0; i < candelabraCount; i ) { const angle = (i / candelabraCount) * Math.PI * 2; const x = Math.sin(angle) * 45; const z = Math.cos(angle) * 45; const candelabra = new THREE.Group(); const base = new THREE.Mesh(new THREE.CylinderGeometry(0.3, 0.3, 1, 8), new THREE.MeshStandardMaterial({ color: 0x8B4513 })); base.position.y = 0.5; candelabra.add(base); for (let j = 0; j < 3; j ) { const armAngle = (j - 1) * Math.PI / 6; const arm = new THREE.Mesh(new THREE.CylinderGeometry(0.05, 0.05, 1, 8), new THREE.MeshStandardMaterial({ color: 0xDAA520 })); arm.position.set(Math.sin(armAngle), 0.8, Math.cos(armAngle)); const candle = new THREE.Mesh(candleGeometry, new THREE.MeshStandardMaterial({ color: 0xF5F5DC })); candle.position.y = 0.5; const flame = new THREE.Mesh(flameGeometry, new THREE.MeshBasicMaterial({ color: 0xFFA500, transparent: true, opacity: 0.8 })); flame.position.y = 0.7; arm.add(candle, flame); candelabra.add(arm); } candelabra.position.set(x, 0, z); candelabraGroup.add(candelabra); } mainScene.add(candelabraGroup); camera.position.z = 10; // Euclidean rhythm simulation (3 hits in 8 steps) let beatTime = 0; const euclid = (n, k) => { let pattern = []; for (let i = 0; i < n; i ) pattern.push(i < k ? 1 : 0); return pattern; }; const rhythm = euclid(8, 3); // [1,0,1,0,1,0,0,0] // Intuitive camera controls (non-inverted) let moveForward = false, moveBackward = false, moveLeft = false, moveRight = false; document.addEventListener('keydown', (e) => { if (e.key === 'w') moveForward = true; if (e.key === 's') moveBackward = true; if (e.key === 'a') moveLeft = true; if (e.key === 'd') moveRight = true; }); document.addEventListener('keyup', (e) => { if (e.key === 'w') moveForward = false; if (e.key === 's') moveBackward = false; if (e.key === 'a') moveLeft = false; if (e.key === 'd') moveRight = false; }); document.addEventListener('mousemove', (e) => { const moveX = (e.movementX / window.innerWidth) * 2; const moveY = (e.movementY / window.innerHeight) * 2; camera.rotation.y -= moveX * 0.1; // Right mouse -> right yaw camera.rotation.x -= moveY * 0.1; // Up mouse -> up pitch camera.rotation.x = Math.max(-Math.PI / 2, Math.min(Math.PI / 2, camera.rotation.x)); }); function animate(time) { requestAnimationFrame(animate); // First pass: Update environment map with separate scene skyboxMaterial.uniforms.time.value = time * 0.001; cubeCamera.position.copy(camera.position); cubeCamera.update(renderer, envScene); // Render envScene into cubeRenderTarget // Apply envMap to mirrors after first render if (!mirrorMaterial.envMap && cubeRenderTarget.texture) { mirrorMaterial.envMap = cubeRenderTarget.texture; mirrorMaterial.needsUpdate = true; console.log('Environment map applied to mirrors'); } else if (!cubeRenderTarget.texture) { console.warn('Cube render target texture is not available yet'); } // Update mirrors with rhythm-based scaling beatTime = 0.016; const beat = rhythm[Math.floor(beatTime % 8)]; mirrorGroup.children.forEach((mirror, i) => { mirror.position.x = mirror.userData.velocity.x; mirror.position.y = mirror.userData.velocity.y; mirror.position.z = mirror.userData.velocity.z; if (Math.abs(mirror.position.x) > 10) mirror.userData.velocity.x *= -1; if (Math.abs(mirror.position.y) > 10) mirror.userData.velocity.y *= -1; if (Math.abs(mirror.position.z) > 10) mirror.userData.velocity.z *= -1; mirror.scale.set(1 0.1 * beat, 1 0.1 * beat, 1 0.1 * beat); }); // Animate candle flames candelabraGroup.traverse(child => { if (child.isMesh && child.geometry.type === 'ConeGeometry') { child.material.opacity = 0.6 0.2 * Math.sin(time * 0.05); } }); // Update particle dust const positions = particleGeometry.attributes.position.array; for (let i = 0; i < particleCount; i ) { positions[i * 3 1] -= 0.01; // Slow drift downward if (positions[i * 3 1] < -50) positions[i * 3 1] = 50; // Reset to top } particleGeometry.attributes.position.needsUpdate = true; // Camera movement const speed = 0.1; const direction = camera.getWorldDirection(new THREE.Vector3()); const side = new THREE.Vector3().crossVectors(direction, new THREE.Vector3(0, 1, 0)).normalize(); if (moveForward) camera.position.add(direction.multiplyScalar(speed)); if (moveBackward) camera.position.add(direction.multiplyScalar(-speed)); if (moveLeft) camera.position.add(side.multiplyScalar(-speed)); if (moveRight) camera.position.add(side.multiplyScalar(speed)); // Render with post-processing composer.render(); } animate(0); // Handle window resize window.addEventListener('resize', () => { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); composer.setSize(window.innerWidth, window.innerHeight); }); } </script> </body> </html>
1
3
75
I love this 😁✅ Social Media Design for Moveright CRM, What do you think?
Social Media Designs for Moveright CRM. I help brands create visuals that boost their online presence and sales. 💯✅
6
126
1 Oct 2025
💡 3 Ways Refit For Life Boosts Your Quality of Life This New Month! Tap below to start moving today ⬇️ 👉 bit.ly/41gpPBL #RefitForLife #WTGF #GiftOfLife #PostTransplantWellness #MoveRight #ThinkRight #EatRight #TransplantStrong #WellnessJourney
1
3
54
Social Media Designs for Moveright CRM. I help brands create visuals that boost their online presence and sales. 💯✅
1
11
253
Learned something cool in game dev today: Instead of writing every board position, you can use functions like moveRight() and moveUp() to build paths. Saves time, code, and braincells.
2
43
Replying to @BigFootMau5
GM Mau too many out here playing the short game, not the long one. Watch actions, not words. Stay sharp, build smart, and don’t fall for the traps. 👀💰 #StayBig #MoveRight
1
21
i need a hsbf warmer ir osnetbung everytime im cold myfingers dont moveright
2
25
25 Feb 2025
#リファラジ hookが複雑になるからclass実装というの、 class実装のメンバ全部useStateにして、もろもろ振る舞い含めたhookにする。という手段を取りそうな気がするな ``` useXXX()=>{ const [grid, setGrid] = useState({}) .... return { moveLeft, moveRight, ...} ``` みたいな
2
138
fyi....you can ask grok to write the code as well....I asked Grok to write it in C# see below C# Implementation of Bubble Trouble csharp using System; using System.Collections.Generic; namespace BubbleTrouble { // Enum for bubble sizes enum BubbleSize { Large, Medium, Small } // Player class class Player { public float X { get; set; } = 0; // Horizontal position public float Y { get; set; } = 0; // Vertical position (0 = ground) public int Lives { get; set; } = 3; public int Score { get; set; } = 0; public float ShotCooldown { get; set; } = 0.5f; // Seconds private float _lastShotTime = 0; public bool CanShoot(float currentTime) => currentTime - _lastShotTime >= ShotCooldown; public void Shoot(List<Projectile> projectiles, float currentTime) { if (CanShoot(currentTime)) { projectiles.Add(new Projectile(X, Y 1)); _lastShotTime = currentTime; Console.WriteLine("Player shoots!"); } } public void MoveLeft() => X = Math.Max(X - 5, 0); // Left boundary public void MoveRight() => X = Math.Min(X 5, 256); // Right boundary (screen width) public void Jump(ref float velocityY) => velocityY = 10; // Jump impulse } // Projectile class class Projectile { public float X { get; set; } public float Y { get; set; } public float Speed { get; } = 10; public Projectile(float x, float y) { X = x; Y = y; } public void Update(float deltaTime) { Y = Speed * deltaTime; // Move upward } } // Bubble class class Bubble { public float X { get; set; } public float Y { get; set; } public float VelocityX { get; set; } public float VelocityY { get; set; } public BubbleSize Size { get; set; } public float Radius => Size == BubbleSize.Large ? 16 : Size == BubbleSize.Medium ? 8 : 4; public Bubble(float x, float y, BubbleSize size) { X = x; Y = y; Size = size; VelocityX = (float)(new Random().NextDouble() * 6 - 3); // Random -3 to 3 VelocityY = 3; // Initial upward velocity } public void Update(float deltaTime) { // Apply gravity VelocityY -= 0.1f * deltaTime; X = VelocityX * deltaTime; Y = VelocityY * deltaTime; // Bounce off walls (256x192 screen) if (X - Radius < 0) { X = Radius; VelocityX = -VelocityX * 0.9f; } if (X Radius > 256) { X = 256 - Radius; VelocityX = -VelocityX * 0.9f; } if (Y - Radius < 0) { Y = Radius; VelocityY = -VelocityY * 0.9f; } } public bool CollidesWith(Projectile p) => Math.Abs(p.X - X) < Radius && Math.Abs(p.Y - Y) < Radius; public List<Bubble> Split() { if (Size == BubbleSize.Small) return new List<Bubble>(); // Small bubbles pop var newSize = Size == BubbleSize.Large ? BubbleSize.Medium : BubbleSize.Small; return new List<Bubble> { new Bubble(X, Y, newSize) { VelocityX = -2, VelocityY = 2 }, new Bubble(X, Y, newSize) { VelocityX = 2, VelocityY = 2 } }; } } // Main game class class Game { private Player _player = new Player(); private List<Bubble> _bubbles = new List<Bubble>(); private List<Projectile> _projectiles = new List<Projectile>(); private float _time = 0; private float _gravity = 0.1f; public Game() { // Spawn initial bubbles (Level 1) _bubbles.Add(new Bubble(50, 50, BubbleSize.Large)); _bubbles.Add(new Bubble(150, 50, BubbleSize.Large)); _bubbles.Add(new Bubble(200, 50, BubbleSize.Large)); } public void Run() { Console.WriteLine("Bubble Trouble - Use A/D to move, Space to shoot, W to jump. Q to quit."); float deltaTime = 0.1f; // Fixed timestep for simplicity float playerVelocityY = 0; while (true) { _time = deltaTime; // Input handling if (Console.KeyAvailable) { var key = Console.ReadKey(true).Key; if (key == ConsoleKey.A) _player.MoveLeft(); if (key == ConsoleKey.D) _player.MoveRight(); if (key == ConsoleKey.W && _player.Y == 0) _player.Jump(ref playerVelocityY); if (key == ConsoleKey.Space) _player.Shoot(_projectiles, _time); if (key == ConsoleKey.Q) break; } // Update player jump if (_player.Y > 0 || playerVelocityY > 0) { playerVelocityY -= _gravity * deltaTime; _player.Y = Math.Max(0, _player.Y playerVelocityY * deltaTime); } // Update bubbles foreach (var bubble in _bubbles) bubble.Update(deltaTime); // Update projectiles and check collisions for (int i = _projectiles.Count - 1; i >= 0; i--) { _projectiles[i].Update(deltaTime); if (_projectiles[i].Y > 192) // Off-screen { _projectiles.RemoveAt(i); continue; } for (int j = _bubbles.Count - 1; j >= 0; j--) { if (_bubbles[j].CollidesWith(_projectiles[i])) { var newBubbles = _bubbles[j].Split(); _player.Score = _bubbles[j].Size == BubbleSize.Large ? 50 : _bubbles[j].Size == BubbleSize.Medium ? 25 : 10; _bubbles.RemoveAt(j); _bubbles.AddRange(newBubbles); _projectiles.RemoveAt(i); Console.WriteLine($"Bubble hit! Score: {_player.Score}"); break; } } } // Check player-bubble collision foreach (var bubble in _bubbles) { if (Math.Abs(bubble.X - _player.X) < bubble.Radius && Math.Abs(bubble.Y - _player.Y) < bubble.Radius) { _player.Lives--; Console.WriteLine($"Hit! Lives left: {_player.Lives}"); if (_player.Lives <= 0) { Console.WriteLine("Game Over!"); return; } bubble.X = 50; bubble.Y = 50; // Reset bubble position } } // Win condition if (_bubbles.Count == 0) { Console.WriteLine("Level Cleared!"); break; } // Render (text-based) Console.Clear(); Console.WriteLine($"Score: {_player.Score} | Lives: {_player.Lives} | Bubbles: {_bubbles.Count}"); Console.WriteLine($"Player: ({_player.X}, {_player.Y})"); foreach (var b in _bubbles) Console.WriteLine($"Bubble {b.Size}: ({b.X}, {b.Y})"); System.Threading.Thread.Sleep(100); // Simulate frame rate } } } class Program { static void Main(string[] args) { Game game = new Game(); game.Run(); } } }

1
5
40
6,381
生成コードは貼れるかな? ``` <!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <title>3D視点のカーレースゲーム with ライバルカー (カメラ近め・左右逆転)</title> <style> body { margin: 0; overflow: hidden; } canvas { display: block; } </style> </head> <body> <!-- Three.jsライブラリの読み込み --> <script src="cdnjs.cloudflare.com/ajax/li…"></script> <script> // グローバル変数の定義 let scene, camera, renderer; let car; // プレイヤーの車 let roadSegments = []; let laneMarkers = []; const roadLength = 500; // 1枚の道路セグメントの長さ const numRoadSegments = 2; // 道路セグメントの数(無限道路効果のため) const carSpeed = 0.5; // プレイヤー車の前進スピード const laneMarkerSpacing = 20; // レーンマーカー間隔 const numLaneMarkers = 30; // レーンマーカーの個数 const carLeftBound = -2.5; // 車の左端の移動制限 const carRightBound = 2.5; // 車の右端の移動制限 let moveLeft = false; let moveRight = false; // ライバルカーの設定 const rivalCars = []; const numRivals = 3; // ライバルカーの台数 // 衝突カウンターとクールダウン、ゲームオーバーフラグ let collisionCount = 0; let collisionCooldown = false; let gameOver = false; // 初期化とアニメーション開始 init(); animate(); function init() { // シーン・カメラ・レンダラーの作成 scene = new THREE.Scene(); scene.background = new THREE.Color(0x87ceeb); // 空色 camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 2000); renderer = new THREE.WebGLRenderer({antialias: true}); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // 環境光と方向光の追加 const ambientLight = new THREE.AmbientLight(0xffffff, 0.6); scene.add(ambientLight); const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8); directionalLight.position.set(0, 10, -10); scene.add(directionalLight); // プレイヤーの車(赤いボックス)の作成 const carGeometry = new THREE.BoxGeometry(1, 0.5, 2); const carMaterial = new THREE.MeshPhongMaterial({color: 0xff0000}); car = new THREE.Mesh(carGeometry, carMaterial); car.position.set(0, 0.25, 0); scene.add(car); // 無限道路効果のための道路セグメントの作成 for (let i = 0; i < numRoadSegments; i ) { const roadGeometry = new THREE.PlaneGeometry(6, roadLength); const roadMaterial = new THREE.MeshPhongMaterial({color: 0x333333}); const road = new THREE.Mesh(roadGeometry, roadMaterial); road.rotation.x = -Math.PI / 2; road.position.z = roadLength/2 i * roadLength; scene.add(road); roadSegments.push(road); } // 中央のレーンマーカー(ダッシュ状の線)の作成 for (let i = 0; i < numLaneMarkers; i ) { const markerGeometry = new THREE.PlaneGeometry(0.2, 10); const markerMaterial = new THREE.MeshBasicMaterial({color: 0xffffff}); const marker = new THREE.Mesh(markerGeometry, markerMaterial); marker.rotation.x = -Math.PI/2; marker.position.set(0, 0.01, i * laneMarkerSpacing 10); scene.add(marker); laneMarkers.push(marker); } // ライバルカーの作成(緑色、プレイヤーの速度の30%で前進) for (let i = 0; i < numRivals; i ) { const rivalGeometry = new THREE.BoxGeometry(1, 0.5, 2); const rivalMaterial = new THREE.MeshPhongMaterial({color: 0x00ff00}); // 緑色 const rival = new THREE.Mesh(rivalGeometry, rivalMaterial); // プレイヤーの車より前方に配置(50~150のランダムなオフセット) rival.position.z = car.position.z Math.random() * 100 50; // x座標は車の移動範囲内でランダムに決定 rival.position.x = Math.random() * (carRightBound - carLeftBound) carLeftBound; rival.position.y = 0.25; // userDataに、ライバルカー独自の情報を保持 rival.userData = { speed: carSpeed * 0.3, // プレイヤーの速度の30% targetX: rival.position.x, // 目標のx座標 changeTimer: 0, // レーン変更用のタイマー // 一定フレーム数ごとに新しいレーン(x座標)へ変更(100~300フレーム) changeInterval: Math.floor(Math.random() * 200) 100 }; scene.add(rival); rivalCars.push(rival); } // カメラをプレイヤーの車の後方に近い位置に配置し、注視 camera.position.set(0, 2.5, -6); // カメラを車に近づける camera.lookAt(car.position); // 画面リサイズとキーボード操作のイベントリスナー設定 window.addEventListener('resize', onWindowResize, false); window.addEventListener('keydown', onKeyDown, false); window.addEventListener('keyup', onKeyUp, false); } // 画面リサイズ時の処理 function onWindowResize() { camera.aspect = window.innerWidth/window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); } // キーダウン時の処理(左右移動フラグをセット) function onKeyDown(event) { if (event.keyCode === 37) { // 左矢印 moveLeft = true; } else if (event.keyCode === 39) { // 右矢印 moveRight = true; } } // キーアップ時の処理(フラグをリセット) function onKeyUp(event) { if (event.keyCode === 37) { moveLeft = false; } else if (event.keyCode === 39) { moveRight = false; } } // 簡易的なAABB衝突判定関数 function checkCollision(obj1, obj2) { const dx = Math.abs(obj1.position.x - obj2.position.x); const dz = Math.abs(obj1.position.z - obj2.position.z); // 両車とも 幅1, 長さ2 として、閾値は x:1, z:2 とする return dx < 1 && dz < 2; } // 毎フレーム呼ばれるアニメーションループ function animate() { if (gameOver) return; // ゲームオーバーならループ停止 requestAnimationFrame(animate); // プレイヤーの車は常に前進( z方向) car.position.z = carSpeed; // キー操作の左右を逆に変更: // 左キー (moveLeft) で右へ、右キー (moveRight) で左へ移動 if (moveLeft && car.position.x < carRightBound) { car.position.x = 0.1; } if (moveRight && car.position.x > carLeftBound) { car.position.x -= 0.1; } // カメラをプレイヤーの車に追従させる(近い位置で追従) camera.position.x = car.position.x; camera.position.z = car.position.z - 6; camera.position.y = car.position.y 2.5; camera.lookAt(car.position); // 道路セグメントの再配置(プレイヤーの車より後ろになったら前方に移動) roadSegments.forEach(segment => { if (segment.position.z roadLength/2 < car.position.z - 20) { segment.position.z = numRoadSegments * roadLength; } }); // レーンマーカーの再配置 laneMarkers.forEach(marker => { if (marker.position.z < car.position.z - 20) { marker.position.z = numLaneMarkers * laneMarkerSpacing; } }); // ライバルカーの更新処理 rivalCars.forEach(rival => { // ライバルカーも前進(各自の速度で) rival.position.z = rival.userData.speed; // 現在のx座標と目標のx座標(targetX)との差を補正 if (rival.position.x < rival.userData.targetX - 0.05) { rival.position.x = 0.02; } else if (rival.position.x > rival.userData.targetX 0.05) { rival.position.x -= 0.02; } // レーン変更用のタイマー更新 rival.userData.changeTimer ; if (rival.userData.changeTimer > rival.userData.changeInterval) { // 一定間隔ごとに新しい目標x座標を設定 rival.userData.targetX = Math.random() * (carRightBound - carLeftBound) carLeftBound; rival.userData.changeTimer = 0; } // ライバルカーがプレイヤーの車より大きく後方に下がった場合、再配置する if (rival.position.z < car.position.z - 20) { rival.position.z = car.position.z Math.random() * 50 50; // 50~100の範囲で再配置 rival.position.x = Math.random() * (carRightBound - carLeftBound) carLeftBound; rival.userData.targetX = rival.position.x; } }); // 衝突判定処理(衝突クールダウン中でなければ判定) if (!collisionCooldown) { let collisionDetected = false; for (let i = 0; i < rivalCars.length; i ) { if (checkCollision(car, rivalCars[i])) { collisionDetected = true; break; } } if (collisionDetected) { collisionCooldown = true; collisionCount ; car.material.color.set(0xffff00); // 衝突時は黄色に変更 setTimeout(() => { if (!gameOver) { car.material.color.set(0xff0000); // 元の赤に戻す } collisionCooldown = false; }, 200); // 3回衝突したらゲームオーバー if (collisionCount >= 3) { gameOver = true; alert("ゲームオーバー"); return; } } } renderer.render(scene, camera); } </script> </body> </html> ```

1
3
390
🚒 Traffic congestion is slowing down emergency response times in Halifax. When you see lights and sirens, please move to the right—it makes all the difference, and it’s the law. Our #hfxfirefighters are on the front lines, urging everyone to help us respond faster. Every second counts in an emergency. #hfxtraffic #MoveRight See our interview with @globalhalifax below ⬇️
6
21
81
9,711
Replying to @Barchart
1
1
37
22 Oct 2024
🎮 Handling Car Movement We’ll implement a function to handle moveLeft and moveRight actions. This keeps the car within bounds and updates the game state.
1
4
112
The tide is turning! People have had enough of this radical New Democratic Party. No More Tyranny! #moveright
23 Aug 2024
I'm a Kennedy supporter. As you can tell from my pinned post, I’ve felt for a few weeks now that I might have to choose between Trump and Harris. The vibe shifted when Harris was tagged in. I can’t believe I’m about to say this, but I think I will vote for a Republican for the first time in my life in November. And his name is Donald Trump. I simply can’t support the results of the Biden/Harris administration or the process the Democrats used to select their new candidate. We’re not in Kansas anymore. I hope the big guest I have on Monday (prominent progressive thought leader) doesn’t cancel on me if and when she sees this post.
4
112
With THAT said, the relative difficulty of the task is totally beside the point. The primary question is: as the model generates a sequence of moves, (moveLeft, moveRight, ...), is it keeping track of the state of the board in some way? Does it know about the little guy?
1
3
321