Skip to content

Commit

Permalink
lui v2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
L3P3 committed Jul 12, 2024
1 parent 1bd5041 commit 2da2077
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="shortcut icon" href=assets/logo.svg>
</head>
<body>
<script type=module src=https://cdn.jsdelivr.net/gh/L3P3/lui@1/lui.dev.js></script>
<script type=module src=https://cdn.jsdelivr.net/gh/L3P3/lui@2/lui.dev.js></script>
<script type=module src=src/app.js></script>
<script>
window.ASSETS = 'assets/';
Expand Down
2 changes: 1 addition & 1 deletion app-prod.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="shortcut icon" href=assets/logo.svg>
</head>
<body>
<script defer src=https://cdn.jsdelivr.net/gh/L3P3/lui@1/lui.dev.js></script>
<script defer src=https://cdn.jsdelivr.net/gh/L3P3/lui@2/lui.dev.js></script>
<script defer src=dist/app-de.js></script>
<script>
window.ASSETS = 'assets/';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minicraft",
"version": "0.10.0",
"version": "0.10.1",
"description": "voxel-based 3d game, written in javascript",
"homepage": "https://l3p3.de/minicraft",
"repository": {
Expand Down
9 changes: 6 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
hook_assert,
hook_dom,
hook_effect,
hook_model,
hook_static,
Expand Down Expand Up @@ -107,17 +108,19 @@ lui_.init(() => {
}
}, [flag_touch]);

return [{
hook_dom('', {
onkeydown: handler_key,
onkeyup: handler_key,
oncontextmenu: handler_noop,
ondragstart: handler_noop,
}, [
});

return [
node(App, {
account: state.account,
actions,
config: state.config,
ref,
}),
]];
];
});
2 changes: 1 addition & 1 deletion src/externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ lui.hook_sub = function(getter, deps){}
lui.hook_transition = function(target, msecs){}

/**
@param {function():Array!} root
@param {TYPE_COMPONENT} root
@return {void}
*/
lui.init = function(root){}
Expand Down

0 comments on commit 2da2077

Please sign in to comment.