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(){ | |
var id; | |
this.preload = function(entityID) { | |
id = entityID; | |
}; | |
this.enterEntity = function(entityID) { | |
Window.location = "hifi://eschatology/1000,1000,1000"; | |
}; | |
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(){ | |
var id; | |
this.preload = function(entityID) { | |
id = entityID; | |
}; | |
this.enterEntity = function(entityID) { | |
print("enterEntity() called on " + id); | |
}; | |
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
{ | |
"Entities": [ | |
{ | |
"type": "Material", | |
"position" : { | |
"x": 0, | |
"y": 0, | |
"z": 1 | |
}, | |
"materialData": "{\n \"materials\": {\n \"emissiveMap\": \"http://cdn1-www.dogtime.com/assets/uploads/2011/03/puppy-development.jpg\",\n \"albedoMap\": \"http://cdn1-www.dogtime.com/assets/uploads/2011/03/puppy-development.jpg\",\n \"opacityMap\": \"https://supermariorun.com/assets/img/stage/mario03.png\",\n \"metallicMap\": \"https://www.filterforge.com/filters/14196-metallic.jpg\",\n \"roughnessMap\": \"https://artisaverb.info/Cerberus/Cerberus_R.jpg\",\n \"normalMap\": \"http://jsoverson.github.io/texture.js/demo/images/brickwork-normal.jpg\",\n \"occlusionMap\": \"https://www.filterforge.com/filters/10500-ambientocclusion.jpg\",\n \"scatteringMap\": \"https://hifi-public.s3.amazonaws.com/sam/models/skinRenderingTest/priscilla/skin_map.jpg\"\n }\n}" |
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
{ | |
"Entities": [ | |
{ | |
"type": "Model", | |
"dimensions": { | |
"x": 1, | |
"y": 1, | |
"z": 1 | |
}, | |
"position" : { |
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() { // BEGIN LOCAL_SCOPE | |
var entities = []; | |
function getPos(x, y, z) { | |
return Vec3.sum(MyAvatar.position, Vec3.sum(Vec3.multiply(x, Quat.getRight(MyAvatar.orientation)), | |
Vec3.sum(Vec3.multiply(y, Quat.getUp(MyAvatar.orientation)), | |
Vec3.multiply(z + 6, Quat.getForward(MyAvatar.orientation))))); | |
} |
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() { // BEGIN LOCAL_SCOPE | |
var entities = []; | |
function getPos(x, y) { | |
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(6, Quat.getFront(MyAvatar.orientation))); | |
return Vec3.sum(Vec3.sum(center, Vec3.multiply(Quat.getRight(MyAvatar.orientation), x)), Vec3.multiply(Quat.getUp(MyAvatar.orientation), y)); | |
} | |
entities.push(Entities.addEntity({ |
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() { // BEGIN LOCAL_SCOPE | |
//var sound = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/ken/test/WaveFormatExtensible.wav"); | |
var sound = SoundCache.getSound("http://hifi-public.s3.amazonaws.com/birarda/medium-crowd.wav"); | |
var injector = undefined; | |
var localOnly = true; | |
var pitch = 1.0; | |
var loop = 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
(function() { // BEGIN LOCAL_SCOPE | |
var entities = []; | |
entities.push(Entities.addEntity({ | |
type: "Model", | |
modelURL: "http://mpassets.highfidelity.com/ad348528-de38-420c-82bb-054cb22163f5-v1/mannequin.fst", | |
position: Vec3.sum(MyAvatar.position, Vec3.multiply(4.0, Quat.getForward(MyAvatar.orientation))), | |
rotation: MyAvatar.orientation, | |
animation: { |
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() { // BEGIN LOCAL_SCOPE | |
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); | |
var button = tablet.addButton({ | |
icon: Script.resolvePath('laser.svg'), | |
activeIcon: Script.resolvePath('laser-a.svg'), | |
text: "TEST" | |
}); | |
var overlay = Overlays.addOverlay("text", { |
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() { // BEGIN LOCAL_SCOPE | |
function getTopMaterial(multiMaterial) { | |
// For non-models: multiMaterial[0] will be the top material | |
// For models, multiMaterial[0] is the base material, and multiMaterial[1] is the highest priority applied material | |
if (multiMaterial.length > 1) { | |
if (multiMaterial[1].priority > multiMaterial[0].priority) { | |
return multiMaterial[1]; | |
} | |
} |