Skip to content

Instantly share code, notes, and snippets.

View Davisonpro's full-sized avatar
🎯
Focusing

Davison Pro Davisonpro

🎯
Focusing
View GitHub Profile
@Davisonpro
Davisonpro / webpack.config.js
Created January 9, 2019 18:34
Our app webpack configuration
'use strict';
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
let config = {
entry: {
main: [
'./_devapp/app.js',
@Davisonpro
Davisonpro / package.json
Last active January 13, 2019 10:32
Nodejs SSL
{
"name": "nodejs-sll",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon index.js"
},
"keywords": [],
"author": "I am a pro",
@Davisonpro
Davisonpro / index.js
Last active January 13, 2019 11:12
Node js SSL
const express = require('express'),
chalk = require('chalk'),
fs = require( 'fs' );
const pkg = require( './package.json' );
const start = Date.now(),
protocol = process.env.PROTOCOL || 'https',
port = process.env.PORT || '3000',
host = process.env.HOST || 'localhost';
@Davisonpro
Davisonpro / game.html
Created January 28, 2019 19:57
Game starter
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
@Davisonpro
Davisonpro / game.html
Created January 28, 2019 19:57
Game starter
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
@Davisonpro
Davisonpro / game.html
Last active January 28, 2019 19:58
Game starter
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
@Davisonpro
Davisonpro / scene.js
Created January 28, 2019 20:03
Scene
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 );
@Davisonpro
Davisonpro / box-geometry.js
Created January 28, 2019 20:08
Box Geometry
var geometry = new THREE.BoxGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
var cube = new THREE.Mesh( geometry, material );
scene.add( cube );
camera.position.z = 5;
@Davisonpro
Davisonpro / game.html
Created January 28, 2019 20:12
Game Play
<html>
<head>
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
<body>
<script src="js/three.js"></script>
<html>
<head>
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
<body>
<script src="https://threejs.org/build/three.js"></script>