From c9378c630d4d6f4d28a62a12f6e6be8a3967fb37 Mon Sep 17 00:00:00 2001 From: Chewico Date: Tue, 9 Dec 2025 10:31:21 +0100 Subject: [PATCH] Cleanup codebase --- Editor/.undo-redo-ned.json | 39 - Editor/Modules/ActiveEntity/as.predefined | 436 --------- .../Modules/EntityManipulation/as.predefined | 436 --------- Editor/Modules/Previewer/as.predefined | 405 -------- Editor/Modules/ResourceExplorer/as.predefined | 436 --------- Editor/Modules/TreeExplorer/as.predefined | 436 --------- Editor/Modules/Viewport/as.predefined | 436 --------- .../Panels/EntityManipulation/AddComponent.as | 40 - .../EntityManipulation/CameraProperties.as | 49 - .../EntityManipulation/MeshProperties.as | 60 -- .../EntityManipulation/PropertiesPannel.as | 72 -- .../EntityManipulation/ShaderProperties.as | 75 -- .../EntityManipulation/TransformProperties.as | 19 - .../Panels/EntityManipulation/as.predefined | 872 ------------------ .../EntityManipulation/dockPanelModule.json | 13 - Editor/Panels/ResourceExplorer/GlobalVars.as | 1 - Editor/Panels/ResourceExplorer/IconRender.as | 93 -- .../ResourceExplorer/ResourceExplorer.as | 91 -- .../ResourceExplorer/ResourceMetadata.as | 8 - Editor/Panels/ResourceExplorer/as.predefined | 872 ------------------ .../ResourceExplorer/dockPanelModule.json | 8 - Editor/Panels/TreeExplorer/Tree.as | 94 -- Editor/Panels/TreeExplorer/as.predefined | 872 ------------------ .../Panels/TreeExplorer/dockPanelModule.json | 13 - Editor/Panels/Viewport/Viewport.as | 97 -- Editor/Panels/Viewport/as.predefined | 872 ------------------ Editor/Panels/Viewport/dockPanelModule.json | 8 - Editor/Services/ActiveEntity/ActiveEntity.as | 8 - .../Services/ActiveEntity/ServiceScript.json | 7 - Editor/Services/ActiveEntity/as.predefined | 436 --------- Editor/as.predefined_old | 564 ----------- Tools/Blockbench/deer_engine_exporter.js | 244 ----- Tools/Blockbench/exporter.js | 8 - Voxels/Data/blue.voxel | 6 - Voxels/Data/ceci.voxel | 6 - Voxels/Data/debug.voxel | 6 - Voxels/Data/debug_internal.voxel | 6 - Voxels/Data/dirt.voxel | 6 - Voxels/Data/grass.voxel | 6 - Voxels/Data/green.voxel | 6 - Voxels/Data/red.voxel | 6 - Voxels/Data/wood.voxel | 6 - Voxels/Shaders/solid_voxel.glsl | 88 -- Voxels/Textures/ceci.png | Bin 36661 -> 0 bytes Voxels/Textures/debug.png | Bin 575 -> 0 bytes Voxels/Textures/debug_internal.png | Bin 588 -> 0 bytes Voxels/Textures/dirt.png | Bin 7647 -> 0 bytes Voxels/Textures/dirt_grass.png | Bin 8982 -> 0 bytes Voxels/Textures/grass.png | Bin 4925 -> 0 bytes Voxels/Textures/info.png | Bin 140 -> 0 bytes Voxels/Textures/wood.png | Bin 4682 -> 0 bytes Voxels/Visuals/blue.vaspect | 18 - Voxels/Visuals/ceci.vaspect | 18 - Voxels/Visuals/debug.vaspect | 18 - Voxels/Visuals/debug_internal.vaspect | 18 - Voxels/Visuals/dir.vaspect | 18 - Voxels/Visuals/grass.vaspect | 18 - Voxels/Visuals/green.vaspect | 18 - Voxels/Visuals/red.vaspect | 18 - Voxels/Visuals/wood.vaspect | 18 - Web/Docs/.gitignore | 1 - Web/Docs/book.toml | 5 - Web/Docs/src/SUMMARY.md | 3 - Web/Docs/src/chapter_1.md | 1 - 64 files changed, 8434 deletions(-) delete mode 100644 Editor/.undo-redo-ned.json delete mode 100644 Editor/Modules/ActiveEntity/as.predefined delete mode 100644 Editor/Modules/EntityManipulation/as.predefined delete mode 100644 Editor/Modules/Previewer/as.predefined delete mode 100644 Editor/Modules/ResourceExplorer/as.predefined delete mode 100644 Editor/Modules/TreeExplorer/as.predefined delete mode 100644 Editor/Modules/Viewport/as.predefined delete mode 100644 Editor/Panels/EntityManipulation/AddComponent.as delete mode 100644 Editor/Panels/EntityManipulation/CameraProperties.as delete mode 100644 Editor/Panels/EntityManipulation/MeshProperties.as delete mode 100644 Editor/Panels/EntityManipulation/PropertiesPannel.as delete mode 100644 Editor/Panels/EntityManipulation/ShaderProperties.as delete mode 100644 Editor/Panels/EntityManipulation/TransformProperties.as delete mode 100644 Editor/Panels/EntityManipulation/as.predefined delete mode 100644 Editor/Panels/EntityManipulation/dockPanelModule.json delete mode 100644 Editor/Panels/ResourceExplorer/GlobalVars.as delete mode 100644 Editor/Panels/ResourceExplorer/IconRender.as delete mode 100644 Editor/Panels/ResourceExplorer/ResourceExplorer.as delete mode 100644 Editor/Panels/ResourceExplorer/ResourceMetadata.as delete mode 100644 Editor/Panels/ResourceExplorer/as.predefined delete mode 100644 Editor/Panels/ResourceExplorer/dockPanelModule.json delete mode 100644 Editor/Panels/TreeExplorer/Tree.as delete mode 100644 Editor/Panels/TreeExplorer/as.predefined delete mode 100644 Editor/Panels/TreeExplorer/dockPanelModule.json delete mode 100644 Editor/Panels/Viewport/Viewport.as delete mode 100644 Editor/Panels/Viewport/as.predefined delete mode 100644 Editor/Panels/Viewport/dockPanelModule.json delete mode 100644 Editor/Services/ActiveEntity/ActiveEntity.as delete mode 100644 Editor/Services/ActiveEntity/ServiceScript.json delete mode 100644 Editor/Services/ActiveEntity/as.predefined delete mode 100644 Editor/as.predefined_old delete mode 100644 Tools/Blockbench/deer_engine_exporter.js delete mode 100644 Tools/Blockbench/exporter.js delete mode 100644 Voxels/Data/blue.voxel delete mode 100644 Voxels/Data/ceci.voxel delete mode 100644 Voxels/Data/debug.voxel delete mode 100644 Voxels/Data/debug_internal.voxel delete mode 100644 Voxels/Data/dirt.voxel delete mode 100644 Voxels/Data/grass.voxel delete mode 100644 Voxels/Data/green.voxel delete mode 100644 Voxels/Data/red.voxel delete mode 100644 Voxels/Data/wood.voxel delete mode 100755 Voxels/Shaders/solid_voxel.glsl delete mode 100644 Voxels/Textures/ceci.png delete mode 100644 Voxels/Textures/debug.png delete mode 100644 Voxels/Textures/debug_internal.png delete mode 100644 Voxels/Textures/dirt.png delete mode 100644 Voxels/Textures/dirt_grass.png delete mode 100644 Voxels/Textures/grass.png delete mode 100644 Voxels/Textures/info.png delete mode 100644 Voxels/Textures/wood.png delete mode 100644 Voxels/Visuals/blue.vaspect delete mode 100644 Voxels/Visuals/ceci.vaspect delete mode 100644 Voxels/Visuals/debug.vaspect delete mode 100644 Voxels/Visuals/debug_internal.vaspect delete mode 100644 Voxels/Visuals/dir.vaspect delete mode 100644 Voxels/Visuals/grass.vaspect delete mode 100644 Voxels/Visuals/green.vaspect delete mode 100644 Voxels/Visuals/red.vaspect delete mode 100644 Voxels/Visuals/wood.vaspect delete mode 100644 Web/Docs/.gitignore delete mode 100644 Web/Docs/book.toml delete mode 100644 Web/Docs/src/SUMMARY.md delete mode 100644 Web/Docs/src/chapter_1.md diff --git a/Editor/.undo-redo-ned.json b/Editor/.undo-redo-ned.json deleted file mode 100644 index 541096a..0000000 --- a/Editor/.undo-redo-ned.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "files": { - "/home/chewico/Dev/DeerEngine/Editor/Services/ActiveEntity/ActiveEntity.as": { - "lastCommittedState": "class ActiveEntity : ServiceScript {\n Entity entity;\n\n void onInit() {\n entity = Engine::getMainEnvironment().getRootEntity();\n }\n \n [ServiceAPI]\n Entity getActiveEntity() {\n return entity;\n }\n\n [ServiceAPI]\n void setActiveEntity(Entity ent) {\n entity = ent;\n }\n\n [ServiceAPI]\n void renameEntity(any@ data) {\n Entity entity;\n data.retrieve(entity);\n \n string name = entity.name;\n if (UI::inputText(\"##RENAME\", name, name)) {\n entity.name = name;\n }\n \n UI::sameline();\n if (UI::button(\"Accept\")) {\n UI::closePopup();\n }\n }\n}\n", - "maxStackSize": 50, - "redoStack": [ - { - "cursor_after": 294, - "cursor_before": 293, - "inserted": "d", - "position": 293, - "removed": "" - } - ], - "undoStack": [] - }, - "/home/chewico/Dev/DeerEngine/Editor/Services/ActiveEntity/ServiceScript.json": { - "lastCommittedState": "{\n \"serviceScriptModule\" : {\n \"name\" : \"ActiveEntity\",\n \"author\" : \"Chewico\",\n \"version\" : \"1.0.0\"\n }\n}", - "maxStackSize": 50, - "redoStack": [], - "undoStack": [ - { - "cursor_after": 100, - "cursor_before": 128, - "inserted": "}\n \"version\" : \"1.0.0\"", - "position": 99, - "removed": " \"version\" : \"1.0.0\"\n }" - }, - { - "cursor_after": 128, - "cursor_before": 100, - "inserted": " \"version\" : \"1.0.0\"\n }", - "position": 99, - "removed": "}\n \"version\" : \"1.0.0\"" - } - ] - } - } -} \ No newline at end of file diff --git a/Editor/Modules/ActiveEntity/as.predefined b/Editor/Modules/ActiveEntity/as.predefined deleted file mode 100644 index 40b097e..0000000 --- a/Editor/Modules/ActiveEntity/as.predefined +++ /dev/null @@ -1,436 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 656, - MouseRight = 657, - MouseMiddle = 658 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class GPUMesh { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMesh get_meshResource() property; - void set_meshResource(GPUMesh) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class Panel { - void render(); -} -class Service { -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace UI { bool button(const string&in text); } -namespace UI { bool buttonCenter(const string&in text); } -namespace UI { bool buttonEnd(const string&in text); } -namespace UI { bool cartIconButton(const string&in label, const string&in icon, int iconSize, int width); } -namespace UI { bool checkbox(const string&in text, bool value); } -namespace UI { bool checkboxDisabled(const string&in text, bool value); } -namespace UI { float magicSlider(const string&in text, float value, float speed); } -namespace UI { vec3 magicSlider3(const string&in text, vec3 value, float speed); } -namespace UI { int sliderInt(string&in text, int value, int min, int max); } -namespace UI { float slider(string&in text, float value, float min, float max); } -namespace UI { bool inputText(const string&in text, const string&in value, string&out valueOutput); } -namespace UI { bool menuItem(const string&in text); } -namespace UI { void menuItemDisabled(const string&in text); } -namespace UI { void subMenu(const string&in text, Callback@ func); } -namespace UI { void text(const string&in text); } -namespace UI { void textCenter(const string&in text); } -namespace UI { void textEnd(const string&in text); } -namespace UI { void textColor(float r, float g, float b, const string&in text); } -namespace UI { void title(const string&in text); } -namespace UI { void titleCenter(const string&in text); } -namespace UI { void titleCenterY(const string&in text, int height); } -namespace UI { void titleEnd(const string&in text); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int x, int y = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -namespace Resource { GPUMesh loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace Resource { Environment getMainEnvironment(); } -namespace Resource { Environment createLoadEnvironment(const string&in envId); } -namespace Engine { Entity getRoot(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { FrameBuffer createLoadRGBA8FrameBuffer(const string&in, int width, int height, int samples = 4); } diff --git a/Editor/Modules/EntityManipulation/as.predefined b/Editor/Modules/EntityManipulation/as.predefined deleted file mode 100644 index 40b097e..0000000 --- a/Editor/Modules/EntityManipulation/as.predefined +++ /dev/null @@ -1,436 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 656, - MouseRight = 657, - MouseMiddle = 658 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class GPUMesh { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMesh get_meshResource() property; - void set_meshResource(GPUMesh) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class Panel { - void render(); -} -class Service { -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace UI { bool button(const string&in text); } -namespace UI { bool buttonCenter(const string&in text); } -namespace UI { bool buttonEnd(const string&in text); } -namespace UI { bool cartIconButton(const string&in label, const string&in icon, int iconSize, int width); } -namespace UI { bool checkbox(const string&in text, bool value); } -namespace UI { bool checkboxDisabled(const string&in text, bool value); } -namespace UI { float magicSlider(const string&in text, float value, float speed); } -namespace UI { vec3 magicSlider3(const string&in text, vec3 value, float speed); } -namespace UI { int sliderInt(string&in text, int value, int min, int max); } -namespace UI { float slider(string&in text, float value, float min, float max); } -namespace UI { bool inputText(const string&in text, const string&in value, string&out valueOutput); } -namespace UI { bool menuItem(const string&in text); } -namespace UI { void menuItemDisabled(const string&in text); } -namespace UI { void subMenu(const string&in text, Callback@ func); } -namespace UI { void text(const string&in text); } -namespace UI { void textCenter(const string&in text); } -namespace UI { void textEnd(const string&in text); } -namespace UI { void textColor(float r, float g, float b, const string&in text); } -namespace UI { void title(const string&in text); } -namespace UI { void titleCenter(const string&in text); } -namespace UI { void titleCenterY(const string&in text, int height); } -namespace UI { void titleEnd(const string&in text); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int x, int y = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -namespace Resource { GPUMesh loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace Resource { Environment getMainEnvironment(); } -namespace Resource { Environment createLoadEnvironment(const string&in envId); } -namespace Engine { Entity getRoot(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { FrameBuffer createLoadRGBA8FrameBuffer(const string&in, int width, int height, int samples = 4); } diff --git a/Editor/Modules/Previewer/as.predefined b/Editor/Modules/Previewer/as.predefined deleted file mode 100644 index 0f8e79f..0000000 --- a/Editor/Modules/Previewer/as.predefined +++ /dev/null @@ -1,405 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 656, - MouseRight = 657, - MouseMiddle = 658 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class GPUMesh { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMesh get_meshResource() property; - void set_meshResource(GPUMesh) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class Panel { - void render(); -} -class Service { -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace UI { bool button(const string&in text); } -namespace UI { bool buttonCenter(const string&in text); } -namespace UI { bool buttonEnd(const string&in text); } -namespace UI { bool cartIconButton(const string&in label, const string&in icon, int iconSize, int width); } -namespace UI { bool checkbox(const string&in text, bool value); } -namespace UI { bool checkboxDisabled(const string&in text, bool value); } -namespace UI { float magicSlider(const string&in text, float value, float speed); } -namespace UI { vec3 magicSlider3(const string&in text, vec3 value, float speed); } -namespace UI { int sliderInt(string&in text, int value, int min, int max); } -namespace UI { float slider(string&in text, float value, float min, float max); } -namespace UI { bool inputText(const string&in text, const string&in value, string&out valueOutput); } -namespace UI { bool menuItem(const string&in text); } -namespace UI { void menuItemDisabled(const string&in text); } -namespace UI { void subMenu(const string&in text, Callback@ func); } -namespace UI { void text(const string&in text); } -namespace UI { void textCenter(const string&in text); } -namespace UI { void textEnd(const string&in text); } -namespace UI { void textColor(float r, float g, float b, const string&in text); } -namespace UI { void title(const string&in text); } -namespace UI { void titleCenter(const string&in text); } -namespace UI { void titleCenterY(const string&in text, int height); } -namespace UI { void titleEnd(const string&in text); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int x, int y = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -namespace Resource { GPUMesh loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace Resource { Environment getMainEnvironment(); } -namespace Resource { Environment createLoadEnvironment(const string&in envId); } -namespace Engine { Entity getRoot(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { FrameBuffer createLoadRGBA8FrameBuffer(const string&in, int width, int height, int samples = 4); } diff --git a/Editor/Modules/ResourceExplorer/as.predefined b/Editor/Modules/ResourceExplorer/as.predefined deleted file mode 100644 index 40b097e..0000000 --- a/Editor/Modules/ResourceExplorer/as.predefined +++ /dev/null @@ -1,436 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 656, - MouseRight = 657, - MouseMiddle = 658 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class GPUMesh { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMesh get_meshResource() property; - void set_meshResource(GPUMesh) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class Panel { - void render(); -} -class Service { -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace UI { bool button(const string&in text); } -namespace UI { bool buttonCenter(const string&in text); } -namespace UI { bool buttonEnd(const string&in text); } -namespace UI { bool cartIconButton(const string&in label, const string&in icon, int iconSize, int width); } -namespace UI { bool checkbox(const string&in text, bool value); } -namespace UI { bool checkboxDisabled(const string&in text, bool value); } -namespace UI { float magicSlider(const string&in text, float value, float speed); } -namespace UI { vec3 magicSlider3(const string&in text, vec3 value, float speed); } -namespace UI { int sliderInt(string&in text, int value, int min, int max); } -namespace UI { float slider(string&in text, float value, float min, float max); } -namespace UI { bool inputText(const string&in text, const string&in value, string&out valueOutput); } -namespace UI { bool menuItem(const string&in text); } -namespace UI { void menuItemDisabled(const string&in text); } -namespace UI { void subMenu(const string&in text, Callback@ func); } -namespace UI { void text(const string&in text); } -namespace UI { void textCenter(const string&in text); } -namespace UI { void textEnd(const string&in text); } -namespace UI { void textColor(float r, float g, float b, const string&in text); } -namespace UI { void title(const string&in text); } -namespace UI { void titleCenter(const string&in text); } -namespace UI { void titleCenterY(const string&in text, int height); } -namespace UI { void titleEnd(const string&in text); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int x, int y = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -namespace Resource { GPUMesh loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace Resource { Environment getMainEnvironment(); } -namespace Resource { Environment createLoadEnvironment(const string&in envId); } -namespace Engine { Entity getRoot(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { FrameBuffer createLoadRGBA8FrameBuffer(const string&in, int width, int height, int samples = 4); } diff --git a/Editor/Modules/TreeExplorer/as.predefined b/Editor/Modules/TreeExplorer/as.predefined deleted file mode 100644 index 40b097e..0000000 --- a/Editor/Modules/TreeExplorer/as.predefined +++ /dev/null @@ -1,436 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 656, - MouseRight = 657, - MouseMiddle = 658 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class GPUMesh { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMesh get_meshResource() property; - void set_meshResource(GPUMesh) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class Panel { - void render(); -} -class Service { -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace UI { bool button(const string&in text); } -namespace UI { bool buttonCenter(const string&in text); } -namespace UI { bool buttonEnd(const string&in text); } -namespace UI { bool cartIconButton(const string&in label, const string&in icon, int iconSize, int width); } -namespace UI { bool checkbox(const string&in text, bool value); } -namespace UI { bool checkboxDisabled(const string&in text, bool value); } -namespace UI { float magicSlider(const string&in text, float value, float speed); } -namespace UI { vec3 magicSlider3(const string&in text, vec3 value, float speed); } -namespace UI { int sliderInt(string&in text, int value, int min, int max); } -namespace UI { float slider(string&in text, float value, float min, float max); } -namespace UI { bool inputText(const string&in text, const string&in value, string&out valueOutput); } -namespace UI { bool menuItem(const string&in text); } -namespace UI { void menuItemDisabled(const string&in text); } -namespace UI { void subMenu(const string&in text, Callback@ func); } -namespace UI { void text(const string&in text); } -namespace UI { void textCenter(const string&in text); } -namespace UI { void textEnd(const string&in text); } -namespace UI { void textColor(float r, float g, float b, const string&in text); } -namespace UI { void title(const string&in text); } -namespace UI { void titleCenter(const string&in text); } -namespace UI { void titleCenterY(const string&in text, int height); } -namespace UI { void titleEnd(const string&in text); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int x, int y = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -namespace Resource { GPUMesh loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace Resource { Environment getMainEnvironment(); } -namespace Resource { Environment createLoadEnvironment(const string&in envId); } -namespace Engine { Entity getRoot(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { FrameBuffer createLoadRGBA8FrameBuffer(const string&in, int width, int height, int samples = 4); } diff --git a/Editor/Modules/Viewport/as.predefined b/Editor/Modules/Viewport/as.predefined deleted file mode 100644 index 16381f4..0000000 --- a/Editor/Modules/Viewport/as.predefined +++ /dev/null @@ -1,436 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 656, - MouseRight = 657, - MouseMiddle = 658 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - funcdef bool less(const T&in a, const T&in b); - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class GPUMesh { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMesh get_meshResource() property; - void set_meshResource(GPUMesh) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class Panel { - void render(); -} -class Service { -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace UI { bool button(const string&in text); } -namespace UI { bool buttonCenter(const string&in text); } -namespace UI { bool buttonEnd(const string&in text); } -namespace UI { bool cartIconButton(const string&in label, const string&in icon, int iconSize, int width); } -namespace UI { bool checkbox(const string&in text, bool value); } -namespace UI { bool checkboxDisabled(const string&in text, bool value); } -namespace UI { float magicSlider(const string&in text, float value, float speed); } -namespace UI { vec3 magicSlider3(const string&in text, vec3 value, float speed); } -namespace UI { int sliderInt(string&in text, int value, int min, int max); } -namespace UI { float slider(string&in text, float value, float min, float max); } -namespace UI { bool inputText(const string&in text, const string&in value, string&out valueOutput); } -namespace UI { bool menuItem(const string&in text); } -namespace UI { void menuItemDisabled(const string&in text); } -namespace UI { void subMenu(const string&in text, Callback@ func); } -namespace UI { void text(const string&in text); } -namespace UI { void textCenter(const string&in text); } -namespace UI { void textEnd(const string&in text); } -namespace UI { void textColor(float r, float g, float b, const string&in text); } -namespace UI { void title(const string&in text); } -namespace UI { void titleCenter(const string&in text); } -namespace UI { void titleCenterY(const string&in text, int height); } -namespace UI { void titleEnd(const string&in text); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int x, int y = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -namespace Resource { GPUMesh loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace Resource { Environment getMainEnvironment(); } -namespace Resource { Environment createLoadEnvironment(const string&in envId); } -namespace Engine { Entity getRoot(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { FrameBuffer createLoadRGBA8FrameBuffer(const string&in, int width, int height, int samples = 4); } diff --git a/Editor/Panels/EntityManipulation/AddComponent.as b/Editor/Panels/EntityManipulation/AddComponent.as deleted file mode 100644 index aaaddd9..0000000 --- a/Editor/Panels/EntityManipulation/AddComponent.as +++ /dev/null @@ -1,40 +0,0 @@ -class AddComponentRender { - Entity entity; - AddComponentRender(Entity _entity) { - entity = _entity; - } - - void addComponentPopup() { - UI::titleCenter("Component"); - UI::separator(); - UI::subMenu("Rendering", Callback(this.addComponentRendering)); - if (UI::menuItem("Script Component")) { - } - } - - void addComponentRendering() { - if (entity.hasMeshComponent()) { - UI::menuItemDisabled("Mesh Render Component"); - } else { - if (UI::menuItem("Mesh Render Component")) { - entity.createMeshComponent(); - } - } - - if (entity.hasShaderComponent()) { - UI::menuItemDisabled("Shader Render Component"); - } else { - if (UI::menuItem("Shader Render Component")) { - entity.createShaderComponent(); - } - } - - if (entity.hasCameraComponent()) { - UI::menuItemDisabled("Camera Component"); - } else { - if (UI::menuItem("Camera Component")) { - entity.createCameraComponent(); - } - } - } -} diff --git a/Editor/Panels/EntityManipulation/CameraProperties.as b/Editor/Panels/EntityManipulation/CameraProperties.as deleted file mode 100644 index 67bf3d6..0000000 --- a/Editor/Panels/EntityManipulation/CameraProperties.as +++ /dev/null @@ -1,49 +0,0 @@ -class CameraComponentRender { - Entity entity; - CameraComponentRender(Entity _entity) { - entity = _entity; - } - - void render() { - if (!entity.hasCameraComponent()) - return; - - CameraComponent cameraComponent = entity.getCameraComponent(); - - float fov = cameraComponent.fov; - float aspect = cameraComponent.aspectRatio; - float nearZ = cameraComponent.nearZ; - float farZ = cameraComponent.farZ; - - fov = UI::magicSlider("Fov", fov, 0.1); - if (fov > 180) - fov = 180; - if (fov < 0) - fov = 0; - - aspect = UI::magicSlider("Aspect Ratio", aspect, 0.1); - if (aspect < 0.1) - aspect = 0.1; - nearZ = UI::magicSlider("Near Z", nearZ, 0.1); - if (nearZ < 0) - nearZ = 0; - farZ = UI::magicSlider("Far Z", farZ, 0.1); - if (farZ < 0) - farZ = 0; - - if (nearZ > farZ) - farZ = nearZ; - - cameraComponent.fov = fov; - cameraComponent.aspectRatio = aspect; - cameraComponent.nearZ = nearZ; - cameraComponent.farZ = farZ; - } - - void remove() { - if (UI::menuItem("Remove")) { - entity.removeCameraComponent(); - } - } - -} diff --git a/Editor/Panels/EntityManipulation/MeshProperties.as b/Editor/Panels/EntityManipulation/MeshProperties.as deleted file mode 100644 index 4969dc7..0000000 --- a/Editor/Panels/EntityManipulation/MeshProperties.as +++ /dev/null @@ -1,60 +0,0 @@ -class MeshComponentRender { - Entity entity; - MeshComponent meshComponent; - - MeshComponentRender(Entity _entity) { - entity = _entity; - meshComponent = entity.getMeshComponent(); - } - - void render() { - if (!entity.hasMeshComponent()) - return; - - if (meshComponent.hasMesh) { - UI::drawIcon("object3d.png", 32); - } else { - UI::drawIcon("empty.png", 32); - } - - UI::dragDropTarget("MESH", AnyCallback(this.setMesh)); - - if (meshComponent.hasMesh) { - UI::sameline(); - UI::space(); - UI::sameline(); - - UI::titleCenterY(meshComponent.meshResource.name, 32); - UI::dragDropTarget("MESH", AnyCallback(this.setMesh)); - } - - UI::space(20, 20); - - if (UI::button("Clear")) { - meshComponent.clear(); - } - - UI::sameline(); - UI::space(10, 20); - UI::sameline(); - - if (meshComponent.hasMesh) { - meshComponent.isActive = UI::checkbox("Active", meshComponent.isActive); - } else { - UI::checkboxDisabled("Active", meshComponent.isActive); - } - } - - void setMesh(any@ mesh_data) { - string mesh; - mesh_data.retrieve(mesh); - - meshComponent.meshResource = Resource::loadGPUMesh(mesh); - } - - void remove() { - if (UI::menuItem("Remove")) { - entity.removeMeshComponent(); - } - } -} diff --git a/Editor/Panels/EntityManipulation/PropertiesPannel.as b/Editor/Panels/EntityManipulation/PropertiesPannel.as deleted file mode 100644 index 7ee494b..0000000 --- a/Editor/Panels/EntityManipulation/PropertiesPannel.as +++ /dev/null @@ -1,72 +0,0 @@ -import Entity getActiveEntity() from "ActiveEntity"; -import void setActiveEntity(Entity) from "ActiveEntity"; - -class PropertiesPanel : DockPanel { - float slider = 0; - vec3 slid; - vec3 slid2; - - void onRender() { - Entity entity = getActiveEntity(); - - // NAME - // Id:0 [+ add component] - UI::title(entity.name); - if (!entity.isRoot) - UI::contextItemPopup("##MenuOptions", Callback(this.renameEntityMenu)); - UI::separator(); - UI::textColor(0.5, 0.5, 0.5f, "Id : " + entity.id); - - // We don't want to change root options - if (entity.isRoot) - return; - - UI::sameline(); - if (UI::buttonEnd("Add Component")) { - UI::openPopup("ADD_COMPONENT", any(entity)); - } - - UI::space(); - - TransformPropertiesRender transformComponentRender(entity); - UI::componentNode("Transform Component", Callback(transformComponentRender.renderTransformComponent)); - - if (entity.hasMeshComponent()) { - MeshComponentRender meshComponentRender(entity); - UI::componentNodeContextMenu("Mesh Component", Callback(meshComponentRender.render), Callback(meshComponentRender.remove)); - } - - if (entity.hasShaderComponent()) { - ShaderComponentRender shaderComponentRender(entity); - UI::componentNodeContextMenu("Shader Component", Callback(shaderComponentRender.render), Callback(shaderComponentRender.remove)); - } - - if (entity.hasCameraComponent()) { - CameraComponentRender cameraComponentRender(entity); - UI::componentNodeContextMenu("Camera Component", Callback(cameraComponentRender.render), Callback(cameraComponentRender.remove)); - } - - UI::space(); - - UI::separator(); - - if (UI::buttonCenter("Add Component##2")) { - UI::openPopup("ADD_COMPONENT", any(entity)); - } - - AddComponentRender addComponentRender(entity); - UI::simplePopup("ADD_COMPONENT", Callback(addComponentRender.addComponentPopup)); - UI::modalPopup("Rename entity", Callback(this.renameEntityMenu)); - } - - void renameEntityMenu() { - Entity entity = getActiveEntity(); - - if (!entity.isRoot) { - if (UI::menuItem("Rename")) { - UI::openPopup("Rename entity", any(entity)); - } - } - } - -} diff --git a/Editor/Panels/EntityManipulation/ShaderProperties.as b/Editor/Panels/EntityManipulation/ShaderProperties.as deleted file mode 100644 index 401138a..0000000 --- a/Editor/Panels/EntityManipulation/ShaderProperties.as +++ /dev/null @@ -1,75 +0,0 @@ -class ShaderComponentRender { - Entity entity; - ShaderComponent shaderComponent; - ShaderComponentRender(Entity _entity) { - entity = _entity; - shaderComponent = entity.getShaderComponent(); - } - - void setShader(any@ shader_data) { - string shader; - shader_data.retrieve(shader); - - shaderComponent.shader = Resource::loadShader(shader); - } - - void setTexture(any@ texture_data) { - Texture texture; - texture_data.retrieve(texture); - Engine::print(texture.name); - - shaderComponent.texture = texture; - Engine::print(shaderComponent.texture.name); - } - - void render() { - if (!entity.hasShaderComponent()) - return; - - if (shaderComponent.hasShader) { - UI::drawIcon("shader.png", 32); - } else { - UI::drawIcon("empty.png", 32); - } - UI::dragDropTarget("SHADER", AnyCallback(this.setShader)); - - if (shaderComponent.hasShader) { - UI::sameline(); - UI::space(); - UI::sameline(); - - UI::titleCenterY(shaderComponent.shader.name, 32); - UI::dragDropTarget("SHADER", AnyCallback(this.setShader)); - } - - UI::space(); - - if (shaderComponent.texture.isValid()) { - UI::drawIcon(shaderComponent.texture, 32); - } else { - UI::drawIcon("empty.png", 32); - } - UI::dragDropTarget("TEXTURE", AnyCallback(this.setTexture)); - - if (shaderComponent.texture.isValid()) { - UI::sameline(); - UI::space(); - UI::sameline(); - - UI::titleCenterY(shaderComponent.texture.name, 32); - UI::dragDropTarget("TEXTURE", AnyCallback(this.setTexture)); - } - UI::space(20, 20); - - if (UI::button("Clear")) { - shaderComponent.clear(); - } - } - - void remove() { - if (UI::menuItem("Remove")) { - entity.removeShaderComponent(); - } - } - -} diff --git a/Editor/Panels/EntityManipulation/TransformProperties.as b/Editor/Panels/EntityManipulation/TransformProperties.as deleted file mode 100644 index 071d879..0000000 --- a/Editor/Panels/EntityManipulation/TransformProperties.as +++ /dev/null @@ -1,19 +0,0 @@ -class TransformPropertiesRender { - Entity entity; - TransformComponent transform; - TransformPropertiesRender(Entity _entity) { - entity = _entity; - transform = entity.transform; - } - - void renderTransformComponent() { - - vec3 position = transform.position; - vec3 scale = transform.scale; - vec3 rotation = transform.rotation; - - transform.position = UI::magicSlider3("Positon", position, 0.1); - transform.scale = UI::magicSlider3("Scale", scale, 0.1); - transform.rotation = UI::magicSlider3("Rotation", rotation, 0.1); - } -} diff --git a/Editor/Panels/EntityManipulation/as.predefined b/Editor/Panels/EntityManipulation/as.predefined deleted file mode 100644 index 2298fff..0000000 --- a/Editor/Panels/EntityManipulation/as.predefined +++ /dev/null @@ -1,872 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } diff --git a/Editor/Panels/EntityManipulation/dockPanelModule.json b/Editor/Panels/EntityManipulation/dockPanelModule.json deleted file mode 100644 index ab42d70..0000000 --- a/Editor/Panels/EntityManipulation/dockPanelModule.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "dockPanelModule" : { - "name" : "Entity Manipulation", - "author" : "Chewico", - "version" : "1.0.0", - "services" : [ - { - "name" : "ActiveEntity", - "version" : "1.0.0" - } - ] - } -} \ No newline at end of file diff --git a/Editor/Panels/ResourceExplorer/GlobalVars.as b/Editor/Panels/ResourceExplorer/GlobalVars.as deleted file mode 100644 index 101435e..0000000 --- a/Editor/Panels/ResourceExplorer/GlobalVars.as +++ /dev/null @@ -1 +0,0 @@ -string selectedResource = ""; diff --git a/Editor/Panels/ResourceExplorer/IconRender.as b/Editor/Panels/ResourceExplorer/IconRender.as deleted file mode 100644 index 73bde19..0000000 --- a/Editor/Panels/ResourceExplorer/IconRender.as +++ /dev/null @@ -1,93 +0,0 @@ -bool drawFolder(string&in name) { - bool click = false; - UI::drawIconCentered("folder.png", 64); - - if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) { - click = true; - } - - UI::textCenter(name); - UI::nextColumn(); - return click; -} - -bool drawIcon(string&in name, string&in iconName) { - bool click = false; - UI::drawIconCentered(iconName, 64); - - if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) { - click = true; - } - - UI::textCenter(name); - UI::nextColumn(); - return click; -} - -bool drawFile(string&in name) { - bool click = false; - UI::drawIconCentered("file.png", 64); - if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) { - click = true; - } - - UI::textCenter(name); - UI::nextColumn(); - return click; -} - -bool drawFile(string&in name, string&in dragId, any dragData, string&in overlay) { - bool click = false; - UI::drawIconCentered("file.png", 64); - if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) { - click = true; - } - - UI::dragDropSource(dragId, - dragData, - overlay); - - UI::textCenter(name); - UI::nextColumn(); - return click; -} - -bool drawFileIcon(string&in name, string&in dragId, any dragData, string&in overlay, string&in icon, bool selected = false) { - bool click = false; - if (selected) { - UI::drawIconCenteredHighlight(icon, 64); - } else { - UI::drawIconCentered(icon, 64); - } - if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) { - click = true; - } - - UI::dragDropSource(dragId, - dragData, - overlay); - - UI::textCenter(name); - UI::nextColumn(); - return click; -} - -bool drawTextureIcon(string&in name, string&in dragId, any dragData, string&in overlay, Texture texture, bool selected = false) { - bool click = false; - if (selected) { - UI::drawIconCenteredHighlight(texture, 64); - } else { - UI::drawIconCentered(texture, 64); - } - if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) { - click = true; - } - - UI::dragDropSource(dragId, - dragData, - overlay); - - UI::textCenter(name); - UI::nextColumn(); - return click; -} diff --git a/Editor/Panels/ResourceExplorer/ResourceExplorer.as b/Editor/Panels/ResourceExplorer/ResourceExplorer.as deleted file mode 100644 index 8f41d02..0000000 --- a/Editor/Panels/ResourceExplorer/ResourceExplorer.as +++ /dev/null @@ -1,91 +0,0 @@ -class ResourceExplorer : DockPanel { - string currentPath = ""; - array subFolders; - array subFiles; - - void onInit() { - setPath(""); - } - - void setPath(string&in path) { - currentPath = path; - subFolders = Resource::getResourceFolders(path); - subFiles = Resource::getResourceFiles(path); - } - - void onRender() { - renderTopBar(); - UI::automaticColumns(160); - - string temp_path = currentPath; - - // Render navigation folders - for (uint i = 0; i < subFolders.length(); i++) { - if (drawFolder(Path::getName(subFolders[i]))) { - setPath(subFolders[i]); - } - } - - for (uint i = 0; i < subFiles.length(); i++) { - drawResource(subFiles[i]); - } - } - - void drawResource(string&in filename) { - ResourceType resType = Resource::getResourceType(filename); - bool selected = filename == selectedResource; - - if (resType == ResourceType::Mesh) { - if (drawFileIcon(Path::getName(filename), "MESH", any(filename), Path::getName(filename), "mesh.png", selected)) { - selectedResource = filename; - } - return; - } - - if (resType == ResourceType::Shader) { - if (drawFileIcon(Path::getName(filename), "SHADER", any(filename), Path::getName(filename), "shader.png", selected)) { - selectedResource = filename; - } - return; - } - - if (resType == ResourceType::Texture) { - Texture Texture = Resource::loadTexture(filename); - if (drawTextureIcon(Path::getName(filename), "TEXTURE", any(Texture), Path::getName(filename), Texture, selected)) { - selectedResource = filename; - } - return; - } - - drawIcon(Path::getName(filename), "file.png"); - } - - void renderTopBar() { - UI::text("\t"); - UI::sameline(); - // If we select that path - if (UI::button("Resources")) { - setPath(""); - } - array@ paths = Path::divide(currentPath); - for (uint i = 0; i < paths.length(); i++) { - UI::sameline(); - UI::text("/"); - UI::sameline(); - - // If we select that path - if (UI::button(paths[i])) { - - // We obtain that pat - string changePath = ""; - for (uint z = 0; z <= i; z++) { - if (z != 0) - changePath += "/"; - changePath += paths[z]; - } - - setPath(changePath); - } - } - } -} diff --git a/Editor/Panels/ResourceExplorer/ResourceMetadata.as b/Editor/Panels/ResourceExplorer/ResourceMetadata.as deleted file mode 100644 index f533c2f..0000000 --- a/Editor/Panels/ResourceExplorer/ResourceMetadata.as +++ /dev/null @@ -1,8 +0,0 @@ -class ResourceMetadata : DockPanel { - void onRender() { - UI::title("Metadata"); - UI::separator(); - - UI::text(Path::getName(selectedResource)); - } -} diff --git a/Editor/Panels/ResourceExplorer/as.predefined b/Editor/Panels/ResourceExplorer/as.predefined deleted file mode 100644 index 2298fff..0000000 --- a/Editor/Panels/ResourceExplorer/as.predefined +++ /dev/null @@ -1,872 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } diff --git a/Editor/Panels/ResourceExplorer/dockPanelModule.json b/Editor/Panels/ResourceExplorer/dockPanelModule.json deleted file mode 100644 index a261086..0000000 --- a/Editor/Panels/ResourceExplorer/dockPanelModule.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dockPanelModule" : { - "name" : "Asset Explorer", - "author" : "Chewico", - "version" : "1.0.0", - "services" : [] - } -} \ No newline at end of file diff --git a/Editor/Panels/TreeExplorer/Tree.as b/Editor/Panels/TreeExplorer/Tree.as deleted file mode 100644 index 5627d17..0000000 --- a/Editor/Panels/TreeExplorer/Tree.as +++ /dev/null @@ -1,94 +0,0 @@ -import Entity getActiveEntity() from "ActiveEntity"; -import void setActiveEntity(Entity) from "ActiveEntity"; - -class EntityTreeRender { - EntityTreeRender(Entity _entity) { - entity = _entity; - } - - Entity entity; - bool isActiveEntity() { - return entity == getActiveEntity(); - } - - void renderEntity() { - string displayName = entity.name; - if (displayName == "") { - displayName = "-"; - } - - displayName += "##" + entity.id; - if (entity.childs.count == 0) { - // END OF THE TREE - - UI::treeNodeLeaf(displayName, isActiveEntity()); - interaction(); - } else { - // ADD ANOTHER NODE - bool opened = UI::treeNode(displayName, isActiveEntity(), Callback(this.renderChilds)); - if (!opened) { - interaction(); - } - } - } - - void renderChilds() { - interaction(); - for (int i = 0; i < entity.childs.count; i++) { - EntityTreeRender child(entity.childs[i]); - child.renderEntity(); - } - } - - void interaction() { - UI::dragDropSource("ENTITY", any(entity), entity.name); - UI::dragDropTarget("ENTITY", AnyCallback(this.entityDrop)); - UI::contextItemPopup("POP_ENTITY_" + entity.id, Callback(this.renderContextMenu)); - - if (UI::isItemClicked(0)) { - setActiveEntity(entity); - } - } - - void entityDrop(any@ data) { - Entity data_entity; - data.retrieve(data_entity); - - // You cant be the father of your father - if (data_entity.isRoot || data_entity.isDescendantOf(entity)) { - return; - } - - data_entity.parent = entity; - } - - void renderContextMenu() { - if (entity.isRoot) { - if (UI::menuItem("New Entity")) { - entity.createChild("node"); - } - } else { - if (UI::menuItem("Add child")) { - entity.createChild("node"); - } - - if (UI::menuItem("Rename")) { - UI::openPopup("Rename entity", any(entity)); - } - - if (UI::menuItem("Destroy")) { - entity.destroy(); - } - } - } -} - -class TreePanel : DockPanel { - void onRender() { - Entity root = Engine::getRoot(); - EntityTreeRender rootTree(root); - - UI::contextMenuPopup("Window popup", Callback(rootTree.renderContextMenu)); - rootTree.renderEntity(); - } -} diff --git a/Editor/Panels/TreeExplorer/as.predefined b/Editor/Panels/TreeExplorer/as.predefined deleted file mode 100644 index 2298fff..0000000 --- a/Editor/Panels/TreeExplorer/as.predefined +++ /dev/null @@ -1,872 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } diff --git a/Editor/Panels/TreeExplorer/dockPanelModule.json b/Editor/Panels/TreeExplorer/dockPanelModule.json deleted file mode 100644 index e607943..0000000 --- a/Editor/Panels/TreeExplorer/dockPanelModule.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "dockPanelModule" : { - "name" : "Tree explorer", - "author" : "Chewico", - "version" : "1.0.0", - "services" : [ - { - "name" : "ActiveEntity", - "version" : "1.0.0" - } - ] - } -} \ No newline at end of file diff --git a/Editor/Panels/Viewport/Viewport.as b/Editor/Panels/Viewport/Viewport.as deleted file mode 100644 index 57ce332..0000000 --- a/Editor/Panels/Viewport/Viewport.as +++ /dev/null @@ -1,97 +0,0 @@ -class ViewportPanel : DockPanel { - FrameBuffer frameBuffer; - SceneCamera sceneCamera; - Environment mainEnv; - - float pitch = 0; - float yaw = 0; - float vel = 0.02f; - - void onRender() { - if (!frameBuffer.isValid()) - return; - - int x = UI::getAvailableSizeX(); - int y = UI::getAvailableSizeY(); - - if (x < 10 || y < 10) - return; - - frameBuffer.resize(x, y); - frameBuffer.clearRGBA(0, 0, 0, 255); - - sceneCamera.camera.aspect = float(x) / y; - mainEnv.render(frameBuffer, sceneCamera); - - UI::drawFrameBufferCentered(frameBuffer, x, y); - - if (!UI::isPanelActive()) - return; - - if (UI::isMouseDragging(key::MouseRight) && !UI::isKeyDown(key::MouseMiddle)) { - pitch += UI::getMouseDeltaY() * 0.1f; - yaw += UI::getMouseDeltaX() * 0.1f; - - sceneCamera.transform.rotation.setEuler(vec3(pitch, yaw, 0)); - } - - if (UI::isMouseDragging(key::MouseMiddle) && !UI::isKeyDown(key::MouseRight)) { - vec3 panDir = vec3(); - - panDir.x -= UI::getMouseDeltaX(); - panDir.y += UI::getMouseDeltaY(); - - panDir = panDir * vel * 0.4f; - sceneCamera.transform.position = sceneCamera.transform.relative(panDir); - } - - vec3 relDir = vec3(); - - if (UI::isKeyDown(key::W)) - relDir.z++; - if (UI::isKeyDown(key::S)) - relDir.z--; - - if (UI::isKeyDown(key::D)) - relDir.x++; - if (UI::isKeyDown(key::A)) - relDir.x--; - - relDir = relDir * vel; - sceneCamera.transform.position = sceneCamera.transform.relative(relDir); - - float vertically = 0; - if (UI::isKeyDown(key::Space)) - vertically++; - if (UI::isKeyDown(key::LeftCtrl)) - vertically--; - - sceneCamera.transform.position = sceneCamera.transform.position + vec3(0, vertically * vel, 0); - } - - void onInit() { - frameBuffer = Engine::createRGBA8FrameBuffer("MainFrameBuffer", 400, 400); - mainEnv = Engine::getMainEnvironment(); - - sceneCamera.transform.position = vec3(0, 1, -2); - sceneCamera.camera.nearZ = 0.1; - sceneCamera.camera.farZ = 100; - UI::disablePanelPadding(true); - } - - void onMenuBar() { - if (UI::menuItem("Start")) { - - } - - if (UI::menuItem("Camera Props")) { - UI::openPopup("ViewportCameraProps", any()); - } - - UI::simplePopup("ViewportCameraProps", Callback(this.viewportCameraProps)); - } - - void viewportCameraProps() { - sceneCamera.camera.fov = UI::slider("Fov", sceneCamera.camera.fov / 3.14f * 180, 10, 160) / 180 * 3.14f; - } -} diff --git a/Editor/Panels/Viewport/as.predefined b/Editor/Panels/Viewport/as.predefined deleted file mode 100644 index 2298fff..0000000 --- a/Editor/Panels/Viewport/as.predefined +++ /dev/null @@ -1,872 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } diff --git a/Editor/Panels/Viewport/dockPanelModule.json b/Editor/Panels/Viewport/dockPanelModule.json deleted file mode 100644 index 493987a..0000000 --- a/Editor/Panels/Viewport/dockPanelModule.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dockPanelModule" : { - "name" : "Viewport", - "author" : "Chewico", - "version" : "1.0.0", - "services" : [] - } -} \ No newline at end of file diff --git a/Editor/Services/ActiveEntity/ActiveEntity.as b/Editor/Services/ActiveEntity/ActiveEntity.as deleted file mode 100644 index f0a9638..0000000 --- a/Editor/Services/ActiveEntity/ActiveEntity.as +++ /dev/null @@ -1,8 +0,0 @@ -Entity entity = Engine::getRoot(); -Entity getActiveEntity() { - return entity; -} - -void setActiveEntity(Entity ent) { - entity = ent; -} diff --git a/Editor/Services/ActiveEntity/ServiceScript.json b/Editor/Services/ActiveEntity/ServiceScript.json deleted file mode 100644 index f53143a..0000000 --- a/Editor/Services/ActiveEntity/ServiceScript.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "serviceScriptModule" : { - "name" : "ActiveEntity", - "author" : "Chewico", - "version" : "1.0.0" - } -} \ No newline at end of file diff --git a/Editor/Services/ActiveEntity/as.predefined b/Editor/Services/ActiveEntity/as.predefined deleted file mode 100644 index 288490a..0000000 --- a/Editor/Services/ActiveEntity/as.predefined +++ /dev/null @@ -1,436 +0,0 @@ -//This file was generated automatically -funcdef void Callback(); -funcdef void AnyCallback(any@); -funcdef void ReciverFunc(any@); -funcdef void TransferFunc(any@, any@); -enum key { - A = 546, - B = 547, - C = 548, - D = 549, - E = 550, - F = 551, - G = 552, - H = 553, - I = 554, - J = 555, - K = 556, - L = 557, - M = 558, - N = 559, - O = 560, - P = 561, - Q = 562, - R = 563, - S = 564, - T = 565, - U = 566, - V = 567, - W = 568, - X = 569, - Y = 570, - Z = 571, - K0 = 536, - K1 = 537, - K2 = 538, - K3 = 539, - K4 = 540, - K5 = 541, - K6 = 542, - K7 = 543, - K8 = 544, - K9 = 545, - Tab = 512, - Enter = 525, - Escape = 526, - Backspace = 523, - Space = 524, - Delete = 522, - Insert = 521, - Home = 519, - End = 520, - PageUp = 517, - PageDown = 518, - Right = 514, - Up = 515, - Down = 516, - Left = 513, - RightCtrl = 531, - LeftShift = 528, - RightShift = 532, - LeftAlt = 529, - RightAlt = 533, - LeftSuper = 530, - RightSuper = 534, - LeftCtrl = 527, - MouseLeft = 641, - MouseRight = 642, - MouseMiddle = 643 -} -enum ResourceType { - None = 0, - Mesh = 1, - Shader = 2, - Texture = 3 -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any@ any(); - any@ any(?&in); - any@ any(const int64&in); - any@ any(const double&in); - any& opAssign(any&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class array { - funcdef bool less(const T&in a, const T&in b); - T[]@ array(int&in); - T[]@ array(int&in, uint length); - T[]@ array(int&in, uint length, const T&in value); - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary@ dictionary(); - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} -class DockPanel { - void onRender(); -} -class ServiceScript { -} -class Entity { - string get_name() const property; - void set_name(string&in) property; - int get_id() const property; - Entity createChild(const string&in); - bool get_isRoot() const property; - void destroy(); - bool get_exists() const property; - Entity get_parent() property; - void set_parent(Entity) property; - bool isDescendantOf(Entity); - bool opEquals(const Entity&in) const; - EntityChilds get_childs() const property; - TransformComponent get_transform() const property; - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} -class EntityChilds { - int get_count() const property; - Entity opIndex(int) const; -} -class TransformComponent { - vec3 get_position() const property; - vec3 get_scale() const property; - vec3 get_rotation() const property; - void set_position(const vec3) property; - void set_scale(const vec3) property; - void set_rotation(const vec3) property; -} -class MeshComponent { - bool get_isActive() const property; - bool get_hasMesh() const property; - void clear(); - GPUMeshResource get_meshResource() property; - void set_meshResource(GPUMeshResource) property; - void set_isActive(const bool) const property; -} -class ShaderComponent { - bool get_hasShader() const property; - void clear(); - Shader get_shader() const property; - void set_shader(Shader) property; - Texture get_texture() const property; - void set_texture(Texture) property; -} -class CameraComponent { - float get_fov() const property; - float get_aspectRatio() const property; - float get_nearZ() const property; - float get_farZ() const property; - void set_fov(float) property; - void set_aspectRatio(float) property; - void set_nearZ(float) property; - void set_farZ(float) property; -} -class vec3 { - vec3(); - vec3(float, float = 0, float = 0); - vec3 opAdd(const vec3&in); - vec3 opSub(const vec3&in) const; - vec3 opNeg() const; - vec3 opMul(float) const; - vec3 opMul_r(float) const; - float x; - float y; - float z; -} -class quat { - ~quat(); - quat(); - quat(float, float, float, float); - quat opMul(const quat&in) const; - vec3 getEuler() const; - void setEuler(vec3); - float x; - float y; - float z; - float w; -} -class Transform { - Transform(); - vec3 relative(vec3); - vec3 position; - vec3 scale; - quat rotation; -} -class Camera { - Camera(); - float fov; - float aspect; - float nearZ; - float farZ; -} -class SceneCamera { - SceneCamera(); - Camera camera; - Transform transform; -} -class FrameBuffer { - FrameBuffer(); - void clearRGBA(int, int, int, int); - int get_height() const property; - void resize(int, int); - string get_name() const property; - bool isValid(); -} -class Environment { - void render(FrameBuffer, SceneCamera&in); - Entity getRootEntity(); - Entity getEntity(int); -} -class GPUMeshResource { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Shader { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -class Texture { - bool isValid() const; - string get_name() const property; - string get_path() const property; - int get_resourceId() const property; -} -string formatInt(int64 val, const string&in options = "", uint width = 0); -string formatUInt(uint64 val, const string&in options = "", uint width = 0); -string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0); -int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0); -uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0); -double parseFloat(const string&in, uint&out byteCount = 0); -namespace Engine { Entity getRoot(); } -namespace UI { bool button(const string&in); } -namespace UI { bool buttonCenter(const string&in); } -namespace UI { bool buttonEnd(const string&in); } -namespace UI { bool checkbox(const string&in, bool); } -namespace UI { bool checkboxDisabled(const string&in, bool); } -namespace UI { float magicSlider(const string&in, float, float); } -namespace UI { vec3 magicSlider3(const string&in, vec3, float); } -namespace UI { int sliderInt(string&in, int, int, int); } -namespace UI { float slider(string&in, float, float, float); } -namespace UI { bool inputText(const string&in, const string&in, string&out); } -namespace UI { bool menuItem(const string&in); } -namespace UI { void menuItemDisabled(const string&in); } -namespace UI { void subMenu(const string&in, Callback@); } -namespace UI { void text(const string&in); } -namespace UI { void textCenter(const string&in); } -namespace UI { void textEnd(const string&in); } -namespace UI { void textColor(float, float, float, const string&in); } -namespace UI { void title(const string&in); } -namespace UI { void titleCenter(const string&in); } -namespace UI { void titleCenterY(const string&in, int); } -namespace UI { void titleEnd(const string&in); } -namespace UI { void sameline(); } -namespace UI { void separator(); } -namespace UI { void space(); } -namespace UI { void space(int, int = 10); } -namespace UI { void drawFrameBuffer(FrameBuffer, int, int); } -namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); } -namespace UI { void drawIcon(const string&in, int); } -namespace UI { void drawIconCentered(const string&in, int); } -namespace UI { void drawIconHighlight(const string&in, int); } -namespace UI { void drawIconCenteredHighlight(const string&in, int); } -namespace UI { void drawIcon(Texture texture, int); } -namespace UI { void drawIconCentered(Texture texture, int); } -namespace UI { void drawIconHighlight(Texture texture, int); } -namespace UI { void drawIconCenteredHighlight(Texture texture, int); } -namespace UI { bool isKeyDown(key); } -namespace UI { bool isKeyPressed(key); } -namespace UI { bool isMouseDragging(key); } -namespace UI { bool isItemClicked(int); } -namespace UI { bool isMouseDoubleClicked(int); } -namespace UI { float getMouseDragDeltaX(); } -namespace UI { float getMouseDragDeltaY(); } -namespace UI { float getMouseDeltaX(); } -namespace UI { float getMouseDeltaY(); } -namespace UI { bool isPanelActive(); } -namespace UI { void disablePanelPadding(bool); } -namespace UI { int getAvailableSizeX(); } -namespace UI { int getAvailableSizeY(); } -namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); } -namespace Engine { FrameBuffer getFrameBuffer(const string&in); } -namespace Engine { Environment getMainEnvironment(); } -namespace Engine { Environment createEnvironment(); } -namespace Engine { void print(const string&in text); } -namespace Path { string getParent(const string&in path); } -namespace Path { string getParentName(const string&in path); } -namespace Path { string getName(const string&in path); } -namespace Path { string[]@ divide(const string&in path); } -namespace Resource { GPUMeshResource loadGPUMesh(string&in path); } -namespace Resource { Shader loadShader(string&in path); } -namespace Resource { Texture loadTexture(string&in path); } -namespace Resource { string[]@ getResourceFolders(string&in path); } -namespace Resource { string[]@ getResourceFiles(string&in path); } -namespace Resource { ResourceType getResourceType(string&in path); } -namespace UI { void automaticColumns(int); } -namespace UI { void columns(int); } -namespace UI { void nextColumn(); } -namespace UI { void endColumns(); } -namespace UI { void treeNodeLeaf(const string&in, bool); } -namespace UI { bool treeNode(const string&in, bool, Callback@); } -namespace UI { bool componentNode(const string&in, Callback@); } -namespace UI { bool componentNodeContextMenu(const string&in, Callback@, Callback@); } -namespace UI { void contextItemPopup(const string&in, Callback@); } -namespace UI { void contextMenuPopup(const string&in, Callback@); } -namespace UI { void modalPopup(const string&in, Callback@); } -namespace UI { void simplePopup(const string&in, Callback@); } -namespace UI { void openPopup(const string&in, any@); } -namespace UI { void closePopup(); } -namespace UI { void dragDropSource(const string&in, any@, const string&in); } -namespace UI { void dragDropTarget(const string&in, AnyCallback@); } diff --git a/Editor/as.predefined_old b/Editor/as.predefined_old deleted file mode 100644 index 7b562d7..0000000 --- a/Editor/as.predefined_old +++ /dev/null @@ -1,564 +0,0 @@ - -funcdef void ReciverFunc(any@ value); -funcdef void TransferFunc(any@ from, any@ data); - - -enum key -{ - None = 0, - A, B, C, D, E, F, G, H, I, J, K, L, M, - N, O, P, Q, R, S, T, U, V, W, X, Y, Z, - K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, - Tab, Enter, Escape, Backspace, Space, Delete, Insert, Home, End, PageUp, PageDown, - Right, Up, Down, Left, - RightCtrl, LeftShift, RightShift, - LeftAlt, RightAlt, LeftSuper, - RightSuper, LeftCtrl, - MouseLeft,MouseRight,MouseMiddle -}; - -//This file was generated automatically -enum AssetType { - Mesh = 1, - Shader = 2 -} -class string { - ~string(); - string(); - string(const string&in); - string& opAssign(const string&in); - string& opAddAssign(const string&in); - bool opEquals(const string&in) const; - int opCmp(const string&in) const; - string opAdd(const string&in) const; - uint length() const; - void resize(uint); - bool isEmpty() const; - uint8& opIndex(uint); - const uint8& opIndex(uint) const; - string& opAssign(double); - string& opAddAssign(double); - string opAdd(double) const; - string opAdd_r(double) const; - string& opAssign(float); - string& opAddAssign(float); - string opAdd(float) const; - string opAdd_r(float) const; - string& opAssign(int64); - string& opAddAssign(int64); - string opAdd(int64) const; - string opAdd_r(int64) const; - string& opAssign(uint64); - string& opAddAssign(uint64); - string opAdd(uint64) const; - string opAdd_r(uint64) const; - string& opAssign(bool); - string& opAddAssign(bool); - string opAdd(bool) const; - string opAdd_r(bool) const; - string substr(uint start = 0, int count = - 1) const; - int findFirst(const string&in, uint start = 0) const; - int findFirstOf(const string&in, uint start = 0) const; - int findFirstNotOf(const string&in, uint start = 0) const; - int findLast(const string&in, int start = - 1) const; - int findLastOf(const string&in, int start = - 1) const; - int findLastNotOf(const string&in, int start = - 1) const; - void insert(uint pos, const string&in other); - void erase(uint pos, int count = - 1); -} -class ref { - ~ref(); - ref(); - ref(const ref&in); - ref(const ?&in); - void opCast(?&out); - ref& opHndlAssign(const ref&in); - ref& opHndlAssign(const ?&in); - bool opEquals(const ref&in) const; - bool opEquals(const ?&in) const; -} -class any { - any& opAssign(any&in); - any(); - any(?&in); - void store(?&in); - void store(const int64&in); - void store(const double&in); - bool retrieve(?&out); - bool retrieve(int64&out); - bool retrieve(double&out); -} -class Entity { - // Gets the entity's name - string get_name() const property; - // Sets the entity's name - void set_name(string&in) property; - - // Gets the unique entity ID - int get_id() const property; - - // Creates a new child entity with the given name - Entity createChild(const string&in); - - // Returns true if this entity is the root entity - bool get_isRoot() const property; - - // Destroys this entity - void destroy(); - - // Returns true if the entity currently exists - bool get_exists() const property; - - // Gets the parent entity - Entity get_parent() property; - // Sets the parent entity - void set_parent(Entity) property; - - // Checks if this entity is a descendant of the given entity - bool isDescendantOf(Entity); - - // Compares this entity with another entity for equality - bool opEquals(const Entity&in) const; - - // Gets the collection of child entities - EntityChilds get_childs() const property; - - // Gets the transform component of the entity - TransformComponent get_transform() const property; - - // Mesh component methods - MeshComponent getMeshComponent(); - MeshComponent createMeshComponent(); - bool hasMeshComponent(); - void removeMeshComponent(); - - // Shader component methods - ShaderComponent getShaderComponent(); - ShaderComponent createShaderComponent(); - bool hasShaderComponent(); - void removeShaderComponent(); - - // Camera component methods - CameraComponent getCameraComponent(); - CameraComponent createCameraComponent(); - bool hasCameraComponent(); - void removeCameraComponent(); -} - -class EntityChilds { - // Gets the number of child entities - int get_count() const property; - - // Access child entity by index - Entity opIndex(int) const; -} - -class TransformComponent { - // Gets/sets position vector - vec3 get_position() const property; - void set_position(const vec3) property; - - // Gets/sets scale vector - vec3 get_scale() const property; - void set_scale(const vec3) property; - - // Gets/sets rotation vector (Euler angles) - vec3 get_rotation() const property; - void set_rotation(const vec3) property; - -} - -class MeshComponent { - // Is mesh component active? - bool get_isActive() const property; - void set_isActive(const bool) property; - - // Does this component have a mesh assigned? - bool get_hasMesh() const property; - - // Clears the mesh data - void clear(); - - // Gets/sets mesh identifier - string getMesh(); - void setMesh(string&in); -} - -class ShaderComponent { - // Does this component have a shader assigned? - bool get_hasShader() const property; - - // Clears the shader data - void clear(); - - // Gets/sets shader identifier - string getShader(); - void setShader(const string&in); -} - -class CameraComponent { - // Gets/sets field of view - float get_fov() const property; - void set_fov(float) property; - - // Gets/sets aspect ratio - float get_aspectRatio() const property; - void set_aspectRatio(float) property; - - // Gets/sets near clipping plane distance - float get_nearZ() const property; - void set_nearZ(float) property; - - // Gets/sets far clipping plane distance - float get_farZ() const property; - void set_farZ(float) property; -} - -class vec3 { - // Default constructor (zero vector) - vec3(); - // Constructor with components (y,z default to 0) - vec3(float, float = 0, float = 0); - - // Vector addition - vec3 opAdd(const vec3&in); - // Vector subtraction - vec3 opSub(const vec3&in) const; - // Negation - vec3 opNeg() const; - // Multiply by scalar - vec3 opMul(float) const; - vec3 opMul_r(float) const; - - float x; - float y; - float z; -} - -class quat { - ~quat(); - quat(); - quat(const quat&in); - quat(float, float, float, float); - - // Quaternion multiplication - quat opMul(const quat&in) const; - - // Gets/sets Euler angles representation of the quaternion - vec3 getEuler() const; - void setEuler(vec3); - - float x; - float y; - float z; - float w; -} - -class Transform { - Transform(); - - vec3 position; - vec3 scale; - quat rotation; - - // Returns a vec3 relative to the transform - vec3 relative(vec3); -} - -class Camera { - ~Camera(); - - float fov; - float aspect; - float nearZ; - float farZ; -} - -class SceneCamera { - ~SceneCamera(); - - Camera camera; - Transform transform; -} - -class FrameBuffer { - // Clears the framebuffer with RGBA color - void clearRGBA(int, int, int, int); - // Gets the height of the framebuffer - int get_height() const property; - // Resizes the framebuffer - void resize(int, int); - // Gets the framebuffer's name - string get_name() const property; - bool isValid(); -} - -class Environment { - // Renders the scene with the given camera and framebuffer target - void render(FrameBuffer, SceneCamera); - // Gets the root entity of the environment - Entity getRootEntity(); - // Gets an entity by its ID - Entity getEntity(int); -} - -class DockPanel { - // Called to render the dock panel UI - void onRender(); - void onInit(); - void onMenuBar(); -} - - -// Format a signed 64-bit integer to string with optional formatting and width -string formatInt(int64 val, const string& in options = "", uint width = 0); -// Format an unsigned 64-bit integer to string with optional formatting and width -string formatUInt(uint64 val, const string& in options = "", uint width = 0); -// Format a double-precision float to string with options, width, and precision -string formatFloat(double val, const string& in options = "", uint width = 0, uint precision = 0); - -// Parse a signed 64-bit integer from string with base, returning byte count parsed -int64 parseInt(const string& in str, uint base = 10, uint& out byteCount = 0); -// Parse an unsigned 64-bit integer from string with base, returning byte count parsed -uint64 parseUInt(const string& in str, uint base = 10, uint& out byteCount = 0); -// Parse a double-precision float from string, returning byte count parsed -double parseFloat(const string& in str, uint& out byteCount = 0); - -namespace Engine { - // Print a message to the engine's console or log - void print(const string& in message); - // Retrieve the root entity of the scene or hierarchy - Entity getRoot(); - // Create an RGBA8 framebuffer with a name and size - FrameBuffer createRGBA8FrameBuffer(const string& in name, int width, int height); - // Retrieve an existing framebuffer by name - FrameBuffer getFrameBuffer(const string& in name); - - // Get the main environment instance - Environment getMainEnvironment(); - // Create a new environment - Environment createEnvironment(); -} - - -namespace Resource { - // Get the number of resources of a given type and category - int getAssetCount(AssetType type, const string& in category); - // Get the name of a resource by type, category, and resource ID - string getAssetNameById(AssetType type, const string& in category, int id); - // Get the file path of a resource by type, category, and resource ID - string getAssetTypePathById(AssetType type, const string& in category, int id); - - // Get the number of directories of a given resource type and category - int getDirCount(AssetType type, const string& in category); - // Get the path of a directory by resource type, category, and directory ID - string getDirPathById(AssetType type, const string& in category, int id); - // Get the name of a directory by resource type, category, and directory ID - string getDirNameById(AssetType type, const string& in category, int id); -} - - -namespace UI { - // Columns - - // Setup automatic columns with given count - void automaticColumns(int count); - // Setup fixed columns count - void columns(int count); - // End columns layout - void columns(); - // Move to next column - void nextColumn(); - - // Tree nodes - - // Draw leaf node with label and open state - void treeNodeLeaf(const string& in label, bool open); - // Draw tree node with label, open state, data, and callback - bool treeNode(const string& in label, bool open, any@ data, ReciverFunc@ cb); - // Draw component node with label, data, and callback - bool componentNode(const string& in label, any@ data, ReciverFunc@ cb); - // Draw component node with context menu support - bool componentNodeContextMenu(const string& in label, any@ data, ReciverFunc@ cb, ReciverFunc@ ctxMenu); - - // Popups & Context menus - - // Show a context menu popup with callback - void contextMenuPopup(const string& in label, any@ data, ReciverFunc@ cb); - // Popup attached to an item with label, data, and callback - void contextItemPopup(const string& in label, any@ data, ReciverFunc@ cb); - // Show a modal popup blocking interaction until closed - void modalPopup(const string& in label, ReciverFunc@ cb); - // Show a simple popup window with callback - void simplePopup(const string& in label, ReciverFunc@ cb); - // Open a popup with label and associated data - void openPopup(const string& in label, any@ data); - // Close the currently opened popup - void closePopup(); - - // Drag & Drop - - // Start a drag-drop source with type, data, and payload string - void dragDropSource(const string& in type, any@ data, const string& in payload); - // Define a drag-drop target with type, data, and transfer callback - void dragDropTarget(const string& in type, any@ data, TransferFunc@ transfer); - - // Buttons & Controls - - // Create a clickable button with label - bool button(const string& in label); - // Create a centered button - bool buttonCenter(const string& in label); - // Create a button aligned to the end of the line - bool buttonEnd(const string& in label); - // Checkbox toggle with label and current value - bool checkbox(const string& in label, bool val); - // Disabled checkbox with label and current value - bool checkboxDisabled(const string& in label, bool val); - - // Drawing - - // Draw a framebuffer with given width and height - void drawFrameBuffer(FrameBuffer fb, int w, int h); - // Draw a framebuffer centered with given dimensions - void drawFrameBufferCentered(FrameBuffer fb, int w, int h); - // Draw an icon with name and size - void drawIcon(const string& in icon, int size); - // Draw a centered icon with name and size - void drawIconCentered(const string& in icon, int size); - - // Input & Interaction - - // Text input field with label, initial value, and output string - bool inputText(const string& in label, const string& in initial, string& out result); - // Check if an item was clicked with specific mouse button - bool isItemClicked(int button); - // Check if mouse was double-clicked with specific button - bool isMouseDoubleClicked(int button); - - // Sliders - - // Slider for a float value with step increment - float magicSlider(const string& in label, float val, float step); - // Slider for a vec3 value with step increment - vec3 magicSlider3(const string& in label, vec3 val, float step); - - // Menu Items - - // Selectable menu item with label - bool menuItem(const string& in label); - // Disabled (non-selectable) menu item with label - void menuItemDisabled(const string& in label); - // Menu space with label, data, and callback - void subMenu(const string& in label, any@ data, ReciverFunc@ cb); - - // Layout - - // Place next UI element on the same line - void sameline(); - // Draw a horizontal separator line - void separator(); - // Add vertical space - void space(); - // Add multiple vertical spaces with optional spacing - void space(int count, int spacing=10); - - // Text - - // Draw normal text - void text(const string& in txt); - // Draw centered text - void textCenter(const string& in txt); - // Draw colored text with RGB and string - void textColor(float r, float g, float b, const string& in txt); - // Draw text aligned to end - void textEnd(const string& in txt); - - // Titles - - // Draw a title text - void title(const string& in txt); - // Draw a centered title - void titleCenter(const string& in txt); - // Draw a vertically offset centered title - void titleCenterY(const string& in txt, int yOffset); - // Draw a title aligned to the end - void titleEnd(const string& in txt); - - bool isPanelActive(); - - bool isKeyDown(key); - bool isKeyPressed(key); - - bool isMouseDragging(key); - float getMouseDragDeltaX(); - float getMouseDragDeltaY(); - float getMouseDeltaX(); - float getMouseDeltaY(); - int getAvailableSizeX(); - int getAvailableSizeY(); - void disablePanelPadding(bool); - - int sliderInt(string&in, int value, int min, int max); - float slider(string&in, float value, float min, float max); -} - -class array { - T& opIndex(uint index); - const T& opIndex(uint index) const; - T[]& opAssign(const T[]&in); - void insertAt(uint index, const T&in value); - void insertAt(uint index, const T[]&inout arr); - void insertLast(const T&in value); - void removeAt(uint index); - void removeLast(); - void removeRange(uint start, uint count); - uint length() const; - void reserve(uint length); - void resize(uint length); - void sortAsc(); - void sortAsc(uint startAt, uint count); - void sortDesc(); - void sortDesc(uint startAt, uint count); - void reverse(); - int find(const T&in value) const; - int find(uint startAt, const T&in value) const; - int findByRef(const T&in value) const; - int findByRef(uint startAt, const T&in value) const; - bool opEquals(const T[]&in) const; - bool isEmpty() const; - //void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 )); - funcdef bool less(const T&in, const T&in); -} - -class dictionaryValue { - ~dictionaryValue(); - dictionaryValue(); - dictionaryValue& opAssign(const dictionaryValue&in); - dictionaryValue& opHndlAssign(const ?&in); - dictionaryValue& opHndlAssign(const dictionaryValue&in); - dictionaryValue& opAssign(const ?&in); - dictionaryValue& opAssign(double); - dictionaryValue& opAssign(int64); - void opCast(?&out); - void opConv(?&out); - int64 opConv(); - double opConv(); -} -class dictionary { - dictionary& opAssign(const dictionary&in); - void set(const string&in, const ?&in); - bool get(const string&in, ?&out) const; - void set(const string&in, const int64&in); - bool get(const string&in, int64&out) const; - void set(const string&in, const double&in); - bool get(const string&in, double&out) const; - bool exists(const string&in) const; - bool isEmpty() const; - uint getSize() const; - bool delete(const string&in); - void deleteAll(); - string[]@ getKeys() const; - dictionaryValue& opIndex(const string&in); - const dictionaryValue& opIndex(const string&in) const; -} \ No newline at end of file diff --git a/Tools/Blockbench/deer_engine_exporter.js b/Tools/Blockbench/deer_engine_exporter.js deleted file mode 100644 index bd7761b..0000000 --- a/Tools/Blockbench/deer_engine_exporter.js +++ /dev/null @@ -1,244 +0,0 @@ -let exporterAction; - -function exportToDeerEngine() { - // Build your JSON structure and trigger download - var json = { - mesh: { - hasNormalData: true, - vertexPositions: [], - vertexNormals: [], - indices: [], - }, - }; - - function addVertex(vector) { - json.mesh.vertexPositions.push({ - x: Math.round((vector[0] / 16) * 256), - y: Math.round((vector[1] / 16) * 256), - z: Math.round((vector[2] / 16) * 256), - }); - - return json.mesh.vertexPositions.length - 1; - } - - function addIndex(indexID) { - json.mesh.indices.push(indexID); - } - - function addNormal(normal) { - json.mesh.vertexNormals.push({ - x: Math.round(normal[0] * 64), - y: Math.round(normal[1] * 64), - z: Math.round(normal[2] * 64), - }); - } - - Mesh.all.forEach((mesh) => { - function getWorldPosition(v) { - const mat = mesh.mesh.matrixWorld; // mat4 (THREE.Matrix4) - const vec = new THREE.Vector3(v[0], v[1], v[2]); - vec.applyMatrix4(mat); - - // Convert to your engine’s left-handed space: flip Y and Z - return [vec.x, vec.y, -vec.z]; - } - - for (const fkey in mesh.faces) { - const face = mesh.faces[fkey]; - var verticesIDs = []; - - for (const vKey of face.vertices) { - const position = getWorldPosition(mesh.vertices[vKey]); - verticesIDs.push(addVertex(position)); - } - - // DEER ENGINE IS CLOCK FACE - //for (var i = 0; i < verticesIDs.length; i++) { - // addIndex(verticesIDs[i]); - //} - - if (verticesIDs.length == 3) { - addIndex(verticesIDs[0]); - addIndex(verticesIDs[2]); - addIndex(verticesIDs[1]); - } else if (verticesIDs.length == 4) { - addIndex(verticesIDs[0]); - addIndex(verticesIDs[2]); - addIndex(verticesIDs[1]); - - addIndex(verticesIDs[1]); - addIndex(verticesIDs[2]); - addIndex(verticesIDs[3]); - } - - // Normal calulation - var origin = getWorldPosition(mesh.vertices[face.vertices[0]]); - var dirBRef = getWorldPosition(mesh.vertices[face.vertices[1]]); - var dirARef = getWorldPosition(mesh.vertices[face.vertices[2]]); - var dirA = [0, 0, 0]; - var dirB = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - dirB[i] = dirARef[i] - origin[i]; - dirA[i] = dirBRef[i] - origin[i]; - } - - var normalDir = [0, 0, 0]; - normalDir[0] = dirB[1] * dirA[2] - dirB[2] * dirA[1]; - normalDir[1] = dirB[2] * dirA[0] - dirB[0] * dirA[2]; - normalDir[2] = dirB[0] * dirA[1] - dirB[1] * dirA[0]; - - var normalMagnitude = Math.sqrt( - normalDir[0] * normalDir[0] + - normalDir[1] * normalDir[1] + - normalDir[2] * normalDir[2] - ); - - for (var i = 0; i < 3; i++) { - normalDir[i] = normalDir[i] / normalMagnitude; - } - - for (var i = 0; i < verticesIDs.length; i++) { - addNormal(normalDir); - } - } - }); - - const face_corners = { - north: [5, 4, 7, 6], - east: [1, 5, 3, 7], - south: [0, 1, 2, 3], - west: [4, 0, 6, 2], - up: [2, 3, 6, 7], - down: [4, 5, 0, 1], - }; - - Cube.all.forEach((cube) => { - // Cubes are simpler: they have 6 faces and 8 vertices - const mat = cube.mesh.matrixWorld; - - function getWorldPosition(v) { - const vec = new THREE.Vector3(v[0], v[1], v[2]); - vec.applyMatrix4(mat); - return [vec.x, vec.y, -vec.z]; // Flip Z to match left-handed - } - - // cube.from and cube.to define the min and max corners - const from = cube.from; // [x, y, z] - const to = cube.to; // [x, y, z] - const corners = [ - [from[0], from[1], from[2]], - [to[0], from[1], from[2]], - [from[0], to[1], from[2]], - [to[0], to[1], from[2]], - [from[0], from[1], to[2]], - [to[0], from[1], to[2]], - [from[0], to[1], to[2]], - [to[0], to[1], to[2]], - ]; - - for (var i = 0; i < corners.length; i++) { - corners[i][0] -= cube.origin[0]; - corners[i][1] -= cube.origin[1]; - corners[i][2] -= cube.origin[2]; - } - - for (const fkey in cube.faces) { - const face = cube.faces[fkey]; - const verticesIDs = []; - - const corner_indices = face_corners[fkey]; // get the right 4 corner indices - if (!corner_indices) continue; // just in case - - const face_vertices = corner_indices.map((i) => corners[i]); - - for (const v of face_vertices) { - const position = getWorldPosition(v); - verticesIDs.push(addVertex(position)); - } - - if (verticesIDs.length == 4) { - addIndex(verticesIDs[0]); - addIndex(verticesIDs[1]); - addIndex(verticesIDs[2]); - - addIndex(verticesIDs[1]); - addIndex(verticesIDs[3]); - addIndex(verticesIDs[2]); - } - - // Calculate normal like in your mesh code - var origin = getWorldPosition(face_vertices[0]); - var dirBRef = getWorldPosition(face_vertices[1]); - var dirARef = getWorldPosition(face_vertices[2]); - var dirA = [0, 0, 0]; - var dirB = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - dirA[i] = dirARef[i] - origin[i]; - dirB[i] = dirBRef[i] - origin[i]; - } - - var normalDir = [0, 0, 0]; - normalDir[0] = dirB[1] * dirA[2] - dirB[2] * dirA[1]; - normalDir[1] = dirB[2] * dirA[0] - dirB[0] * dirA[2]; - normalDir[2] = dirB[0] * dirA[1] - dirB[1] * dirA[0]; - - var normalMagnitude = Math.sqrt( - normalDir[0] * normalDir[0] + - normalDir[1] * normalDir[1] + - normalDir[2] * normalDir[2] - ); - - for (var i = 0; i < 3; i++) { - normalDir[i] = normalDir[i] / normalMagnitude; - } - - for (var i = 0; i < verticesIDs.length; i++) { - addNormal(normalDir); - } - } - }); - - Blockbench.export({ - type: "DeerMesh", - extensions: ["dmesh"], - name: Project.name, - content: autoStringify(json), - }); - - /* - Blockbench.showQuickMessage( - PathModule.join(folder, Project.name + ".dmesh"), - 10000 - ); - Blockbench.writeFile(PathModule.join(folder, Project.name + ".dmesh"), { - content: autoStringify(json), - });*/ -} - -Plugin.register("deer_engine_exporter", { - title: "Deer Engine", - author: "Chewico", - description: "Utilities to work with Deer Engine", - icon: "export", // any valid Blockbench icon :contentReference[oaicite:5]{index=5} - version: "1.0.0", - variant: "both", // supports desktop & web - - onload() { - // (1) Create the export action - exporterAction = new Action("export_deer_engine_json", { - name: "Export to Deer Engine Mesh Format", - icon: "export", - click() { - //visibleOverridesDialog.show(); - exportToDeerEngine(); - }, - }); - // (2) Add it under File → Export (top position) - MenuBar.addAction(exporterAction, "file.export.0"); // “export” submenu, index 0 :contentReference[oaicite:6]{index=6} - }, - - onunload() { - // Remove the action when plugin unloads - exporterAction.delete(); - }, -}); diff --git a/Tools/Blockbench/exporter.js b/Tools/Blockbench/exporter.js deleted file mode 100644 index bb2289e..0000000 --- a/Tools/Blockbench/exporter.js +++ /dev/null @@ -1,8 +0,0 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}}(r(2));(()=>{let t=null;Plugin.register("blockmodels-exporter",{title:"Export to BlockModels.com",icon:"web",author:"TheDestruc7i0n",description:"Export models from Blockbench directly to BlockModels.com",version:"1.0.2",variant:"both",onload(){t=new Action("export-blockmodels",{name:"Export to BlockModels.com",icon:"web",click:()=>{"java_block"===Format.id?(0,n.default)(t=>{$.ajax({type:"POST",url:"https://blockmodels.com/api/submit",data:t,contentType:!1,processData:!1,xhr:function(){let t=$.ajaxSettings.xhr();return t.upload&&t.upload.addEventListener("progress",function(t){t.lengthComputable&&$("#blockmodels_upload_progress .progress_bar .progress_bar_inner").last().css("width",100*t.loaded/t.total+"%")},!1),t},success:t=>{t.error?alert(`An error occurred in uploading: ${t.error}`):(alert(`Model uploaded! https://blockmodels.com/model/${t.id}`),hideDialog()),window.blockmodels_confirming=!1},error:()=>{alert("An error occurred in uploading."),window.blockmodels_confirming=!1}})}):alert("This type of model is not supported yet!")}}),MenuBar.addAction(t,"filter")},onunload(){MenuBar.removeAction("filter.export-blockmodels"),$(".blockmodels_css").remove(),localStorage&&localStorage.getItem("blockmodels_api_key")&&localStorage.removeItem("blockmodels_api_key")}}),window.blockmodels_confirming=!1})()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(r(3)),i=a(r(11));function a(t){return t&&t.__esModule?t:{default:t}}e.default=(t=>{const e=t=>{let e=document.createElement("canvas");return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e.toDataURL("image/png").replace(/^data:image\/(png|jpg);base64,/,"")};(0,i.default)(async()=>{if(window.blockmodels_confirming)return void alert("Already uploading. Please wait.");window.blockmodels_confirming=!0;const r=$("[name=blockmodels__creation_title]").last().val(),i=$("[name=blockmodels__short]").last().val(),a=$("[name=blockmodels__long]").last().val(),s=$("[name=blockmodels__category]").last().val(),o=$("[name=blockmodels__minecraft_version]").last().val(),u=$("[name=blockmodels__api_key]").last().val();u&&localStorage&&localStorage.setItem("blockmodels_api_key",u);const l=JSON.parse(Codecs.java_block.compile());if(console.log("inputs: ",r,i,a,s,o,u,"bb","bb"),r&&i&&a&&s&&o&&u){const h=(()=>{const t=Blockbench.textures,r=new n.default;for(let n of t)if(!n.error){let t=n.img;const i=e(t);let a=n.name;r.file(a,i,{base64:!0})}return r})();(t=>{Screencam.cleanCanvas({width:512,height:512},e=>{e=e.replace(/^data:image\/(png|jpg);base64,/,""),t(e)})})(async e=>{h.file("imagelink.png",e,{base64:!0}),h.file("upload.json",JSON.stringify(l)),console.log("zipped file",h.files);let n=new FormData;n.append("uploadlink",!1),n.append("short",i),n.append("long",a),n.append("title",r),n.append("category",s),n.append("mcver",o),n.append("programused","bb"),n.append("source","bb"),n.append("api",u),n.append("files",await h.generateAsync({type:"blob"})),t(n)})}else alert("Please fill all fields."),window.blockmodels_confirming=!1})})},function(t,e,r){(function(e,r,n){var i;!function(e){t.exports=e()}(function(){return function t(e,r,n){function a(o,u){if(!r[o]){if(!e[o]){if(!u&&("function"==typeof i&&i))return i(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[o]={exports:{}};e[o][0].call(h.exports,function(t){return a(e[o][1][t]||t)},h,h.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof i&&i,o=0;o>2,o=(3&e)<<4|r>>4,u=1>6:64,l=2>4,r=(15&s)<<4|(o=a.indexOf(t.charAt(l++)))>>2,n=(3&o)<<6|(u=a.indexOf(t.charAt(l++))),c[h++]=e,64!==o&&(c[h++]=r),64!==u&&(c[h++]=n);return c}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),a=t("./stream/DataLengthProbe"),s=t("./stream/Crc32Probe");function o(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}a=t("./stream/DataLengthProbe"),o.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new s).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var a=i,s=0+r;t^=-1;for(var o=0;o>>8^a[255&(t^e[o])];return-1^t}(0|e,t,t.length):function(t,e,r,n){var a=i,s=0+r;t^=-1;for(var o=0;o>>8^a[255&(t^e.charCodeAt(o))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),a=t("./utils"),s=t("./stream/GenericWorker"),o=n?"uint8array":"array";function u(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",a.inherits(u,s),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(a.transformTo(o,t.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r>>=8;return n}function i(t,e,r,i,s,h){var f,c,d=t.file,p=t.compression,m=h!==o.utf8encode,_=a.transformTo("string",h(d.name)),g=a.transformTo("string",o.utf8encode(d.name)),v=d.comment,b=a.transformTo("string",h(v)),y=a.transformTo("string",o.utf8encode(v)),w=g.length!==d.name.length,k=y.length!==v.length,x="",E="",A="",S=d.dir,C=d.date,z={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(z.crc32=t.crc32,z.compressedSize=t.compressedSize,z.uncompressedSize=t.uncompressedSize);var T=0;e&&(T|=8),m||!w&&!k||(T|=2048);var I=0,R=0;S&&(I|=16),"UNIX"===s?(R=798,I|=function(t,e){var r=t;return t||(r=S?16893:33204),(65535&r)<<16}(d.unixPermissions)):(R=20,I|=63&(d.dosPermissions||0)),f=C.getUTCHours(),f<<=6,f|=C.getUTCMinutes(),f<<=5,f|=C.getUTCSeconds()/2,c=C.getUTCFullYear()-1980,c<<=4,c|=C.getUTCMonth()+1,c<<=5,c|=C.getUTCDate(),w&&(x+="up"+n((E=n(1,1)+n(u(_),4)+g).length,2)+E),k&&(x+="uc"+n((A=n(1,1)+n(u(b),4)+y).length,2)+A);var B="";return B+="\n\0",B+=n(T,2),B+=p.magic,B+=n(f,2),B+=n(c,2),B+=n(z.crc32,4),B+=n(z.compressedSize,4),B+=n(z.uncompressedSize,4),B+=n(_.length,2),B+=n(x.length,2),{fileRecord:l.LOCAL_FILE_HEADER+B+_+x,dirRecord:l.CENTRAL_FILE_HEADER+n(R,2)+B+n(b.length,2)+"\0\0\0\0"+n(I,4)+n(i,4)+_+x+b}}var a=t("../utils"),s=t("../stream/GenericWorker"),o=t("../utf8"),u=t("../crc32"),l=t("../signature");function h(t,e,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,s),h.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return l.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),a=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new o(t):i.uint8array?new u(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function a(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(a,n),a.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,n),a.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function a(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(a,i),a.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function a(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}n.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],29:[function(t,r,n){"use strict";var i=t("../utils"),a=t("./ConvertWorker"),s=t("./GenericWorker"),o=t("../base64"),u=t("../support"),l=t("../external"),h=null;if(u.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function f(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,i.checkSupport(n),this._worker=t.pipe(new a(n)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}f.prototype={accumulate:function(t){return function(t,r){return new l.Promise(function(n,a){var s=[],u=t._internalType,l=t._outputType,h=t._mimeType;t.on("data",function(t,e){s.push(t),r&&r(e)}).on("error",function(t){s=[],a(t)}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),r);case"base64":return o.encode(e);default:return i.transformTo(t,e)}}(l,function(t,r){var n,i=0,a=null,s=0;for(n=0;n>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,a,s=t.length,u=new Array(2*s);for(e=r=0;e>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(l,s),l.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=e;(e=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),e.set(a,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+o[t[r]]>e?r:e}(e),u=e;s!==e.length&&(i.uint8array?(u=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(u=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,n.inherits(h,s),h.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),a=t("./nodejsUtils"),s=t("set-immediate-shim"),o=t("./external");function u(t){return t}function l(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+s[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var a=n,s=i+r;t^=-1;for(var o=i;o>>8^a[255&(t^e[o])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),a=t("./trees"),s=t("./adler32"),o=t("./crc32"),u=t("./messages"),l=0,h=4,f=0,c=-2,d=-1,p=4,m=2,_=8,g=9,v=286,b=30,y=19,w=2*v+1,k=15,x=3,E=258,A=E+x+1,S=42,C=113,z=1,T=2,I=3,R=4;function B(t,e){return t.msg=u[e],e}function O(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function U(t,e){a._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,D(t.strm)}function F(t,e){t.pending_buf[t.pending++]=e}function L(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function N(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,u=t.strstart>t.w_size-A?t.strstart-(t.w_size-A):0,l=t.window,h=t.w_mask,f=t.prev,c=t.strstart+E,d=l[a+s-1],p=l[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(r=e)+s]===p&&l[r+s-1]===d&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&au&&0!=--i);return s<=t.lookahead?s:t.lookahead}function M(t){var e,r,n,a,u,l,h,f,c,d,p=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-A)){for(i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;n=t.head[--e],t.head[e]=p<=n?n-p:0,--r;);for(e=r=p;n=t.prev[--e],t.prev[e]=p<=n?n-p:0,--r;);a+=p}if(0===t.strm.avail_in)break;if(l=t.strm,h=t.window,f=t.strstart+t.lookahead,d=void 0,(c=a)<(d=l.avail_in)&&(d=c),r=0===d?0:(l.avail_in-=d,i.arraySet(h,l.input,l.next_in,d,f),1===l.state.wrap?l.adler=s(l.adler,h,d,f):2===l.state.wrap&&(l.adler=o(l.adler,h,d,f)),l.next_in+=d,l.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=x)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(n=a._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-x,n=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(M(t),0===t.lookahead&&e===l)return z;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,U(t,!1),0===t.strm.avail_out))return z;if(t.strstart-t.block_start>=t.w_size-A&&(U(t,!1),0===t.strm.avail_out))return z}return t.insert=0,e===h?(U(t,!0),0===t.strm.avail_out?I:R):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),z)}),new W(4,4,8,4,j),new W(4,5,16,8,j),new W(4,6,32,32,j),new W(4,4,16,16,Z),new W(8,16,32,32,Z),new W(8,16,128,128,Z),new W(8,32,128,256,Z),new W(32,128,258,1024,Z),new W(32,258,258,4096,Z)],r.deflateInit=function(t,e){return K(t,e,_,15,8,0)},r.deflateInit2=K,r.deflateReset=G,r.deflateResetKeep=H,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,f):c},r.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||5>8&255),F(i,i.gzhead.time>>16&255),F(i,i.gzhead.time>>24&255),F(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),F(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(F(i,255&i.gzhead.extra.length),F(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=o(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(F(i,0),F(i,0),F(i,0),F(i,0),F(i,0),F(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),F(i,3),i.status=C);else{var d=_+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=C,L(i,d),0!==i.strstart&&(L(i,t.adler>>>16),L(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),D(t),s=i.pending,i.pending!==i.pending_buf_size));)F(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),D(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),D(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&D(t),i.pending+2<=i.pending_buf_size&&(F(i,255&t.adler),F(i,t.adler>>8&255),t.adler=0,i.status=C)):i.status=C),0!==i.pending){if(D(t),0===t.avail_out)return i.last_flush=-1,f}else if(0===t.avail_in&&O(e)<=O(r)&&e!==h)return B(t,-5);if(666===i.status&&0!==t.avail_in)return B(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(M(t),0===t.lookahead)){if(e===l)return z;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(U(t,!1),0===t.strm.avail_out))return z}return t.insert=0,e===h?(U(t,!0),0===t.strm.avail_out?I:R):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?z:T}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,o=t.window;;){if(t.lookahead<=E){if(M(t),t.lookahead<=E&&e===l)return z;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(r=a._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(U(t,!1),0===t.strm.avail_out))return z}return t.insert=0,e===h?(U(t,!0),0===t.strm.avail_out?I:R):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?z:T}(i,e):n[i.level].func(i,e);if(p!==I&&p!==R||(i.status=666),p===z||p===I)return 0===t.avail_out&&(i.last_flush=-1),f;if(p===T&&(1===e?a._tr_align(i):5!==e&&(a._tr_stored_block(i,0,0,!1),3===e&&(P(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),D(t),0===t.avail_out))return i.last_flush=-1,f}return e!==h?f:i.wrap<=0?1:(2===i.wrap?(F(i,255&t.adler),F(i,t.adler>>8&255),F(i,t.adler>>16&255),F(i,t.adler>>24&255),F(i,255&t.total_in),F(i,t.total_in>>8&255),F(i,t.total_in>>16&255),F(i,t.total_in>>24&255)):(L(i,t.adler>>>16),L(i,65535&t.adler)),D(t),0=r.w_size&&(0===o&&(P(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,p-r.w_size,r.w_size,0),e=d,p=r.w_size),u=t.avail_in,l=t.next_in,h=t.input,t.avail_in=p,t.next_in=0,t.input=e,M(r);r.lookahead>=x;){for(n=r.strstart,a=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=b>>>24,p-=y,0==(y=b>>>16&255))S[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=m[(65535&b)+(d&(1<>>=y,p-=y),p<15&&(d+=A[n++]<>>=y=b>>>24,p-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=_[(65535&b)+(d&(1<>>=y,p-=y,(y=a-s)>3,d&=(1<<(p-=w<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function _(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=c,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(d),e.distcode=e.distdyn=new n.Buf32(p),e.sane=1,e.back=-1,h):f}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,_(t)):f}function v(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(a=s.wsize-s.wnext)&&(a=i),n.arraySet(s.window,e,r-i,a,s.wnext),(i-=a)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=a,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=a(r.check,M,2,0),w=y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=30;break}if(w-=4,D=8+(15&(y>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(M[0]=255&y,M[1]=y>>>8&255,r.check=a(r.check,M,2,0)),w=y=0,r.mode=3;case 3:for(;w<32;){if(0===v)break t;v--,y+=d[_++]<>>8&255,M[2]=y>>>16&255,M[3]=y>>>24&255,r.check=a(r.check,M,4,0)),w=y=0,r.mode=4;case 4:for(;w<16;){if(0===v)break t;v--,y+=d[_++]<>8),512&r.flags&&(M[0]=255&y,M[1]=y>>>8&255,r.check=a(r.check,M,2,0)),w=y=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===v)break t;v--,y+=d[_++]<>>8&255,r.check=a(r.check,M,2,0)),w=y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(v<(S=r.length)&&(S=v),S&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,_,S,D)),512&r.flags&&(r.check=a(r.check,d,S,_)),v-=S,_+=S,r.length-=S),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===v)break t;for(S=0;D=d[_+S++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D)),D&&S>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;w<32;){if(0===v)break t;v--,y+=d[_++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===v)break t;v--,y+=d[_++]<>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6!==e)break;y>>>=2,w-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}y>>>=2,w-=2;break;case 14:for(y>>>=7&w,w-=7&w;w<32;){if(0===v)break t;v--,y+=d[_++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&y,w=y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(S=r.length){if(v>>=5,w-=5,r.ndist=1+(31&y),y>>>=5,w-=5,r.ncode=4+(15&y),y>>>=4,w-=4,286>>=3,w-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},U=o(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,U){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&N,!((T=N>>>24)<=w);){if(0===v)break t;v--,y+=d[_++]<>>=T,w-=T,r.lens[r.have++]=R;else{if(16===R){for(L=T+2;w>>=T,w-=T,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}D=r.lens[r.have-1],S=3+(3&y),y>>>=2,w-=2}else if(17===R){for(L=T+3;w>>=T)),y>>>=3,w-=3}else{for(L=T+7;w>>=T)),y>>>=7,w-=7}if(r.have+S>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;S--;)r.lens[r.have++]=D}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,F={bits:r.lenbits},U=o(u,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,U){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},U=o(l,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,U){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=v&&258<=b){t.next_out=g,t.avail_out=b,t.next_in=_,t.avail_in=v,r.hold=y,r.bits=w,s(t,A),g=t.next_out,p=t.output,b=t.avail_out,_=t.next_in,d=t.input,v=t.avail_in,y=r.hold,w=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;I=(N=r.lencode[y&(1<>>16&255,R=65535&N,!((T=N>>>24)<=w);){if(0===v)break t;v--,y+=d[_++]<>B)])>>>16&255,R=65535&N,!(B+(T=N>>>24)<=w);){if(0===v)break t;v--,y+=d[_++]<>>=B,w-=B,r.back+=B}if(y>>>=T,w-=T,r.back+=T,r.length=R,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=12;break}if(64&I){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(L=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;I=(N=r.distcode[y&(1<>>16&255,R=65535&N,!((T=N>>>24)<=w);){if(0===v)break t;v--,y+=d[_++]<>B)])>>>16&255,R=65535&N,!(B+(T=N>>>24)<=w);){if(0===v)break t;v--,y+=d[_++]<>>=B,w-=B,r.back+=B}if(y>>>=T,w-=T,r.back+=T,64&I){t.msg="invalid distance code",r.mode=30;break}r.offset=R,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(L=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===b)break t;if(S=A-b,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}C=S>r.wnext?(S-=r.wnext,r.wsize-S):r.wnext-S,S>r.length&&(S=r.length),z=r.window}else z=p,C=g-r.offset,S=r.length;for(bv?(y=F[L+f[E]],O[P+f[E]]):(y=96,0),d=1<>T)+(p-=d)]=b<<24|y<<16|w|0,0!==p;);for(d=1<>=1;if(0!==d?(B&=d-1,B+=d):B=0,E++,0==--D[x]){if(x===S)break;x=e[r+f[E]]}if(C>>7)]}function O(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function P(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function F(t,e,r){var n,i,a=new Array(f+1),s=0;for(n=1;n<=f;n++)a[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var o=t[2*i+1];0!==o&&(t[2*i]=U(a[o]++,o))}}function L(t){var e;for(e=0;e>1;1<=r;r--)j(t,a,r);for(i=u;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],j(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,j(t,a,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,s,o,u=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,d=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,m=e.stat_desc.extra_base,_=e.stat_desc.max_length,g=0;for(a=0;a<=f;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r>=7;n>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?K(t,e,r,n):4===t.strategy||a===i?(P(t,2+(n?1:0),3),Z(t,w,k)):(P(t,4+(n?1:0),3),function(t,e,r,n){var i;for(P(t,e-257,5),P(t,r-1,5),P(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(E[r]+s+1)]++,t.dyn_dtree[2*B(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),D(t,d,w),function(t){16===t.bi_valid?(O(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof n?n:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)})}).call(e,r(4).Buffer,r(0),r(8).setImmediate)},function(t,e,r){"use strict";(function(t){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -var n=r(5),i=r(6),a=r(7);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var a,s=1,o=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,o/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(a=r;ao&&(r=o-u),a=r;a>=0;a--){for(var f=!0,c=0;ci&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;s>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(h=l);break;case 2:128==(192&(a=t[i+1]))&&(u=(31&l)<<6|63&a)>127&&(h=u);break;case 3:a=t[i+1],s=t[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:a=t[i+1],s=t[i+2],o=t[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(h=u)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=f}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return z(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,s=r-e,o=Math.min(a,s),l=this.slice(n,i),h=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function D(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,a){return a||D(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,a){return a||D(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var a=0,s=1,o=0;for(this[e]=255&t;++a>0)-o&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var a=r-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)t<0&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function j(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(e,r(0))},function(t,e,r){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=l(t),s=n[0],o=n[1],u=new a(function(t,e,r){return 3*(e+r)/4-r}(0,s,o)),h=0,f=o>0?s-4:s;for(r=0;r>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===o&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[h++]=255&e);1===o&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],s=0,o=r-i;so?o:s+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,r){for(var n,i=[],a=e;a>1,h=-7,f=r?i-1:0,c=r?-1:1,d=t[e+f];for(f+=c,a=d&(1<<-h)-1,d>>=-h,h+=o;h>0;a=256*a+t[e+f],f+=c,h-=8);for(s=a&(1<<-h)-1,a>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=c,h-=8);if(0===a)a=1-l;else{if(a===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),a-=l}return(d?-1:1)*s*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var s,o,u,l=8*a-i-1,h=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?c/u:c*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(o=0,s=h):s+f>=1?(o=(e*u-1)*Math.pow(2,i),s+=f):(o=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&o,d+=p,o/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,l-=8);t[r+d-p]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(9),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,r(0))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i=1,a={},s=!1,o=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){h(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&h(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){h(t.data)},n=function(e){t.port2.postMessage(e)}}():o&&"onreadystatechange"in o.createElement("script")?function(){var t=o.documentElement;n=function(e){var r=o.createElement("script");r.onreadystatechange=function(){h(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=function(t){setTimeout(h,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r1)for(var r=1;rnull))=>{$('