QScriptValue Text3DOverlay::getProperty(const QString& property) { if (property == "text") { return _text; } if (property == "backgroundColor") { return xColorToScriptValue(_scriptEngine, _backgroundColor); } if (property == "backgroundAlpha") { return _backgroundAlpha; } if (property == "lineHeight") { return _lineHeight; } if (property == "leftMargin") { return _leftMargin; } if (property == "topMargin") { return _topMargin; } if (property == "rightMargin") { return _rightMargin; } if (property == "bottomMargin") { return _bottomMargin; } if (property == "isFacingAvatar") { return _isFacingAvatar; } return Planar3DOverlay::getProperty(property); }
QScriptValue ModelItemProperties::copyToScriptValue(QScriptEngine* engine) const { QScriptValue properties = engine->newObject(); QScriptValue position = vec3toScriptValue(engine, _position); properties.setProperty("position", position); QScriptValue color = xColorToScriptValue(engine, _color); properties.setProperty("color", color); properties.setProperty("radius", _radius); properties.setProperty("shouldDie", _shouldDie); properties.setProperty("modelURL", _modelURL); QScriptValue modelRotation = quatToScriptValue(engine, _modelRotation); properties.setProperty("modelRotation", modelRotation); if (_idSet) { properties.setProperty("id", _id); properties.setProperty("isKnownID", (_id != UNKNOWN_MODEL_ID)); } return properties; }
QScriptValue Circle3DOverlay::getProperty(const QString& property) { if (property == "startAt") { return _startAt; } if (property == "endAt") { return _endAt; } if (property == "outerRadius") { return _outerRadius; } if (property == "innerRadius") { return _innerRadius; } if (property == "hasTickMarks") { return _hasTickMarks; } if (property == "majorTickMarksAngle") { return _majorTickMarksAngle; } if (property == "minorTickMarksAngle") { return _minorTickMarksAngle; } if (property == "majorTickMarksLength") { return _majorTickMarksLength; } if (property == "minorTickMarksLength") { return _minorTickMarksLength; } if (property == "majorTickMarksColor") { return xColorToScriptValue(_scriptEngine, _majorTickMarksColor); } if (property == "minorTickMarksColor") { return xColorToScriptValue(_scriptEngine, _minorTickMarksColor); } return Planar3DOverlay::getProperty(property); }
QScriptValue Overlay::getProperty(const QString& property) { if (property == "color") { return xColorToScriptValue(_scriptEngine, _color); } if (property == "alpha") { return _alpha; } if (property == "glowLevel") { return _glowLevel; } if (property == "pulseMax") { return _pulseMax; } if (property == "pulseMin") { return _pulseMin; } if (property == "pulsePeriod") { return _pulsePeriod; } if (property == "glowLevelPulse") { return _glowLevelPulse; } if (property == "alphaPulse") { return _alphaPulse; } if (property == "colorPulse") { return _colorPulse; } if (property == "visible") { return _visible; } if (property == "anchor") { return _anchor == MY_AVATAR ? "MyAvatar" : ""; } return QScriptValue(); }
QScriptValue TextOverlay::getProperty(const QString& property) { if (property == "font") { QScriptValue font = _scriptEngine->newObject(); font.setProperty("size", _fontSize); return font; } if (property == "text") { return _text; } if (property == "backgroundColor") { return xColorToScriptValue(_scriptEngine, _backgroundColor); } if (property == "backgroundAlpha") { return _backgroundAlpha; } if (property == "leftMargin") { return _leftMargin; } if (property == "topMargin") { return _topMargin; } return Overlay2D::getProperty(property); }