|
@@ -336,6 +336,7 @@ var INSPECTOR;
|
|
'ArcRotateCamera': {
|
|
'ArcRotateCamera': {
|
|
type: BABYLON.ArcRotateCamera,
|
|
type: BABYLON.ArcRotateCamera,
|
|
properties: [
|
|
properties: [
|
|
|
|
+ 'position',
|
|
'alpha',
|
|
'alpha',
|
|
'beta',
|
|
'beta',
|
|
'radius',
|
|
'radius',
|
|
@@ -354,6 +355,21 @@ var INSPECTOR;
|
|
'checkCollisions'
|
|
'checkCollisions'
|
|
]
|
|
]
|
|
},
|
|
},
|
|
|
|
+ 'FreeCamera': {
|
|
|
|
+ type: BABYLON.FreeCamera,
|
|
|
|
+ properties: [
|
|
|
|
+ 'position',
|
|
|
|
+ 'ellipsoid',
|
|
|
|
+ 'applyGravity',
|
|
|
|
+ 'angularSensibility',
|
|
|
|
+ 'keysUp',
|
|
|
|
+ 'keysDown',
|
|
|
|
+ 'keysLeft',
|
|
|
|
+ 'keysRight',
|
|
|
|
+ 'onCollide',
|
|
|
|
+ 'checkCollisions'
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
'Scene': {
|
|
'Scene': {
|
|
type: BABYLON.Scene,
|
|
type: BABYLON.Scene,
|
|
properties: [
|
|
properties: [
|
|
@@ -570,6 +586,16 @@ var INSPECTOR;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(Adapter.prototype, "object", {
|
|
|
|
+ /**
|
|
|
|
+ * Returns the actual object used for this adapter
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._obj;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
/** Should be overriden in subclasses */
|
|
/** Should be overriden in subclasses */
|
|
Adapter.prototype.highlight = function (b) { };
|
|
Adapter.prototype.highlight = function (b) { };
|
|
;
|
|
;
|
|
@@ -589,6 +615,110 @@ var __extends = (this && this.__extends) || function (d, b) {
|
|
};
|
|
};
|
|
var INSPECTOR;
|
|
var INSPECTOR;
|
|
(function (INSPECTOR) {
|
|
(function (INSPECTOR) {
|
|
|
|
+ var CameraAdapter = (function (_super) {
|
|
|
|
+ __extends(CameraAdapter, _super);
|
|
|
|
+ function CameraAdapter(obj) {
|
|
|
|
+ return _super.call(this, obj) || this;
|
|
|
|
+ }
|
|
|
|
+ /** Returns the name displayed in the tree */
|
|
|
|
+ CameraAdapter.prototype.id = function () {
|
|
|
|
+ var str = '';
|
|
|
|
+ if (this._obj.name) {
|
|
|
|
+ str = this._obj.name;
|
|
|
|
+ } // otherwise nothing displayed
|
|
|
|
+ return str;
|
|
|
|
+ };
|
|
|
|
+ /** Returns the type of this object - displayed in the tree */
|
|
|
|
+ CameraAdapter.prototype.type = function () {
|
|
|
|
+ return INSPECTOR.Helpers.GET_TYPE(this._obj);
|
|
|
|
+ };
|
|
|
|
+ /** Returns the list of properties to be displayed for this adapter */
|
|
|
|
+ CameraAdapter.prototype.getProperties = function () {
|
|
|
|
+ var propertiesLines = [];
|
|
|
|
+ var camToDisplay = [];
|
|
|
|
+ // The if is there to work with the min version of babylon
|
|
|
|
+ if (this._obj instanceof BABYLON.ArcRotateCamera) {
|
|
|
|
+ camToDisplay = INSPECTOR.PROPERTIES['ArcRotateCamera'].properties;
|
|
|
|
+ }
|
|
|
|
+ else if (this._obj instanceof BABYLON.FreeCamera) {
|
|
|
|
+ camToDisplay = INSPECTOR.PROPERTIES['FreeCamera'].properties;
|
|
|
|
+ }
|
|
|
|
+ for (var _i = 0, camToDisplay_1 = camToDisplay; _i < camToDisplay_1.length; _i++) {
|
|
|
|
+ var dirty = camToDisplay_1[_i];
|
|
|
|
+ var infos = new INSPECTOR.Property(dirty, this._obj);
|
|
|
|
+ propertiesLines.push(new INSPECTOR.PropertyLine(infos));
|
|
|
|
+ }
|
|
|
|
+ return propertiesLines;
|
|
|
|
+ };
|
|
|
|
+ CameraAdapter.prototype.getTools = function () {
|
|
|
|
+ var tools = [];
|
|
|
|
+ // tools.push(new Checkbox(this));
|
|
|
|
+ tools.push(new INSPECTOR.CameraPOV(this));
|
|
|
|
+ return tools;
|
|
|
|
+ };
|
|
|
|
+ CameraAdapter.prototype.setPOV = function () {
|
|
|
|
+ this._obj.getScene().activeCamera = this._obj;
|
|
|
|
+ };
|
|
|
|
+ return CameraAdapter;
|
|
|
|
+ }(INSPECTOR.Adapter));
|
|
|
|
+ INSPECTOR.CameraAdapter = CameraAdapter;
|
|
|
|
+})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
+
|
|
|
|
+//# sourceMappingURL=CameraAdapter.js.map
|
|
|
|
+
|
|
|
|
+var __extends = (this && this.__extends) || function (d, b) {
|
|
|
|
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
+ function __() { this.constructor = d; }
|
|
|
|
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
|
|
+};
|
|
|
|
+var INSPECTOR;
|
|
|
|
+(function (INSPECTOR) {
|
|
|
|
+ var TextureAdapter = (function (_super) {
|
|
|
|
+ __extends(TextureAdapter, _super);
|
|
|
|
+ function TextureAdapter(obj) {
|
|
|
|
+ return _super.call(this, obj) || this;
|
|
|
|
+ }
|
|
|
|
+ /** Returns the name displayed in the tree */
|
|
|
|
+ TextureAdapter.prototype.id = function () {
|
|
|
|
+ var str = '';
|
|
|
|
+ if (this._obj.name) {
|
|
|
|
+ str = this._obj.name;
|
|
|
|
+ } // otherwise nothing displayed
|
|
|
|
+ return str;
|
|
|
|
+ };
|
|
|
|
+ /** Returns the type of this object - displayed in the tree */
|
|
|
|
+ TextureAdapter.prototype.type = function () {
|
|
|
|
+ return INSPECTOR.Helpers.GET_TYPE(this._obj);
|
|
|
|
+ };
|
|
|
|
+ /** Returns the list of properties to be displayed for this adapter */
|
|
|
|
+ TextureAdapter.prototype.getProperties = function () {
|
|
|
|
+ var propertiesLines = [];
|
|
|
|
+ for (var _i = 0, _a = INSPECTOR.PROPERTIES['Texture'].properties; _i < _a.length; _i++) {
|
|
|
|
+ var dirty = _a[_i];
|
|
|
|
+ var infos = new INSPECTOR.Property(dirty, this._obj);
|
|
|
|
+ propertiesLines.push(new INSPECTOR.PropertyLine(infos));
|
|
|
|
+ }
|
|
|
|
+ return propertiesLines;
|
|
|
|
+ };
|
|
|
|
+ TextureAdapter.prototype.getTools = function () {
|
|
|
|
+ var tools = [];
|
|
|
|
+ // tools.push(new CameraPOV(this));
|
|
|
|
+ return tools;
|
|
|
|
+ };
|
|
|
|
+ return TextureAdapter;
|
|
|
|
+ }(INSPECTOR.Adapter));
|
|
|
|
+ INSPECTOR.TextureAdapter = TextureAdapter;
|
|
|
|
+})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
+
|
|
|
|
+//# sourceMappingURL=TextureAdapter.js.map
|
|
|
|
+
|
|
|
|
+var __extends = (this && this.__extends) || function (d, b) {
|
|
|
|
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
+ function __() { this.constructor = d; }
|
|
|
|
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
|
|
+};
|
|
|
|
+var INSPECTOR;
|
|
|
|
+(function (INSPECTOR) {
|
|
var Canvas2DAdapter = (function (_super) {
|
|
var Canvas2DAdapter = (function (_super) {
|
|
__extends(Canvas2DAdapter, _super);
|
|
__extends(Canvas2DAdapter, _super);
|
|
function Canvas2DAdapter(obj) {
|
|
function Canvas2DAdapter(obj) {
|
|
@@ -1694,8 +1824,6 @@ var INSPECTOR;
|
|
INSPECTOR.SearchBar = SearchBar;
|
|
INSPECTOR.SearchBar = SearchBar;
|
|
})(INSPECTOR || (INSPECTOR = {}));
|
|
})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
|
|
-//# sourceMappingURL=SearchBar.js.map
|
|
|
|
-
|
|
|
|
var __extends = (this && this.__extends) || function (d, b) {
|
|
var __extends = (this && this.__extends) || function (d, b) {
|
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
function __() { this.constructor = d; }
|
|
function __() { this.constructor = d; }
|
|
@@ -1737,8 +1865,6 @@ var INSPECTOR;
|
|
INSPECTOR.TextureElement = TextureElement;
|
|
INSPECTOR.TextureElement = TextureElement;
|
|
})(INSPECTOR || (INSPECTOR = {}));
|
|
})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
|
|
-//# sourceMappingURL=TextureElement.js.map
|
|
|
|
-
|
|
|
|
var INSPECTOR;
|
|
var INSPECTOR;
|
|
(function (INSPECTOR) {
|
|
(function (INSPECTOR) {
|
|
/**
|
|
/**
|
|
@@ -2014,6 +2140,14 @@ var INSPECTOR;
|
|
/** Add this in the propertytab with the searchbar */
|
|
/** Add this in the propertytab with the searchbar */
|
|
Tab.prototype.filter = function (str) { };
|
|
Tab.prototype.filter = function (str) { };
|
|
;
|
|
;
|
|
|
|
+ /** Select an item in the tree */
|
|
|
|
+ Tab.prototype.select = function (item) {
|
|
|
|
+ // To define in subclasses if needed
|
|
|
|
+ };
|
|
|
|
+ /** Highlight the given node, and downplay all others */
|
|
|
|
+ Tab.prototype.highlightNode = function (item) {
|
|
|
|
+ // To define in subclasses if needed
|
|
|
|
+ };
|
|
/**
|
|
/**
|
|
* Returns the total width in pixel of this tab, 0 by default
|
|
* Returns the total width in pixel of this tab, 0 by default
|
|
*/
|
|
*/
|
|
@@ -2171,6 +2305,150 @@ var __extends = (this && this.__extends) || function (d, b) {
|
|
};
|
|
};
|
|
var INSPECTOR;
|
|
var INSPECTOR;
|
|
(function (INSPECTOR) {
|
|
(function (INSPECTOR) {
|
|
|
|
+ var CameraTab = (function (_super) {
|
|
|
|
+ __extends(CameraTab, _super);
|
|
|
|
+ function CameraTab(tabbar, inspector) {
|
|
|
|
+ return _super.call(this, tabbar, 'Camera', inspector) || this;
|
|
|
|
+ }
|
|
|
|
+ /* Overrides super */
|
|
|
|
+ CameraTab.prototype._getTree = function () {
|
|
|
|
+ var arr = [];
|
|
|
|
+ // get all cameras from the first scene
|
|
|
|
+ var instances = this._inspector.scene;
|
|
|
|
+ for (var _i = 0, _a = instances.cameras; _i < _a.length; _i++) {
|
|
|
|
+ var camera = _a[_i];
|
|
|
|
+ arr.push(new INSPECTOR.TreeItem(this, new INSPECTOR.CameraAdapter(camera)));
|
|
|
|
+ }
|
|
|
|
+ return arr;
|
|
|
|
+ };
|
|
|
|
+ return CameraTab;
|
|
|
|
+ }(INSPECTOR.PropertyTab));
|
|
|
|
+ INSPECTOR.CameraTab = CameraTab;
|
|
|
|
+})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
+
|
|
|
|
+var __extends = (this && this.__extends) || function (d, b) {
|
|
|
|
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
+ function __() { this.constructor = d; }
|
|
|
|
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
|
|
+};
|
|
|
|
+var INSPECTOR;
|
|
|
|
+(function (INSPECTOR) {
|
|
|
|
+ var TextureTab = (function (_super) {
|
|
|
|
+ __extends(TextureTab, _super);
|
|
|
|
+ function TextureTab(tabbar, inspector) {
|
|
|
|
+ var _this = _super.call(this, tabbar, 'Textures') || this;
|
|
|
|
+ _this._treeItems = [];
|
|
|
|
+ _this._inspector = inspector;
|
|
|
|
+ // Build the properties panel : a div that will contains the tree and the detail panel
|
|
|
|
+ _this._panel = INSPECTOR.Helpers.CreateDiv('tab-panel');
|
|
|
|
+ // Build the treepanel
|
|
|
|
+ _this._treePanel = INSPECTOR.Helpers.CreateDiv('insp-tree', _this._panel);
|
|
|
|
+ _this._imagePanel = INSPECTOR.Helpers.CreateDiv('image-panel', _this._panel);
|
|
|
|
+ Split([_this._treePanel, _this._imagePanel], {
|
|
|
|
+ blockDrag: _this._inspector.popupMode,
|
|
|
|
+ direction: 'vertical'
|
|
|
|
+ });
|
|
|
|
+ _this.update();
|
|
|
|
+ return _this;
|
|
|
|
+ }
|
|
|
|
+ TextureTab.prototype.dispose = function () {
|
|
|
|
+ // Nothing to dispose
|
|
|
|
+ };
|
|
|
|
+ TextureTab.prototype.update = function (_items) {
|
|
|
|
+ var items;
|
|
|
|
+ if (_items) {
|
|
|
|
+ items = _items;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ // Rebuild the tree
|
|
|
|
+ this._treeItems = this._getTree();
|
|
|
|
+ items = this._treeItems;
|
|
|
|
+ }
|
|
|
|
+ // Clean the tree
|
|
|
|
+ INSPECTOR.Helpers.CleanDiv(this._treePanel);
|
|
|
|
+ INSPECTOR.Helpers.CleanDiv(this._imagePanel);
|
|
|
|
+ // Sort items alphabetically
|
|
|
|
+ items.sort(function (item1, item2) {
|
|
|
|
+ return item1.compareTo(item2);
|
|
|
|
+ });
|
|
|
|
+ // Display items
|
|
|
|
+ for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
|
|
|
|
+ var item = items_1[_i];
|
|
|
|
+ this._treePanel.appendChild(item.toHtml());
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ /* Overrides super */
|
|
|
|
+ TextureTab.prototype._getTree = function () {
|
|
|
|
+ var arr = [];
|
|
|
|
+ // get all cameras from the first scene
|
|
|
|
+ var instances = this._inspector.scene;
|
|
|
|
+ for (var _i = 0, _a = instances.textures; _i < _a.length; _i++) {
|
|
|
|
+ var tex = _a[_i];
|
|
|
|
+ arr.push(new INSPECTOR.TreeItem(this, new INSPECTOR.TextureAdapter(tex)));
|
|
|
|
+ }
|
|
|
|
+ return arr;
|
|
|
|
+ };
|
|
|
|
+ /** Display the details of the given item */
|
|
|
|
+ TextureTab.prototype.displayDetails = function (item) {
|
|
|
|
+ // Remove active state on all items
|
|
|
|
+ this.activateNode(item);
|
|
|
|
+ INSPECTOR.Helpers.CleanDiv(this._imagePanel);
|
|
|
|
+ // Get the texture object
|
|
|
|
+ var texture = item.adapter.object;
|
|
|
|
+ var img = INSPECTOR.Helpers.CreateElement('img', '', this._imagePanel);
|
|
|
|
+ // If an url is present, the texture is an image
|
|
|
|
+ if (texture.url) {
|
|
|
|
+ img.src = texture.url;
|
|
|
|
+ }
|
|
|
|
+ else if (texture['_canvas']) {
|
|
|
|
+ // Dynamic texture
|
|
|
|
+ var base64Image = texture['_canvas'].toDataURL("image/png");
|
|
|
|
+ img.src = base64Image;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ /** Select an item in the tree */
|
|
|
|
+ TextureTab.prototype.select = function (item) {
|
|
|
|
+ // Remove the node highlight
|
|
|
|
+ this.highlightNode();
|
|
|
|
+ // Active the node
|
|
|
|
+ this.activateNode(item);
|
|
|
|
+ // Display its details
|
|
|
|
+ this.displayDetails(item);
|
|
|
|
+ };
|
|
|
|
+ /** Set the given item as active in the tree */
|
|
|
|
+ TextureTab.prototype.activateNode = function (item) {
|
|
|
|
+ if (this._treeItems) {
|
|
|
|
+ for (var _i = 0, _a = this._treeItems; _i < _a.length; _i++) {
|
|
|
|
+ var node = _a[_i];
|
|
|
|
+ node.active(false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ item.active(true);
|
|
|
|
+ };
|
|
|
|
+ /** Highlight the given node, and downplay all others */
|
|
|
|
+ TextureTab.prototype.highlightNode = function (item) {
|
|
|
|
+ if (this._treeItems) {
|
|
|
|
+ for (var _i = 0, _a = this._treeItems; _i < _a.length; _i++) {
|
|
|
|
+ var node = _a[_i];
|
|
|
|
+ node.highlight(false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (item) {
|
|
|
|
+ item.highlight(true);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ return TextureTab;
|
|
|
|
+ }(INSPECTOR.Tab));
|
|
|
|
+ INSPECTOR.TextureTab = TextureTab;
|
|
|
|
+})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
+
|
|
|
|
+var __extends = (this && this.__extends) || function (d, b) {
|
|
|
|
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
+ function __() { this.constructor = d; }
|
|
|
|
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
|
|
+};
|
|
|
|
+var INSPECTOR;
|
|
|
|
+(function (INSPECTOR) {
|
|
var Canvas2DTab = (function (_super) {
|
|
var Canvas2DTab = (function (_super) {
|
|
__extends(Canvas2DTab, _super);
|
|
__extends(Canvas2DTab, _super);
|
|
function Canvas2DTab(tabbar, inspector) {
|
|
function Canvas2DTab(tabbar, inspector) {
|
|
@@ -2633,34 +2911,6 @@ var INSPECTOR;
|
|
inside = this._beautify(inside, level + 1);
|
|
inside = this._beautify(inside, level + 1);
|
|
return this._beautify(left, level) + '{\n' + inside + '\n' + spaces + '}\n' + this._beautify(right, level);
|
|
return this._beautify(left, level) + '{\n' + inside + '\n' + spaces + '}\n' + this._beautify(right, level);
|
|
}
|
|
}
|
|
- // // Replace bracket with @1 and @2 with correct indentation
|
|
|
|
- // let newInside = "@1\n\t" + inside + "\n@2";
|
|
|
|
- // newInside = newInside.replace(/;\n/g, ";\n\t");
|
|
|
|
- // glsl = glsl.replace(insideWithBrackets, newInside);
|
|
|
|
- // firstBracket = glsl.indexOf('{');
|
|
|
|
- // lastBracket = glsl.lastIndexOf('}');
|
|
|
|
- // }
|
|
|
|
- // console.log(glsl);
|
|
|
|
- // let regex = /(\{(?:\{??[^\{]*?}))+/gmi;
|
|
|
|
- // let tmp = glsl;
|
|
|
|
- // let m;
|
|
|
|
- // while ((m = regex.exec(tmp)) !== null) {
|
|
|
|
- // // This is necessary to avoid infinite loops with zero-width matches
|
|
|
|
- // if (m.index === regex.lastIndex) {
|
|
|
|
- // regex.lastIndex++;
|
|
|
|
- // }
|
|
|
|
- // // The result can be accessed through the `m`-variable.
|
|
|
|
- // m.forEach((match, groupIndex) => {
|
|
|
|
- // // Remove the first and the last bracket only
|
|
|
|
- // let matchWithoutBrackets = match.replace(/{/, "").replace(/}/, "");
|
|
|
|
- // // Indent the content inside brackets with tabs
|
|
|
|
- // glsl = glsl.replace(match, `{\n\t${matchWithoutBrackets}\n}\n`);
|
|
|
|
- // // removes the match from tmp
|
|
|
|
- // tmp = tmp.replace(match, "");
|
|
|
|
- // // and continue
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // return
|
|
|
|
};
|
|
};
|
|
return ShaderTab;
|
|
return ShaderTab;
|
|
}(INSPECTOR.Tab));
|
|
}(INSPECTOR.Tab));
|
|
@@ -3094,6 +3344,7 @@ var INSPECTOR;
|
|
/** The list of tabs visible, displayed in the tab bar */
|
|
/** The list of tabs visible, displayed in the tab bar */
|
|
_this._visibleTabs = [];
|
|
_this._visibleTabs = [];
|
|
_this._inspector = inspector;
|
|
_this._inspector = inspector;
|
|
|
|
+ _this._tabs.push(new INSPECTOR.TextureTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.SceneTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.SceneTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.ConsoleTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.ConsoleTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.StatsTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.StatsTab(_this, _this._inspector));
|
|
@@ -3106,6 +3357,7 @@ var INSPECTOR;
|
|
_this._tabs.push(new INSPECTOR.Canvas2DTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.Canvas2DTab(_this, _this._inspector));
|
|
}
|
|
}
|
|
_this._tabs.push(new INSPECTOR.MaterialTab(_this, _this._inspector));
|
|
_this._tabs.push(new INSPECTOR.MaterialTab(_this, _this._inspector));
|
|
|
|
+ _this._tabs.push(new INSPECTOR.CameraTab(_this, _this._inspector));
|
|
_this._toolBar = new INSPECTOR.Toolbar(_this._inspector);
|
|
_this._toolBar = new INSPECTOR.Toolbar(_this._inspector);
|
|
_this._build();
|
|
_this._build();
|
|
// Active the first tab
|
|
// Active the first tab
|
|
@@ -3689,6 +3941,16 @@ var INSPECTOR;
|
|
this.children.push(child);
|
|
this.children.push(child);
|
|
this.update();
|
|
this.update();
|
|
};
|
|
};
|
|
|
|
+ Object.defineProperty(TreeItem.prototype, "adapter", {
|
|
|
|
+ /**
|
|
|
|
+ * Returns the original adapter
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._adapter;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
/**
|
|
/**
|
|
* Function used to compare this item to another tree item.
|
|
* Function used to compare this item to another tree item.
|
|
* Returns the alphabetical sort of the adapter ID
|
|
* Returns the alphabetical sort of the adapter ID
|
|
@@ -3911,6 +4173,45 @@ var __extends = (this && this.__extends) || function (d, b) {
|
|
var INSPECTOR;
|
|
var INSPECTOR;
|
|
(function (INSPECTOR) {
|
|
(function (INSPECTOR) {
|
|
/**
|
|
/**
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ var CameraPOV = (function (_super) {
|
|
|
|
+ __extends(CameraPOV, _super);
|
|
|
|
+ function CameraPOV(camera) {
|
|
|
|
+ var _this = _super.call(this) || this;
|
|
|
|
+ _this.cameraPOV = camera;
|
|
|
|
+ _this._elem.classList.add('fa-video-camera');
|
|
|
|
+ return _this;
|
|
|
|
+ }
|
|
|
|
+ CameraPOV.prototype.action = function () {
|
|
|
|
+ _super.prototype.action.call(this);
|
|
|
|
+ this._gotoPOV();
|
|
|
|
+ };
|
|
|
|
+ CameraPOV.prototype._gotoPOV = function () {
|
|
|
|
+ var actives = INSPECTOR.Inspector.DOCUMENT.querySelectorAll(".fa-video-camera.active");
|
|
|
|
+ console.log(actives);
|
|
|
|
+ for (var i = 0; i < actives.length; i++) {
|
|
|
|
+ actives[i].classList.remove('active');
|
|
|
|
+ }
|
|
|
|
+ //if (this._on) {
|
|
|
|
+ // set icon camera
|
|
|
|
+ this._elem.classList.add('active');
|
|
|
|
+ //}
|
|
|
|
+ this.cameraPOV.setPOV();
|
|
|
|
+ };
|
|
|
|
+ return CameraPOV;
|
|
|
|
+ }(INSPECTOR.AbstractTreeTool));
|
|
|
|
+ INSPECTOR.CameraPOV = CameraPOV;
|
|
|
|
+})(INSPECTOR || (INSPECTOR = {}));
|
|
|
|
+
|
|
|
|
+var __extends = (this && this.__extends) || function (d, b) {
|
|
|
|
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
+ function __() { this.constructor = d; }
|
|
|
|
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
|
|
+};
|
|
|
|
+var INSPECTOR;
|
|
|
|
+(function (INSPECTOR) {
|
|
|
|
+ /**
|
|
* Checkbox to display/hide the primitive
|
|
* Checkbox to display/hide the primitive
|
|
*/
|
|
*/
|
|
var Checkbox = (function (_super) {
|
|
var Checkbox = (function (_super) {
|