Skip to content

Instantly share code, notes, and snippets.

@ericrius1
ericrius1 / cloudSettings
Last active December 31, 2019 23:18
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-12-31T23:18:08.025Z","extensionVersion":"v3.4.3"}
[General]
LastScriptLocation=/Users/ericlevin1/MyHiFiStuff/scripts/ripples.js
WindowGeometry=@Rect(0 23 720 851)
WindowState=0
audioOutputBufferSize=5
audio_input_device=@Invalid()
audio_output_device=@Invalid()
autoFocusOnSelect=false
cameraEaseOnFocus=false
desktopLODDecreaseFPS=@Variant(\0\0\0\x87\x41\xf0\0\0)
var phi = (90 - latitude) * Math.PI / 180;
var theta = (180 - longitude) * Math.PI / 180;
var point = new THREE.Vector3(
EARTH_RADIUS * Math.sin(phi) * Math.cos(theta),
EARTH_RADIUS * Math.cos(phi),
EARTH_RADIUS * Math.sin(phi) * Math.sin(theta)
)
//
// groupVehicle.js
// examples
//
// Created by Eric Levin on April 9, 2015
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
MyAvatar.clearReferential();
var waypoints = [
{x: 100, y: 100, z: 300},
{x: 100, y: 200, z: 200},
{x: 100: y: 100, z: 100}
]
//Simple entity script with update
(function(){
var self = this;
this.preload = function(){
this.xPosition = 10;
}
this.update = function(){
self.xPosition += 0.2;
}
function followWaypoints() {
startingPosition = Entities.getEntityProperties(ship).position;
var currentProps = {
x: startingPosition.x,
y: startingPosition.y,
z: startingPosition.z,
}
var endProps = {
x: waypoints[
currentWaypointIndex].x,
this.preload = function(entityId) {
this.entityId = entityId;
//...
}
this.properties = Entities.getEntityProperties(this.entityId);