Skip to content

Commit 74463e3

Browse files
committed
Renamed Markdown Scripts to Setup.
1 parent b87962d commit 74463e3

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

Frame.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,13 @@ class Frame {
462462

463463
fromMarkdown( markdown ) {
464464

465+
const sections = {
466+
'Config': 'config',
467+
'Setup': 'scripts',
468+
'Effects': 'effects',
469+
'Animations': 'animations'
470+
};
471+
465472
const lines = markdown.split( '\n' );
466473
const json = { name: '', config: { duration: 120 }, scripts: [], effects: [], animations: [] };
467474

@@ -484,7 +491,7 @@ class Frame {
484491

485492
if ( line.startsWith( '## ' ) ) {
486493

487-
currentSection = line.substring( 3 ).toLowerCase();
494+
currentSection = sections[ line.substring( 3 ) ];
488495
continue;
489496

490497
}

examples/threejs_cube.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Three.js Shaders
44

5-
## Scripts
5+
## Setup
66

77
### Renderer
88

examples/threejs_shaders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
* Duration: 70
88

9-
## Scripts
9+
## Setup
1010

1111
### Renderer
1212

js/Editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ Editor.prototype = {
511511
markdown += ` * Duration: ${ this.duration }\n\n`;
512512

513513
if ( this.scripts.length > 0 ) {
514-
markdown += '## Scripts\n\n';
514+
markdown += '## Setup\n\n';
515515
for ( const script of this.scripts ) {
516516
markdown += `### ${ script.name }\n\n`;
517517
markdown += '```js\n';

js/SidebarProject.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ function SidebarProject( editor ) {
6060

6161
container.add( new UIBreak() );
6262

63-
// Scripts
63+
// Setup
6464

65-
container.add( new UIText( 'Scripts' ).setTextTransform( 'uppercase' ) );
65+
container.add( new UIText( 'Setup' ).setTextTransform( 'uppercase' ) );
6666
container.add( new UIBreak(), new UIBreak() );
6767

6868
var scriptsContainer = new UIRow();
@@ -76,7 +76,7 @@ function SidebarProject( editor ) {
7676
} );
7777
container.add( newScript );
7878

79-
var reload = new UIButton( 'Reload Scripts' );
79+
var reload = new UIButton( 'Reload All' );
8080
reload.onClick( async function () {
8181

8282
await editor.reloadScripts();

0 commit comments

Comments
 (0)