1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

add HemisphereLight

This commit is contained in:
Kevin Levron 2021-03-07 16:17:18 +01:00
parent 57faa3a4b6
commit c476728322
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import { HemisphereLight } from 'three';
import Light from './Light.js';
import { bindProp } from '../tools.js';
export default {
extends: Light,
props: {
groundColor: { type: String, default: '#ffffff' },
},
created() {
this.light = new HemisphereLight(this.color, this.groundColor, this.intensity);
bindProp(this, 'groundColor', this.light);
this.initLight();
},
__hmrId: 'HemisphereLight',
};

View File

@ -1,5 +1,6 @@
export { default as AmbientLight } from './AmbientLight.js'; export { default as AmbientLight } from './AmbientLight.js';
export { default as DirectionalLight } from './DirectionalLight.js'; export { default as DirectionalLight } from './DirectionalLight.js';
export { default as HemisphereLight } from './HemisphereLight.js';
export { default as PointLight } from './PointLight.js'; export { default as PointLight } from './PointLight.js';
export { default as RectAreaLight } from './RectAreaLight.js'; export { default as RectAreaLight } from './RectAreaLight.js';
export { default as SpotLight } from './SpotLight.js'; export { default as SpotLight } from './SpotLight.js';

View File

@ -29,6 +29,7 @@ export const TroisJSVuePlugin = {
'AmbientLight', 'AmbientLight',
'DirectionalLight', 'DirectionalLight',
'HemisphereLight',
'PointLight', 'PointLight',
'RectAreaLight', 'RectAreaLight',
'SpotLight', 'SpotLight',