Obelisk Test Case

Developer
Size
3,253 Kb
Views
8,096

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 Previews

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);
Obelisk Test Case - Script Codes
Obelisk Test Case - Script Codes
Home Page Home
Developer Max Huang
Username nosir
Uploaded December 26, 2022
Rating 3.5
Size 3,253 Kb
Views 8,096
Do you need developer help for Obelisk Test Case?

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!

Max Huang (nosir) Script Codes
Create amazing sales emails 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!