Commit 98582931 authored by athanasios's avatar athanasios
Browse files

bug fix

parent f768a7c1
......@@ -6,12 +6,11 @@ define([
return declare(null, {
constructor: function () {
let viewer = CesiumViewer.getViewer();
this._scene = viewer.scene;
this._viewer = CesiumViewer.getViewer();
},
cullingVolume2Url: function () {
let planes = this._scene.frameState.cullingVolume.planes;
let planes = this._viewer.camera.frustum._offCenterFrustum._cullingVolume.planes;
let result = [];
for (i = 0, len = planes.length; i < len; i++) {
result.push(planes[i].x)
......@@ -23,7 +22,7 @@ define([
},
camera2Url: function () {
let camera = this._scene.frameState.camera;
let camera = this._viewer.camera;
let position = camera.position;
let direction = camera.direction;
let result = [];
......@@ -37,9 +36,9 @@ define([
},
frustum2Url: function () {
let near = this._scene.frameState.camera.frustum._offCenterFrustum.near;
let top = this._scene.frameState.camera.frustum._offCenterFrustum.top;
let right = this._scene.frameState.camera.frustum._offCenterFrustum.right;
let near = this._viewer.camera.frustum._offCenterFrustum.near;
let top = this._viewer.camera.frustum._offCenterFrustum.top;
let right = this._viewer.camera.frustum._offCenterFrustum.right;
let result = [];
result.push(near);
result.push(top);
......@@ -48,8 +47,8 @@ define([
},
drawingBuffer2Url: function () {
let width = this._scene.frameState.context.drawingBufferWidth;
let height = this._scene.frameState.context.drawingBufferHeight;
let width = this._viewer.scene.frameState.context.drawingBufferWidth;
let height = this._viewer.scene.frameState.context.drawingBufferHeight;
let result = [];
result.push(width);
result.push(height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment