// // Copyright 2016 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 // (function(){ // Script.include("../libraries/utils.js"); var REZ_POSITION = MyAvatar.position;//getJointPosition(MyAvatar.jointNames.indexOf("Flash")), var IMPORT_URL = "http://mpassets.highfidelity.com/c3df96f0-1c66-42b7-82e3-e0a1ae490325-v1/bopoTheClown.svo.json"; var soundURL ='http://hifi-content.s3.amazonaws.com/caitlyn/production/lazybonesToybox/cameras/353044__montclairguy__camera-sound.wav'; var ringSound; this.preload = function(entityID) { print("preload("+entityID+")"); ringSound = SoundCache.getSound(soundURL); }; this.startNearGrab = function(entityID, mouseEvent) { Audio.playSound(ringSound, { position: REZ_POSITION, volume: 0.5 }); Script.setTimeout(function(){},2555); Clipboard.importEntities(IMPORT_URL); Clipboard.pasteEntities(REZ_POSITION); }; })