From 3757601317d0d0c12dd779e284ec80a8ee664fd9 Mon Sep 17 00:00:00 2001
From: DD Liu <liudi@media.mit.edu>
Date: Mon, 3 May 2021 12:28:28 -0400
Subject: [PATCH] Remove upload from camera

---
 src/components/action-menu/icon--camera.svg  | Bin 1050 -> 0 bytes
 src/components/camera-modal/camera-modal.css | 157 -------------------
 src/components/camera-modal/camera-modal.jsx | 141 -----------------
 src/components/camera-modal/icon--back.svg   | Bin 2848 -> 0 bytes
 src/containers/camera-modal.jsx              | 103 ------------
 src/containers/costume-tab.jsx               |  44 +-----
 src/reducers/modals.js                       |  10 --
 7 files changed, 1 insertion(+), 454 deletions(-)
 delete mode 100644 src/components/action-menu/icon--camera.svg
 delete mode 100644 src/components/camera-modal/camera-modal.css
 delete mode 100644 src/components/camera-modal/camera-modal.jsx
 delete mode 100644 src/components/camera-modal/icon--back.svg
 delete mode 100644 src/containers/camera-modal.jsx

diff --git a/src/components/action-menu/icon--camera.svg b/src/components/action-menu/icon--camera.svg
deleted file mode 100644
index e8c442d8f5d994a764942dcd957cff4239fde281..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 1050
zcmZuw+m4$s5PjdTaNU<yg24uiAp%w^()J}QRciYI6uf{!AOafl`5j-7@=z4XXT~$<
z9FHdX>*G3-yIR&^o(jr=QKF`1ZilHW=<i=|eo9}<mwdf<WFOkCFKEba4@!D9bp3Wj
z_d)I7=0`ypVI<T)`b^3xL78bSXuoZ@QxNR?4toUi(gh)7EI@i!a(axzbopN)&$28q
zx3qjA_~oB`pL|!7TIy|HPUPoBZB0+&6hiVPmQg6b5}!ON{+WAq9cuSHXy$9M+8*C`
zl-sb4s%+{jlIDSptXQkormPlKZ>q&nY`xQiJTO;B)yG=u3?4Sqk)bW<kGfMnj$z%F
z`JxIs&67GJ-whV8KZbEUE;aU-zav(wyPD><b?-KBx3t#i(f9eyd{1Sj^j4!;^zhD^
z$72wrN+F6<VFT&$2)N*aAmaK~dKsiqB8V$XF^R4EsIVeQB4Gj^9fgQ&s|Jqks5FX)
z@;gtw1VTa1n9hX76=FkbZZL>LeZvXDFh!pN(gZsqj8HlT7NOe;W5$ISfk1m9h!7z%
zqi&Yyv{p%hIao=EQP8BNZAw6f$nN;g0wlLml>i~F1pyIC8e;+&@>=(?bB=E{g{XxN
zFqt_dL883QaiN`51}4BH&ee8t)E6Z7?0Lq?SXAMW;sk8OrRH#rHZX)|gN;mOpw)K0
jc9M41)GVOg6n|*uiQ<Clov;gPRwU@$wrY^;zhn6i5&Hw1

diff --git a/src/components/camera-modal/camera-modal.css b/src/components/camera-modal/camera-modal.css
deleted file mode 100644
index 7522fbb2e..000000000
--- a/src/components/camera-modal/camera-modal.css
+++ /dev/null
@@ -1,157 +0,0 @@
-@import "../../css/colors.css";
-@import "../../css/units.css";
-
-$main-button-size: 2.75rem;
-
-.modal-content {
-    width: 552px;
-}
-
-.body {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    background: $ui-white;
-    padding: 1.5rem 2.25rem;
-}
-
-.camera-feed-container {
-    display: flex;
-    justify-content: space-around;
-    align-items: center;
-
-    background: $ui-primary;
-    border: 1px solid $ui-black-transparent;
-    border-radius: 4px;
-    padding: 3px;
-
-    width: 480px;
-    height: 360px;
-    position: relative;
-    overflow: hidden;
-}
-
-.canvas {
-    position: absolute;
-    width: 480px;
-    height: 360px;
-}
-
-.loading-text {
-    position: absolute;
-    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-    color: $text-primary-transparent;
-    font-size: 0.95rem;
-    font-weight: 500;
-    text-align: center;
-}
-
-.help-text {
-    margin: 10px auto 0;
-    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-    color: $text-primary-transparent;
-    font-size: 0.95rem;
-    font-weight: 500;
-    text-align: center;
-}
-
-.capture-text {
-    color: $motion-primary;
-}
-
-.disabled-text {
-    color: $text-primary;
-    opacity: 0.25;
-}
-
-.main-button-row {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: space-around;
-    margin-top: 15px;
-    width: 100%;
-}
-
-/* Action Menu */
-.main-button {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    cursor: pointer;
-    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-    background: $motion-primary;
-    outline: none;
-    border: none;
-    transition: background-color 0.2s;
-
-    border-radius: 100%;
-    width: $main-button-size;
-    height: $main-button-size;
-    box-shadow: 0 0 0 4px $motion-transparent;
-}
-
-.main-button:hover {
-    background: $extensions-primary;
-    box-shadow: 0 0 0 6px $motion-transparent;
-}
-
-.main-button:disabled {
-    background: $text-primary;
-    border-color: $ui-black-transparent;
-    box-shadow: none;
-    opacity: 0.25;
-}
-
-.main-icon {
-    width: calc($main-button-size - 1rem);
-    height: calc($main-button-size - 1rem);
-}
-
-.button-row {
-    font-weight: bolder;
-    text-align: right;
-    display: flex;
-    justify-content: space-between;
-    margin-top: 20px;
-    width: 480px;
-}
-
-.button-row button {
-    padding: 0.75rem 1rem;
-    border-radius: 0.25rem;
-    background: $ui-white;
-    border: 1px solid $ui-black-transparent;
-    font-weight: 600;
-    font-size: 0.85rem;
-    color: $motion-primary;
-    cursor: pointer;
-}
-
-.button-row button.ok-button {
-    background: $motion-primary;
-    border: $motion-primary;
-    color: $ui-white;
-}
-
-[dir="rtl"] .retake-button img {
-    transform: scaleX(-1);
-}
-
-@keyframes flash {
-    0% { opacity: 1; }
-    100% { opacity: 0; }
-}
-
-.flash-overlay {
-    position: absolute;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background: $ui-white;
-    animation-name: flash;
-    animation-duration: 0.5s;
-    animation-fill-mode: forwards; /* Leave at 0 opacity after animation */
-}
diff --git a/src/components/camera-modal/camera-modal.jsx b/src/components/camera-modal/camera-modal.jsx
deleted file mode 100644
index 8c499c362..000000000
--- a/src/components/camera-modal/camera-modal.jsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import PropTypes from 'prop-types';
-import React from 'react';
-import {defineMessages, injectIntl, intlShape} from 'react-intl';
-import Box from '../box/box.jsx';
-import Modal from '../../containers/modal.jsx';
-import styles from './camera-modal.css';
-import backIcon from './icon--back.svg';
-import cameraIcon from '../action-menu/icon--camera.svg';
-
-const messages = defineMessages({
-    cameraModalTitle: {
-        defaultMessage: 'Take a Photo',
-        description: 'Title for prompt to take a picture (to add as a new costume).',
-        id: 'gui.cameraModal.cameraModalTitle'
-    },
-    loadingCameraMessage: {
-        defaultMessage: 'Loading Camera...',
-        description: 'Notification to the user that the camera is loading',
-        id: 'gui.cameraModal.loadingCameraMessage'
-    },
-    permissionRequest: {
-        defaultMessage: 'We need your permission to use your camera',
-        description: 'Notification to the user that the app needs camera access',
-        id: 'gui.cameraModal.permissionRequest'
-    },
-    retakePhoto: {
-        defaultMessage: 'Retake Photo',
-        description: 'A button that allows the user to take the picture again, replacing the old one',
-        id: 'gui.cameraModal.retakePhoto'
-    },
-    save: {
-        defaultMessage: 'Save',
-        description: 'A button that allows the user to save the photo they took as a costume',
-        id: 'gui.cameraModal.save'
-    },
-    takePhotoButton: {
-        defaultMessage: 'Take Photo',
-        description: 'A button to take a photo',
-        id: 'gui.cameraModal.takePhoto'
-    },
-    loadingCaption: {
-        defaultMessage: 'Loading...',
-        description: 'A caption for a disabled button while the video from the camera is still loading',
-        id: 'gui.cameraModal.loadingCaption'
-    },
-    enableCameraCaption: {
-        defaultMessage: 'Enable Camera',
-        description: 'A caption for a disabled button prompting the user to enable camera access',
-        id: 'gui.cameraModal.enableCameraCaption'
-    }
-});
-
-const CameraModal = ({intl, ...props}) => (
-    <Modal
-        className={styles.modalContent}
-        contentLabel={intl.formatMessage(messages.cameraModalTitle)}
-        onRequestClose={props.onCancel}
-    >
-        <Box className={styles.body}>
-            <Box className={styles.cameraFeedContainer}>
-                <div className={styles.loadingText}>
-                    {props.access ? intl.formatMessage(messages.loadingCameraMessage) :
-                        `↖️ \u00A0${intl.formatMessage(messages.permissionRequest)}`}
-                </div>
-                <canvas
-                    className={styles.canvas}
-                    // height and (below) width of the actual image
-                    // double stage dimensions to avoid the need for
-                    // resizing the captured image when importing costume
-                    // to accommodate double resolution bitmaps
-                    height="720"
-                    ref={props.canvasRef}
-                    width="960"
-                />
-                {props.capture ? (
-                    <div className={styles.flashOverlay} />
-                ) : null}
-            </Box>
-            {props.capture ?
-                <Box className={styles.buttonRow}>
-                    <button
-                        className={styles.retakeButton}
-                        key="retake-button"
-                        onClick={props.onBack}
-                    >
-                        <img
-                            draggable={false}
-                            src={backIcon}
-                        /> {intl.formatMessage(messages.retakePhoto)}
-                    </button>
-                    <button
-                        className={styles.okButton}
-                        onClick={props.onSubmit}
-                    > {intl.formatMessage(messages.save)}
-                    </button>
-                </Box> :
-                <Box className={styles.mainButtonRow}>
-                    <button
-                        className={styles.mainButton}
-                        disabled={!props.loaded}
-                        key="capture-button"
-                        onClick={props.onCapture}
-                    >
-                        <img
-                            className={styles.mainIcon}
-                            draggable={false}
-                            src={cameraIcon}
-                        />
-                    </button>
-                    <div className={styles.helpText}>
-                        {props.access ?
-                            <span className={props.loaded ? styles.captureText : styles.disabledText}>
-                                {props.loaded ?
-                                    intl.formatMessage(messages.takePhotoButton) :
-                                    intl.formatMessage(messages.loadingCaption)}
-                            </span> :
-                            <span className={styles.disabledText}>
-                                {intl.formatMessage(messages.enableCameraCaption)}
-                            </span>
-                        }
-                    </div>
-
-                </Box>
-            }
-        </Box>
-    </Modal>
-);
-
-CameraModal.propTypes = {
-    access: PropTypes.bool,
-    canvasRef: PropTypes.func.isRequired,
-    capture: PropTypes.string,
-    intl: intlShape.isRequired,
-    loaded: PropTypes.bool,
-    onBack: PropTypes.func.isRequired,
-    onCancel: PropTypes.func.isRequired,
-    onCapture: PropTypes.func.isRequired,
-    onSubmit: PropTypes.func.isRequired
-};
-
-export default injectIntl(CameraModal);
diff --git a/src/components/camera-modal/icon--back.svg b/src/components/camera-modal/icon--back.svg
deleted file mode 100644
index 47d09bc7fad766b50da3ed1cffec190b1e94878c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 2848
zcmZ{m+fE}#6h+_XD>|K*AkpQzUq&_~#nI%2NTbZ;1037~7RHV24v@dkI@K6V#PkdH
zcCpVs`&_E$pPufv%|pLGY=+&UHA=Tlzq=aNo89%I{p;K3F1O8LT<zAY?Xc???QUp4
zU3{1y9<H0m&3e4yfAalP+uZb<>zi@W)-Mm6{_)r0Y0>INHzqf5oP;oKL(tt}(cX;X
z{m0qt@$peTIyLOCXI5)HgZ%l($EWRPcl+K!Q%afDU)zfh4bS|iu4{hpcl~}f4*QSI
z*V}%)x@o*qw)w>s9m`qMH761O9&Y-(&FVQ>bv4}04%7d1-81F58Mpn#zVG(^)v#aB
zXA>~RTla^ni{-vwjr|%g#+&DmYCfw!9Z!8fTnNIS3At`I>qYxzb=`M3aTxc*ZS{56
zAHQ`+XWQocX1f*B<wyD4?f=<wx_{_*!+QOkdQE?#{jERTj>CP|b;f4>lq~fe_p9CE
z`>?-TwDsc_#lLjkM}^ru=S}B>fBtfIjQO))mh}1aNr;m$U&sEw^F;ZwUHwa|bl>)y
zyB|c-FJZiW2{L&hjK^m_CGh9b>>sdscT{@bczxtP`=87g()$&4!R|k-Q?Ue-k~=q9
z>71iYwz;%g1)YP{{@facWiflxEP-t-#zZS{Fh1t&8dFs9!I<fA^f4Bl1dUK=Un!30
z64)lEOMU|ryZEAujc<svN;-RDoT|7qK?UoyGvQS864->KEof57+Gs^ZP#R)OdP$iS
zqtQh`>p2<Yxrv0Zk^gFh!26(`HUe9lL-BI9Xro=W=kn3ofJY6#dy}+J{uI3=Mu<+w
zR8HZgz)oOP1cenLJ2;Z^A!rd1lyg3$Yy@=V7F|WP2DKJxi6WR7EyNx{nM8vewlcyN
z!Cqx!1N9Kp6r-a-u~*5&5L0E~cO4};Un>(s4QCv@x}HTrK%FpXZ*<6r@OT146%kb~
z#H}bIL&*4pfidVHf@#5+1CO8-A2ZSGRL(YpX9kNj9|-4E@H+U22(dU}G4`;Q2<J6v
zP>oWkGJ>6=D#1w_)RU&NE}a`o${u53AfrIt&|p<0niB#q&8l^Q0F-=ekt(AH4cbyV
ziw49<4~raI3Y{&eqxZ8F)VW-W^wcXV6xKz=RT05i4kN-TQY)Fxmct=};)H0=C8vov
z%Grnts|s^Mi`B!}W;5LiYM~H+ph%*PMBYV(f}<s+DQoI%3$?S#7*Cn1HYZ+FBsNU4
z1<0sOkxleff+mYtuw8~3SPtTUNe<5pZA1k<HlQWKnJa-tmbPqz_hHb;t&$3!ac^RS
z=Bg7E1zBW)VwpCsQY4y0h6_|GE8|IFEoU9VwAch%rQvwVaY9X|JA{D}QRX5Ou4xF-
zSzS-q!6T?Fks@8`741ZbiqdAj(CtfLShW#<w21eGR-@Bkp#QKJRN^_bu^527#~_F!
z)r!(oQ57aU$S@<>02h2qB+Vq2{Kn0!9CJVAEStv|VaS|iuv0xNvupwkMQNLKsV&7o
z1|ubAg;HQTO}Yf5*oFm$B0I^*fLrA<sHDsmwz8UQlLR{1im;-R2aRNGSrIunBOOub
z4rZg&_TwrD&Nu9Qt<h-EKrd?sjf_EA9LdNW()U!^!7CR;1hq0;P9<QBki)boH!p(O
zC-h__Ww}_Ol`6B+P{zfx1a!U_7a(9OGC?WJNyd~|r1rW$>kWhgnYY)?d}-+(%@t+f
zeTA1?bfTB_bqa%W^_kk)FDoCgBxC5oH`jyp%5eFi==3fDW!0MO$nEvodG}gv>l@C?
zYts*Ia=C_MF0{Ec8%c91o;8Q7)t0vt19;Z#hjDsWVHwuvY<iiQ-e67$x)X+$*DbmB
Y-+9HDUB3nAr@+gX`e80_p%)+i0|$YAnE(I)

diff --git a/src/containers/camera-modal.jsx b/src/containers/camera-modal.jsx
deleted file mode 100644
index c55b0ee45..000000000
--- a/src/containers/camera-modal.jsx
+++ /dev/null
@@ -1,103 +0,0 @@
-import bindAll from 'lodash.bindall';
-import PropTypes from 'prop-types';
-import React from 'react';
-import {connect} from 'react-redux';
-
-import CameraModalComponent from '../components/camera-modal/camera-modal.jsx';
-import ModalVideoManager from '../lib/video/modal-video-manager.js';
-
-import {
-    closeCameraCapture
-} from '../reducers/modals';
-
-class CameraModal extends React.Component {
-    constructor (props) {
-        super(props);
-        bindAll(this, [
-            'handleAccess',
-            'handleBack',
-            'handleCancel',
-            'handleCapture',
-            'handleLoaded',
-            'handleSubmit',
-            'setCanvas'
-        ]);
-
-        this.video = null;
-        this.videoDevice = null;
-
-        this.state = {
-            capture: null,
-            access: false,
-            loaded: false
-        };
-    }
-    componentWillUnmount () {
-        if (this.videoDevice) {
-            this.videoDevice.disableVideo();
-        }
-    }
-    handleAccess () {
-        this.setState({access: true});
-    }
-    handleLoaded () {
-        this.setState({loaded: true});
-    }
-    handleBack () {
-        this.setState({capture: null});
-        this.videoDevice.clearSnapshot();
-    }
-    handleCapture () {
-        if (this.state.loaded) {
-            const capture = this.videoDevice.takeSnapshot();
-            this.setState({capture: capture});
-        }
-    }
-    setCanvas (canvas) {
-        this.canvas = canvas;
-        if (this.canvas) {
-            this.videoDevice = new ModalVideoManager(this.canvas);
-            this.videoDevice.enableVideo(this.handleAccess, this.handleLoaded);
-        }
-    }
-    handleSubmit () {
-        if (!this.state.capture) return;
-        this.props.onNewCostume(this.state.capture);
-        this.props.onClose();
-    }
-    handleCancel () {
-        this.props.onClose();
-    }
-    render () {
-        return (
-            <CameraModalComponent
-                access={this.state.access}
-                canvasRef={this.setCanvas}
-                capture={this.state.capture}
-                loaded={this.state.loaded}
-                onBack={this.handleBack}
-                onCancel={this.handleCancel}
-                onCapture={this.handleCapture}
-                onSubmit={this.handleSubmit}
-            />
-        );
-    }
-}
-
-CameraModal.propTypes = {
-    onClose: PropTypes.func,
-    onNewCostume: PropTypes.func
-};
-
-const mapStateToProps = () => ({});
-
-const mapDispatchToProps = dispatch => ({
-    onClose: () => {
-        dispatch(closeCameraCapture());
-    }
-});
-
-export default connect(
-    mapStateToProps,
-    mapDispatchToProps
-)(CameraModal);
diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx
index f9ecdab08..be9b6d44b 100644
--- a/src/containers/costume-tab.jsx
+++ b/src/containers/costume-tab.jsx
@@ -6,7 +6,6 @@ import VM from 'scratch-vm';
 
 import AssetPanel from '../components/asset-panel/asset-panel.jsx';
 import PaintEditorWrapper from './paint-editor-wrapper.jsx';
-import CameraModal from './camera-modal.jsx';
 import {connect} from 'react-redux';
 import {handleFileUpload, costumeUpload} from '../lib/file-uploader.js';
 import errorBoundaryHOC from '../lib/error-boundary-hoc.jsx';
@@ -16,8 +15,6 @@ import sharedMessages from '../lib/shared-messages';
 import downloadBlob from '../lib/download-blob';
 
 import {
-    closeCameraCapture,
-    openCameraCapture,
     openCostumeLibrary,
     openBackdropLibrary
 } from '../reducers/modals';
@@ -34,7 +31,6 @@ import addLibraryBackdropIcon from '../components/asset-panel/icon--add-backdrop
 import addLibraryCostumeIcon from '../components/asset-panel/icon--add-costume-lib.svg';
 import fileUploadIcon from '../components/action-menu/icon--file-upload.svg';
 import paintIcon from '../components/action-menu/icon--paint.svg';
-import cameraIcon from '../components/action-menu/icon--camera.svg';
 import surpriseIcon from '../components/action-menu/icon--surprise.svg';
 import searchIcon from '../components/action-menu/icon--search.svg';
 
@@ -71,11 +67,6 @@ let messages = defineMessages({
         defaultMessage: 'Upload Costume',
         description: 'Button to add a costume by uploading a file in the editor tab',
         id: 'gui.costumeTab.addFileCostume'
-    },
-    addCameraCostumeMsg: {
-        defaultMessage: 'Camera',
-        description: 'Button to use the camera to create a costume costume in the editor tab',
-        id: 'gui.costumeTab.addCameraCostume'
     }
 });
 
@@ -95,7 +86,6 @@ class CostumeTab extends React.Component {
             'handleSurpriseBackdrop',
             'handleFileUploadClick',
             'handleCostumeUpload',
-            'handleCameraBuffer',
             'handleDrop',
             'setFileInput'
         ]);
@@ -218,14 +208,6 @@ class CostumeTab extends React.Component {
             }, this.props.onCloseImporting);
         }, this.props.onCloseImporting);
     }
-    handleCameraBuffer (buffer) {
-        const storage = this.props.vm.runtime.storage;
-        const targetId = this.props.vm.editingTarget.id;
-        costumeUpload(buffer, 'image/png', storage, vmCostumes => {
-            vmCostumes[0].name = this.props.intl.formatMessage(messages.costume, {index: 1});
-            this.handleNewCostume(vmCostumes, false, targetId);
-        });
-    }
     handleFileUploadClick () {
         this.fileInput.click();
     }
@@ -264,11 +246,8 @@ class CostumeTab extends React.Component {
             dispatchUpdateRestore, // eslint-disable-line no-unused-vars
             intl,
             isRtl,
-            onNewCostumeFromCameraClick,
             onNewLibraryBackdropClick,
             onNewLibraryCostumeClick,
-            cameraModalVisible,
-            onRequestCloseCameraModal,
             vm
         } = this.props;
 
@@ -299,11 +278,6 @@ class CostumeTab extends React.Component {
                         img: addLibraryIcon,
                         onClick: addLibraryFunc
                     },
-                    {
-                        title: intl.formatMessage(messages.addCameraCostumeMsg),
-                        img: cameraIcon,
-                        onClick: onNewCostumeFromCameraClick
-                    },
                     {
                         title: intl.formatMessage(addFileMessage),
                         img: fileUploadIcon,
@@ -346,29 +320,20 @@ class CostumeTab extends React.Component {
                     /> :
                     null
                 }
-                {cameraModalVisible ? (
-                    <CameraModal
-                        onClose={onRequestCloseCameraModal}
-                        onNewCostume={this.handleCameraBuffer}
-                    />
-                ) : null}
             </AssetPanel>
         );
     }
 }
 
 CostumeTab.propTypes = {
-    cameraModalVisible: PropTypes.bool,
     dispatchUpdateRestore: PropTypes.func,
     editingTarget: PropTypes.string,
     intl: intlShape,
     isRtl: PropTypes.bool,
     onActivateSoundsTab: PropTypes.func.isRequired,
     onCloseImporting: PropTypes.func.isRequired,
-    onNewCostumeFromCameraClick: PropTypes.func.isRequired,
     onNewLibraryBackdropClick: PropTypes.func.isRequired,
     onNewLibraryCostumeClick: PropTypes.func.isRequired,
-    onRequestCloseCameraModal: PropTypes.func.isRequired,
     onShowImporting: PropTypes.func.isRequired,
     sprites: PropTypes.shape({
         id: PropTypes.shape({
@@ -392,8 +357,7 @@ const mapStateToProps = state => ({
     isRtl: state.locales.isRtl,
     sprites: state.scratchGui.targets.sprites,
     stage: state.scratchGui.targets.stage,
-    dragging: state.scratchGui.assetDrag.dragging,
-    cameraModalVisible: state.scratchGui.modals.cameraCapture
+    dragging: state.scratchGui.assetDrag.dragging
 });
 
 const mapDispatchToProps = dispatch => ({
@@ -406,12 +370,6 @@ const mapDispatchToProps = dispatch => ({
         e.preventDefault();
         dispatch(openCostumeLibrary());
     },
-    onNewCostumeFromCameraClick: () => {
-        dispatch(openCameraCapture());
-    },
-    onRequestCloseCameraModal: () => {
-        dispatch(closeCameraCapture());
-    },
     dispatchUpdateRestore: restoreState => {
         dispatch(setRestore(restoreState));
     },
diff --git a/src/reducers/modals.js b/src/reducers/modals.js
index 303819790..2e69bf8ba 100644
--- a/src/reducers/modals.js
+++ b/src/reducers/modals.js
@@ -2,7 +2,6 @@ const OPEN_MODAL = 'scratch-gui/modals/OPEN_MODAL';
 const CLOSE_MODAL = 'scratch-gui/modals/CLOSE_MODAL';
 
 const MODAL_BACKDROP_LIBRARY = 'backdropLibrary';
-const MODAL_CAMERA_CAPTURE = 'cameraCapture';
 const MODAL_COSTUME_LIBRARY = 'costumeLibrary';
 const MODAL_EXTENSION_LIBRARY = 'extensionLibrary';
 const MODAL_LOADING_PROJECT = 'loadingProject';
@@ -15,7 +14,6 @@ const MODAL_TIPS_LIBRARY = 'tipsLibrary';
 
 const initialState = {
     [MODAL_BACKDROP_LIBRARY]: false,
-    [MODAL_CAMERA_CAPTURE]: false,
     [MODAL_COSTUME_LIBRARY]: false,
     [MODAL_EXTENSION_LIBRARY]: false,
     [MODAL_LOADING_PROJECT]: false,
@@ -57,9 +55,6 @@ const closeModal = function (modal) {
 const openBackdropLibrary = function () {
     return openModal(MODAL_BACKDROP_LIBRARY);
 };
-const openCameraCapture = function () {
-    return openModal(MODAL_CAMERA_CAPTURE);
-};
 const openCostumeLibrary = function () {
     return openModal(MODAL_COSTUME_LIBRARY);
 };
@@ -90,9 +85,6 @@ const openTipsLibrary = function () {
 const closeBackdropLibrary = function () {
     return closeModal(MODAL_BACKDROP_LIBRARY);
 };
-const closeCameraCapture = function () {
-    return closeModal(MODAL_CAMERA_CAPTURE);
-};
 const closeCostumeLibrary = function () {
     return closeModal(MODAL_COSTUME_LIBRARY);
 };
@@ -124,7 +116,6 @@ export {
     reducer as default,
     initialState as modalsInitialState,
     openBackdropLibrary,
-    openCameraCapture,
     openCostumeLibrary,
     openExtensionLibrary,
     openLoadingProject,
@@ -135,7 +126,6 @@ export {
     openTipsLibrary,
     openConnectionModal,
     closeBackdropLibrary,
-    closeCameraCapture,
     closeCostumeLibrary,
     closeExtensionLibrary,
     closeLoadingProject,
-- 
GitLab