9

Space globe - Three.js

 2 years ago
source link: https://codepen.io/bgoonz/pen/rNyENQJ
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Pen Settings

HTML Preprocessor

Add Class(es) to <html>

Stuff for <head>

0 unsaved changes
xxxxxxxxxx
<div id="canvas_container"></div>
<button id="fullscr">Go Fullscreen</button>
xxxxxxxxxx
body {
    margin: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background-image: url("https://user-images.githubusercontent.com/26748614/96337246-f14d4580-1085-11eb-8793-a86d929e034d.jpg");
    background-size: cover;
    backdrop-filter:  brightness(50%);
}
canvas {
    display: block;
}
#canvas_container {
    width: 100%;
    height: 100vh;
}
xxxxxxxxxx
let renderer,
scene,
camera,
sphereBg,
nucleus,
stars,
controls,
container = document.getElementById("canvas_container"),
timeout_Debounce,
noise = new SimplexNoise(),
cameraSpeed = 0,
blobScale = 3;
init();
animate();
function init() {
    scene = new THREE.Scene();
    camera = new THREE.PerspectiveCamera(55, window.innerWidth / window.innerHeight, 0.01, 1000)
    camera.position.set(0,0,230);

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK