This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var game = exports; | |
| game.of = {}; | |
| game.of.life = function () { | |
| var self = this; | |
| self.init = function ( turns, width, height ) { | |
| self.board = new Array( height ); | |
| for ( var x = 0; x < height; x++ ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;(function (window, document) { | |
| 'use strict'; | |
| var self = this, | |
| root = self.window, | |
| ConfBplate = root.ConfBplate = {}, | |
| jQuery = root.jQuery, | |
| $ = jQuery; | |
| var animateScroll = root.ConfBplate.animateScroll = function () { | |
| var $navLink = $('.nav-link'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| var Y = exports; | |
| var createObject = Y.createObject = function (d) { | |
| var s = this; | |
| return function () { | |
| var operations = 'keys,values,has,set,get,iter,next,reset'; | |
| var s = this, o = (function () { return (new function () {}); }).call(s), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| def quantidade(produtos=0, tipo_pagamento=''): | |
| resultado = 0 | |
| produto = 1.99 | |
| regra = 0 | |
| if produtos: | |
| if tipo_pagamento and tipo_pagamento == 'dinheiro': | |
| regra += 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html><title>Minimal tQuery Page</title> | |
| <script src="tquery-bundle.js"></script> | |
| <body><script> | |
| var world = tQuery.createWorld().boilerplate().start(); | |
| var object = tQuery.createTorus().addTo(world); | |
| </script></body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function render() { | |
| requestAnimationFrame(render); | |
| renderer.render(scene, camera); | |
| } | |
| render(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var geometry = new THREE.CubeGeometry(1,1,1); | |
| var material = new THREE.MeshBasicMaterial({color: 0x00ff00}); | |
| var cube = new THREE.Mesh(geometry, material); | |
| scene.add(cube); | |
| camera.position.z = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var scene = new THREE.Scene(); | |
| var camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); | |
| var renderer = new THREE.WebGLRenderer(); | |
| renderer.setSize(window.innerWidth, window.innerHeight); | |
| document.body.appendChild(renderer.domElement); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Three.js rápida introdução</title> | |
| <style> | |
| canvas { width: 100%; height: 100% } | |
| </style> | |
| </head> | |
| <body> | |
| <script src="https://raw.github.com/mrdoob/three.js/master/build/three.js"></script> | |
| <script> // O javascript vem aqui. </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var canvas = document.getElementById('canvas1'); | |
| var gl = canvas.getContext('webgl'); | |
| canvas.width = newWidth; | |
| canvas.height = newHeight; | |
| gl.viewport(0, 0, canvas.width, canvas.height); |