提交 0779f7e7 编写于 作者: A alteredq

Editor: added handling of AmbientLight.

上级 fb451cb4
......@@ -3,6 +3,7 @@ Sidebar.Object3D = function ( signals ) {
var objects = {
'PerspectiveCamera': THREE.PerspectiveCamera,
'AmbientLight': THREE.AmbientLight,
'PointLight': THREE.PointLight,
'DirectionalLight': THREE.DirectionalLight,
'Mesh': THREE.Mesh,
......
......@@ -3,6 +3,7 @@ Sidebar.Scene = function ( signals ) {
var objectTypes = {
'PerspectiveCamera': THREE.PerspectiveCamera,
'AmbientLight': THREE.AmbientLight,
'PointLight': THREE.PointLight,
'DirectionalLight': THREE.DirectionalLight,
'Mesh': THREE.Mesh,
......
......@@ -68,6 +68,8 @@ var Viewport = function ( signals ) {
var light3 = new THREE.PointLight( 0xffaa00, 0.75 );
light3.position.set( 0, -200, 0 );
var light4 = new THREE.AmbientLight( 0x111111 );
// fog
var oldFogType = "None";
......@@ -88,6 +90,8 @@ var Viewport = function ( signals ) {
light3.name = "Light 3";
light4.name = "Light 4";
// active objects
camera.properties.active = true;
......@@ -754,6 +758,7 @@ var Viewport = function ( signals ) {
signals.objectAdded.dispatch( light1 );
signals.objectAdded.dispatch( light2 );
signals.objectAdded.dispatch( light3 );
signals.objectAdded.dispatch( light4 );
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册