2018-11-24 12:06:07 +00:00
|
|
|
|
|
|
|
Process.prototype.proxy = 'https://turtlestitch.org:8080';
|
|
|
|
|
2017-02-28 21:26:29 +00:00
|
|
|
Process.prototype.reportMouseX = function () {
|
|
|
|
var stage, world;
|
|
|
|
if (this.homeContext.receiver) {
|
|
|
|
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
|
|
|
|
if (stage) {
|
|
|
|
world = stage.world();
|
|
|
|
if (world) {
|
2019-01-17 00:35:47 +00:00
|
|
|
return (
|
|
|
|
(world.hand.position().x - stage.center().x)
|
|
|
|
/ stage.camera.zoomFactor
|
|
|
|
/ stage.scale
|
|
|
|
* 2
|
|
|
|
+ stage.controls.center.x
|
|
|
|
);
|
2017-02-28 21:26:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
Process.prototype.reportMouseY = function () {
|
|
|
|
var stage, world;
|
|
|
|
if (this.homeContext.receiver) {
|
|
|
|
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
|
|
|
|
if (stage) {
|
|
|
|
world = stage.world();
|
|
|
|
if (world) {
|
2019-01-17 00:35:47 +00:00
|
|
|
return (
|
|
|
|
(stage.center().y - world.hand.position().y)
|
|
|
|
/ stage.camera.zoomFactor
|
|
|
|
/ stage.scale
|
|
|
|
* 2
|
|
|
|
+ stage.controls.center.y
|
|
|
|
);
|
2017-02-28 21:26:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
};
|
2018-10-23 18:21:12 +00:00
|
|
|
|
|
|
|
Process.prototype.zoomToFit = function() {
|
|
|
|
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
|
|
|
|
if (stage) {
|
|
|
|
stage.camera.fitScene();
|
|
|
|
}
|
|
|
|
}
|
2018-10-24 08:31:05 +00:00
|
|
|
|
|
|
|
Process.prototype.reportPi = function (min, max) {
|
|
|
|
return Math.PI;
|
|
|
|
};
|
|
|
|
|
2018-11-24 12:06:07 +00:00
|
|
|
Process.prototype.reportProxiedURL = function (url) {
|
|
|
|
return this.reportURL(this.proxy + '/' + url);
|
|
|
|
};
|