Closed JohnLouderback closed 8 years ago
Where's the Camera object from? Some library like Threejs?
It's custom code I've written, the source of which is written in TypeScript.
Here's the TypeScript code:
class Camera {
public static x: number = 0;
public static y: number = 0;
private static _zoom: number = 1;
public static get zoom(): number {
return Camera._zoom;
}
public static set zoom(value) {
Camera._zoom = value;
StatusBar.editorZoomStatus.text = StatusBar.editorZoomText;
console.log('zoom now = ' + value);
}
}
which in turn is compiled to:
var Camera = (function () {
function Camera() {
}
Object.defineProperty(Camera, "zoom", {
get: function () {
return Camera._zoom;
},
set: function (value) {
Camera._zoom = value;
StatusBar.editorZoomStatus.text = StatusBar.editorZoomText;
console.log('zoom now = ' + value);
},
enumerable: true,
configurable: true
});
Camera.x = 0;
Camera.y = 0;
Camera._zoom = 1;
return Camera;
})();
Any news on this?
Sorry, just seeing this now. I'm not sure setter/getter is supported, I'd assumed it would but maybe if it doesn't work it comes from that?
After a further look at this, this seems unrelated to dynamics
I have the following code: which, should, in theory, animate the
zoom
property on theCamera
object to the specified value. However, the behavior I'm seeing is very strange where only the first few frames animate and then it spends the rest of the duration setting the value to the end value: This seems like a bug, but if perhaps I'm doing this incorrectly, please let me know.