Skip to content

Commit

Permalink
Updating to a global phet namespace, see phetsims/scenery#966
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Feb 23, 2023
1 parent d4f8062 commit 29f40d0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,34 +60,34 @@
<body>
<script>
( () => {
const textFont = new scenery.Font( {
const textFont = new phet.scenery.Font( {
size: 12
} );

const checkbox = new sun.Checkbox( new axon.BooleanProperty( true ), new scenery.Text( 'Checkbox', { font: textFont } ), {
const checkbox = new phet.sun.Checkbox( new phet.axon.BooleanProperty( true ), new phet.scenery.Text( 'Checkbox', { font: textFont } ), {
labelContent: 'Checkbox',
descriptionContent: 'This is a very impressive looking checkbox!'
} );

const button = new sun.TextPushButton( 'Text Push Button', {
const button = new phet.sun.TextPushButton( 'Text Push Button', {
font: textFont,
listener: () => {
button.alertDescriptionUtterance( 'This is an alert!' );
}
} );

const rootNode = new scenery.Node( {
const rootNode = new phet.scenery.Node( {
children: [
new scenery.VBox( {
new phet.scenery.VBox( {
align: 'left',
spacing: 10,
x: 10,
y: 10,
children: [
new scenery.Text( 'Scenery Lab Demo', {
new phet.scenery.Text( 'Scenery Lab Demo', {
tagName: 'h1',
innerContent: 'Scenery Lab Demo',
font: new scenery.Font( {
font: new phet.scenery.Font( {
size: 24,
weight: 'bold'
} ),
Expand All @@ -103,7 +103,7 @@
// Happens every frame, can be used to animate things
};

const display = new scenery.Display( rootNode, {
const display = new phet.scenery.Display( rootNode, {
// A specific size. Could set `display.width = window.innerWidth` etc. in the
width: 640,
height: 480
Expand Down

0 comments on commit 29f40d0

Please sign in to comment.