mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 09:44:49 +08:00
Merge remote-tracking branch 'origin/master' into mirrored-object-reference-fix
This commit is contained in:
@@ -8,7 +8,6 @@ https://www.npmjs.com/package/ueblueprint
|
||||
|
||||
- Intercommunicates with UE (can copy nodes both ways).
|
||||
- Can be used as a WEB library to visualize and interact with Blueprint graphs.
|
||||
- Can be used inside VS Code to operate directly on files from a UE project (in the future).
|
||||
- Graph shown is pixel-similar to how it appears in UE.
|
||||
- Graph behaves the same way as it does in UE (with the default settings).
|
||||
- All the information shown in he graph is just the one embedded in the serialized text.
|
||||
@@ -47,10 +46,10 @@ You can check `index.html` for a working example, the main steps are the followi
|
||||
4. Import the class Blueprint in JavaScript (this library uses modules).
|
||||
```HTML
|
||||
<script type="module">
|
||||
import { Blueprint } from "./dist/ueblueprint.js"
|
||||
import { Blueprint } from "./dist/ueblueprint.min.js"
|
||||
</script>
|
||||
```
|
||||
5. Define your blueprint by just writing the code inside a `ueb-blueprint`, inside a `template` element.
|
||||
5. Define your blueprint by writing the code inside a `template`, inside a `ueb-blueprint` element.
|
||||
```HTML
|
||||
<ueb-blueprint>
|
||||
<template>
|
||||
|
||||
9
dist/css/ueb-style.css
vendored
9
dist/css/ueb-style.css
vendored
@@ -20,7 +20,8 @@ ueb-blueprint {
|
||||
}
|
||||
|
||||
ueb-blueprint svg {
|
||||
overflow: visible;
|
||||
overflow: visible !important;
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
.ueb-viewport-header {
|
||||
@@ -191,9 +192,9 @@ ueb-link {
|
||||
ueb-link > svg {
|
||||
--ueb-y-reflected-coefficient: calc(2 * var(--ueb-y-reflected) - 1);
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
min-height: 1px !important;
|
||||
transform: scaleY(calc(var(--ueb-y-reflected-coefficient) * var(--ueb-from-input-coefficient)));
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
2
dist/css/ueb-style.css.map
vendored
2
dist/css/ueb-style.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css
vendored
2
dist/css/ueb-style.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css.map
vendored
2
dist/css/ueb-style.min.css.map
vendored
File diff suppressed because one or more lines are too long
4
dist/ueblueprint.js
vendored
4
dist/ueblueprint.js
vendored
@@ -3372,6 +3372,10 @@ class ColorChannelEntity extends IEntity {
|
||||
valueOf() {
|
||||
return this.value
|
||||
}
|
||||
|
||||
toString() {
|
||||
return this.value.toString()
|
||||
}
|
||||
}
|
||||
|
||||
class LinearColorEntity extends IEntity {
|
||||
|
||||
2
dist/ueblueprint.min.js
vendored
2
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -30,4 +30,8 @@ export default class ColorChannelEntity extends IEntity {
|
||||
valueOf() {
|
||||
return this.value
|
||||
}
|
||||
|
||||
toString() {
|
||||
return this.value.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ ueb-blueprint {
|
||||
}
|
||||
|
||||
ueb-blueprint svg {
|
||||
overflow: visible;
|
||||
overflow: visible !important;
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
.ueb-viewport-header {
|
||||
|
||||
@@ -19,9 +19,9 @@ ueb-link {
|
||||
ueb-link>svg {
|
||||
--ueb-y-reflected-coefficient: calc(2 * var(--ueb-y-reflected) - 1);
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
min-height: 1px !important;
|
||||
transform: scaleY(calc(var(--ueb-y-reflected-coefficient) * var(--ueb-from-input-coefficient)));
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@@ -277,6 +277,18 @@ test("Boolean", () => {
|
||||
expect(BooleanEntity.flagSerialized().grammar.parse("true").serialize()).toEqual(`"true"`)
|
||||
})
|
||||
|
||||
test("ColorChannelEntity", () => {
|
||||
let grammar = ColorChannelEntity.grammar
|
||||
|
||||
let value = grammar.parse("0.45")
|
||||
expect(value).toBeInstanceOf(ColorChannelEntity)
|
||||
expect(value).toEqual(new ColorChannelEntity(0.45))
|
||||
expect(value.serialize()).toBe("0.450000")
|
||||
expect(value.equals(new (ColorChannelEntity.withDefault().flagNullable())(0.45))).toBeTruthy()
|
||||
expect(value.valueOf()).toBe(0.45)
|
||||
expect(value.toString()).toBe("0.45")
|
||||
})
|
||||
|
||||
test("FormatTextEntity", () => {
|
||||
let grammar = FormatTextEntity.grammar
|
||||
let grammar2 = FormatTextEntity.flagSerialized().grammar
|
||||
|
||||
Reference in New Issue
Block a user