Skip to content

Instantly share code, notes, and snippets.

View cozza13's full-sized avatar

Chris Collins cozza13

View GitHub Profile
#define DEBUG_CONSOLE
#define DEBUG_LEVEL_LOG
#define DEBUG_LEVEL_WARN
#define DEBUG_LEVEL_ERROR
#if (UNITY_EDITOR || DEVELOPMENT_BUILD)
#define DEBUG
#endif
#if (UNITY_IOS || UNITY_ANDROID)
//
// locationsMenu.js
// examples
//
// Created by Ryan Huffman on 5/28/14
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script showing how to load JSON data using XMLHttpRequest.
//
// URL Macro created by Thijs Wenker.
//
// editVoxels.js
// examples
//
// Created by Philip Rosedale on February 8, 2014
// Copyright 2014 High Fidelity, Inc.
//
// Captures mouse clicks and edits voxels accordingly.
//
// click = create a new voxel on this face, same color as old (default color picker state)
//
// locationsMenu.js
// examples
//
// Created by Ryan Huffman on 5/28/14
// Copyright 2014 High Fidelity, Inc.
//
// This is an example script showing how to load JSON data using XMLHttpRequest.
//
// URL Macro created by Thijs Wenker.
//
// cameraExample.js
// examples
//
// Copyright 2014 High Fidelity, Inc.
//
// This sample script watches your hydra hands and makes clapping sound when they come close together fast
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// frisbee.js
// examples
//
// Created by Thijs Wenker on 7/5/14.
// Copyright 2014 High Fidelity, Inc.
//
// This description is still work in progress
//
// Distributed under the Apache License, Version 2.0.
var i = 0;
var text = "My name is very long.... And the story goes on and on.. Are you AFK? I might be....";
var forwards = true;
var delay = 1500; // setting this lower might cause other people not to see it update quick enough
var message_length = 16; //set this to make your name ticker wider or narrower
function loopTimer() {
var tickertext = "";
for (var ib = 0; ib < text.length && ib < message_length; ib++) {
tickertext += text[(i + ib) % text.length];
//
// EntityRain.js
//
// Created by Richard Gunther on 15-09-2014.
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var startpos = {x: 115, y: 180, z: 130};
//
// playSoundOnEnterOrLeave.js
// examples/entityScripts
//
// Created by Brad Hefta-Gaub on 11/3/14.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example of an entity script which when assigned to an entity, that entity will play a sound in world when
// your avatar enters or leaves the bounds of the entity.
//
@cozza13
cozza13 / cats.js
Last active August 29, 2015 14:10
//
// playSoundOnEnterOrLeave.js
// examples/entityScripts
//
// Created by Brad Hefta-Gaub on 11/3/14.
// Copyright 2014 High Fidelity, Inc.
//
// This is an example of an entity script which when assigned to an entity, that entity will play a sound in world when
// your avatar enters or leaves the bounds of the entity.
//