All Projects → fairygui → FairyGUI-threejs

fairygui / FairyGUI-threejs

Licence: MIT license
A GUI Editor & framework for Three.js

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to FairyGUI-threejs

three-musketeers
A simple module to introspect, debug and test any THREE.js application.
Stars: ✭ 30 (-73.91%)
Mutual labels:  threejs, three-js
TweetMigration
A WebGL heatmap of global Twitter activity
Stars: ✭ 42 (-63.48%)
Mutual labels:  threejs, three-js
ng-three-examples
three.js examples in Angular 2
Stars: ✭ 24 (-79.13%)
Mutual labels:  threejs, three-js
lvr
👓 Augmented Reality for everyone - Out of the world experiences
Stars: ✭ 92 (-20%)
Mutual labels:  threejs, three-js
Manim.three.js
A web compatible html5 canvas based mathematical rendering engine like the manim by 3b1b
Stars: ✭ 14 (-87.83%)
Mutual labels:  threejs, three-js
three-csg-ts
CSG library for use with THREE.js
Stars: ✭ 312 (+171.3%)
Mutual labels:  threejs, three-js
three-js-fundamentals-r3f
Examples from the Three.js Fundamentals website recreated in react-three-fiber renderer.
Stars: ✭ 84 (-26.96%)
Mutual labels:  threejs, three-js
Patches
Patches is a visual programming editor for building WebVR and WebGL experiences.
Stars: ✭ 164 (+42.61%)
Mutual labels:  threejs, three-js
EduSmart
It utilizes 3D, Augmented reality to give real-life simulations or feels of various models and make the learning process more impactful and fascinating. With an interactive live feature, students can ask the teacher their doubts instantly and also discuss.
Stars: ✭ 23 (-80%)
Mutual labels:  threejs, three-js
revit-family-web-viewer
Revit Web Viewer is a Three.js-based project viewer. Revit projects / families must be exported using RvtVa3cExporter (https://github.com/va3c/RvtVa3c)
Stars: ✭ 48 (-58.26%)
Mutual labels:  threejs, three-js
three-kt-wrapper
Kotlin wrappers for Three.js
Stars: ✭ 46 (-60%)
Mutual labels:  threejs, three-js
gamedex
👾 The code for my game dev + computer graphics experiments on YouTube.
Stars: ✭ 165 (+43.48%)
Mutual labels:  threejs, three-js
Pipes
💿 Classic 3D Pipes screensaver remake (web-based)
Stars: ✭ 176 (+53.04%)
Mutual labels:  threejs, three-js
generative-art
🌈🎨 Generative Art is the idea realized as genetic code of artificial events, as construction of dynamic complex systems able to generate endless variations. This is also a nuxt-module (@luxdamore/nuxt-canvas-sketch) - [three.js, tensorflow.js and gsap are not included].
Stars: ✭ 41 (-64.35%)
Mutual labels:  threejs, three-js
Threejs Sandbox
Set of experiments and extensions to THREE.js.
Stars: ✭ 163 (+41.74%)
Mutual labels:  threejs, three-js
threejs
Tutorials on Three.js, an open source javascript library for 3D graphics on the web.
Stars: ✭ 30 (-73.91%)
Mutual labels:  threejs, threejs-example
Three Csgmesh
Conversion of a CSG library for use with modern THREE.js
Stars: ✭ 101 (-12.17%)
Mutual labels:  threejs, three-js
Three Ui
UI solution for Three.js
Stars: ✭ 149 (+29.57%)
Mutual labels:  threejs, three-js
THREE.InfiniteGridHelper
Infinite anti-aliased grid.
Stars: ✭ 101 (-12.17%)
Mutual labels:  threejs, three-js
react-with-threejs-example
An example project integrating React with three.js
Stars: ✭ 27 (-76.52%)
Mutual labels:  threejs, three-js

FairyGUI-three

A GUI Editor&framework for Three.js

Official website: www.fairygui.com

Usage

Step 1, we use the editor to create the UI.

Step 2, we only need a little code to display it.

import * as fgui from "fairygui-three";

var renderer;
var scene;
var view;

init();
animate();

function init() {
    //THREE initialization code here

    fgui.Stage.init(renderer, { screenMode:'horizontal' });  //screenMode is optional if you dont want to rotate the screen 
    fgui.Stage.scene = scene;

    fgui.UIPackage.loadPackage('path/to/UI').then(()=> {
        view = fgui.UIPackage.CreateObject('Basics', 'Main');
        view.makeFullScreen();
        fgui.GRoot.inst.addChild(view);
    });
}

function animate() {

    requestAnimationFrame( animate );

    fgui.Stage.update();
    renderer.render(scene, fgui.Stage.camera);
}

You should see this

In the example above, an UI is created and displayed by an orthographic camera (fgui.Stage.camera) . It's easy to display UI by an specific perspective camera.

import * as fgui from "fairygui-three";

var renderer;
var scene;
var camera;
var view;

init();
animate();

function init() {
    //THREE initialization code here

    camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.01, 10 );
	camera.position.z = 1;

    fgui.Stage.init(renderer);
    fgui.Stage.scene = scene;

    fgui.UIPackage.loadPackage('path/to/UI').then(()=> {
        view = fgui.UIPackage.CreateObject('3DInventory', 'Main');
        view.displayObject.camera = camera;
        view.displayObject.setLayer(0);

        let container = new Group();
        container.scale.set(0.5, 0.5, 0.5);
        container.add(view.obj3D);
        scene.add(container);
    });
}

function animate() {

    requestAnimationFrame( animate );

    fgui.Stage.update();
    renderer.render(scene, camera);
}

You should see this

If a perspective camera is using for all UI,

    Stage.init(renderer, { defaultLayer:0 });
    Stage.camera = yourCamera;

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].