mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 01:23:17 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into account-managed-wallet-punchlist2
This commit is contained in:
commit
d3391b9273
16 changed files with 128 additions and 72 deletions
|
@ -48,35 +48,11 @@ Item {
|
||||||
spacing: 4; x: 4; y: 4;
|
spacing: 4; x: 4; y: 4;
|
||||||
|
|
||||||
StatText {
|
StatText {
|
||||||
text: "State Machines:---------------------------------------------------------------------------"
|
text: root.positionText
|
||||||
}
|
}
|
||||||
ListView {
|
|
||||||
width: firstCol.width
|
|
||||||
height: root.animStateMachines.length * 15
|
|
||||||
visible: root.animStateMchines.length > 0;
|
|
||||||
model: root.animStateMachines
|
|
||||||
delegate: StatText {
|
|
||||||
text: {
|
|
||||||
return modelData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: secondCol.width + 8
|
|
||||||
height: secondCol.height + 8
|
|
||||||
color: root.bgColor;
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: secondCol
|
|
||||||
spacing: 4; x: 4; y: 4;
|
|
||||||
|
|
||||||
StatText {
|
StatText {
|
||||||
text: "Anim Vars:--------------------------------------------------------------------------------"
|
text: "Anim Vars:--------------------------------------------------------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
width: secondCol.width
|
width: secondCol.width
|
||||||
height: root.animVars.length * 15
|
height: root.animVars.length * 15
|
||||||
|
@ -104,6 +80,36 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: secondCol.width + 8
|
||||||
|
height: secondCol.height + 8
|
||||||
|
color: root.bgColor;
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: secondCol
|
||||||
|
spacing: 4; x: 4; y: 4;
|
||||||
|
|
||||||
|
StatText {
|
||||||
|
text: root.rotationText
|
||||||
|
}
|
||||||
|
StatText {
|
||||||
|
text: "State Machines:---------------------------------------------------------------------------"
|
||||||
|
}
|
||||||
|
ListView {
|
||||||
|
width: firstCol.width
|
||||||
|
height: root.animStateMachines.length * 15
|
||||||
|
visible: root.animStateMachines.length > 0;
|
||||||
|
model: root.animStateMachines
|
||||||
|
delegate: StatText {
|
||||||
|
text: {
|
||||||
|
return modelData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: thirdCol.width + 8
|
width: thirdCol.width + 8
|
||||||
height: thirdCol.height + 8
|
height: thirdCol.height + 8
|
||||||
|
@ -113,10 +119,12 @@ Item {
|
||||||
id: thirdCol
|
id: thirdCol
|
||||||
spacing: 4; x: 4; y: 4;
|
spacing: 4; x: 4; y: 4;
|
||||||
|
|
||||||
|
StatText {
|
||||||
|
text: root.velocityText
|
||||||
|
}
|
||||||
StatText {
|
StatText {
|
||||||
text: "Alpha Values:--------------------------------------------------------------------------"
|
text: "Alpha Values:--------------------------------------------------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
width: thirdCol.width
|
width: thirdCol.width
|
||||||
height: root.animAlphaValues.length * 15
|
height: root.animAlphaValues.length * 15
|
||||||
|
|
|
@ -42,6 +42,29 @@ void AnimStats::updateStats(bool force) {
|
||||||
auto myAvatar = avatarManager->getMyAvatar();
|
auto myAvatar = avatarManager->getMyAvatar();
|
||||||
auto debugAlphaMap = myAvatar->getSkeletonModel()->getRig().getDebugAlphaMap();
|
auto debugAlphaMap = myAvatar->getSkeletonModel()->getRig().getDebugAlphaMap();
|
||||||
|
|
||||||
|
glm::vec3 position = myAvatar->getWorldPosition();
|
||||||
|
glm::quat rotation = myAvatar->getWorldOrientation();
|
||||||
|
glm::vec3 velocity = myAvatar->getWorldVelocity();
|
||||||
|
|
||||||
|
_positionText = QString("Position: (%1, %2, %3)").
|
||||||
|
arg(QString::number(position.x, 'f', 2)).
|
||||||
|
arg(QString::number(position.y, 'f', 2)).
|
||||||
|
arg(QString::number(position.z, 'f', 2));
|
||||||
|
emit positionTextChanged();
|
||||||
|
|
||||||
|
glm::vec3 eulerRotation = safeEulerAngles(rotation);
|
||||||
|
_rotationText = QString("Heading: %1").
|
||||||
|
arg(QString::number(glm::degrees(eulerRotation.y), 'f', 2));
|
||||||
|
emit rotationTextChanged();
|
||||||
|
|
||||||
|
// transform velocity into rig coordinate frame. z forward.
|
||||||
|
glm::vec3 localVelocity = Quaternions::Y_180 * glm::inverse(rotation) * velocity;
|
||||||
|
_velocityText = QString("Local Vel: (%1, %2, %3)").
|
||||||
|
arg(QString::number(localVelocity.x, 'f', 2)).
|
||||||
|
arg(QString::number(localVelocity.y, 'f', 2)).
|
||||||
|
arg(QString::number(localVelocity.z, 'f', 2));
|
||||||
|
emit velocityTextChanged();
|
||||||
|
|
||||||
// update animation debug alpha values
|
// update animation debug alpha values
|
||||||
QStringList newAnimAlphaValues;
|
QStringList newAnimAlphaValues;
|
||||||
qint64 now = usecTimestampNow();
|
qint64 now = usecTimestampNow();
|
||||||
|
|
|
@ -19,6 +19,9 @@ class AnimStats : public QQuickItem {
|
||||||
Q_PROPERTY(QStringList animAlphaValues READ animAlphaValues NOTIFY animAlphaValuesChanged)
|
Q_PROPERTY(QStringList animAlphaValues READ animAlphaValues NOTIFY animAlphaValuesChanged)
|
||||||
Q_PROPERTY(QStringList animVars READ animVars NOTIFY animVarsChanged)
|
Q_PROPERTY(QStringList animVars READ animVars NOTIFY animVarsChanged)
|
||||||
Q_PROPERTY(QStringList animStateMachines READ animStateMachines NOTIFY animStateMachinesChanged)
|
Q_PROPERTY(QStringList animStateMachines READ animStateMachines NOTIFY animStateMachinesChanged)
|
||||||
|
Q_PROPERTY(QString positionText READ positionText NOTIFY positionTextChanged)
|
||||||
|
Q_PROPERTY(QString rotationText READ rotationText NOTIFY rotationTextChanged)
|
||||||
|
Q_PROPERTY(QString velocityText READ velocityText NOTIFY velocityTextChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static AnimStats* getInstance();
|
static AnimStats* getInstance();
|
||||||
|
@ -27,9 +30,13 @@ public:
|
||||||
|
|
||||||
void updateStats(bool force = false);
|
void updateStats(bool force = false);
|
||||||
|
|
||||||
QStringList animAlphaValues() { return _animAlphaValues; }
|
QStringList animAlphaValues() const { return _animAlphaValues; }
|
||||||
QStringList animVars() { return _animVarsList; }
|
QStringList animVars() const { return _animVarsList; }
|
||||||
QStringList animStateMachines() { return _animStateMachines; }
|
QStringList animStateMachines() const { return _animStateMachines; }
|
||||||
|
|
||||||
|
QString positionText() const { return _positionText; }
|
||||||
|
QString rotationText() const { return _rotationText; }
|
||||||
|
QString velocityText() const { return _velocityText; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void forceUpdateStats() { updateStats(true); }
|
void forceUpdateStats() { updateStats(true); }
|
||||||
|
@ -39,6 +46,9 @@ signals:
|
||||||
void animAlphaValuesChanged();
|
void animAlphaValuesChanged();
|
||||||
void animVarsChanged();
|
void animVarsChanged();
|
||||||
void animStateMachinesChanged();
|
void animStateMachinesChanged();
|
||||||
|
void positionTextChanged();
|
||||||
|
void rotationTextChanged();
|
||||||
|
void velocityTextChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringList _animAlphaValues;
|
QStringList _animAlphaValues;
|
||||||
|
@ -50,6 +60,10 @@ private:
|
||||||
std::map<QString, qint64> _animVarChangedTimers; // last time animVar value has changed.
|
std::map<QString, qint64> _animVarChangedTimers; // last time animVar value has changed.
|
||||||
|
|
||||||
QStringList _animStateMachines;
|
QStringList _animStateMachines;
|
||||||
|
|
||||||
|
QString _positionText;
|
||||||
|
QString _rotationText;
|
||||||
|
QString _velocityText;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AnimStats_h
|
#endif // hifi_AnimStats_h
|
||||||
|
|
|
@ -88,6 +88,10 @@ const AnimPoseVec& AnimStateMachine::evaluate(const AnimVariantMap& animVars, co
|
||||||
processOutputJoints(triggersOut);
|
processOutputJoints(triggersOut);
|
||||||
|
|
||||||
context.addStateMachineInfo(_id, _currentState->getID(), _previousState->getID(), _duringInterp, _alpha);
|
context.addStateMachineInfo(_id, _currentState->getID(), _previousState->getID(), _duringInterp, _alpha);
|
||||||
|
if (_duringInterp) {
|
||||||
|
// hack: add previoius state to debug alpha map, with parens around it's name.
|
||||||
|
context.setDebugAlpha(QString("(%1)").arg(_previousState->getID()), 1.0f - _alpha, AnimNodeType::Clip);
|
||||||
|
}
|
||||||
|
|
||||||
return _poses;
|
return _poses;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,14 +140,19 @@ std::map<QString, QString> AnimVariantMap::toDebugMap() const {
|
||||||
result[pair.first] = QString::number(pair.second.getFloat(), 'f', 3);
|
result[pair.first] = QString::number(pair.second.getFloat(), 'f', 3);
|
||||||
break;
|
break;
|
||||||
case AnimVariant::Type::Vec3: {
|
case AnimVariant::Type::Vec3: {
|
||||||
|
// To prevent filling up debug stats, don't show vec3 values
|
||||||
|
/*
|
||||||
glm::vec3 value = pair.second.getVec3();
|
glm::vec3 value = pair.second.getVec3();
|
||||||
result[pair.first] = QString("(%1, %2, %3)").
|
result[pair.first] = QString("(%1, %2, %3)").
|
||||||
arg(QString::number(value.x, 'f', 3)).
|
arg(QString::number(value.x, 'f', 3)).
|
||||||
arg(QString::number(value.y, 'f', 3)).
|
arg(QString::number(value.y, 'f', 3)).
|
||||||
arg(QString::number(value.z, 'f', 3));
|
arg(QString::number(value.z, 'f', 3));
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AnimVariant::Type::Quat: {
|
case AnimVariant::Type::Quat: {
|
||||||
|
// To prevent filling up the anim stats, don't show quat values
|
||||||
|
/*
|
||||||
glm::quat value = pair.second.getQuat();
|
glm::quat value = pair.second.getQuat();
|
||||||
result[pair.first] = QString("(%1, %2, %3, %4)").
|
result[pair.first] = QString("(%1, %2, %3, %4)").
|
||||||
arg(QString::number(value.x, 'f', 3)).
|
arg(QString::number(value.x, 'f', 3)).
|
||||||
|
@ -155,10 +160,14 @@ std::map<QString, QString> AnimVariantMap::toDebugMap() const {
|
||||||
arg(QString::number(value.z, 'f', 3)).
|
arg(QString::number(value.z, 'f', 3)).
|
||||||
arg(QString::number(value.w, 'f', 3));
|
arg(QString::number(value.w, 'f', 3));
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
case AnimVariant::Type::String:
|
case AnimVariant::Type::String:
|
||||||
|
// To prevent filling up anim stats, don't show string values
|
||||||
|
/*
|
||||||
result[pair.first] = pair.second.getString();
|
result[pair.first] = pair.second.getString();
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
assert(("invalid AnimVariant::Type", false));
|
assert(("invalid AnimVariant::Type", false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2829,8 +2829,10 @@ void RayToAvatarIntersectionResultFromScriptValue(const QScriptValue& object, Ra
|
||||||
value.extraInfo = object.property("extraInfo").toVariant().toMap();
|
value.extraInfo = object.property("extraInfo").toVariant().toMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// these coefficients can be changed via JS for experimental tuning
|
||||||
|
// use AvatatManager.setAvatarSortCoefficient("name", value) by a user with domain kick-rights
|
||||||
float AvatarData::_avatarSortCoefficientSize { 8.0f };
|
float AvatarData::_avatarSortCoefficientSize { 8.0f };
|
||||||
float AvatarData::_avatarSortCoefficientCenter { 4.0f };
|
float AvatarData::_avatarSortCoefficientCenter { 0.25f };
|
||||||
float AvatarData::_avatarSortCoefficientAge { 1.0f };
|
float AvatarData::_avatarSortCoefficientAge { 1.0f };
|
||||||
|
|
||||||
QScriptValue AvatarEntityMapToScriptValue(QScriptEngine* engine, const AvatarEntityMap& value) {
|
QScriptValue AvatarEntityMapToScriptValue(QScriptEngine* engine, const AvatarEntityMap& value) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ void GL41Backend::postLinkProgram(ShaderObject& programObject, const Shader& pro
|
||||||
const auto resourceBufferUniforms = ::gl::Uniform::loadByName(glprogram, program.getResourceBuffers().getNames());
|
const auto resourceBufferUniforms = ::gl::Uniform::loadByName(glprogram, program.getResourceBuffers().getNames());
|
||||||
for (const auto& resourceBuffer : resourceBufferUniforms) {
|
for (const auto& resourceBuffer : resourceBufferUniforms) {
|
||||||
const auto& targetBinding = expectedResourceBuffers.at(resourceBuffer.name);
|
const auto& targetBinding = expectedResourceBuffers.at(resourceBuffer.name);
|
||||||
glProgramUniform1i(glprogram, resourceBuffer.binding, targetBinding);
|
glProgramUniform1i(glprogram, resourceBuffer.binding, targetBinding + GL41Backend::RESOURCE_BUFFER_SLOT0_TEX_UNIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -538,7 +538,6 @@ void AccountManager::requestAccessToken(const QString& login, const QString& pas
|
||||||
|
|
||||||
QNetworkReply* requestReply = networkAccessManager.post(request, postData);
|
QNetworkReply* requestReply = networkAccessManager.post(request, postData);
|
||||||
connect(requestReply, &QNetworkReply::finished, this, &AccountManager::requestAccessTokenFinished);
|
connect(requestReply, &QNetworkReply::finished, this, &AccountManager::requestAccessTokenFinished);
|
||||||
connect(requestReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(requestAccessTokenError(QNetworkReply::NetworkError)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountManager::requestAccessTokenWithSteam(QByteArray authSessionTicket) {
|
void AccountManager::requestAccessTokenWithSteam(QByteArray authSessionTicket) {
|
||||||
|
@ -633,12 +632,6 @@ void AccountManager::requestAccessTokenFinished() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountManager::requestAccessTokenError(QNetworkReply::NetworkError error) {
|
|
||||||
// TODO: error handling
|
|
||||||
qCDebug(networking) << "AccountManager: failed to fetch access token - " << error;
|
|
||||||
emit loginFailed();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AccountManager::refreshAccessTokenFinished() {
|
void AccountManager::refreshAccessTokenFinished() {
|
||||||
QNetworkReply* requestReply = reinterpret_cast<QNetworkReply*>(sender());
|
QNetworkReply* requestReply = reinterpret_cast<QNetworkReply*>(sender());
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,6 @@ public slots:
|
||||||
void requestAccessTokenFinished();
|
void requestAccessTokenFinished();
|
||||||
void refreshAccessTokenFinished();
|
void refreshAccessTokenFinished();
|
||||||
void requestProfileFinished();
|
void requestProfileFinished();
|
||||||
void requestAccessTokenError(QNetworkReply::NetworkError error);
|
|
||||||
void refreshAccessTokenError(QNetworkReply::NetworkError error);
|
void refreshAccessTokenError(QNetworkReply::NetworkError error);
|
||||||
void requestProfileError(QNetworkReply::NetworkError error);
|
void requestProfileError(QNetworkReply::NetworkError error);
|
||||||
void logout();
|
void logout();
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<@include Highlight_shared.slh@>
|
<@include Highlight_shared.slh@>
|
||||||
|
|
||||||
layout(binding=RENDER_UTILS_BUFFER_HIGHLIGHT_PARAMS) uniform highlightParamsBuffer {
|
layout(std140, binding=RENDER_UTILS_BUFFER_HIGHLIGHT_PARAMS) uniform highlightParamsBuffer {
|
||||||
HighlightParameters params;
|
HighlightParameters params;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct HighlightParameters {
|
||||||
vec2 outlineWidth;
|
vec2 outlineWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding=0) uniform parametersBuffer {
|
layout(std140, binding=0) uniform parametersBuffer {
|
||||||
HighlightParameters _parameters;
|
HighlightParameters _parameters;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1553,14 +1553,13 @@ void Model::setBlendedVertices(int blendNumber, const QVector<glm::vec3>& vertic
|
||||||
for (int i = 0; i < fbxGeometry.meshes.size(); i++) {
|
for (int i = 0; i < fbxGeometry.meshes.size(); i++) {
|
||||||
const FBXMesh& mesh = fbxGeometry.meshes.at(i);
|
const FBXMesh& mesh = fbxGeometry.meshes.at(i);
|
||||||
auto meshNormalsAndTangents = _normalsAndTangents.find(i);
|
auto meshNormalsAndTangents = _normalsAndTangents.find(i);
|
||||||
if (mesh.blendshapes.isEmpty() || meshNormalsAndTangents == _normalsAndTangents.end()) {
|
const auto& buffer = _blendedVertexBuffers.find(i);
|
||||||
|
if (mesh.blendshapes.isEmpty() || meshNormalsAndTangents == _normalsAndTangents.end() || buffer == _blendedVertexBuffers.end()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto vertexCount = mesh.vertices.size();
|
const auto vertexCount = mesh.vertices.size();
|
||||||
const auto verticesSize = vertexCount * sizeof(glm::vec3);
|
const auto verticesSize = vertexCount * sizeof(glm::vec3);
|
||||||
const auto& buffer = _blendedVertexBuffers.find(i);
|
|
||||||
assert(buffer != _blendedVertexBuffers.end());
|
|
||||||
buffer->second->resize(mesh.vertices.size() * sizeof(glm::vec3) + meshNormalsAndTangents->second.size() * sizeof(NormalType));
|
buffer->second->resize(mesh.vertices.size() * sizeof(glm::vec3) + meshNormalsAndTangents->second.size() * sizeof(NormalType));
|
||||||
buffer->second->setSubData(0, verticesSize, (gpu::Byte*) vertices.constData() + index * sizeof(glm::vec3));
|
buffer->second->setSubData(0, verticesSize, (gpu::Byte*) vertices.constData() + index * sizeof(glm::vec3));
|
||||||
buffer->second->setSubData(verticesSize, meshNormalsAndTangents->second.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data() + normalAndTangentIndex * sizeof(NormalType));
|
buffer->second->setSubData(verticesSize, meshNormalsAndTangents->second.size() * sizeof(NormalType), (const gpu::Byte*) normalsAndTangents.data() + normalAndTangentIndex * sizeof(NormalType));
|
||||||
|
|
|
@ -2134,9 +2134,7 @@ var PropertiesTool = function (opts) {
|
||||||
var onWebEventReceived = function(data) {
|
var onWebEventReceived = function(data) {
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
}
|
} catch(e) {
|
||||||
catch(e) {
|
|
||||||
print('Edit.js received web event that was not valid json.');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var i, properties, dY, diff, newPosition;
|
var i, properties, dY, diff, newPosition;
|
||||||
|
|
|
@ -27,8 +27,11 @@ const COMPARE_ASCENDING = function(a, b) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (va > vb) {
|
} else if (va > vb) {
|
||||||
return 1;
|
return 1;
|
||||||
|
} else if (a.id < b.id) {
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
const COMPARE_DESCENDING = function(a, b) {
|
const COMPARE_DESCENDING = function(a, b) {
|
||||||
return COMPARE_ASCENDING(b, a);
|
return COMPARE_ASCENDING(b, a);
|
||||||
|
@ -161,7 +164,10 @@ function loaded() {
|
||||||
|
|
||||||
selectedEntities.forEach(function(entityID) {
|
selectedEntities.forEach(function(entityID) {
|
||||||
if (selection.indexOf(entityID) === -1) {
|
if (selection.indexOf(entityID) === -1) {
|
||||||
entitiesByID[entityID].el.className = '';
|
let entity = entitiesByID[entityID];
|
||||||
|
if (entity !== undefined) {
|
||||||
|
entity.el.className = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -223,15 +229,15 @@ function loaded() {
|
||||||
type: type,
|
type: type,
|
||||||
url: filename,
|
url: filename,
|
||||||
fullUrl: entity.url,
|
fullUrl: entity.url,
|
||||||
locked: entity.locked ? LOCKED_GLYPH : null,
|
locked: entity.locked,
|
||||||
visible: entity.visible ? VISIBLE_GLYPH : null,
|
visible: entity.visible,
|
||||||
verticesCount: displayIfNonZero(entity.verticesCount),
|
verticesCount: entity.verticesCount,
|
||||||
texturesCount: displayIfNonZero(entity.texturesCount),
|
texturesCount: entity.texturesCount,
|
||||||
texturesSize: decimalMegabytes(entity.texturesSize),
|
texturesSize: entity.texturesSize,
|
||||||
hasTransparent: entity.hasTransparent ? TRANSPARENCY_GLYPH : null,
|
hasTransparent: entity.hasTransparent,
|
||||||
isBaked: entity.isBaked ? BAKED_GLYPH : null,
|
isBaked: entity.isBaked,
|
||||||
drawCalls: displayIfNonZero(entity.drawCalls),
|
drawCalls: entity.drawCalls,
|
||||||
hasScript: entity.hasScript ? SCRIPT_GLYPH : null,
|
hasScript: entity.hasScript,
|
||||||
}
|
}
|
||||||
|
|
||||||
entities.push(entityData);
|
entities.push(entityData);
|
||||||
|
@ -259,15 +265,15 @@ function loaded() {
|
||||||
addColumn('type', entity.type);
|
addColumn('type', entity.type);
|
||||||
addColumn('name', entity.name);
|
addColumn('name', entity.name);
|
||||||
addColumn('url', entity.url);
|
addColumn('url', entity.url);
|
||||||
addColumnHTML('locked glyph', entity.locked);
|
addColumnHTML('locked glyph', entity.locked ? LOCKED_GLYPH : null);
|
||||||
addColumnHTML('visible glyph', entity.visible);
|
addColumnHTML('visible glyph', entity.visible ? VISIBLE_GLYPH : null);
|
||||||
addColumn('verticesCount', entity.verticesCount);
|
addColumn('verticesCount', displayIfNonZero(entity.verticesCount));
|
||||||
addColumn('texturesCount', entity.texturesCount);
|
addColumn('texturesCount', displayIfNonZero(entity.texturesCount));
|
||||||
addColumn('texturesSize', entity.texturesSize);
|
addColumn('texturesSize', decimalMegabytes(entity.texturesSize));
|
||||||
addColumnHTML('hasTransparent glyph', entity.hasTransparent);
|
addColumnHTML('hasTransparent glyph', entity.hasTransparent ? TRANSPARENCY_GLYPH : null);
|
||||||
addColumnHTML('isBaked glyph', entity.isBaked);
|
addColumnHTML('isBaked glyph', entity.isBaked ? BAKED_GLYPH : null);
|
||||||
addColumn('drawCalls', entity.drawCalls);
|
addColumn('drawCalls', displayIfNonZero(entity.drawCalls));
|
||||||
addColumn('hasScript glyph', entity.hasScript);
|
addColumn('hasScript glyph', entity.hasScript ? SCRIPT_GLYPH : null);
|
||||||
row.addEventListener('click', onRowClicked);
|
row.addEventListener('click', onRowClicked);
|
||||||
row.addEventListener('dblclick', onRowDoubleClicked);
|
row.addEventListener('dblclick', onRowDoubleClicked);
|
||||||
|
|
||||||
|
@ -385,15 +391,18 @@ function loaded() {
|
||||||
let notFound = false;
|
let notFound = false;
|
||||||
|
|
||||||
selectedEntities.forEach(function(id) {
|
selectedEntities.forEach(function(id) {
|
||||||
entitiesByID[id].el.className = '';
|
let entity = entitiesByID[id];
|
||||||
|
if (entity !== undefined) {
|
||||||
|
entity.el.className = '';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
selectedEntities = [];
|
selectedEntities = [];
|
||||||
for (let i = 0; i < selectedIDs.length; i++) {
|
for (let i = 0; i < selectedIDs.length; i++) {
|
||||||
let id = selectedIDs[i];
|
let id = selectedIDs[i];
|
||||||
selectedEntities.push(id);
|
selectedEntities.push(id);
|
||||||
if (id in entitiesByID) {
|
let entity = entitiesByID[id];
|
||||||
let entity = entitiesByID[id];
|
if (entity !== undefined) {
|
||||||
entity.el.className = 'selected';
|
entity.el.className = 'selected';
|
||||||
} else {
|
} else {
|
||||||
notFound = true;
|
notFound = true;
|
||||||
|
|
|
@ -140,7 +140,6 @@
|
||||||
localPosition: { x: 0.0 , y: -1.5, z: -0.3 },
|
localPosition: { x: 0.0 , y: -1.5, z: -0.3 },
|
||||||
url: Script.resourcesPath() + "images/interstitialPage/goTo_button.png",
|
url: Script.resourcesPath() + "images/interstitialPage/goTo_button.png",
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
dimensions: { x: 1.5, y: 1.0 },
|
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
ignoreRayIntersection: false,
|
ignoreRayIntersection: false,
|
||||||
|
|
|
@ -267,7 +267,6 @@ GridTool = function(opts) {
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("gridTool.js: Error parsing JSON: " + e.name + " data " + data);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue