Black Hole

Size
2,089 Kb
Views
12,144

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 Previews

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());
Black Hole - Script Codes
Black Hole - Script Codes
Home Page Home
Developer Admiral Potato
Username AdmiralPotato
Uploaded December 10, 2022
Rating 4.5
Size 2,089 Kb
Views 12,144
Do you need developer help for Black Hole?

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!

Admiral Potato (AdmiralPotato) Script Codes
Create amazing SEO content with AI!

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!