Cleanup codebase
@ -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\""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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> {
|
||||
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); }
|
||||
@ -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> {
|
||||
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); }
|
||||
@ -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); }
|
||||
@ -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> {
|
||||
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); }
|
||||
@ -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> {
|
||||
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); }
|
||||
@ -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> {
|
||||
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); }
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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<T> {
|
||||
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<T> {
|
||||
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@); }
|
||||
@ -1,13 +0,0 @@
|
||||
{
|
||||
"dockPanelModule" : {
|
||||
"name" : "Entity Manipulation",
|
||||
"author" : "Chewico",
|
||||
"version" : "1.0.0",
|
||||
"services" : [
|
||||
{
|
||||
"name" : "ActiveEntity",
|
||||
"version" : "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
string selectedResource = "";
|
||||
@ -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;
|
||||
}
|
||||
@ -1,91 +0,0 @@
|
||||
class ResourceExplorer : DockPanel {
|
||||
string currentPath = "";
|
||||
array<string> subFolders;
|
||||
array<string> 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<string>@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
class ResourceMetadata : DockPanel {
|
||||
void onRender() {
|
||||
UI::title("Metadata");
|
||||
UI::separator();
|
||||
|
||||
UI::text(Path::getName(selectedResource));
|
||||
}
|
||||
}
|
||||
@ -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<T> {
|
||||
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<T> {
|
||||
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@); }
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"dockPanelModule" : {
|
||||
"name" : "Asset Explorer",
|
||||
"author" : "Chewico",
|
||||
"version" : "1.0.0",
|
||||
"services" : []
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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<T> {
|
||||
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<T> {
|
||||
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@); }
|
||||
@ -1,13 +0,0 @@
|
||||
{
|
||||
"dockPanelModule" : {
|
||||
"name" : "Tree explorer",
|
||||
"author" : "Chewico",
|
||||
"version" : "1.0.0",
|
||||
"services" : [
|
||||
{
|
||||
"name" : "ActiveEntity",
|
||||
"version" : "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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<T> {
|
||||
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<T> {
|
||||
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@); }
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"dockPanelModule" : {
|
||||
"name" : "Viewport",
|
||||
"author" : "Chewico",
|
||||
"version" : "1.0.0",
|
||||
"services" : []
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
Entity entity = Engine::getRoot();
|
||||
Entity getActiveEntity() {
|
||||
return entity;
|
||||
}
|
||||
|
||||
void setActiveEntity(Entity ent) {
|
||||
entity = ent;
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"serviceScriptModule" : {
|
||||
"name" : "ActiveEntity",
|
||||
"author" : "Chewico",
|
||||
"version" : "1.0.0"
|
||||
}
|
||||
}
|
||||
@ -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<T> {
|
||||
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@); }
|
||||
@ -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> {
|
||||
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;
|
||||
}
|
||||
@ -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();
|
||||
},
|
||||
});
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "blue",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "ceci",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "debug",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "debug_internal",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "dirt",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "grass",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "green",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "red",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"voxel": {
|
||||
"name": "wood",
|
||||
"type": "voxel"
|
||||
}
|
||||
}
|
||||
@ -1,88 +0,0 @@
|
||||
#type vertex
|
||||
#version 410 core
|
||||
layout(location = 0) in int a_textureID;
|
||||
layout(location = 1) in float a_ambient_occlusion;
|
||||
|
||||
layout(location = 2) in float a_xPos;
|
||||
layout(location = 3) in float a_yPos;
|
||||
layout(location = 4) in float a_zPos;
|
||||
|
||||
layout(location = 5) in float a_a_light;
|
||||
layout(location = 6) in float a_r_light;
|
||||
layout(location = 7) in float a_g_light;
|
||||
layout(location = 8) in float a_b_light;
|
||||
|
||||
layout(location = 9) in int a_normal;
|
||||
|
||||
layout(location = 10) in float a_u;
|
||||
layout(location = 11) in float a_v;
|
||||
|
||||
uniform mat4 u_viewMatrix;
|
||||
uniform mat4 u_worldMatrix;
|
||||
|
||||
uniform int u_chunkID_x;
|
||||
uniform int u_chunkID_y;
|
||||
uniform int u_chunkID_z;
|
||||
|
||||
uniform int u_textureSize;
|
||||
|
||||
out vec2 uv;
|
||||
out vec3 voxel_light;
|
||||
out float ambient_light;
|
||||
out float ambient_occlusion;
|
||||
|
||||
flat out uint normal;
|
||||
|
||||
void main() {
|
||||
voxel_light = vec3(a_r_light, a_g_light, a_b_light);
|
||||
ambient_light = a_a_light;
|
||||
ambient_occlusion = a_ambient_occlusion;
|
||||
|
||||
normal = a_normal;
|
||||
|
||||
int posY = a_textureID / u_textureSize;
|
||||
int posX = a_textureID - posY * u_textureSize;
|
||||
|
||||
uv = vec2((a_u + float(posX)) / float(u_textureSize), (a_v + float(posY)) / float(u_textureSize));
|
||||
|
||||
gl_Position = u_viewMatrix * u_worldMatrix * vec4(a_xPos + u_chunkID_x * 32, a_yPos + u_chunkID_y * 32, a_zPos + u_chunkID_z * 32, 1.0);
|
||||
}
|
||||
|
||||
#type fragment
|
||||
#version 410 core
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
layout(location = 1) out int objectID;
|
||||
|
||||
in vec2 uv;
|
||||
in vec3 voxel_light;
|
||||
in float ambient_light;
|
||||
in float ambient_occlusion;
|
||||
|
||||
flat in uint normal;
|
||||
|
||||
uniform int u_objectID;
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
vec3 normalDir[6] = vec3[6](
|
||||
vec3(-1, 0, 0),
|
||||
vec3( 1, 0, 0),
|
||||
vec3( 0, -1, 0),
|
||||
vec3( 0, 1, 0),
|
||||
vec3( 0, 0, -1),
|
||||
vec3( 0, 0, 1)
|
||||
);
|
||||
|
||||
void main()
|
||||
{
|
||||
objectID = -1;
|
||||
|
||||
vec3 normalVec = normalDir[normal];
|
||||
|
||||
vec3 tLight = vec3(ambient_light, ambient_light, ambient_light) + voxel_light;
|
||||
tLight = vec3(clamp(tLight.r / 255, 0, 1), clamp(tLight.g / 255, 0, 1), clamp(tLight.b / 255, 0, 1));
|
||||
|
||||
vec3 col = texture(u_texture, uv).rgb * vec3(tLight);
|
||||
col = (col * 3) / (3 + ambient_occlusion);
|
||||
fragColor = vec4(col, 1);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 575 B |
|
Before Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 4.6 KiB |
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "blue",
|
||||
"textureFaces": {
|
||||
"left": "ceci",
|
||||
"right": "ceci",
|
||||
"down": "ceci",
|
||||
"up": "ceci",
|
||||
"front": "ceci",
|
||||
"back": "ceci"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 255
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "ceci",
|
||||
"textureFaces": {
|
||||
"left": "ceci",
|
||||
"right": "ceci",
|
||||
"down": "ceci",
|
||||
"up": "ceci",
|
||||
"front": "ceci",
|
||||
"back": "ceci"
|
||||
},
|
||||
"emission": {
|
||||
"red": 255,
|
||||
"green": 125,
|
||||
"blue": 30
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "debug",
|
||||
"textureFaces": {
|
||||
"left": "debug",
|
||||
"right": "debug",
|
||||
"down": "debug",
|
||||
"up": "debug",
|
||||
"front": "debug",
|
||||
"back": "debug"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "debug_internal",
|
||||
"textureFaces": {
|
||||
"left": "debug_internal",
|
||||
"right": "debug_internal",
|
||||
"down": "debug_internal",
|
||||
"up": "debug_internal",
|
||||
"front": "debug_internal",
|
||||
"back": "debug_internal"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "dirt",
|
||||
"textureFaces": {
|
||||
"left": "dirt",
|
||||
"right": "dirt",
|
||||
"down": "dirt",
|
||||
"up": "dirt",
|
||||
"front": "dirt",
|
||||
"back": "dirt"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "grass",
|
||||
"textureFaces": {
|
||||
"left": "dirt_grass",
|
||||
"right": "dirt_grass",
|
||||
"down": "dirt",
|
||||
"up": "grass",
|
||||
"front": "dirt_grass",
|
||||
"back": "dirt_grass"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "green",
|
||||
"textureFaces": {
|
||||
"left": "ceci",
|
||||
"right": "ceci",
|
||||
"down": "ceci",
|
||||
"up": "ceci",
|
||||
"front": "ceci",
|
||||
"back": "ceci"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 255,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "red",
|
||||
"textureFaces": {
|
||||
"left": "ceci",
|
||||
"right": "ceci",
|
||||
"down": "ceci",
|
||||
"up": "ceci",
|
||||
"front": "ceci",
|
||||
"back": "ceci"
|
||||
},
|
||||
"emission": {
|
||||
"red": 255,
|
||||
"green": 0,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"voxelAspect": {
|
||||
"name": "wood",
|
||||
"textureFaces": {
|
||||
"left": "wood",
|
||||
"right": "wood",
|
||||
"down": "wood",
|
||||
"up": "wood",
|
||||
"front": "wood",
|
||||
"back": "wood"
|
||||
},
|
||||
"emission": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Web/Docs/.gitignore
vendored
@ -1 +0,0 @@
|
||||
book
|
||||
@ -1,5 +0,0 @@
|
||||
[book]
|
||||
authors = ["Chewico"]
|
||||
language = "en"
|
||||
src = "src"
|
||||
title = "Deer Docs"
|
||||
@ -1,3 +0,0 @@
|
||||
# Summary
|
||||
|
||||
- [Chapter 1](./chapter_1.md)
|
||||
@ -1 +0,0 @@
|
||||
# Chapter 1
|
||||