-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from MakinoharaShoko/dev
fix parser
- Loading branch information
Showing
16 changed files
with
340 additions
and
18 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as fsp from "fs/promises"; | ||
import SceneParser, {ADD_NEXT_ARG_LIST, SCRIPT_CONFIG} from "../src"; | ||
|
||
|
||
async function debug() { | ||
const sceneRaw = await fsp.readFile('test/test-resources/var.txt'); | ||
const sceneText = sceneRaw.toString(); | ||
|
||
const parser = new SceneParser((assetList) => { | ||
}, (fileName, assetType) => { | ||
return fileName; | ||
}, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); | ||
|
||
const result = parser.parse(sceneText, "var", "/var.txt"); | ||
console.log(result) | ||
} | ||
|
||
debug(); |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
setVar:a=1; | ||
WebGAL:a=1? -when=a==1; |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { FC } from 'react'; | ||
import styles from './logo.module.scss'; | ||
import { useSelector } from 'react-redux'; | ||
import { RootState } from '@/store/store'; | ||
/** | ||
* 标识 | ||
* @constructor | ||
*/ | ||
const Logo: FC = () => { | ||
const GUIState = useSelector((state: RootState) => state.GUI); | ||
const logoImage = GUIState.logoImage; | ||
const logoList = logoImage.split(' '); | ||
|
||
const logo = logoList.map((logo,index)=> | ||
<li | ||
key = {index} | ||
className={styles.Logo_main} | ||
style={{ | ||
backgroundImage: `url("${logo}")`, | ||
animationDelay: `${index*1.5}s`, | ||
}} | ||
></li> | ||
); | ||
|
||
return ( | ||
<> | ||
{GUIState.showTitle && ( | ||
<div id = "logo_target" className={styles.Logo_target}> | ||
<ul> | ||
{logo} | ||
</ul> | ||
</div> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default Logo; |
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,32 @@ | ||
.Logo_target { | ||
display: none; | ||
} | ||
.Logo_main { | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
animation: change-img-anim 2.5s infinite; | ||
background-size: cover; | ||
animation-iteration-count: 1; | ||
animation-direction: alternate; | ||
} | ||
@keyframes change-img-anim { | ||
0%{ | ||
opacity: 0; | ||
z-index: 14; | ||
} | ||
10%{ | ||
opacity: 1; | ||
} | ||
90%{ | ||
opacity: 1; | ||
} | ||
100%{ | ||
opacity: 0; | ||
z-index: 14; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export function setLogo(logoName :string , url: string ) { | ||
const logoImage = document.getElementById('logoImage'); | ||
if (logoImage) { | ||
logoImage.style.backgroundImage = `url("${url}")`; | ||
} | ||
} |
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
Oops, something went wrong.