mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 09:42:23 +02:00
Minor fixes and XMLHTTPRequest debugging
This commit is contained in:
parent
d74089d7d8
commit
48a3368b69
7 changed files with 42 additions and 23 deletions
|
@ -230,7 +230,6 @@ void ParabolaPointer::RenderState::update(const glm::vec3& origin, const glm::ve
|
|||
item.updateBounds();
|
||||
});
|
||||
scene->enqueueTransaction(transaction);
|
||||
qDebug() << "ParabolaPointer::RenderState::update";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,7 +283,6 @@ std::shared_ptr<StartEndRenderState> ParabolaPointer::buildRenderState(const QVa
|
|||
if (pathMap["drawInFront"].isValid()) {
|
||||
drawInFront = pathMap["drawInFront"].toBool();
|
||||
}
|
||||
qDebug() << "ParabolaPointer::buildRenderState";
|
||||
}
|
||||
|
||||
QUuid endID;
|
||||
|
@ -470,7 +468,6 @@ void ParabolaPointer::RenderState::ParabolaRenderItem::render(RenderArgs* args)
|
|||
|
||||
// We draw 2 * n + 2 vertices for a triangle strip
|
||||
batch.draw(gpu::TRIANGLE_STRIP, 2 * _parabolaData.numSections + 2, 0);
|
||||
qDebug() << "ParabolaPointer::RenderState::ParabolaRenderItem::render";
|
||||
}
|
||||
|
||||
namespace render {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "ScriptException.h"
|
||||
|
||||
// These are used for debugging memory leaks caused by persistent handles
|
||||
#define OVERTE_V8_MEMORY_DEBUG
|
||||
//#define OVERTE_V8_MEMORY_DEBUG
|
||||
|
||||
class QByteArray;
|
||||
class QLatin1String;
|
||||
|
|
|
@ -234,6 +234,8 @@ void XMLHttpRequestClass::requestFinished() {
|
|||
}
|
||||
}
|
||||
|
||||
qDebug() << "XMLHttpRequestClass::requestFinished : ec: " << _errorCode << " rt: " << _responseType << " URL: " << _url
|
||||
<< " method: " << _method << "data" << QString(_rawResponseData.data());
|
||||
setReadyState(DONE);
|
||||
emit requestComplete();
|
||||
|
||||
|
|
|
@ -32,9 +32,17 @@ public: // construction
|
|||
ScriptValueV8Wrapper() = delete;
|
||||
//ScriptValueV8Wrapper(ScriptValueV8Wrapper &) = delete;
|
||||
inline ScriptValueV8Wrapper(ScriptEngineV8* engine, const V8ScriptValue& value) :
|
||||
_engine(engine), _value(value) { engine->incrementScriptValueProxyCounter(); }
|
||||
_engine(engine), _value(value) {
|
||||
#ifdef OVERTE_V8_MEMORY_DEBUG
|
||||
engine->incrementScriptValueProxyCounter();
|
||||
#endif
|
||||
}
|
||||
inline ScriptValueV8Wrapper(ScriptEngineV8* engine, V8ScriptValue&& value) :
|
||||
_engine(engine), _value(std::move(value)) { engine->incrementScriptValueProxyCounter(); }
|
||||
_engine(engine), _value(std::move(value)) {
|
||||
#ifdef OVERTE_V8_MEMORY_DEBUG
|
||||
engine->incrementScriptValueProxyCounter();
|
||||
#endif
|
||||
}
|
||||
static ScriptValueV8Wrapper* unwrap(const ScriptValue& val);
|
||||
inline const V8ScriptValue& toV8Value() const { return _value; }
|
||||
static V8ScriptValue fullUnwrap(ScriptEngineV8* engine, const ScriptValue& value);
|
||||
|
@ -95,7 +103,11 @@ public: // ScriptValue implementation
|
|||
virtual QObject* toQObject() const override;
|
||||
|
||||
protected:
|
||||
virtual ~ScriptValueV8Wrapper() { _engine->decrementScriptValueProxyCounter(); };
|
||||
virtual ~ScriptValueV8Wrapper() {
|
||||
#ifdef OVERTE_V8_MEMORY_DEBUG
|
||||
_engine->decrementScriptValueProxyCounter();
|
||||
#endif
|
||||
};
|
||||
|
||||
private: // helper functions
|
||||
V8ScriptValue fullUnwrap(const ScriptValue& value) const;
|
||||
|
|
|
@ -521,17 +521,20 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
} else {
|
||||
// Set play area position and rotation in local coordinates with parenting.
|
||||
var targetRotation = Entities.getEntityProperties(_this.targetOverlayID, ["rotation"]).rotation;
|
||||
var sensorToTargetRotation = Quat.multiply(Quat.inverse(targetRotation), sensorToWorldRotation);
|
||||
var relativePlayAreaCenterOffset =
|
||||
Vec3.sum(_this.playAreaCenterOffset, { x: 0, y: -TARGET_MODEL_DIMENSIONS.y / 2, z: 0 });
|
||||
Overlays.editOverlay(_this.playAreaOverlay, {
|
||||
parentID: _this.targetOverlayID,
|
||||
localPosition: Vec3.multiplyQbyV(Quat.inverse(targetRotation),
|
||||
Vec3.multiplyQbyV(sensorToWorldRotation,
|
||||
Vec3.multiply(MyAvatar.sensorToWorldScale,
|
||||
Vec3.subtract(relativePlayAreaCenterOffset, avatarSensorPosition)))),
|
||||
localRotation: sensorToTargetRotation
|
||||
});
|
||||
// TODO: Why is targetRotation undefined sometimes?
|
||||
if (targetRotation) {
|
||||
var sensorToTargetRotation = Quat.multiply(Quat.inverse(targetRotation), sensorToWorldRotation);
|
||||
var relativePlayAreaCenterOffset =
|
||||
Vec3.sum(_this.playAreaCenterOffset, {x: 0, y: -TARGET_MODEL_DIMENSIONS.y / 2, z: 0});
|
||||
Overlays.editOverlay(_this.playAreaOverlay, {
|
||||
parentID: _this.targetOverlayID,
|
||||
localPosition: Vec3.multiplyQbyV(Quat.inverse(targetRotation),
|
||||
Vec3.multiplyQbyV(sensorToWorldRotation,
|
||||
Vec3.multiply(MyAvatar.sensorToWorldScale,
|
||||
Vec3.subtract(relativePlayAreaCenterOffset, avatarSensorPosition)))),
|
||||
localRotation: sensorToTargetRotation
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -654,10 +654,10 @@ EditVoxels = function() {
|
|||
}
|
||||
|
||||
function cleanup() {
|
||||
Controller.mousePressEvent.disconnect(self.mousePressEvent);
|
||||
Controller.mouseReleaseEvent.disconnect(self.mouseReleaseEvent);
|
||||
Controller.keyPressEvent.disconnect(self.keyPressEvent);
|
||||
Controller.keyReleaseEvent.disconnect(self.keyReleaseEvent);
|
||||
Controller.mousePressEvent.disconnect(mousePressEvent);
|
||||
Controller.mouseReleaseEvent.disconnect(mouseReleaseEvent);
|
||||
Controller.keyPressEvent.disconnect(keyPressEvent);
|
||||
Controller.keyReleaseEvent.disconnect(keyReleaseEvent);
|
||||
}
|
||||
|
||||
Controller.mousePressEvent.connect(mousePressEvent);
|
||||
|
|
|
@ -2638,7 +2638,12 @@ SelectionDisplay = (function() {
|
|||
that.showDebugPickPlaneHit(newPick);
|
||||
}
|
||||
|
||||
var vector = Vec3.subtract(newPick, initialPick);
|
||||
var vector = null;
|
||||
if (initialPick) {
|
||||
vector = Vec3.subtract(newPick, initialPick);
|
||||
} else {
|
||||
vector = newPick;
|
||||
}
|
||||
|
||||
// If the mouse is too close to the horizon of the pick plane, stop moving
|
||||
var MIN_ELEVATION = 0.02; // largest dimension of object divided by distance to it
|
||||
|
|
Loading…
Reference in a new issue