Add node controller
This commit is contained in:
59
types/aton.d.ts
vendored
Normal file
59
types/aton.d.ts
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
declare global {
|
||||
const THREE: typeof import('three');
|
||||
}
|
||||
|
||||
declare namespace ATON {
|
||||
function realize(): void;
|
||||
function setPathCollection(path: string): void;
|
||||
function setMainLightDirection(v: THREE.Vector3): void;
|
||||
function getMainLightDirection(): THREE.Vector3;
|
||||
function toggleShadows(enabled: boolean): void;
|
||||
function setExposure(value: number): void;
|
||||
function setMainPanorama(path: string): void;
|
||||
function setAutoLP(enabled: boolean): void;
|
||||
function enableClipPlanes(): void;
|
||||
function disableClipPlanes(): void;
|
||||
function addClipPlane(normal: THREE.Vector3, point: THREE.Vector3): THREE.Plane;
|
||||
function createSceneNode(id: string): SceneNode;
|
||||
function getSceneNode(id: string): SceneNode;
|
||||
function getRootScene(): THREE.Object3D;
|
||||
|
||||
interface SceneNode {
|
||||
load(path: string): SceneNode;
|
||||
setRotation(x: number, y: number, z: number): SceneNode;
|
||||
setMaterial(material: THREE.Material): SceneNode;
|
||||
attachToRoot(): SceneNode;
|
||||
toggle(visible: boolean): SceneNode;
|
||||
getBound(): THREE.Sphere;
|
||||
add(object: THREE.Object3D): void;
|
||||
remove(object: THREE.Object3D): void;
|
||||
}
|
||||
|
||||
namespace Nav {
|
||||
let _camera: THREE.Camera;
|
||||
function setUserControl(enabled: boolean): void;
|
||||
function requestPOVbyNode(n: ATON.SceneNode, duration: number): void;
|
||||
}
|
||||
|
||||
namespace UI {
|
||||
let elSidePanel: HTMLElement;
|
||||
function init(): void;
|
||||
function addBasicEvents(): void;
|
||||
function setSidePanelLeft(): void;
|
||||
function setSidePanelRight(): void;
|
||||
function showSidePanel(options: { header: string }): void;
|
||||
function createSlider(options: {
|
||||
range: [number, number];
|
||||
label: string;
|
||||
value: number | string;
|
||||
oninput: (val: string) => void;
|
||||
}): HTMLElement;
|
||||
}
|
||||
|
||||
namespace FX {
|
||||
const PASS_AO: number;
|
||||
function togglePass(pass: number, enabled: boolean): void;
|
||||
}
|
||||
|
||||
let _renderer: THREE.WebGLRenderer;
|
||||
}
|
||||
Reference in New Issue
Block a user