mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +02:00
Limit Entity List to only getting the properties it needs
This commit is contained in:
parent
a9a5bf1e97
commit
739530cb85
1 changed files with 4 additions and 1 deletions
|
@ -82,6 +82,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
PROFILE("Script-JSON.stringify", function() {
|
PROFILE("Script-JSON.stringify", function() {
|
||||||
dataString = JSON.stringify(data);
|
dataString = JSON.stringify(data);
|
||||||
});
|
});
|
||||||
|
console.log("Length: ", dataString.length, data.type);
|
||||||
PROFILE("Script-emitScriptEvent", function() {
|
PROFILE("Script-emitScriptEvent", function() {
|
||||||
webView.emitScriptEvent(dataString);
|
webView.emitScriptEvent(dataString);
|
||||||
if (entityListWindow.window) {
|
if (entityListWindow.window) {
|
||||||
|
@ -149,7 +150,9 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
PROFILE("getProperties", function() {
|
PROFILE("getProperties", function() {
|
||||||
for (var i = 0; i < ids.length; i++) {
|
for (var i = 0; i < ids.length; i++) {
|
||||||
var id = ids[i];
|
var id = ids[i];
|
||||||
var properties = Entities.getEntityProperties(id);
|
//var properties = Entities.getEntityProperties(id);
|
||||||
|
var properties = Entities.getEntityProperties(id, ['name', 'type', 'locked',
|
||||||
|
'visible', 'renderInfo', 'type', 'modelURL', 'materialURL', 'script']);
|
||||||
|
|
||||||
if (!filterInView || Vec3.distance(properties.position, cameraPosition) <= searchRadius) {
|
if (!filterInView || Vec3.distance(properties.position, cameraPosition) <= searchRadius) {
|
||||||
var url = "";
|
var url = "";
|
||||||
|
|
Loading…
Reference in a new issue