Black Hole
How do I make an black hole?
It's actually purple and blue.. What is a black hole? How do you make a black hole? This script and codes were developed by Admiral Potato on 10 December 2022, Saturday.
Black Hole - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Black Hole</title>
</head>
<body> <script src='https://admiralpotato.github.io/js/npos3d/build/npos3d.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Black Hole - Script Codes JS Codes
var n = NPos3d;
var s = new n.Scene({ backgroundColor: 'rgba(0,0,0,0.2)', globalCompositeOperation: 'lighter'
});
var BlackHoleRing = function(args){ var t = this, type = 'BlackHoleRing', n = NPos3d, m = n.Maths, scale; if(t.type !== type){throw type + ' must be invoked using the `new` keyword.';} args = args || {}; n.blessWith3DBase(t, args); t.offset = args.offset || 0; t.numRings = args.numRings || 1; t.frac = t.offset / (t.numRings - 1); t.color = 'hsla('+ (240 + (60 * t.frac)) +', 100%, 40%, '+ (t.frac * 0.6) +')'; scale = (t.frac * 300) + 1; t.scale = [scale,scale,scale]; t.angle = m.deg * (((1 - t.frac) * -45) + 65); t.rot = [0, t.angle, 0.6 * t.angle]; t.pos = m.p3Rotate([-250 + ((1 - t.frac) * 700), 0, 0],t.rot, t.rotOrder); return t;
};
BlackHoleRing.prototype = { type: 'BlackHoleRing', shape: new n.Geom.Circle({ radius: 1, segments: 24, axies: [2,1,0] }), renderStyle: 'both', renderAlways: true, pointStyle: 'stroke', pointScale: 4, rotOrder: [2,1,0], update: function () { var t = this; t.rot[0] += deg * (t.numRings - t.offset) * 0.2; //t.pos[0] += cos(t.rot[2] / 10); //t.pos[1] += sin(t.rot[2] / 10); t.render(); }
};
var BlackHole = function(args){ var t = this, type = 'BlackHole', i; if(t.type !== type){throw type + ' must be invoked using the `new` keyword.';} args = args || {}; NPos3d.blessWith3DBase(t, args); t.rings = args.rings || 20; for(i = 0; i < t.rings; i += 1){ t.add(new BlackHoleRing({offset: i, numRings:t.rings})); } return t;
};
BlackHole.prototype = { type: 'BlackHole', update: function() {}
};
s.add(new BlackHole());
Developer | Admiral Potato |
Username | AdmiralPotato |
Uploaded | December 10, 2022 |
Rating | 4.5 |
Size | 2,089 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Basic 3D Webkit Frequency Analyser | 3,659 Kb |
Multiple Radial Point Interpolated Animation | 2,923 Kb |
Spiralator 9000 | 4,671 Kb |
A Pen by Admiral Potato | 1,957 Kb |
Vertical Positioning | 1,690 Kb |
Empty NPos3D template | 1,655 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Web Spiral - p5.js | TWAIN | 2,183 Kb |
Day 11 - Calendar Card | Arnellebalane | 6,984 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
A Pen by lizz | Lizz | 10,068 Kb |
LDE old privacy page | Jasonangle | 2,339 Kb |
IE11 Test | Boostnewmedia | 4,998 Kb |
Ball Physics | Getsetbro | 3,149 Kb |
Compare resources on mobile sites | Gyusza | 3,226 Kb |
Super Discount | Orrinward | 3,225 Kb |
Ipad Mini Showcase | Hornebom | 10,479 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!