Obelisk Test Case
How do I make an obelisk test case?
Https://github.com/nosir/obelisk.js/issues/6. What is a obelisk test case? How do you make a obelisk test case? This script and codes were developed by Max Huang on 26 December 2022, Monday.
Obelisk Test Case - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Obelisk Test Case</title>
</head>
<body> <script src="//nosir.github.io/obelisk.js/dist/obelisk.min.1.0.2.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/stats.js/r11/Stats.js" type="text/javascript"></script> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Obelisk Test Case - Script Codes JS Codes
(function() { var Renderer, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; $(function() { return new Renderer; }); Renderer = (function() { function Renderer() { this.tick = bind(this.tick, this); var colorCube, colorShadow, dimensionCube, dimensionShadow, i, j, point; this.width = $(window).width(); this.height = $(window).height(); this.stats = new Stats(); this.stats.setMode(0); this.stats.domElement.style.position = 'absolute'; this.stats.domElement.style.left = '0px'; this.stats.domElement.style.top = '0px'; document.body.appendChild(this.stats.domElement); this.canvas = $("<canvas width='" + this.width + "' height='" + this.height + "' style='width: " + this.width + "px; height: " + this.height + "px' />").appendTo('body'); this.ctx = this.canvas[0].getContext('2d'); point = new obelisk.Point(200, 200); this.pixelView = new obelisk.PixelView(this.canvas, point); colorShadow = new obelisk.SideColor(0x66666677, 0x66666677); dimensionShadow = new obelisk.BrickDimension(20, 20); this.brick = new obelisk.Brick(dimensionShadow, colorShadow); colorCube = new obelisk.CubeColor().getByHorizontalColor(obelisk.ColorPattern.PURPLE); dimensionCube = new obelisk.CubeDimension(20, 20, 20); this.cube = new obelisk.Cube(dimensionCube, colorCube, true); this.nodes = []; for (i = j = 0; j <= 50; i = ++j) { this.nodes.push({ x: Math.random(), y: Math.random(), t: Math.random() * 0xFFFF }); } setInterval(this.tick, 1000 / 60); } Renderer.prototype.tick = function() { var j, len, node, pointCube, pointShadow, ref, t, x, y; this.stats.begin(); this.ctx.clearRect(0, 0, this.width, this.height); ref = this.nodes; for (j = 0, len = ref.length; j < len; j++) { node = ref[j]; t = (node.t + new Date().getTime()) / 1000.0; x = Math.sin(t * node.x) * this.width; y = Math.sin(t * node.y) * this.height; pointCube = new obelisk.Point3D(x, y, 0); pointShadow = new obelisk.Point3D(x, y + 20, 0); this.pixelView.renderObject(this.brick, pointShadow); this.pixelView.renderObject(this.cube, pointCube); } this.stats.end(); }; return Renderer; })();
}).call(this);
Developer | Max Huang |
Username | nosir |
Uploaded | December 26, 2022 |
Rating | 3.5 |
Size | 3,253 Kb |
Views | 8,096 |
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 |
Obelisk Test Case - Depth Sorting | 2,707 Kb |
Pixel Isometric Flappy Bird | 3,836 Kb |
Fireworks fountain | 3,155 Kb |
Pixel Isometric Input Text Rendering | 3,248 Kb |
Build Monument Valley by Obelisk.js | 3,775 Kb |
Lissajous Particles | 3,201 Kb |
Pixel Isometric Cube Generator | 2,195 Kb |
Segments mouse following | 2,909 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 |
APortfolio | Skybutterfly | 5,174 Kb |
Drag n Drop | Martin42 | 2,594 Kb |
A Pen by Michael Parenteau | Michaelparenteau | 2,133 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
P1 | Vivi_Lai | 1,533 Kb |
CSS3 Latte Art Logo | Esambino | 2,036 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
UI Challenge - Budget Selector | AgentRR007 | 3,547 Kb |
Promodoro | Bencarp | 1,712 Kb |
Map Controls | Iliadraznin | 3,721 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!