Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 41 files). Show all
Unified · Split
| @@ -32,10 +32,13 @@ · 31 unmodified lines | |||
| 32 | #include <VoxelDetail.h> | 32 | #include <VoxelDetail.h> |
| 33 | 33 | ||
| 34 | #include "AnimationObject.h" | 34 | #include "AnimationObject.h" |
| 35 | #include "ArrayBufferViewClass.h" | ||
| 36 | #include "DataViewClass.h" | ||
| 35 | #include "MenuItemProperties.h" | 37 | #include "MenuItemProperties.h" |
| 36 | #include "MIDIEvent.h" | 38 | #include "MIDIEvent.h" |
| 37 | #include "LocalVoxels.h" | 39 | #include "LocalVoxels.h" |
| 38 | #include "ScriptEngine.h" | 40 | #include "ScriptEngine.h" |
| 41 | #include "TypedArrays.h" | ||
| 39 | #include "XMLHttpRequestClass.h" | 42 | #include "XMLHttpRequestClass.h" |
| 40 | 43 | ||
| 41 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; | 44 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; |
| @@ -90,7 +93,8 @@ ScriptEngine::ScriptEngine(const QString& scriptContents, const QString& fileNam · 48 unmodified lines | |||
| 90 | _quatLibrary(), | 93 | _quatLibrary(), |
| 91 | _vec3Library(), | 94 | _vec3Library(), |
| 92 | _uuidLibrary(), | 95 | _uuidLibrary(), |
| 93 | _animationCache(this) | 96 | _animationCache(this), |
| 97 | _arrayBufferClass(new ArrayBufferClass(this)) | ||
| 94 | { | 98 | { |
| 95 | } | 99 | } |
| 96 | 100 | ||
| @@ -115,13 +119,14 @@ ScriptEngine::ScriptEngine(const QUrl& scriptURL, · 18 unmodified lines | |||
| 115 | _quatLibrary(), | 119 | _quatLibrary(), |
| 116 | _vec3Library(), | 120 | _vec3Library(), |
| 117 | _uuidLibrary(), | 121 | _uuidLibrary(), |
| 118 | _animationCache(this) | 122 | _animationCache(this), |
| 123 | _arrayBufferClass(new ArrayBufferClass(this)) | ||
| 119 | { | 124 | { |
| 120 | QString scriptURLString = scriptURL.toString(); | 125 | QString scriptURLString = scriptURL.toString(); |
| 121 | _fileNameString = scriptURLString; | 126 | _fileNameString = scriptURLString; |
| 122 | 127 | ||
| 123 | QUrl url(scriptURL); | 128 | QUrl url(scriptURL); |
| 124 | 129 | ||
| 125 | // if the scheme length is one or lower, maybe they typed in a file, let's try | 130 | // if the scheme length is one or lower, maybe they typed in a file, let's try |
| 126 | const int WINDOWS_DRIVE_LETTER_SIZE = 1; | 131 | const int WINDOWS_DRIVE_LETTER_SIZE = 1; |
| 127 | if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) { | 132 | if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) { |
| @@ -210,7 +215,7 @@ void ScriptEngine::init() { · 82 unmodified lines | |||
| 210 | if (_isInitialized) { | 215 | if (_isInitialized) { |
| 211 | return; // only initialize once | 216 | return; // only initialize once |
| 212 | } | 217 | } |
| 213 | 218 | ||
| 214 | _isInitialized = true; | 219 | _isInitialized = true; |
| 215 | 220 | ||
| 216 | _voxelsScriptingInterface.init(); | 221 | _voxelsScriptingInterface.init(); |