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
| 'use strict'; | |
| const webpack = require('webpack'); | |
| const path = require('path'); | |
| const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
| let config = { | |
| entry: { | |
| main: [ | |
| './_devapp/app.js', |
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
| { | |
| "name": "nodejs-sll", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "nodemon index.js" | |
| }, | |
| "keywords": [], | |
| "author": "I am a pro", |
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
| 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'; |
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> | |
| <html> | |
| <head> | |
| <meta charset=utf-8> | |
| <title>My first three.js app</title> | |
| <style> | |
| body { margin: 0; } | |
| canvas { width: 100%; height: 100% } | |
| </style> | |
| </head> |
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> | |
| <html> | |
| <head> | |
| <meta charset=utf-8> | |
| <title>My first three.js app</title> | |
| <style> | |
| body { margin: 0; } | |
| canvas { width: 100%; height: 100% } | |
| </style> | |
| </head> |
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> | |
| <html> | |
| <head> | |
| <meta charset=utf-8> | |
| <title>My first three.js app</title> | |
| <style> | |
| body { margin: 0; } | |
| canvas { width: 100%; height: 100% } | |
| </style> | |
| </head> |
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
| 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; |
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>My first three.js app</title> | |
| <style> | |
| body { margin: 0; } | |
| canvas { width: 100%; height: 100% } | |
| </style> | |
| </head> | |
| <body> | |
| <script src="js/three.js"></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
| <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> |
OlderNewer