mtr_addon:nte:js:start
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mtr_addon:nte:js:start [2023/10/08 14:36] – weryskok | mtr_addon:nte:js:start [2024/02/06 13:08] (current) – added source weryskok | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== JavaScript Support ====== | ====== JavaScript Support ====== | ||
- | NTE supports fully customizable control of rendering and other features using JavaScript | + | NTE supports fully customizable control of rendering and other features using JavaScript. This page lists the various functions, objects, |
===== Why Overcomplicate Everything? ===== | ===== Why Overcomplicate Everything? ===== | ||
- | The main purpose of this feature is to implement dynamic displays on trains, but you have to keep in mind that the interface of the displays, the logic of operation, and so on, varies greatly from city to city and from train to train around | + | The main purpose of this feature is to implement dynamic displays on trains |
- | If a simple format was chosen, it would not be possible | + | By simplifying this process, it would be too hard to accurately |
- | ===== How To Edit .js Files? ===== | + | ===== How To Edit JavaScript |
- | Any text editor | + | A JavaScript file (.js) can be edited in a variety of editors. It is recommended to have a text editor |
- | This article assumes that you have some basic understanding of JavaScript, so it won't delve into the basic syntax and other aspects of JavaScript | + | This rest of this article assumes that you have a basic understanding of JavaScript |
===== Type Annotation ===== | ===== Type Annotation ===== | ||
- | As you know, values in JS have different types. When calling a function, you must pass parameters of the appropriate type, and the result it returns will also have a type. In this article, the parameter and return types of the provided functions are denoted in a form similar to TypeScript. For example: | + | As you know, values in JS have different types. When calling a function, you must pass parameters of the appropriate type, and the result it returns will also have a type. In this article, |
* <code javascript> | * <code javascript> | ||
* '' | * '' | ||
Line 62: | Line 62: | ||
* <code javascript> | * <code javascript> | ||
* Loads and runs the JS file by location in the resource pack. For example, '' | * Loads and runs the JS file by location in the resource pack. For example, '' | ||
+ | |||
+ | ===== Source ===== | ||
+ | * https:// |
mtr_addon/nte/js/start.1696775806.txt.gz · Last modified: 2023/10/08 14:36 by weryskok