Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch/mars game development #476

Open
wants to merge 164 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
cd1f769
Create event manager driver and component behavior
Dec 5, 2014
84449f3
Addressed PR comments
Dec 7, 2014
c08be94
Added findInScene and findTypeInScene
kadst43 Dec 5, 2014
3785977
Added asserts.
kadst43 Dec 12, 2014
38336af
Improved documentation, made warnings and errors optional.
kadst43 Dec 17, 2014
2607a09
Now, if there's an error parsing the YAML file, we print some details on
Jan 27, 2015
1a9602a
Modify raycast results to remove circular references
Jan 20, 2015
c5912fd
Return sound instance id rather than instance object
Jan 21, 2015
e7116c9
Remove blockly xml log statement
Jan 21, 2015
3abae6d
Remove console.log in blockly driver
Jan 21, 2015
b081bf6
Comment out line generating errors with repeat blocks
Jan 22, 2015
c9f0607
Remove centroid from raycast
Jan 26, 2015
e7a3695
More verbose/correct sceneGetter warning
AmbientOSX Jan 29, 2015
d969ed2
Update light target matrix when target property is set.
Jan 29, 2015
84a74b8
Change graph visibility to a property
Feb 4, 2015
7e77816
Fixed the sceneGetter so that it doesn't set this.scene incorrectly w…
kadst43 Feb 12, 2015
862d9af
Really fix the sceneGetter this time.
kadst43 Feb 12, 2015
28d8925
Start writing HUD driver and components
Feb 12, 2015
f942ef6
Finish HUD creation
Feb 17, 2015
6153341
Delete HUD.js for renaming
Feb 17, 2015
44ec0a6
Re-add hud.js for renaming
Feb 17, 2015
56cef00
Fix HUD export
Feb 17, 2015
1a816da
Handle events
Feb 17, 2015
82933d8
Properly handle empty image placeholders and extra properties
Feb 17, 2015
816eb46
Code cleanup
Feb 18, 2015
c47478e
Initialize empty image objects
Feb 18, 2015
6325240
Added support for pre/post draw functions
Feb 18, 2015
24c1842
Fixed bugs with images
Feb 19, 2015
3848f5e
Moved hud.js to view folder and removed global reference
Feb 19, 2015
9a21ae0
Allow an element to have no images
Feb 20, 2015
d1e3782
Fix setting properties on elements
Feb 20, 2015
8762eb2
Set draw functions after initialize to allow them to be defined in ex…
Feb 20, 2015
8efddd9
Got the jPlayer driver to load...
Feb 16, 2015
c2d1e24
Got the new videoManager dropped in. Doesn't break TDG.
Feb 16, 2015
577d6e7
Got the changes to the jPlayer model driver merged in. It loads and
Feb 16, 2015
72dd773
Removed unnecessary method which sets z-index.
Feb 17, 2015
47fb8fb
Debugged calling "play" along with passing in the URL.
Feb 17, 2015
a46f39a
Got more stuff using "vwf." rather than this.kernel.
Feb 19, 2015
79c42a1
Now it appears that we can inject divs dynamically?
Feb 19, 2015
ad8fdbd
Div injection now works (I think?)
Feb 20, 2015
d8af39b
Changed default names of jPlayer div container and player container BACK
Feb 20, 2015
26751b4
Corrected tabs vs spaces in the view driver.
Feb 20, 2015
a055a03
Fixed HUD prototype test
Feb 24, 2015
f7dc38d
Fix prototype ids for jPlayer
Feb 25, 2015
d9b22f3
Delete HUD components for renaming
Feb 25, 2015
09eff14
Add hud components with renamed directory
Feb 25, 2015
e2335a6
Add information to element events
Feb 27, 2015
1a46caa
Div injection now works (I think?)
Feb 20, 2015
96efc54
Instead of creating a new mediaObject for every case of file format, …
spencerfrazier Feb 26, 2015
654f7eb
Beginnings of consuming an array of video input URLs is there...
Feb 27, 2015
5768c41
Adding multi-format support appears to work!
Feb 27, 2015
d3437e2
Now, mars-game appears to pass both test cases: playing on a browser …
spencerfrazier Feb 27, 2015
df3db10
Adding some comments to explain what I commented out.
spencerfrazier Mar 2, 2015
72c415c
Removed two unnecessary lines of code.
Mar 2, 2015
3c96ab0
Cleaned up the video URL. Now we are ready to test if it's a string or a
Mar 2, 2015
177569d
Added check to see if we're parsing a string or an array.
Mar 3, 2015
9b3697b
Cleand up the code a little bit - in setURL, we now determine if we're
Mar 3, 2015
22f6a62
Fixed spacing and removed some debug code.
Mar 4, 2015
7bdbd14
Merge pull request #477 from virtual-world-framework/branch/jplayer-m…
Mar 4, 2015
f58860c
we can now stop execution on a particular Blockly node,as opposed to
Mar 11, 2015
bc7c369
Now, per Brett's suggestion, we changed stopExecutingForNode in
Mar 13, 2015
63de81b
Merge pull request #480 from virtual-world-framework/branch/blockly_s…
Mar 13, 2015
f36355f
Allow images to be inserted at run time
Mar 9, 2015
a563a6c
Remove UI visibility code from blockly_activeNodeID handler
Mar 12, 2015
56b69a5
Add blockly_interfaceVisible property
Mar 12, 2015
f70cf77
Only fire blocklyVisibleChanged if active node is defined
Mar 12, 2015
5a8ba67
Fire blocklyVisibleChanged when active node changes
Mar 12, 2015
813e429
Merge pull request #481 from virtual-world-framework/branch/mg-hud-su…
BrettASwift Mar 13, 2015
bccb8bc
Treat properties with names ending in `$` as private record values only.
davideaster Mar 2, 2015
81e8f32
Optimized kernel.application calls in view/threejs
AmbientOSX Mar 18, 2015
b67a365
Merge pull request #483 from virtual-world-framework/branch/optimized…
kadst43 Mar 19, 2015
7b7159f
Re-apply transparency fix to collada loader
Mar 23, 2015
9b9040a
Enable specular map from specularLevel node
Mar 23, 2015
6f40570
Merge pull request #484 from virtual-world-framework/branch/collada-t…
kadst43 Mar 23, 2015
147b793
Brings back the trashcan and removes an offset that isn't needed (whi…
AmbientOSX Apr 7, 2015
d70e9de
Clean up changes
AmbientOSX Apr 7, 2015
be8d366
Merge pull request #486 from virtual-world-framework/branch/blockly-c…
spencerfrazier Apr 8, 2015
9fda43c
Adds support to change the execution time of Blockly depending on the…
AmbientOSX Apr 9, 2015
dcfa9c2
Remove log messages
AmbientOSX Apr 10, 2015
242deb7
Now we are checking if the URL exists.
Apr 20, 2015
f183bd9
Separated setting the URL from playing the video. This should allow us
Apr 20, 2015
18ca8f4
"load" now works in the jPlayer model.
Apr 21, 2015
4463792
Got the load functionality into the jPlayer driver...
Apr 21, 2015
61daccf
Merge pull request #489 from virtual-world-framework/branch/jplayer-p…
Apr 21, 2015
4288c1a
Merge pull request #488 from virtual-world-framework/branch/Blockly-C…
spencerfrazier Apr 21, 2015
53be4d1
Now we can pre-load the correct cutscenes in the scenario1* series of…
Apr 22, 2015
f321e9e
Now the jPlayer driver doesn't set the URL (which may cause a load to
Apr 22, 2015
f9f7b39
Update jPlayer.js
Apr 23, 2015
ad33667
Update jPlayer.js
Apr 23, 2015
8d23971
Merge pull request #492 from virtual-world-framework/branch/video_loa…
Apr 23, 2015
36214c5
Add lights property to shader material
Apr 16, 2015
a015f89
Allow properties to be stored on material for use in updateFunction
Apr 21, 2015
5692c50
Store custom properties on material object
Apr 22, 2015
8db9cbf
Fix uniform generation with shader material components
Apr 24, 2015
6032785
Texture arrays and texture wrapping to shader materials
Apr 27, 2015
404b06b
Merge pull request #493 from virtual-world-framework/branch/shader-ma…
BrettASwift Apr 27, 2015
847fbcc
Refinements in progress...
AmbientOSX Apr 28, 2015
1c084a5
Speed up working.
AmbientOSX Apr 28, 2015
e619348
Remove a log message
AmbientOSX Apr 30, 2015
01a6f61
Fix error message
AmbientOSX May 5, 2015
9f50fb5
Merge pull request #494 from virtual-world-framework/branch/blockly-r…
spencerfrazier May 5, 2015
e62fc4f
Use `kernel.prototypes` instead of `getPrototypes` in each driver.
davideaster May 9, 2015
1feaa0e
Remove attempts to follow the driver chain using `kernel.kernel`.
davideaster May 9, 2015
58b79c1
No stage/log.
davideaster May 11, 2015
b248459
Optimize `kernel.application`.
davideaster May 11, 2015
61de7c1
Setting up to be merged into mars-game-dev
AmbientOSX May 12, 2015
e234163
Merge pull request #495 from virtual-world-framework/branch/optimizat…
spencerfrazier May 12, 2015
8f75776
Added ability to set defines in shaders
May 15, 2015
0516816
Merge pull request #496 from virtual-world-framework/branch/shader-ma…
BrettASwift May 16, 2015
d41d2f3
Update shader material when defines are modified
May 17, 2015
16533b3
Merge pull request #497 from virtual-world-framework/branch/shader-ma…
BrettASwift May 17, 2015
61e2214
Prevents invalid xml from being loaded
AmbientOSX May 18, 2015
3510aac
Fix handling of Blockly clear
AmbientOSX May 18, 2015
0cc0bdb
Merge pull request #498 from virtual-world-framework/branch/blockly-c…
spencerfrazier May 18, 2015
09305d1
Adds a grid and updates blockly version for new goodness.
AmbientOSX May 19, 2015
1aea167
Merge pull request #499 from virtual-world-framework/branch/blockly-u…
spencerfrazier May 19, 2015
fbb1922
Check if blocklyNode and previousBlocklyNode are defined before setti…
May 21, 2015
6d61407
Merge pull request #500 from virtual-world-framework/branch/fix-toolb…
kadst43 May 21, 2015
6ecb32a
Add ability to use a 2d canvas as a texture in shader materials
Jun 5, 2015
f038814
Merge pull request #502 from virtual-world-framework/branch/canvas-ma…
BrettASwift Jun 5, 2015
872502c
Fix for extending heightmap
Jun 10, 2015
03695e9
Merge pull request #503 from virtual-world-framework/branch/mg-grid-r…
BrettASwift Jun 17, 2015
050c68a
Modify analytic particle solver and convert tabs to spaces
Jul 3, 2015
ec21545
More fixes to analytic solver
Jul 5, 2015
1cf86d5
Merge pull request #504 from virtual-world-framework/branch/particle-…
BrettASwift Jul 6, 2015
c33e55b
Start of refactor for new version of blockly.
AmbientOSX Jul 8, 2015
37e4c7d
Refactor in progress... addressing some deprecated Blockly function c…
AmbientOSX Jul 8, 2015
426aa6f
Fix width issue with retrieving old blocks
AmbientOSX Jul 9, 2015
2f8ec1f
Undo changes to make rollback of Blockly work.
AmbientOSX Jul 10, 2015
e83dec4
Merge pull request #505 from virtual-world-framework/branch/blockly-r…
spencerfrazier Jul 13, 2015
5d18418
Core changes made (trashcan, toolbox autoclose, tooltip speed, select…
AmbientOSX Jul 22, 2015
3cb67fe
Merge pull request #506 from virtual-world-framework/branch/blockly-c…
spencerfrazier Jul 22, 2015
a09aa7d
Add fog define toggle for shader materials
Jul 31, 2015
70feaf6
Core changes that support some flyout/aesthetic/UI changes
AmbientOSX Jul 29, 2015
1bbd8d0
Fix alignment, fix coloring, update closing dropdown window, add vari…
AmbientOSX Jul 31, 2015
c35531d
Really update variable
AmbientOSX Jul 31, 2015
e7f2494
Merge pull request #507 from virtual-world-framework/branch/fog-property
BrettASwift Aug 1, 2015
819da5b
Allow entire HUD to be disabled
Aug 3, 2015
d590b05
Disable events when hud is disabled
Aug 3, 2015
56382bf
Merge pull request #508 from virtual-world-framework/branch/blockly-c…
AmbientOSX Aug 3, 2015
210b413
Merge pull request #509 from virtual-world-framework/branch/disable-hud
AmbientOSX Aug 3, 2015
17a0f8c
Changes radial select to use 90 degree angles only, removes comment a…
AmbientOSX Aug 3, 2015
0904b1b
Reduces time between lines for Blockly.
AmbientOSX Aug 4, 2015
08f8a04
Allow manual setting of hud element draw order
Aug 4, 2015
a79d7bd
Merge pull request #511 from virtual-world-framework/branch/blockly-e…
AmbientOSX Aug 5, 2015
468a539
Merge pull request #512 from virtual-world-framework/branch/hud-draw-…
BrettASwift Aug 5, 2015
01653f8
Merge pull request #510 from virtual-world-framework/branch/blockly-c…
AmbientOSX Aug 5, 2015
4a4bec4
Makes disabled blocks more visibly disabled - removes some dropdown c…
AmbientOSX Aug 12, 2015
bdf16fe
Merge pull request #514 from virtual-world-framework/branch/blockly-c…
AmbientOSX Aug 17, 2015
9522976
Add a `scene.vwf` `enableRenderer` property.
davideaster Aug 18, 2015
4ea2e3a
Merge pull request #515 from virtual-world-framework/branch/no-render
BrettASwift Aug 19, 2015
2fe2f09
Fixes satProperty for blockly_xml
AmbientOSX Aug 24, 2015
e625c42
Revert change/clean up code
AmbientOSX Aug 24, 2015
9af8ade
Another reversion
AmbientOSX Aug 24, 2015
7567902
Add support for reset.
AmbientOSX Aug 24, 2015
0b69713
Merge pull request #516 from virtual-world-framework/branch/blockly-r…
AmbientOSX Aug 26, 2015
1ed659c
Address disabled block coloring issue, address behind toolbox issue, …
AmbientOSX Sep 2, 2015
02353c3
Merge pull request #517 from virtual-world-framework/branch/blockly-c…
AmbientOSX Sep 9, 2015
b65ac8c
Reset internal array when uniform length changes
Oct 14, 2015
d119a26
Merge pull request #519 from virtual-world-framework/branch/uniform-a…
BrettASwift Oct 14, 2015
795ea1d
Fix bug where disabling hud prevented mouse events on canvas
Nov 4, 2015
d0fda58
Merge pull request #520 from virtual-world-framework/branch/mg-hud-fix
BrettASwift Nov 5, 2015
b1eeafa
Only call notifyDriverOfPrototypeAndBehaviorProps if node and threeOb…
Jan 20, 2016
270d238
Merge pull request #530 from virtual-world-framework/branch/notify-dr…
BrettASwift Jan 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/nodejs/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function ServeYAML( filename, response, URL ) {
try {
var deYAML = JSON.stringify( YAML.load( file ) );
} catch ( e ) {
global.log( "error parsing YAML " + filename );
global.log( "error parsing YAML " + filename);
global.log("" + e);
_404( response );
return;
}
Expand Down
231 changes: 141 additions & 90 deletions support/client/lib/vwf.js

Large diffs are not rendered by default.

67 changes: 44 additions & 23 deletions support/client/lib/vwf/model/blockly.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ define( [ "module", "vwf/model", "vwf/utility",
"defaultXml": undefined,
"code": undefined,
"lastLineExeTime": undefined,
"timeBetweenLines": 1,
"timeBetweenLines": 0.5,
"baseExecutionSpeed": 1,
"interpreter": undefined,
"interpreterStatus": ""
};
Expand Down Expand Up @@ -226,9 +227,30 @@ define( [ "module", "vwf/model", "vwf/utility",
case "blockly_code":
value = node.code = propertyValue;
break;


case "new_xml":
node.blocks = propertyValue;
value = propertyValue;
break;

case "blockly_xml":
value = node.blocks = propertyValue;
node.blocks = propertyValue;
value = propertyValue;
break;

case "blockly_timeBetweenLines":
this.state.blockly.node.timeBetweenLines = propertyValue;
break;

case "blockly_baseExecutionSpeed":

if ( propertyValue > 0 && propertyValue <= 10 ) {
this.state.blockly.node.baseExecutionSpeed = propertyValue;
} else {
this.logger.errorx("baseExecutionSpeed", "Blockly node with", nodeID,
"must be in the range (0,10).");
}

break;

case "blockly_executing":
Expand Down Expand Up @@ -307,7 +329,7 @@ define( [ "module", "vwf/model", "vwf/utility",

// -- callingMethod --------------------------------------------------------------------------

callingMethod: function( nodeID, methodName /* [, parameter1, parameter2, ... ] */ ) { // TODO: parameters
callingMethod: function( nodeID, methodName, methodParameters ) {
var node = this.state.nodes[ nodeID ];

if ( this.debug.methods ) {
Expand All @@ -317,7 +339,7 @@ define( [ "module", "vwf/model", "vwf/utility",
if ( nodeID == this.kernel.application() ) {

switch ( methodName ) {

case "stopAllExecution":
for ( var id in this.state.executingBlocks ) {
this.state.executingBlocks[ id ].interpreterStatus = "completed";
Expand All @@ -332,8 +354,6 @@ define( [ "module", "vwf/model", "vwf/utility",
this.kernel.fireEvent( id, "blocklyStarted", [ true ] );
}
break;


}
} else if ( node !== undefined ) {
switch ( methodName ) {
Expand All @@ -344,6 +364,17 @@ define( [ "module", "vwf/model", "vwf/utility",
this.kernel.setProperty( nodeID, "blockly_xml", '<xml></xml>' );
}
break;
case "stopExecution":
var currBlockly3Node = this.state.executingBlocks[ nodeID ];
if ( currBlockly3Node ) {
currBlockly3Node.interpreterStatus = "completed";
this.kernel.setProperty( nodeID, 'blockly_executing', false );
this.kernel.fireEvent( nodeID, "blocklyStopped", [ true ] );
} else {
this.logger.errorx("stopExecutionForNode", "Node with", nodeID,
"is not currently executing Blockly!");
}
break;
}
}
},
Expand All @@ -367,8 +398,9 @@ define( [ "module", "vwf/model", "vwf/utility",
for ( var nodeID in this.state.executingBlocks ) {

blocklyNode = this.state.executingBlocks[ nodeID ];
var executeNextLine = false;

var executeNextLine = false;

if ( blocklyNode.interpreter === undefined ||
blocklyNode.interpreterStatus === "completed" ) {
blocklyNode.interpreter = createInterpreter( acorn, blocklyNode.code );
Expand All @@ -377,7 +409,7 @@ define( [ "module", "vwf/model", "vwf/utility",
executeNextLine = true;
} else {
var elaspedTime = vwfTime - blocklyNode.lastLineExeTime;
if ( elaspedTime >= blocklyNode.timeBetweenLines ) {
if ( elaspedTime >= ( blocklyNode.timeBetweenLines * blocklyNode.baseExecutionSpeed ) ) {
executeNextLine = true;
blocklyNode.lastLineExeTime = vwfTime;
}
Expand All @@ -386,10 +418,11 @@ define( [ "module", "vwf/model", "vwf/utility",
if ( executeNextLine ) {

self.state.executionHalted = false;

nextStep( blocklyNode );

this.kernel.fireEvent( nodeID, "blocklyExecuted", [ blocklyNode.interpreter.value ] );
// Does this serve any real purpose? It's not handled in any application.
// Certain blocks, such as repeat blocks, break with the recursive node reference changes.
// this.kernel.fireEvent( nodeID, "blocklyExecuted", [ blocklyNode.interpreter.value ] );
}
}
}
Expand All @@ -398,18 +431,6 @@ define( [ "module", "vwf/model", "vwf/utility",

} );

function getPrototypes( extendsID ) {
var prototypes = [];
var id = extendsID;

while ( id !== undefined ) {
prototypes.push( id );
id = self.kernel.prototype( id );
}

return prototypes;
}

function isBlockly3Node( nodeID ) {
return self.kernel.test( nodeID,
"self::element(*,'http://vwf.example.com/blockly/controller.vwf')",
Expand Down
Loading