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