mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Keep possibly brand names just initials
This commit is contained in:
@@ -3,7 +3,7 @@ Getting started with the development of this application is very easy because it
|
||||
|
||||
Before starting, the gentle reader might want to make sure to be familiar with the [Lit](https://lit.dev/) library and its element [lifecycle](https://lit.dev/docs/components/lifecycle/). This library is used extensively throught the application to keep the HTML elements in sync with the data and avoid updating the DOM too often. The original author is aware that there are way more popular alternatives out there like React, Vue and Svelte, but the design of Lit fits very well into the original design of this application: vanilla JavaScript and object-oriented. This allowed the introduction of Lit with a relatively small amount of changes to the existing code, yes because the decision to use Lit was made at a later point in time. One important detail is that it does not make use of the shadow DOM (part of the Web Components), the real reason is that the development started without using Lit but it is still nice to be able to have a global CSS style (which wouldn't be possibile with a shadow root) so that restyling the library is just a matter of adding another CSS file and rewrite a few properties.
|
||||
|
||||
The only other external library that is used here is the awesome [Parsimmon](https://github.com/jneen/parsimmon): a very small but capable text parsing library used to deserialize the text produced by the Unreal Engine Blueprint Editor.
|
||||
The only other external library that is used here is the awesome [Parsimmon](https://github.com/jneen/parsimmon): a very small but capable text parsing library used to deserialize the text produced by the UE Blueprint Editor.
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# UEBlueprint
|
||||
|
||||
A stand alone editor implementation of the Unreal Engine's Blueprint visual language. (WIP)
|
||||
A stand alone editor implementation of the UE's Blueprint visual language. (WIP)
|
||||
|
||||
## Features:
|
||||
|
||||
|
||||
9374
dist/ueblueprint.js
vendored
9374
dist/ueblueprint.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Unreal Engine Blueprint</title>
|
||||
<title>UE Blueprint</title>
|
||||
<link rel="stylesheet" href="dist/css/ueblueprint-node-value-type-color.css">
|
||||
<link rel="stylesheet" href="dist/css/ueb-style.css">
|
||||
<style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Unreal Engine Blueprint</title>
|
||||
<title>UE Blueprint</title>
|
||||
<link rel="stylesheet" href="dist/css/ueblueprint-node-value-type-color.css">
|
||||
<link rel="stylesheet" href="dist/css/ueb-style.css">
|
||||
<style>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>Unreal Engine Blueprint</title>
|
||||
<title>UE Blueprint</title>
|
||||
<link rel="stylesheet" href="dist/css/ueblueprint-node-value-type-color.css">
|
||||
<link rel="stylesheet" href="dist/css/ueb-style.css">
|
||||
<style>
|
||||
|
||||
21
js/entity/FormatTextEntity.js
Normal file
21
js/entity/FormatTextEntity.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import IEntity from "./IEntity"
|
||||
import InvariantTextEntity from "./InvariantTextEntity"
|
||||
import LocalizedTextEntity from "./LocalizedTextEntity"
|
||||
import UnionType from "./UnionType"
|
||||
|
||||
export default class FormatTextEntity extends IEntity {
|
||||
|
||||
static lookbehind = "LOCGEN_FORMAT_NAMED"
|
||||
static attributes = {
|
||||
value: [new UnionType(LocalizedTextEntity, InvariantTextEntity, FormatTextEntity)],
|
||||
}
|
||||
|
||||
static {
|
||||
this.cleanupAttributes(this.attributes)
|
||||
}
|
||||
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.value
|
||||
}
|
||||
} 1
|
||||
@@ -585,7 +585,7 @@ export default class ObjectEntity extends IEntity {
|
||||
if (hidValue.includes("Mouse")) {
|
||||
return SVGIcon.mouse
|
||||
} else if (hidValue.includes("Gamepad_Special")) {
|
||||
return SVGIcon.keyboard // This is called Touchpad in Unreal Engine
|
||||
return SVGIcon.keyboard // This is called Touchpad in UE
|
||||
} else if (hidValue.includes("Gamepad") || hidValue.includes("Steam")) {
|
||||
return SVGIcon.gamepad
|
||||
} else if (hidValue.includes("Touch")) {
|
||||
|
||||
@@ -371,11 +371,13 @@ export default class Grammar {
|
||||
)
|
||||
|
||||
/** @param {Grammar} r */
|
||||
InvariantText = r => r.String.trim(P.optWhitespace).wrap(
|
||||
P.string(InvariantTextEntity.lookbehind).skip(P.optWhitespace).skip(P.string("(")),
|
||||
P.string(")")
|
||||
)
|
||||
.map(value => new InvariantTextEntity({ value: value }))
|
||||
InvariantText = r =>
|
||||
Grammar.regexMap(
|
||||
new RegExp(
|
||||
String.raw`${InvariantTextEntity.lookbehind}\s*\("(${Grammar.Regex.InsideString.source})"\)`,
|
||||
matchResult => new InvariantTextEntity({ value: matchResult[1] })
|
||||
)
|
||||
)
|
||||
|
||||
/** @param {Grammar} r */
|
||||
AttributeAnyValue = r => P.alt(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ueblueprint",
|
||||
"version": "1.0.0",
|
||||
"description": "Unreal Engine's Blueprint visualisation library",
|
||||
"description": "UE's Blueprint visualisation library",
|
||||
"main": "ueblueprint.js",
|
||||
"scripts": {
|
||||
"build": "rollup --config && sass scss/export.scss:dist/css/ueb-style.css && sass scss/export.scss:dist/css/ueb-style.min.css --style=compressed",
|
||||
|
||||
Reference in New Issue
Block a user