Skip to content

Commit

Permalink
Deploying to gh-pages from @ feb0d8f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Nov 24, 2023
1 parent 10dfa15 commit 61509a1
Show file tree
Hide file tree
Showing 170 changed files with 91,233 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test/js
test/mocha.js
/webgl-lint.js
dist
examples/3rdParty
out
examples/**/*.js
109 changes: 109 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/* global module */

module.exports = {
parser: '@typescript-eslint/parser',
env: {
es2022: true,
browser: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
root: true,

plugins: [
'@typescript-eslint',
'eslint-plugin-html',
'eslint-plugin-optional-comma-spacing',
'eslint-plugin-require-trailing-comma',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
rules: {
'brace-style': [2, '1tbs', { allowSingleLine: false }],
camelcase: [0],
'comma-dangle': 0,
'comma-spacing': 0,
'comma-style': [2, 'last'],
'consistent-return': 2,
curly: [2, 'all'],
'dot-notation': 0,
'eol-last': [0],
eqeqeq: 2,
'global-strict': [0],
'key-spacing': [0],
'keyword-spacing': [1, { before: true, after: true, overrides: {} }],
'new-cap': 2,
'new-parens': 2,
'no-alert': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-catch-shadow': 2,
'no-comma-dangle': [0],
'no-const-assign': 2,
'no-eval': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-parens': [2, 'functions'],
'no-implied-eval': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': 2,
'no-lone-blocks': 2,
'no-loop-func': 2,
'no-multi-spaces': [0],
'no-multi-str': 2,
'no-native-reassign': 2,
'no-new-func': 2,
'no-new-object': 2,
'no-new-wrappers': 2,
'no-new': 2,
'no-obj-calls': 2,
'no-octal-escape': 2,
'no-process-exit': 2,
'no-proto': 2,
'no-return-assign': 2,
'no-script-url': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-shadow': [0],
'no-spaced-func': 2,
'no-trailing-spaces': 2,
'no-undef-init': 2,
//'no-undef': 2, // ts recommends this be off: https://typescript-eslint.io/linting/troubleshooting
'no-underscore-dangle': 2,
'no-unreachable': 2,
'no-unused-expressions': 2,
'no-use-before-define': 0,
'no-var': 2,
'no-with': 2,
'one-var': ["error", "never"],
'optional-comma-spacing/optional-comma-spacing': [2, { after: true }],
'prefer-const': 2,
'require-trailing-comma/require-trailing-comma': [2],
'semi-spacing': [2, { before: false, after: true }],
semi: [2, 'always'],
'space-before-function-paren': [
2,
{
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
},
],
'space-infix-ops': 2,
'space-unary-ops': [2, { words: true, nonwords: false }],
strict: [2, 'function'],
yoda: [2, 'never'],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off', // TODO: Reenable this and figure out how to fix code.
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': 2,
},
};
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


*.pyc
.DS_Store
node_modules
out
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"cSpell.words": [
"Accum",
"elems",
"muigui",
"stepify",
"treeshake"
]
}
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
muigui.org
20 changes: 20 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2022 Gregg Tavares

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# muigui

# NOT READY for USE

<!---
<img src="./images/muigui.png" style="max-width: 640px">
A simple Web UI library.
muigui is a simple UI library in the spirit of
[dat.gui](https://github.com/dataarts/dat.gui) and/or [lil-gui](https://github.com/georgealways/).
## Usage
```js
import GUI from 'https://muigui.org/dist/0.x/muigui.module.js';
```
or
```html
<script src="https://muigui.org/dist/0.x/muigui.min.js"></script>
```
Then
```js
const s = {
someNumber: 123,
someString: "hello",
someOption: "dog",
someColor: '#ED3281',
someFunction: () => console.log('called')
};
const gui = new GUI();
gui.add(s, 'someNumber', 0, 200); // range 0 to 200
gui.add(s, 'someString);
gui.add(s, 'someOption, ['cat', 'bird', 'dog']);
gui.addColor(s, 'someColor');
gui.add(s, 'someFunction');
```
produces
<img src="./images/muigui-screenshot.png" style="max-width: 275px">
or a shorter version
```js
const s = {
someNumber: 123,
someString: "hello",
someOption: "dog",
someColor: '#ED3281',
someFunction: () => console.log('called')
};
const options = {
someNumber: [1, 200], // range 0 to 200
someOption: ['cat', 'bird', 'dog'],
}
const gui = new GUI();
gui.add(s, options);
```
## What
It is not a general purpose library for every type of GUI.
Rather, it is a small, easy to use library for small apps.
Basically I liked how simple it was to use dat.gui to add
a few sliders and options to a demo.
I thought I'd try to make a CSS/DOM based UI standard elements
only and then require CSS to style it and see how far I got.
### Not invented here syndrome
It's possible this already exists but if so I couldn't find it.
Most UI libraries seem to be giant and require a build step.
I wanted something hopefully not too big and something I could
easily add to any example with 1 file (or 2 if you add CSS).
## muigui - wat?
https://user-images.githubusercontent.com/234804/177000460-3449c2dd-da94-4119-903f-cc7460b46e7b.mp4
-->

## License

[MIT](https://github.com/greggman/muigui/blob/main/LICENSE.md)
Loading

0 comments on commit 61509a1

Please sign in to comment.