-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 43455ec 🚀
- Loading branch information
Showing
22 changed files
with
1,280 additions
and
1,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export default class Button extends Controller { | ||
constructor(object: any, property: any, options?: {}); | ||
name(name: any): void; | ||
setOptions(options: any): void; | ||
name(name: any): this; | ||
setOptions(options: any): this; | ||
#private; | ||
} | ||
import Controller from './Controller.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export default class Canvas extends LabelController { | ||
constructor(name: any); | ||
get canvas(): HTMLElement; | ||
listen(): this; | ||
#private; | ||
} | ||
import LabelController from './LabelController.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import GUI from '../../dist/0.x/muigui.module.js'; | ||
//import {GUI} from '../../src/muigui.js'; | ||
|
||
const gui = new GUI(); | ||
|
||
function addFolder(gui, name) { | ||
const f = gui.addFolder(name); | ||
for (let i = 0; i < 50; ++i) { | ||
f.addButton(i.toString(), () => {}); | ||
} | ||
} | ||
|
||
const degToRad = deg => deg * Math.PI / 180; | ||
|
||
const settings = { | ||
translation: new Float32Array([0, 0, 0]), | ||
rotation: new Float32Array([0, 0, 0]), | ||
scale: new Float32Array([1, 1, 1]), | ||
baseRotation: degToRad(-45), | ||
}; | ||
|
||
const radToDegOptions = { min: -180, max: 180, step: 1, converters: GUI.converters.radToDeg }; | ||
const cameraRadToDegOptions = { min: -180, max: 180, step: 1, converters: GUI.converters.radToDeg }; | ||
|
||
gui.add(settings, 'baseRotation', cameraRadToDegOptions); | ||
/*const nodeLabel =*/ gui.addLabel('node:'); | ||
const trsFolder = gui.addFolder('orientation'); | ||
trsFolder.add(settings.translation, '0', -50, 50, 1).name('translation x'); | ||
trsFolder.add(settings.translation, '1', -50, 50, 1).name('translation y'); | ||
trsFolder.add(settings.translation, '2', -50, 50, 1).name('translation z'); | ||
trsFolder.add(settings.rotation, '0', radToDegOptions).name('rotation x'); | ||
trsFolder.add(settings.rotation, '1', radToDegOptions).name('rotation y'); | ||
trsFolder.add(settings.rotation, '2', radToDegOptions).name('rotation z'); | ||
trsFolder.add(settings.scale, '0', 0.001, 2).name('scale x'); | ||
trsFolder.add(settings.scale, '1', 0.001, 2).name('scale y'); | ||
trsFolder.add(settings.scale, '2', 0.001, 2).name('scale z'); | ||
|
||
addFolder(gui, 'one'); | ||
addFolder(gui, 'two'); | ||
addFolder(gui, 'three'); |
Oops, something went wrong.