-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
236 lines (198 loc) · 7.35 KB
/
index.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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html>
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"vz/": "./lib/viewzavr-system-a/"
}
}
</script>
<script src="./lib/viewzavr-system-a/lib/viewlang/code/depends/jquery-2.1.4.js"></script>
<script src="./lib/viewzavr-system-a/lib/viewlang/code//depends/qmlweb/src/parser.js"></script>
<script src="./lib/viewzavr-system-a/lib/viewlang/code//depends/qmlweb/src/process.js"></script>
<script src="./lib/viewzavr-system-a/lib/viewlang/code//depends/qmlweb/src/import.js"></script>
<script src="./lib/viewzavr-system-a/lib/viewlang/code//depends/qmlweb/src/qtcore.js"></script>
<script src="./lib/viewzavr-system-a/lib/viewlang/code//base.js"></script>
<head>
</head>
<body>
<div id="qmlSpace">
target space for qml...
</div>
<style>
#qmlSpace {
width: 100vw !important;
bottom: 0px !important;
z-index: 10000;
}
.viewlang-canvas {
width: 100%; height: 100%;
margin: 0; padding: 0; display: block; left: 0px; top: 0px; position: absolute;
}
body { margin: 0; }
</style>
<script src="./lib/viewzavr-system-a/lib/viewlang/code//threejs_driver/init.js"></script>
<script type="module">
///////////////////////////// qmlweb and viewlang (required for viewzavr-system-a implementation)
import * as Viewlang from "./lib/viewzavr-system-a/lib/viewlang/code/embed2/init.js"
window.qmlEngine = new QMLEngine( document.getElementById( "qmlSpace" ) );
Viewlang.setup_qmlweb( qmlEngine );
///////////////////////////// viewzavr
import * as Viewzavr from "./lib/viewzavr-system-a/lib/viewzavr-core/init.js";
var vz = Viewzavr.create();
// window.vz = vz;
//////////////////////////// player
import * as Player from "./lib/viewzavr-system-a/player/init.js";
var vzPlayer = Player.create( vz, qmlEngine );
window.vzPlayer = vzPlayer;
//////////////////////////// graphical api
import * as VisAPI from "./lib/viewzavr-system-a/graphical-api/init.js";
VisAPI.setup( vz );
//////////////////////////// library-one
import * as lib1 from "./lib/viewzavr-system-a/lib/library-one/init.js";
lib1.setup( vz, vzPlayer );
//////////////////////////// required packages
// we need almost always that package
//var q0 = vzPlayer.loadPackage( ["vis-comps", vz.getDir( import.meta.url ) + "/views/list.txt", vz.getDir( import.meta.url ) + "/views/list.txt"]);
//var q0 = vzPlayer.loadAppPackage( vz.getDir( import.meta.url ) + "/list.txt", "" );
/*
var q0 = vzPlayer.loadApp( vz.getDir( import.meta.url ) + "/list.txt" );
q0.then( function() {
vzPlayer.feature( "hash-settings auto-load-settings auto-save-settings auto-save-screenshot datapath-from-url commands-socket show-file-progress");
});
*/
/*
q0.then( function() {
vzPlayer.loadPackage( vz.getDir( import.meta.url ) + "/app_features.txt" );
});
*/
//vzPlayer.loadPackage( vz.getDir( import.meta.url ) + "/app_features.txt" );
//vzPlayer.feature( "state-in-hash")
//vzPlayer.load_features( vz.getDir( import.meta.url ) + "/app_features.txt" )
/*
import F1 from "./auto-load-settings.js";
import F2 from "./hash-settings.js";
import F3 from "./auto-save-settings.js";
import F4 from "./commands-socket.js";
import F5 from "./file-progress.js";
import F6 from "./datapath-from-url.js";
q0.then( function() {
F1(vz); F2(vz); F3(vz); F4(vz); F5(vz); F6(vz);
});
*/
/*
import * as FE from "./features.js";
var q0 = vzPlayer.loadApp( vz.getDir( import.meta.url ) + "/list.txt" );
q0.then( function() {
FE.auto_load_settings( vzPlayer );
FE.hash_settings( vzPlayer );
FE.auto_save_settings( vzPlayer );
FE.auto_save_screenshot( vzPlayer );
FE.show_file_progress( vzPlayer );
FE.commands_socket( vzPlayer );
FE.datapath_from_url( vzPlayer );
});
*/
////////////////////////////////////////////////
/*
var q0 = vzPlayer.loadApp( vz.getDir( import.meta.url ) + "/list.txt" );
q0.then( function() {
vzPlayer.feature(
`hash-settings
auto-load-settings
auto-save-settings
auto-save-screenshot
datapath-from-url
commands-socket
show-file-progress`);
});
*/
/*
{
main: "features",
features: "hash-settings auto-load-settings auto-save-settings auto-save-screenshot datapath-from-url commands-socket show-file-progress"
}
features:
menu:
*/
var feature_appends =
{ main: 'player_features',
player_features: `
hash-settings
auto-load-settings
auto-save-settings
auto-save-screenshot
datapath-from-url
commands-socket
show-file-progress
switch_to_editor_link
switch_to_editor_kbd
camera_intesecting_objects
`
}
vz.register_feature_map( feature_appends );
// vz.feature( "main" ); // это мечта; но так пока сломается - корневого объекта нет. и пока нет идей
// т.к. запуск применения фич хотелось бы контролировать, все нормально.
// хотя можно будет и зашить что loadApp затем вызывает сама vzPlayer.feature("main") и типа вы должны...
// но это опять же неявность. пока оставим так
vzPlayer.loadPackage( vz.getDir( import.meta.url ) + "/list.txt" ).then( () => {
vzPlayer.setRoot( vz.createObjByType("vr-cinema-app") );
vzPlayer.feature("main")
})
//vz.load( vz.getDir( import.meta.url, "list.txt" ) );
/* в будущем наверное так:
var feature_map =
{ main: 'cinema-view-cinema',
player: {
append: [ 'hash-settings',
'auto-load-settings',
'auto-save-settings',
'auto-save-screenshot',
'datapath-from-url',
'commands-socket',
'show-file-progress' ]
}
}
*/
//vz.env().feature("main");
//vzPlayer.setRoot( vz.createObj( {feature:"main" }));
//vzPlayer.feature("player");
/*
vzPlayer.loadApp( vz.getDir( import.meta.url ) + "/list.txt" ).then( () => {
var feature_map =
{ main: 'features',
features:
[ 'hash-settings',
'auto-load-settings',
'auto-save-settings',
'auto-save-screenshot',
'datapath-from-url',
'commands-socket',
'show-file-progress' ]
}
vz.register_feature_map( feature_map );
vzPlayer.feature("main")
})
*/
/*
var q0 = vzPlayer.loadPackage( vz.getDir( import.meta.url ) + "/list.txt" );
var app = {
main: "features",
features: "hash-settings auto-load-settings auto-save-settings auto-save-screenshot datapath-from-url commands-socket show-file-progress"
}
interpret( app, "main", vz );
q0.then( () => {
vzPlayer.feature( "main" );
})
*/
/*
vz.register_feature( "main",(env) => {
let obj = vz.createObjByType("cinema-view-cinema");
debugger;
console.log("main feature created obj",obj);
env.setRoot( obj );
});
*/
</script>
</body>