forked from croquet/microverse-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpendulum.js
75 lines (69 loc) · 2.05 KB
/
pendulum.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
// Copyright 2022 by Croquet Corporation, Inc. All Rights Reserved.
// https://croquet.io
export function init(Constants) {
Constants.AvatarNames = [
"newwhite", "madhatter", "marchhare", "queenofhearts", "cheshirecat", "alice"
];
Constants.SystemBehaviorDirectory = "behaviors/croquet";
Constants.SystemBehaviorModules = [
"rapier.js", "avatarEvents.js"
];
Constants.UserBehaviorDirectory = "behaviors/pendulum";
Constants.UserBehaviorModules = [
"lights.js", "pendulum.js"
];
// const frameColor = 0x888888;
Constants.UseRapier = true;
Constants.DefaultCards = [
{
card: {
name:"world model",
layers: ["walk"],
type: "3d",
translation:[0, -1.7, 0],
singleSided: true,
shadow: true,
placeholder: true,
placeholderSize: [400, 0.1, 400],
placeholderColor: 0x808080,
placeholderOffset: [0, 0, 0],
}
},
{
card: {
name: "light",
layers: ["light"],
type: "lighting",
behaviorModules: ["Light"],
dataLocation: "./assets/sky/abandoned_parking_4k.jpg",
dataType: "jpg",
}
},
{
card: {
name:"pendulum holder",
translation: [0, 6, -10],
type: "2d",
width: 1,
height: 1,
depth: 1,
layers: ["pointer"],
scale: [0.3, 0.3, 0.3],
color: 0xcccccc
},
id: "holder"
},
{
card: {
name:"pendulum",
parent: "holder",
type: "object",
behaviorModules: ["Rapier", "Pendulum"],
layers: ["pointer"],
multiuser: true,
color: 0xaaaaaa,
}
},
];
}