-
Notifications
You must be signed in to change notification settings - Fork 32
/
example.mesh.html
39 lines (36 loc) · 1.14 KB
/
example.mesh.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="scripts/riven.js"></script>
<script src="scripts/nodes/print.js"></script>
<script src="scripts/nodes/value.js"></script>
<script src="scripts/nodes/add.js"></script>
<script src="scripts/nodes/mesh.js"></script>
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
<link rel="stylesheet" type="text/css" href="links/main.css"/>
<title>Riven — Math</title>
</head>
<body>
<script>
'use strict'
const lib = RIVEN.lib
RIVEN.create = (append = true) => {
Ø("bang").create({x:2,y:2},RIVEN.Node)
Ø("mesh").create({x:8,y:0},lib.Mesh,[
Ø("add").create({x:2,y:0},lib.Add),
Ø("val1").create({x:0,y:4},lib.Value,5),
Ø("val2").create({x:4,y:4},lib.Value,10),
], "add", "add")
Ø("output").create({x:26,y:6},lib.Print)
Ø("add").syphon(["val1","val2"])
Ø("bang").connect("mesh")
Ø("mesh").connect("output")
}
RIVEN.create(true)
Ø("bang").send("foo bar")
RIVEN.graph()
</script>
</body>
</html>