How to use the mage-engine.SunLight function in mage-engine

To help you get started, we’ve selected a few mage-engine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MageStudio / Mage-Studio / app / scene / EditorScene / App.js View on Github external
addSunLight() {
        const light = new SunLight(0xeeeeee, 1, { x: 1, y: 1, z: 1});
        light.position({
            x: (Math.random() * 200) - 100,
            y: (Math.random() * 200) - 100,
            z: (Math.random() * 200) - 100
        });

        light.addHelper();
    }