This file contains 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
controls = new OrbitControls( camera, renderer.domElement ); | |
controls.addEventListener( 'change', render ); // use if there is no animation loop | |
controls.enableZoom = false; | |
controls.enablePan = false; | |
controls.target.set( 0, 0, - 0.2 ); | |
controls.update(); |
This file contains 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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using UnityEngine.Rendering; | |
public class MeshCombineWizard : ScriptableWizard | |
{ | |
public GameObject combineParent; | |
public bool is32bit = true; |
This file contains 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
void LockOn(){ | |
if(currentTarget){ | |
float camToTargetWorldAngle = Vector3.Angle(currentTarget.transform.position, camera.transform.position); | |
// float camForwardAngle = camera.transform.forward.normalized; | |
Vector3 relAngle = Vector3.ProjectOnPlane(currentTarget.transform.position - camera.transform.position, camera.transform.forward.normalized); | |
float angle = Vector3.Angle(currentTarget.transform.position - camera.transform.position, relAngle); | |
Debug.Log(90 - angle); | |
} | |
} |
This file contains 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
//CSS transition duration longer than 30~ | |
$(function(){ | |
const socket = io() | |
socket.on('connected', function(msg) { | |
console.log('connected to server') | |
}) | |
let beaconCount = parseInt($('#beaconCount').val()) | |
let beaconStatus = new Array(beaconCount) | |
setInterval(function(){ |
This file contains 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
let beacons = [] | |
let bands = [] | |
let b0, b1, b2, b3, b4 | |
//socket listener | |
socket.on('location', (data) => { | |
let bandExists = bands.some(band => band.mac === data.band_mac) | |
if (!bandExists) { | |
//new band, instanitate new band obj and add it to array |
This file contains 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
/** | |
* Trilateration example using p5js.org | |
* Trilateration math by https://gist.github.com/kdzwinel/8235348 | |
* Example by Djonathan Krause, 2018 | |
*/ | |
let beacons = [] | |
let b1, b2, b3 | |
/** |
This file contains 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
loader.load( | |
// resource URL | |
'/assets/logo.glb', | |
// called when the resource is loaded | |
function (gltf) { | |
gltf.scene.traverse(function (child) { | |
if (child.isMesh) { | |
child.castShadow = true | |
child.receiveShadow = true |
This file contains 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
.temp{ | |
background-color: #f1f3f6; | |
margin: 8px; | |
padding: 12px 24px; | |
border: none; | |
border-radius: 8px; | |
color:#989cd0; | |
box-shadow: | |
inset 0 0 15px rgba(55, 84, 170,0), | |
inset 0 0 20px rgba(255, 255, 255,0), |
This file contains 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 findAddress(){ | |
new daum.Postcode({ | |
oncomplete: function(data) { | |
$("#postcode1").val(data.postcode1) | |
$("#postcode2").val(data.postcode2) | |
$("#zonecode").val(data.zonecode) | |
$("#address").val(data.address) | |
$("#address_etc").focus() | |
console.log(data) | |
} |
This file contains 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
app.use(async function(req, res, next) { | |
res.locals = { | |
beokCategories: beokCategories, | |
user: req.user || null, | |
success_msg: req.flash('success_msg'), | |
error_msg: req.flash('error_msg'), | |
error: req.flash('error'), | |
moment: require('moment-timezone'), |