You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/src/Add-on/DrawSky.ts

23 lines
559 B

import { ShaderMaterial } from 'three';
import { app } from '../ApplicationServices/Application';
import { IsDev } from '../Common/Deving';
import { Command } from '../Editor/CommandMachine';
import { Sky } from './Sky';
export class DrawSky implements Command
{
async exec()
{
if (!IsDev()) return;
let sky = new Sky();
app.Viewer.Scene.add(sky);
sky.scale.setScalar(50);
sky.rotateY(Math.PI);
let mat = sky.material as ShaderMaterial;
mat.uniforms.sub;
window["sky"] = sky;
}
}