NarraLeaf/narraleaf-react
À propos
Make your own visual novel using a lightweight front-end react visual novel framework.
Développement web et applicatifProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Original
NarraLeaf-React
A React visual novel player framework
English | 简体中文
What is NarraLeaf-React?
NarraLeaf-React is a lightweight front-end visual novel player.
NL focuses on visual novel playing, so the user interface can be customized very easily.
It doesn't use any rendering libraries and can be used on any web platform (e.g. Electron)
Why NarraLeaf-React?
- Lightweight: NarraLeaf-React is a front-end framework, and it doesn't use any rendering libraries.
- Customizable: You can customize the UI as you like, even replace the whole components.
- Easy to use: It is easy to use and has a simple API that is built for developers. Based on OOP principles.
Scripting
NarraLeaf-React uses TypeScript for all scripting, so you don't have to learn a whole new language to use it.
It also has a highly abstracted and easy-to-use API, for example:
import {Character, Menu, Scene, c, b} from "narraleaf-react";
const scene1 = new Scene("Scene1: Hello World", {
background: "/link/to/background.jpg",
});
const jS = new Character("John Smith");
const jD = new Character("John Doe");
scene1.action([
jS`Hello, world!`,
jS`This is my first ${b("NarraLeaf")} story.`,
jS`Start editing ${c("src/story.js", "#00f")} and enjoy the journey!`,
jD`Also, don't forget to check out the ${c("documentation", "#00f")}!`,
"By the way, the documentation is available on https://www.narraleaf.com/docs/narraleaf-react",
"You can also visit the website for demo and more information.",
Menu.prompt("Start the journey")
.choose("Yes I will!", [
jS`Great! Let's start the journey!`,
jS`You can open issues on GitHub if you have any questions.`
])
.choose("No, I'm going to check the documentation", [
jS`Sure! Take your time!`
])
]);
For more information, please visit the NarraLeaf-React documentation.
Recent engine APIs
LiveGame.captureImage({ maxEdge, type, quality, backgroundColor })draws a screenshot at the wanted size and encodes it onceLiveGame.deserialize(save, { requireMatchingStory: true })refuses a save written by another story before changing stateregisterWordRenderer(id, component, { interactive: false })lets a purely visual text effect pass the player's clicks through to the line- Backlog
sayentries carry theavatarshown at that line, while restored saves refuse unsafe image and CSS URLs Layer({ parallax })andScene({ backgroundLayerParallax })place layers at different distances from the cameraVideo.show()andVideo.hide()accept{ duration, easing }to fade a clip in or outGameConfig.preloadreplaces the built-in preload strategy, whilepreloadGateand the image cache budgets control the default pathSound.play()resolves once playback starts; pass{ waitForEnd: true }when the story must wait for the clipGameState.getImageCache(),AudioManager.getCacheStats()andretainOnly()expose cache residency and budgets
Get Started
Install
npm install narraleaf-react
Documentation
Read more in the NarraLeaf-React documentation.
License
NarraLeaf-React is licensed under the MPL-2.0 License.
We updated the license to MPL-2.0 on 2024-9-24.
Contributing
We welcome all contributions.
If you have any ideas, just open an issue or a pull request.
Explorer des projets similaires
Chargement…