Skip to content

Commit

Permalink
geometric-optics-basics initial setup, #2
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 22, 2022
1 parent 10da1a3 commit 34c6b6a
Show file tree
Hide file tree
Showing 12 changed files with 606 additions and 245 deletions.
552 changes: 552 additions & 0 deletions geometric-optics-basics_a11y_view.html

Large diffs are not rendered by default.

25 changes: 20 additions & 5 deletions geometric-optics-basics_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,24 @@
},
"phet": {
"requirejsNamespace": "GEOMETRIC_OPTICS_BASICS",
"phetLibs": [
"geometric-optics"
],
"colorProfiles": [
"default",
"projector"
],
"simulation": true,
"runnable": true,
"readmeCreatedManually": true,
"supportedBrands": [
"phet",
"phet-io",
"adapted-from-phet"
],
"simFeatures": {
"supportsSound": true,
"supportsInteractiveDescription": true
},
"supportsOutputJS": true
},
"eslintConfig": {
Expand All @@ -48,6 +59,14 @@
};
window.phet.chipper.stringRepos =
[
{
"repo": "geometric-optics",
"requirejsNamespace": "GEOMETRIC_OPTICS"
},
{
"repo": "geometric-optics-basics",
"requirejsNamespace": "GEOMETRIC_OPTICS_BASICS"
},
{
"repo": "joist",
"requirejsNamespace": "JOIST"
Expand All @@ -56,10 +75,6 @@
"repo": "scenery-phet",
"requirejsNamespace": "SCENERY_PHET"
},
{
"repo": "geometric-optics-basics",
"requirejsNamespace": "GEOMETRIC_OPTICS_BASICS"
},
{
"repo": "sun",
"requirejsNamespace": "SUN"
Expand Down
29 changes: 0 additions & 29 deletions js/common/GeometricOpticsBasicsColors.ts

This file was deleted.

20 changes: 0 additions & 20 deletions js/common/GeometricOpticsBasicsConstants.ts

This file was deleted.

29 changes: 0 additions & 29 deletions js/common/GeometricOpticsBasicsQueryParameters.ts

This file was deleted.

35 changes: 17 additions & 18 deletions js/geometric-optics-basics-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,32 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import GOConstants from '../../geometric-optics/js/common/GOConstants.js';
import GOGlobalOptionsNode from '../../geometric-optics/js/common/view/GOGlobalOptionsNode.js';
import LensScreen from '../../geometric-optics/js/lens/LensScreen.js';
import MirrorScreen from '../../geometric-optics/js/mirror/MirrorScreen.js';
import Sim from '../../joist/js/Sim.js';
import simLauncher from '../../joist/js/simLauncher.js';
import Tandem from '../../tandem/js/Tandem.js';
import GeometricOpticsBasicsScreen from './geometric-optics-basics/GeometricOpticsBasicsScreen.js';
import geometricOpticsBasicsStrings from './geometricOpticsBasicsStrings.js';

const geometricOpticsBasicsTitleString = geometricOpticsBasicsStrings[ 'geometric-optics-basics' ].title;

const simOptions = {

//TODO fill in credits, all of these fields are optional, see joist.CreditsNode
credits: {
leadDesign: '',
softwareDevelopment: '',
team: '',
qualityAssurance: '',
graphicArts: '',
soundDesign: '',
thanks: ''
}
credits: GOConstants.CREDITS,

// Creates content for the Options dialog, accessible via the PhET menu
createOptionsDialogContent: ( tandem: Tandem ) => new GOGlobalOptionsNode( {
tandem: tandem
} ),

// pdom options
hasKeyboardHelpContent: true
};

// launch the sim - beware that scenery Image nodes created outside of simLauncher.launch() will have zero bounds
// until the images are fully loaded, see https://github.com/phetsims/coulombs-law/issues/70
simLauncher.launch( () => {
const sim = new Sim( geometricOpticsBasicsTitleString, [
new GeometricOpticsBasicsScreen( { tandem: Tandem.ROOT.createTandem( 'geometricOpticsBasicsScreen' ) } )
const sim = new Sim( geometricOpticsBasicsStrings[ 'geometric-optics-basics' ].title, [
new LensScreen( { tandem: Tandem.ROOT.createTandem( 'lensScreen' ) } ),
new MirrorScreen( { tandem: Tandem.ROOT.createTandem( 'mirrorScreen' ) } )
], simOptions );
sim.start();
} );
} );
2 changes: 2 additions & 0 deletions js/geometric-optics-basics-phet-io-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable */
window.phet.preloads.phetio.phetioElementsOverrides = {};
43 changes: 0 additions & 43 deletions js/geometric-optics-basics/GeometricOpticsBasicsScreen.ts

This file was deleted.

37 changes: 0 additions & 37 deletions js/geometric-optics-basics/model/GeometricOpticsBasicsModel.ts

This file was deleted.

64 changes: 0 additions & 64 deletions js/geometric-optics-basics/view/GeometricOpticsBasicsScreenView.ts

This file was deleted.

12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@
},
"phet": {
"requirejsNamespace": "GEOMETRIC_OPTICS_BASICS",
"phetLibs": [
"geometric-optics"
],
"colorProfiles": [
"default",
"projector"
],
"simulation": true,
"runnable": true,
"supportedBrands": [
"phet",
"phet-io",
"adapted-from-phet"
],
"simFeatures": {
"supportsSound": true,
"supportsInteractiveDescription": true
},
"supportsOutputJS": true
},
"eslintConfig": {
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"references": [
{
"path": "../joist/tsconfig-module.json"
},
{
"path": "../geometric-optics"
}
],
"include": [
Expand Down

0 comments on commit 34c6b6a

Please sign in to comment.