mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 13:07:04 +02:00
Added copyright header
This commit is contained in:
parent
4588f175f4
commit
7ec97d8331
1 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
//
|
||||||
|
// pUtils.js
|
||||||
|
//
|
||||||
|
// Created by Patrick Gosch on 03/28/2017
|
||||||
|
// Copyright 2017 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
|
||||||
|
//
|
||||||
|
|
||||||
getEntityTextures = function(id) {
|
getEntityTextures = function(id) {
|
||||||
var results = null;
|
var results = null;
|
||||||
var properties = Entities.getEntityProperties(id, "textures");
|
var properties = Entities.getEntityProperties(id, "textures");
|
||||||
|
@ -10,15 +20,15 @@ getEntityTextures = function(id) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return results ? results : {};
|
return results ? results : {};
|
||||||
}
|
};
|
||||||
|
|
||||||
setEntityTextures = function(id, textureList) {
|
setEntityTextures = function(id, textureList) {
|
||||||
var json = JSON.stringify(textureList);
|
var json = JSON.stringify(textureList);
|
||||||
Entities.editEntity(id, {textures: json});
|
Entities.editEntity(id, {textures: json});
|
||||||
}
|
};
|
||||||
|
|
||||||
editEntityTextures = function(id, textureName, textureURL) {
|
editEntityTextures = function(id, textureName, textureURL) {
|
||||||
var textureList = getEntityTextures(id);
|
var textureList = getEntityTextures(id);
|
||||||
textureList[textureName] = textureURL;
|
textureList[textureName] = textureURL;
|
||||||
setEntityTextures(id, textureList);
|
setEntityTextures(id, textureList);
|
||||||
}
|
};
|
||||||
|
|
Loading…
Reference in a new issue