mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-02-17 17:01:12 -05:00
Adding Camera and iOS to window globals
This commit is contained in:
parent
5ba2f40efc
commit
8c2a26a070
2 changed files with 8 additions and 2 deletions
|
@ -342,3 +342,6 @@ export default class iOS {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Expose iOS methods for ScratchJr tablet sharing callbacks
|
||||
window.iOS = iOS;
|
||||
|
|
|
@ -24,12 +24,12 @@ export default class Camera {
|
|||
available = newAvailable;
|
||||
}
|
||||
|
||||
static startFeed (target) {
|
||||
static startFeed (feedTarget) {
|
||||
ScratchAudio.sndFX('entertap.wav');
|
||||
if (!Paint.canvasFits()) {
|
||||
Paint.scaleToFit();
|
||||
}
|
||||
target = target;
|
||||
target = feedTarget;
|
||||
Camera.active = true;
|
||||
var devicePixelRatio = window.devicePixelRatio;
|
||||
var viewbox = SVGTools.getBox(target).rounded();
|
||||
|
@ -196,3 +196,6 @@ export default class Camera {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Exposing the camera for the tablet callback in iOS.snapShot
|
||||
window.Camera = Camera;
|
||||
|
|
Loading…
Reference in a new issue