update the entityList update with newly added Entities.getMultipleEntities function

This commit is contained in:
Thijs Wenker 2018-09-20 22:48:56 +02:00
parent e2cb96193d
commit d1f35c8c54

View file

@ -150,11 +150,11 @@ EntityListTool = function(shouldUseEditTabletApp) {
});
var cameraPosition = Camera.position;
PROFILE("getProperties", function() {
for (var i = 0; i < ids.length; i++) {
var id = ids[i];
var properties = Entities.getEntityProperties(id, ['name', 'type', 'locked',
'visible', 'renderInfo', 'type', 'modelURL', 'materialURL', 'script']);
PROFILE("getMultipleProperties", function () {
var multipleProperties = Entities.getMultipleEntityProperties(ids, ['name', 'type', 'locked',
'visible', 'renderInfo', 'modelURL', 'materialURL', 'script']);
for (var i = 0; i < multipleProperties.length; i++) {
var properties = multipleProperties[i];
if (!filterInView || Vec3.distance(properties.position, cameraPosition) <= searchRadius) {
var url = "";
@ -164,7 +164,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
url = properties.materialURL;
}
entities.push({
id: id,
id: ids[i],
name: properties.name,
type: properties.type,
url: url,