change the way dependent scripts are loaded and how debug state propagates from server to client to worker
This commit is contained in:
parent
6432ac1e7f
commit
490cdcbce4
8 changed files with 93 additions and 182 deletions
|
|
@ -1 +0,0 @@
|
||||||
../node_modules/n3d-threejs/index.js
|
|
||||||
|
|
@ -1523,7 +1523,7 @@ var gs_kiri_init = exports;
|
||||||
UI.toolMetric.onclick = updateTool;
|
UI.toolMetric.onclick = updateTool;
|
||||||
UI.toolType.onchange = updateTool;
|
UI.toolType.onchange = updateTool;
|
||||||
|
|
||||||
$('kiri').onclick = API.help.show;
|
$('appname').onclick = API.help.show;
|
||||||
|
|
||||||
SPACE.platform.setSize(
|
SPACE.platform.setSize(
|
||||||
settings().device.bedWidth,
|
settings().device.bedWidth,
|
||||||
|
|
@ -1694,36 +1694,40 @@ var gs_kiri_init = exports;
|
||||||
// if a language needs to load, the script is injected and loaded
|
// if a language needs to load, the script is injected and loaded
|
||||||
// first. once this loads, or doesn't, the initialization begins
|
// first. once this loads, or doesn't, the initialization begins
|
||||||
let lang_set = undefined;
|
let lang_set = undefined;
|
||||||
|
let lang = SETUP.ln ? SETUP.ln[0] : SDB.getItem('kiri-lang');
|
||||||
|
|
||||||
// inject language script
|
// inject language script if not english
|
||||||
if (SETUP.ln || SDB.getItem('kiri-lang')) {
|
if (lang && lang !== 'en' && lang !== 'en-us') {
|
||||||
let lang = SETUP.ln ? SETUP.ln[0] : SDB.getItem('kiri-lang');
|
lang_set = lang;
|
||||||
if (lang !== 'en') {
|
let scr = DOC.createElement('script');
|
||||||
lang_set = lang;
|
// scr.setAttribute('defer',true);
|
||||||
let scr = DOC.createElement('script');
|
scr.setAttribute('src',`/kiri/lang/${lang}.js`);
|
||||||
// scr.setAttribute('defer',true);
|
(DOC.body || DOC.head).appendChild(scr);
|
||||||
scr.setAttribute('src',`/kiri/lang/${lang}.js`);
|
STATS.set('ll',lang);
|
||||||
DOC.body.appendChild(scr);
|
scr.onload = function() {
|
||||||
STATS.set('ll',lang);
|
KIRI.lang.set(lang);
|
||||||
scr.onload = function() {
|
init_one();
|
||||||
KIRI.lang.set(lang);
|
};
|
||||||
init_one();
|
scr.onerror = function(err) {
|
||||||
};
|
console.log({language_load_error: err, lang})
|
||||||
scr.onerror = function(err) {
|
init_one();
|
||||||
console.log({language_load_error: err, lang})
|
|
||||||
init_one();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// set to browser default
|
|
||||||
KIRI.lang.set();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set to browser default which will be overridden
|
||||||
|
// by any future script loads (above)
|
||||||
|
KIRI.lang.set();
|
||||||
|
|
||||||
// schedule init_one to run after all page content is loaded
|
// schedule init_one to run after all page content is loaded
|
||||||
// unless a languge script is loading first, in which case it
|
// unless a languge script is loading first, in which case it
|
||||||
// will call init once it's done (or failed)
|
// will call init once it's done (or failed)
|
||||||
if (!lang_set) {
|
if (!lang_set) {
|
||||||
SPACE.addEventListener(DOC, 'DOMContentLoaded', init_one, false);
|
if (document.readyState === 'loading') {
|
||||||
|
SPACE.addEventListener(DOC, 'DOMContentLoaded', init_one);
|
||||||
|
} else {
|
||||||
|
// happens in debug mode when scripts are chain loaded
|
||||||
|
init_one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ let loc = self.location,
|
||||||
host = loc.hostname,
|
host = loc.hostname,
|
||||||
port = loc.port,
|
port = loc.port,
|
||||||
proto = loc.protocol,
|
proto = loc.protocol,
|
||||||
pre = '',
|
|
||||||
// pre = host.indexOf(".space") > 0 || host === "localhost" ?
|
|
||||||
// proto + "//" + host + ":" + port : "",
|
|
||||||
time = function() { return new Date().getTime() },
|
time = function() { return new Date().getTime() },
|
||||||
KIRI = self.kiri,
|
KIRI = self.kiri,
|
||||||
BASE = self.base,
|
BASE = self.base,
|
||||||
|
|
@ -19,13 +16,6 @@ let loc = self.location,
|
||||||
slicing = {},
|
slicing = {},
|
||||||
worker = null;
|
worker = null;
|
||||||
|
|
||||||
// new moto.Ajax(function(body) {
|
|
||||||
// console.log({body:body});
|
|
||||||
// let blob = new Blob([body], {type : 'application/json'});
|
|
||||||
// worker = new Worker(URL.createObjectURL(blob));
|
|
||||||
// console.log({worker})
|
|
||||||
// }).request(pre + "/code/worker.js/123");
|
|
||||||
|
|
||||||
function send(fn, data, onreply, async, zerocopy) {
|
function send(fn, data, onreply, async, zerocopy) {
|
||||||
let seq = seqid++;
|
let seq = seqid++;
|
||||||
|
|
||||||
|
|
@ -59,7 +49,7 @@ KIRI.work = {
|
||||||
|
|
||||||
slicing = {};
|
slicing = {};
|
||||||
running = {};
|
running = {};
|
||||||
worker = new Worker(pre + "/code/worker.js/" + exports.VERSION);
|
worker = new Worker(`/code/worker.js`);
|
||||||
|
|
||||||
worker.onmessage = function(e) {
|
worker.onmessage = function(e) {
|
||||||
let now = time(),
|
let now = time(),
|
||||||
|
|
|
||||||
|
|
@ -1,69 +1,26 @@
|
||||||
/** Copyright Stewart Allen -- All Rights Reserved */
|
/** Copyright Stewart Allen -- All Rights Reserved */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// this code runs in the web worker
|
importScripts(`/code/work.js`);
|
||||||
module = { exports: {} };
|
|
||||||
|
|
||||||
let loc = self.location,
|
let loc = self.location,
|
||||||
ver = exports.VERSION,
|
ver = exports.VERSION,
|
||||||
time = function() { return new Date().getTime() };
|
base = self.base,
|
||||||
host = loc.hostname,
|
|
||||||
debug = host === 'debug' || host === 'localhost';
|
|
||||||
|
|
||||||
console.log(`kiri | init work | ${ver}${debug ? ' | debug' : ''}`);
|
|
||||||
|
|
||||||
// when running the server in 'web' mode, the obfuscated code is served as a
|
|
||||||
// unified ball via /code/work.js -- otherwise, map "localhost" to "debug"
|
|
||||||
// to debug unobfuscated code. if not, /js/ paths will 404.
|
|
||||||
if (debug) {
|
|
||||||
try {
|
|
||||||
[
|
|
||||||
"license",
|
|
||||||
"ext-n3d", // for math/geometry only
|
|
||||||
"ext-clip2",
|
|
||||||
"add-array",
|
|
||||||
"add-three",
|
|
||||||
"geo",
|
|
||||||
"geo-point",
|
|
||||||
"geo-debug",
|
|
||||||
"geo-bounds",
|
|
||||||
"geo-line",
|
|
||||||
"geo-slope",
|
|
||||||
"geo-polygon",
|
|
||||||
"geo-polygons",
|
|
||||||
"geo-gyroid",
|
|
||||||
"kiri-fill",
|
|
||||||
"kiri-slice",
|
|
||||||
"kiri-slicer",
|
|
||||||
"kiri-driver-fdm",
|
|
||||||
"kiri-driver-cam",
|
|
||||||
"kiri-driver-laser",
|
|
||||||
"kiri-widget",
|
|
||||||
"kiri-pack",
|
|
||||||
"kiri-print",
|
|
||||||
"kiri-codec"
|
|
||||||
].forEach(function(scr) {
|
|
||||||
importScripts(`/js/${scr}.js/${ver}`);
|
|
||||||
})
|
|
||||||
} catch (e) {
|
|
||||||
console.log("unable to load worker scripts. server is in production mode.");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
importScripts("/code/work.js/"+ver);
|
|
||||||
}
|
|
||||||
|
|
||||||
let base = self.base,
|
|
||||||
moto = self.moto,
|
moto = self.moto,
|
||||||
dbug = base.debug,
|
|
||||||
util = base.util,
|
util = base.util,
|
||||||
|
time = util.time,
|
||||||
kiri = self.kiri,
|
kiri = self.kiri,
|
||||||
Widget = kiri.Widget,
|
Widget = kiri.Widget,
|
||||||
currentPrint,
|
currentPrint,
|
||||||
cache = {};
|
cache = {};
|
||||||
|
|
||||||
if (!debug) {
|
console.log(`kiri | init work | ${ver}`);
|
||||||
base.debug.disable();
|
base.debug.disable();
|
||||||
}
|
|
||||||
|
// catch clipper alerts and convert to console messages
|
||||||
|
self.alert = function(o) {
|
||||||
|
console.log(o);
|
||||||
|
};
|
||||||
|
|
||||||
let dispatch = {
|
let dispatch = {
|
||||||
decimate: function(vertices, send) {
|
decimate: function(vertices, send) {
|
||||||
|
|
@ -108,7 +65,7 @@ let dispatch = {
|
||||||
slices.forEach(function(slice,index) {
|
slices.forEach(function(slice,index) {
|
||||||
send.data({index: index, slice: slice.encode()});
|
send.data({index: index, slice: slice.encode()});
|
||||||
})
|
})
|
||||||
if (debug && widget.polish) {
|
if (self.debug && widget.polish) {
|
||||||
send.data({polish: kiri.codec.encode(widget.polish)});
|
send.data({polish: kiri.codec.encode(widget.polish)});
|
||||||
}
|
}
|
||||||
send.data({send_end: time()});
|
send.data({send_end: time()});
|
||||||
|
|
@ -221,8 +178,3 @@ self.onmessage = function(e) {
|
||||||
console.log({kiri_msg:e});
|
console.log({kiri_msg:e});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// catch clipper alerts and convert to console messages
|
|
||||||
self.alert = function(o) {
|
|
||||||
console.log(o);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
DOC = self.document,
|
DOC = self.document,
|
||||||
LOC = self.location,
|
LOC = self.location,
|
||||||
HOST = LOC.host.split(':'),
|
HOST = LOC.host.split(':'),
|
||||||
LOCAL = HOST[0] === 'localhost' || HOST[0] === 'debug',
|
LOCAL = self.debug,
|
||||||
SETUP = parseOpt(LOC.search.substring(1)),
|
SETUP = parseOpt(LOC.search.substring(1)),
|
||||||
SECURE = isSecure(LOC.protocol),
|
SECURE = isSecure(LOC.protocol),
|
||||||
SDB = MOTO.KV,
|
SDB = MOTO.KV,
|
||||||
|
|
|
||||||
128
js/web-server.js
128
js/web-server.js
|
|
@ -144,10 +144,6 @@ function prepareScripts() {
|
||||||
code.meta = concatCode(script.meta);
|
code.meta = concatCode(script.meta);
|
||||||
code.work = concatCode(script.work);
|
code.work = concatCode(script.work);
|
||||||
code.worker = concatCode(script.worker);
|
code.worker = concatCode(script.worker);
|
||||||
inject.kiri_local = htmlScript(codePrefix, script.kiri);
|
|
||||||
inject.meta_local = htmlScript(codePrefix, script.meta);
|
|
||||||
inject.kiri = htmlScript("code/", ["kiri"]);
|
|
||||||
inject.meta = htmlScript("code/", ["meta"]);
|
|
||||||
fs.readdir("./web/kiri/filter/FDM", function(err, files) {
|
fs.readdir("./web/kiri/filter/FDM", function(err, files) {
|
||||||
filters_fdm = files || filters_fdm;
|
filters_fdm = files || filters_fdm;
|
||||||
});
|
});
|
||||||
|
|
@ -184,6 +180,32 @@ function concatCode(array) {
|
||||||
cachepath,
|
cachepath,
|
||||||
filepath;
|
filepath;
|
||||||
|
|
||||||
|
// in debug mode, the script should load dependent
|
||||||
|
// scripts instead of serving a complete bundle
|
||||||
|
if (debug) {
|
||||||
|
let code = [ `(function() { let load = [ `];
|
||||||
|
array.forEach(file => {
|
||||||
|
if (file.indexOf(".js") < 0) {
|
||||||
|
file = `/js/${file}.js`;
|
||||||
|
}
|
||||||
|
code.push(`"${file}",`);
|
||||||
|
});
|
||||||
|
code.push([
|
||||||
|
']; function load_next() {',
|
||||||
|
'let file = load.shift();',
|
||||||
|
'if (!file) return;',
|
||||||
|
'if (!self.document) { importScripts(file); return load_next() }',
|
||||||
|
'let s = document.createElement("script");',
|
||||||
|
's.type = "text/javascript";',
|
||||||
|
's.src = file;',
|
||||||
|
's.onload = load_next;',
|
||||||
|
'document.head.append(s);',
|
||||||
|
'}; load_next(); })();',
|
||||||
|
'self.debug=true;'
|
||||||
|
].join('\n'));
|
||||||
|
return code.join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
array.forEach((file, index) => {
|
array.forEach((file, index) => {
|
||||||
if (file.charAt(0) === "/" || file.indexOf("\\") > 0) {
|
if (file.charAt(0) === "/" || file.indexOf("\\") > 0) {
|
||||||
filepath = file;
|
filepath = file;
|
||||||
|
|
@ -202,6 +224,7 @@ function concatCode(array) {
|
||||||
});
|
});
|
||||||
code.push(cached);
|
code.push(cached);
|
||||||
});
|
});
|
||||||
|
|
||||||
return code.join('');
|
return code.join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -420,6 +443,16 @@ function addCorsHeaders(req, res) {
|
||||||
res.setHeader("Allow", "GET,POST,OPTIONS");
|
res.setHeader("Allow", "GET,POST,OPTIONS");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* in debug mode only, serve ANY file path beginning with / that exists
|
||||||
|
*/
|
||||||
|
function handleDebug(req, res, next) {
|
||||||
|
if (debug && lastmod(req.url)) {
|
||||||
|
return res.end(fs.readFileSync(req.url));
|
||||||
|
}
|
||||||
|
return next();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta:moto data storage and retrieval url
|
* meta:moto data storage and retrieval url
|
||||||
*
|
*
|
||||||
|
|
@ -543,6 +576,9 @@ function handleData(req, res, next) {
|
||||||
|
|
||||||
function minify(path) {
|
function minify(path) {
|
||||||
let code = fs.readFileSync(path);
|
let code = fs.readFileSync(path);
|
||||||
|
if (skip_minify.indexOf(path) >= 0) {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
let mini = uglify.minify(code.toString());
|
let mini = uglify.minify(code.toString());
|
||||||
if (mini.error) {
|
if (mini.error) {
|
||||||
console.trace(mini.error);
|
console.trace(mini.error);
|
||||||
|
|
@ -557,7 +593,7 @@ function minify(path) {
|
||||||
* @param {Function} next
|
* @param {Function} next
|
||||||
*/
|
*/
|
||||||
function handleJS(req, res, next) {
|
function handleJS(req, res, next) {
|
||||||
if (!(req.gs.local || debug || clearOK.indexOf(req.gs.path) >= 0)) {
|
if (!(req.gs.local || debug)) {
|
||||||
return reply404(req, res);
|
return reply404(req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -613,10 +649,11 @@ function handleJS(req, res, next) {
|
||||||
* @param {Object} req
|
* @param {Object} req
|
||||||
* @param {Object} res
|
* @param {Object} res
|
||||||
* @param {Function} next
|
* @param {Function} next
|
||||||
|
*
|
||||||
|
* expects paths in the format "/code/[token]/the/rest/is/ignored"
|
||||||
*/
|
*/
|
||||||
function handleCode(req, res, next) {
|
function handleCode(req, res, next) {
|
||||||
let cookie = getCookieValue(req.headers.cookie),
|
let key = req.gs.path.split('/')[2].split('.')[0],
|
||||||
key = req.gs.path.split('/')[2].split('.')[0],
|
|
||||||
ck = code_src[key],
|
ck = code_src[key],
|
||||||
js = code[key];
|
js = code[key];
|
||||||
|
|
||||||
|
|
@ -683,68 +720,6 @@ function serveCode(req, res, code) {
|
||||||
res.end(code.code);
|
res.end(code.code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Object} req
|
|
||||||
* @param {Object} res
|
|
||||||
* @param {Function} next
|
|
||||||
*/
|
|
||||||
function rewriteHTML(req, res, next) {
|
|
||||||
function sendHTML(entry) {
|
|
||||||
let imd = ifModifiedDate(req);
|
|
||||||
if (imd && entry.mtime <= imd) {
|
|
||||||
res.writeHead(304, "Not Modified");
|
|
||||||
res.end();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
res.writeHead(200, {
|
|
||||||
'Last-Modified': new Date(entry.mtime).toGMTString(),
|
|
||||||
'Cache-Control': 'public, max-age=600',
|
|
||||||
'Content-Type': 'text/html'
|
|
||||||
});
|
|
||||||
res.write(entry.data);
|
|
||||||
res.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (req.url.indexOf(".html") > 0) {
|
|
||||||
let local = req.gs.local,
|
|
||||||
key = local ? "local_" + req.url : req.url,
|
|
||||||
path = "web" + req.gs.path,
|
|
||||||
mtime = lastmod(path),
|
|
||||||
cached = fileCache[key],
|
|
||||||
replaced = false,
|
|
||||||
magic;
|
|
||||||
|
|
||||||
if (mtime === 0) return next();
|
|
||||||
if (cached && mtime === cached.mtime) return sendHTML(cached);
|
|
||||||
|
|
||||||
fs.readFile(path, (err, data) => {
|
|
||||||
if (!data) return next();
|
|
||||||
data = data.toString();
|
|
||||||
|
|
||||||
injectKeys.forEach(key => {
|
|
||||||
if (replaced) return;
|
|
||||||
magic = "<!--{"+key+"}-->";
|
|
||||||
if (data.indexOf(magic) > 0) {
|
|
||||||
data = data.replace(magic, inject[local ? key + "_local" : key]);
|
|
||||||
replaced = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (replaced) {
|
|
||||||
cached = fileCache[key] = {
|
|
||||||
data: data,
|
|
||||||
mtime: mtime
|
|
||||||
};
|
|
||||||
sendHTML(cached);
|
|
||||||
} else {
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* *********************************************
|
/* *********************************************
|
||||||
* Setup / Global
|
* Setup / Global
|
||||||
********************************************* */
|
********************************************* */
|
||||||
|
|
@ -791,13 +766,13 @@ let ver = require('../js/license.js'),
|
||||||
filters_laser = [],
|
filters_laser = [],
|
||||||
modPaths = [],
|
modPaths = [],
|
||||||
ipCache = {},
|
ipCache = {},
|
||||||
clearOK = [
|
skip_minify = [
|
||||||
'/js/ext-three.js'
|
"js/ext-three.js"
|
||||||
],
|
],
|
||||||
script = {
|
script = {
|
||||||
kiri : [
|
kiri : [
|
||||||
|
"ext-three",
|
||||||
"license",
|
"license",
|
||||||
// "ext-clip2",
|
|
||||||
"ext-tween",
|
"ext-tween",
|
||||||
"ext-fsave",
|
"ext-fsave",
|
||||||
"add-array",
|
"add-array",
|
||||||
|
|
@ -840,6 +815,7 @@ let ver = require('../js/license.js'),
|
||||||
"kiri-export"
|
"kiri-export"
|
||||||
],
|
],
|
||||||
meta : [
|
meta : [
|
||||||
|
"ext-three",
|
||||||
"license",
|
"license",
|
||||||
"ext-tween",
|
"ext-tween",
|
||||||
"ext-fsave",
|
"ext-fsave",
|
||||||
|
|
@ -856,8 +832,8 @@ let ver = require('../js/license.js'),
|
||||||
"meta"
|
"meta"
|
||||||
],
|
],
|
||||||
work : [
|
work : [
|
||||||
|
"ext-three",
|
||||||
"license",
|
"license",
|
||||||
"ext-n3d",
|
|
||||||
"ext-clip2",
|
"ext-clip2",
|
||||||
"add-array",
|
"add-array",
|
||||||
"add-three",
|
"add-three",
|
||||||
|
|
@ -870,7 +846,6 @@ let ver = require('../js/license.js'),
|
||||||
"geo-polygon",
|
"geo-polygon",
|
||||||
"geo-polygons",
|
"geo-polygons",
|
||||||
"geo-gyroid",
|
"geo-gyroid",
|
||||||
"kiri-lang",
|
|
||||||
"kiri-fill",
|
"kiri-fill",
|
||||||
"kiri-slice",
|
"kiri-slice",
|
||||||
"kiri-slicer",
|
"kiri-slicer",
|
||||||
|
|
@ -883,14 +858,11 @@ let ver = require('../js/license.js'),
|
||||||
"kiri-codec"
|
"kiri-codec"
|
||||||
],
|
],
|
||||||
worker : [
|
worker : [
|
||||||
"license",
|
|
||||||
"kiri-worker"
|
"kiri-worker"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
code_src = {},
|
code_src = {},
|
||||||
code = {},
|
code = {},
|
||||||
inject = {},
|
|
||||||
injectKeys = ["kiri", "meta"],
|
|
||||||
WS = require('ws'),
|
WS = require('ws'),
|
||||||
wss = new WS.Server({ noServer: true }),
|
wss = new WS.Server({ noServer: true }),
|
||||||
wss_roots = {},
|
wss_roots = {},
|
||||||
|
|
@ -1288,8 +1260,8 @@ handler.use(fullpath({
|
||||||
[ "/code/", handleCode ],
|
[ "/code/", handleCode ],
|
||||||
[ "/js/", handleJS ]
|
[ "/js/", handleJS ]
|
||||||
]))
|
]))
|
||||||
|
.use(handleDebug)
|
||||||
.use(fixedmap("/api/", api))
|
.use(fixedmap("/api/", api))
|
||||||
.use(rewriteHTML)
|
|
||||||
.use(compression)
|
.use(compression)
|
||||||
.use(handleStatic(currentDir + "/web/"))
|
.use(handleStatic(currentDir + "/web/"))
|
||||||
.listen(port)
|
.listen(port)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
"leveldown": "^5.5.1",
|
"leveldown": "^5.5.1",
|
||||||
"levelup": "^4.3.2",
|
"levelup": "^4.3.2",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"n3d-threejs": "^72.0.0",
|
|
||||||
"pixi.js": "^4.8.9",
|
"pixi.js": "^4.8.9",
|
||||||
"serve-static": "^1.14.1",
|
"serve-static": "^1.14.1",
|
||||||
"three": "^0.114.0",
|
"three": "^0.114.0",
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,12 @@
|
||||||
<link rel="apple-touch-icon" href="/kiri/favicon-mobile.png">
|
<link rel="apple-touch-icon" href="/kiri/favicon-mobile.png">
|
||||||
<link rel="stylesheet" type="text/css" href="/moto/style.css">
|
<link rel="stylesheet" type="text/css" href="/moto/style.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/kiri/style.css">
|
<link rel="stylesheet" type="text/css" href="/kiri/style.css">
|
||||||
<script src="/js/ext-three.js"></script>
|
<script src="/code/kiri.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
|
||||||
/* because TWEEN complains */
|
|
||||||
module = {};
|
|
||||||
</script>
|
|
||||||
<!--{kiri}-->
|
|
||||||
<!-- app title home page links -->
|
<!-- app title home page links -->
|
||||||
<div id="appid">
|
<div id="appid">
|
||||||
<span><a href="#" id="kiri">Kiri:Moto</a> by <a href="/" target="home">Grid.Space</a></span>
|
<span><a href="#" id="appname">Kiri:Moto</a> by <a href="/" target="home">Grid.Space</a></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- left control menu -->
|
<!-- left control menu -->
|
||||||
<div id="control-left" class="control"><div id="assets"></div></div>
|
<div id="control-left" class="control"><div id="assets"></div></div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue