-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathverse.js
79 lines (71 loc) · 1.67 KB
/
verse.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var Maki = require('maki');
// TODO: use app.configure
var app = new Maki({
service: {
name: 'verse',
icon: 'cube',
pitch: 'create and explore imaginary worlds',
about: 'This is an experimental component of <a href="https://maki.io">a much larger vision</a>, emerging from <a href="https://www.roleplaygateway.com">a decades-old community</a> to explore what is <strong>possible</strong>.',
contract: '',
copyright: 'Copyright can be a contentious topic. We\'d like to start that conversation. Read <a href="#">our statement on copyright</a>.',
links: {
github: 'https://github.com/martindale/verse'
}
},
services: {
http: {
port: 7766
}
}
});
var Verse = require('./lib/maki-client-verse');
var verse = new Verse({
resource: 'Asset'
});
app.use(verse);
app.define('Index', {
public: false,
name: 'Index',
templates: {
query: 'splash'
},
components: {
query: 'verse-ui'
},
routes: {
query: '/'
},
static: true
});
var Script = app.define('Script', {
icon: 'code',
//source: './scripts',
attributes: {
name: { type: String , id: true },
hash: { type: String },
content: { type: String },
}
});
var Asset = app.define('Asset', {
icon: 'cubes',
attributes: {
data: { type: Object },
coordinates: {
name: { type: String },
hash: { type: String },
content: { type: String },
}
}
});
var Instance = app.define('Instance', {
icon: 'star alt',
attributes: {
data: { type: Object },
coordinates: {
x: { type: Number , default: 0 },
y: { type: Number , default: 0 },
z: { type: Number , default: 0 }
}
}
});
app.start();