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

Add a scene.vwf enableRenderer property. #515

Merged
merged 1 commit into from
Aug 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions support/client/lib/vwf/view/threejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ define( [ "module",
var boundingBox = undefined;
var userObjectRequested = false;
var usersShareView = true;
var enableRenderer = true;
var degreesToRadians = Math.PI / 180;
var movingForward = false;
var movingBack = false;
Expand Down Expand Up @@ -297,6 +298,8 @@ define( [ "module",
setActiveCamera.call( this, this.state.scenes[ sceneRootID ].camera.ID );
} else if ( propertyName == "usersShareView" ) {
usersShareView = propertyValue;
} else if ( propertyName == "enableRenderer" ) {
enableRenderer = propertyValue;
}
}

Expand Down Expand Up @@ -1122,6 +1125,11 @@ define( [ "module",
return;
}

// Return if rendering is suppressed in the application scene.
if ( ! enableRenderer ) {
return;
}

// Verify that there is a camera to render from before going any farther
var camera = self.state.cameraInUse;
if ( !camera ) {
Expand Down
7 changes: 7 additions & 0 deletions support/proxy/vwf.example.com/scene.vwf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ properties:
}
value: "PCFSoft"

## Set `enableRenderer` to `false` to disable rendering for this scene. Defaults to `true`.
##
## @name scene.vwf#enableRenderer
## @property

enableRenderer: true

methods:
initializeActiveCamera:
getActiveCameraComp:
Expand Down