-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.php
38 lines (34 loc) · 958 Bytes
/
app.php
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
<?php
/**
* D3模型查看器
* D3ModelViewer
*
* @author Chao
* @website http://xuc7950.top
* @qq: 1099460165
*
* 本插件基于以下开源项目:
* - Three.js https://github.com/mrdoob/three.js
*/
class D3ModelViewerPlugin extends PluginBase {
function __construct() {
parent::__construct();
}
public function regiest() {
$this->hookRegiest(array(
'user.commonJs.insert' => 'D3ModelViewerPlugin.echoJs'
));
}
public function echoJs($st, $act) {
if ($this->isFileExtence($st, $act)) {
$this->echoFile('static/main.js');
}
}
public function index() {
$path = _DIR($this->in['path']);
$fileUrl = _make_file_proxy($path);
$fileName = get_path_this(rawurldecode($this->in['path']));
$fileName = htmlspecialchars($fileName);
include($this->pluginPath . 'static/page.html');
}
}