mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
53 lines
3.3 KiB
HTML
53 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
|
|
<title></title>
|
|
<style>
|
|
</style>
|
|
<link rel="stylesheet" href="css/ueblueprint-node-value-type-color.css">
|
|
<link rel="stylesheet" href="css/ueblueprint-style.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div>Hello</div>
|
|
<script type="module">
|
|
import { UEBlueprint, GraphNode, PinSerializer, PinEntity, Grammar, ObjectReferenceEntity, ObjectSerializer } from "./dist/ueblueprint.js"
|
|
let pinEparsed = PinSerializer.grammar.Reference.parse(`Class'"/Script/Engine.KismetMathLibrary"'`)
|
|
let blueprint = new UEBlueprint()
|
|
|
|
let node0 = new GraphNode(); node0.setLocation([985, 393]); let node1 = new GraphNode(); node1.setLocation([999, 114]); let node2 = new GraphNode(); node2.setLocation([811, 253]); let node3 = new GraphNode(); node3.setLocation([802, 146]); let node4 = new GraphNode(); node4.setLocation([597, 105]); let node5 = new GraphNode(); node5.setLocation([789, 233]); let node6 = new GraphNode(); node6.setLocation([549, 289]); let node7 = new GraphNode(); node7.setLocation([678, 193]); let node8 = new GraphNode(); node8.setLocation([1078, 244]); let node9 = new GraphNode(); node9.setLocation([751, 151]); let node10 = new GraphNode(); node10.setLocation([1046, -14]); let node11 = new GraphNode(); node11.setLocation([714, 267]); let node12 = new GraphNode(); node12.setLocation([767, 36]); let node13 = new GraphNode(); node13.setLocation([807, 219]); let node14 = new GraphNode(); node14.setLocation([1031, 70]); let node15 = new GraphNode(); node15.setLocation([906, 389]); let node16 = new GraphNode(); node16.setLocation([936, 131]); let node17 = new GraphNode(); node17.setLocation([689, 249]); let node18 = new GraphNode(); node18.setLocation([1153, 343]); let node19 = new GraphNode(); node19.setLocation([626, 209]); blueprint.addNode(node0, node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11, node12, node13, node14, node15, node16, node17, node18, node19);
|
|
|
|
document.querySelector('body').appendChild(blueprint)
|
|
</script>
|
|
<script type="module">
|
|
/*
|
|
document.addEventListener("DOMContentLoaded", function (event) {
|
|
let leftmost = Number.MAX_SAFE_INTEGER;
|
|
let topmost = Number.MAX_SAFE_INTEGER;
|
|
let draggableElements = document.querySelectorAll('.ueb-node').forEach(function (node) {
|
|
new UEBlueprintDrag(node)
|
|
leftmost = Math.min(leftmost, node.offsetLeft)
|
|
topmost = Math.min(leftmost, node.offsetTop)
|
|
})
|
|
document.querySelectorAll('.ueb-grid').forEach(function (grid) {
|
|
let obj = new UEBlueprintDragScrollGrid(grid, {
|
|
'clickButton': 2,
|
|
'exitGrabSameButtonOnly': true,
|
|
'expandGridSize': 200
|
|
})
|
|
obj.stepSize = 1
|
|
let viewportWidth = grid.parentElement.clientWidth
|
|
let viewportHeight = grid.parentElement.clientHeight
|
|
grid.style.setProperty('--ueb-translateX', Math.round(viewportWidth / 2))
|
|
grid.style.setProperty('--ueb-translateY', Math.round(viewportHeight / 2))
|
|
grid.style.setProperty('--ueb-additionalX', 0)
|
|
grid.style.setProperty('--ueb-additionalY', 0)
|
|
})
|
|
});*/
|
|
</script>
|
|
</body>
|
|
|
|
</html> |