This reverts commit 584e4be0082c07c62b6ad1f17d4258878ce3223c.
Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 12 files). Show all
Unified · Split
| @@ -1698,14 +1698,9 @@ ScriptValue RayToEntityIntersectionResultToScriptValue(ScriptEngine* engine, con · 1697 unmodified lines | ||
| 1698 | 1698 | obj.setProperty("face", boxFaceToString(value.face)); |
| 1699 | 1699 | Q_ASSERT(value.face < 7); |
| 1700 | 1700 | |
| 1701 | −#ifdef CONVERSIONS_OPTIMIZED_FOR_V8 | |
| 1702 | − ScriptValue intersection = vec3ToScriptValueFast(engine, value.intersection); | |
| 1703 | − ScriptValue surfaceNormal = vec3ToScriptValueFast(engine, value.surfaceNormal); | |
| 1704 | −#else | |
| 1705 | 1701 | ScriptValue intersection = vec3ToScriptValue(engine, value.intersection); |
| 1706 | − ScriptValue surfaceNormal = vec3ToScriptValue(engine, value.surfaceNormal); | |
| 1707 | −#endif | |
| 1708 | 1702 | obj.setProperty("intersection", intersection); |
| 1703 | + ScriptValue surfaceNormal = vec3ToScriptValue(engine, value.surfaceNormal); | |
| 1709 | 1704 | obj.setProperty("surfaceNormal", surfaceNormal); |
| 1710 | 1705 | obj.setProperty("extraInfo", engine->toScriptValue(value.extraInfo)); |
| 1711 | 1706 | return obj; |
| @@ -1722,19 +1717,11 @@ bool RayToEntityIntersectionResultFromScriptValue(const ScriptValue& object, Ray · 10 unmodified lines | ||
| 1722 | 1717 | |
| 1723 | 1718 | ScriptValue intersection = object.property("intersection"); |
| 1724 | 1719 | if (intersection.isValid()) { |
| 1725 | −#ifdef CONVERSIONS_OPTIMIZED_FOR_V8 | |
| 1726 | − vec3FromScriptValueFast(intersection, value.intersection); | |
| 1727 | −#else | |
| 1728 | 1720 | vec3FromScriptValue(intersection, value.intersection); |
| 1729 | −#endif | |
| 1730 | 1721 | } |
| 1731 | 1722 | ScriptValue surfaceNormal = object.property("surfaceNormal"); |
| 1732 | 1723 | if (surfaceNormal.isValid()) { |
| 1733 | −#ifdef CONVERSIONS_OPTIMIZED_FOR_V8 | |
| 1734 | − vec3FromScriptValueFast(surfaceNormal, value.surfaceNormal); | |
| 1735 | −#else | |
| 1736 | 1724 | vec3FromScriptValue(surfaceNormal, value.surfaceNormal); |
| 1737 | −#endif | |
| 1738 | 1725 | } |
| 1739 | 1726 | value.extraInfo = object.property("extraInfo").toVariant().toMap(); |
| 1740 | 1727 | return true; |