forked from Irrelon/ige
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
77 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var ExampleEntity = IgeEntity.extend({ | ||
classId: 'ExampleEntity', | ||
|
||
init: function () { | ||
IgeEntity.prototype.init.call(this); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var ExampleGraph = IgeSceneGraph.extend({ | ||
classId: 'ExampleGraph', | ||
|
||
addGraph: function () { | ||
|
||
}, | ||
|
||
removeGraph: function () { | ||
|
||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* When loaded into memory using ige.addGraph('IgeBaseScene') will create | ||
* the scene "baseScene" and the viewport "vp1" that are used in almost all | ||
* examples and can be used as the base for your scenegraph as well. | ||
*/ | ||
var IgeBaseScene = IgeSceneGraph.extend({ | ||
classId: 'IgeBaseScene', | ||
|
||
init: function () {}, | ||
|
||
/** | ||
* Called when loading the graph data via ige.addGraph(). | ||
* @param options | ||
*/ | ||
addGraph: function (options) { | ||
// Clear existing graph data | ||
if (ige.$('baseScene')) { | ||
this.destroyGraph(); | ||
} | ||
|
||
// Create the scene | ||
var baseScene = new IgeScene2d() | ||
.id('baseScene'); | ||
|
||
// Create the main viewport to look at "baseScene" | ||
new IgeViewport() | ||
.id('vp1') | ||
.autoSize(true) | ||
.scene(baseScene) | ||
.drawBounds(false) | ||
.mount(ige); | ||
}, | ||
|
||
/** | ||
* The method called when the graph items are to be removed from the | ||
* active graph. | ||
*/ | ||
removeGraph: function () { | ||
// Destroy the viewport | ||
ige.$('vp1').destroy(); | ||
|
||
// Destroy the baseScene | ||
ige.$('baseScene').destroy(); | ||
} | ||
}); | ||
|
||
if (typeof(module) !== 'undefined' && typeof(module.exports) !== 'undefined') { module.exports = IgeBaseScene; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters