Subversion Repository Public Repository

Nextrek

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
function object(o) {
  var f = object.f, i, len, n, prop;
  f.prototype = o;
  n = new f;
  for (i=1, len=arguments.length; i<len; ++i)
    for (prop in arguments[i])
      n[prop] = arguments[i][prop];
  return n;
}

object.f = function(){};

var tyrano ={};
tyrano.plugin ={};

tyrano.core ={

    base:null,

    options:{
        
        width:0,
        height:0,
        onComplete:function(){}
        
    },
    
    status:{
        loaded_plugin:0
    },
    
    
    init:function(options){
        
        var that = this;
        
        this.base = object(tyrano.base);
        this.base.init(this);
        
        this.config = window.config;
        
        
        //スクリプトをロードして、そのオブジェクトを作成
        //alert("wwwww");
        that.loadModule();
        
    },
    
    //プラグインのロード処理
    loadPlugins:function(array_src,call_back){
        
        var that = this;
        
        var count_src = 0;
        
        for(var i=0; i<array_src.length; i++){
            
            $.getScript("./tyrano/plugins/"+array_src[i]+"/"+array_src[i]+".js", function(){
                
                count_src++;
                
                if(count_src == array_src.length){
                    if(call_back){
                        call_back(array_src);
                    }  
                }
            });
            
        }
        
    },
    
    loadModule:function(){

        var that = this;
        var array_src = ["kag"];

        for(var i=0;i<array_src.length;i++){
        
            var _name = array_src[i]; 
            this[_name] = object(tyrano.plugin[_name]);
            //操作を委譲 
            this[_name].tyrano = this;
            this[_name].init();
            
        }
        
        this.completeLoad();
          
    },
    
    
    //
    completeLoad:function(){
        
        //console.log(plugin_name);
        
        //読み込み対象のプラグイン数分実行されたらビルド処理へ
        this.build();
        
        
    },
    
    //ローディング完了、システムを組み上げていきます
    build:function(){
        
        
    },
    
    get:function(mark){
        return $(mark);
    },
    
    test:function(){
        //alert("tyrano test");
    }
};



var TYRANO = object(tyrano.core);
window.TYRANO = TYRANO;

if (!('console' in window)) {
 
          window.console = {};
          window.console.log = function(str){
              return str;
          };
     }
    
$(function(){
    //画面をノベル用に構築していくみたいな
    //yunagi.init();
    //DOM構築完了後の初期化
    //yunagi.init_loaded();
TYRANO.init();
    
});

Commits for Nextrek/FurryHouse/tyrano/tyrano.js

Diff revisions: vs.
Revision Author Commited Message
1361 DBraccini picture DBraccini Mon 30 Mar, 2020 13:31:12 +0000