-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
a571e58
commit 336d450
Showing
5 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2020-2021, University of Colorado Boulder | ||
|
||
/** | ||
* This file adds mechamarkers as an input controller to Ratio and Proportion | ||
* | ||
* @author Michael Kauzmann (PhET Interactive Simulations) | ||
*/ | ||
|
||
import MarkerInput from '../../../../tangible/js/MarkerInput.js'; | ||
import quadrilateral from '../../quadrilateral.js'; | ||
|
||
// constants | ||
// Note marker 2 of original aruco doesn't work well when camera is flipped. | ||
const BASE_MARKER = 4; | ||
const RATIO_MARKER_LEFT = 2; | ||
const RATIO_MARKER_RIGHT = 0; | ||
|
||
class QuadrilateralMarkerInput extends MarkerInput { | ||
|
||
/** | ||
*/ | ||
constructor() { | ||
super(); | ||
} | ||
|
||
/** | ||
* @public | ||
*/ | ||
step() { | ||
phet.log && phet.log( [ | ||
RATIO_MARKER_LEFT, this.Beholder.getMarker( RATIO_MARKER_LEFT ).present, '\n', | ||
BASE_MARKER, this.Beholder.getMarker( BASE_MARKER ).present, '\n', | ||
RATIO_MARKER_RIGHT, this.Beholder.getMarker( RATIO_MARKER_RIGHT ).present, '\n' | ||
] ); | ||
} | ||
} | ||
|
||
quadrilateral.register( 'QuadrilateralMarkerInput', QuadrilateralMarkerInput ); | ||
export default QuadrilateralMarkerInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
"references": [ | ||
{ | ||
"path": "../joist" | ||
}, | ||
{ | ||
"path": "../tangible" | ||
} | ||
], | ||
"include": [ | ||
|