diff --git a/src/game-lib-camera.js b/src/game-lib-camera.js index 40f2edc..a23aeb9 100644 --- a/src/game-lib-camera.js +++ b/src/game-lib-camera.js @@ -17,7 +17,17 @@ GameLib.D3.Camera = function Camera( this.graphics = graphics; this.graphics.isNotThreeThrow(); - + + this.position = new GameLib.D3.Vector3.Runtime( + graphics, + this, + this.position + ); + + this.offsetPosition = new GameLib.D3.Vector3.Runtime(graphics, this, new GameLib.D3.Vector3(0,5,5)); + + delete this.offsetPosition.updateInstance; + this.instance = this.createInstance(); this.needsUpdate = false; diff --git a/src/game-lib-mesh.js b/src/game-lib-mesh.js index 0efb5d3..dd46b29 100644 --- a/src/game-lib-mesh.js +++ b/src/game-lib-mesh.js @@ -25,6 +25,20 @@ GameLib.D3.Mesh = function Mesh( this.instance = this.createInstance(false); this.needsUpdate = false; + + this.offsetRotation = new GameLib.D3.Vector3.Runtime(graphics, this, new GameLib.D3.Vector3(0,0,0)); + + delete this.offsetRotation.updateInstance; + + // this.lookAtPoint = new GameLib.D3.Vector3.Runtime(graphics, this, new GameLib.D3.Vector3(0,0,0)); + // + // delete this.offsetRotation.updateInstance; + // + // this.offsetRotation = new GameLib.D3.Vector3.Runtime(graphics, this, new GameLib.D3.Vector3(0,0,0)); + // + // delete this.offsetRotation.updateInstance; + + }; /** diff --git a/src/game-lib-vector-3.js b/src/game-lib-vector-3.js index 5c1fb0c..40399d5 100644 --- a/src/game-lib-vector-3.js +++ b/src/game-lib-vector-3.js @@ -27,6 +27,8 @@ GameLib.D3.Vector3.Runtime = function RuntimeVector3(graphics, parentObject, api this.parentObject = parentObject; + this.grain = 0.001; + this.instance = this.createInstance(); };