|
@@ -2,37 +2,7 @@
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author mrdoob / http://mrdoob.com/
|
|
*/
|
|
*/
|
|
|
|
|
|
-import {
|
|
|
|
- AmbientLight,
|
|
|
|
- BoxBufferGeometry,
|
|
|
|
- CatmullRomCurve3,
|
|
|
|
- CircleBufferGeometry,
|
|
|
|
- CylinderBufferGeometry,
|
|
|
|
- DirectionalLight,
|
|
|
|
- DodecahedronBufferGeometry,
|
|
|
|
- DoubleSide,
|
|
|
|
- HemisphereLight,
|
|
|
|
- IcosahedronBufferGeometry,
|
|
|
|
- LatheBufferGeometry,
|
|
|
|
- Mesh,
|
|
|
|
- MeshStandardMaterial,
|
|
|
|
- OctahedronBufferGeometry,
|
|
|
|
- OrthographicCamera,
|
|
|
|
- PerspectiveCamera,
|
|
|
|
- PlaneBufferGeometry,
|
|
|
|
- PointLight,
|
|
|
|
- RingBufferGeometry,
|
|
|
|
- SphereBufferGeometry,
|
|
|
|
- Sprite,
|
|
|
|
- SpriteMaterial,
|
|
|
|
- SpotLight,
|
|
|
|
- TetrahedronBufferGeometry,
|
|
|
|
- TorusBufferGeometry,
|
|
|
|
- TorusKnotBufferGeometry,
|
|
|
|
- TubeBufferGeometry,
|
|
|
|
- Vector2,
|
|
|
|
- Vector3
|
|
|
|
-} from '../../build/three.module.js';
|
|
|
|
|
|
+import * as THREE from '../../build/three.module.js';
|
|
|
|
|
|
import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
|
|
import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
|
|
|
|
|
|
@@ -80,8 +50,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/box' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/box' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new BoxBufferGeometry( 1, 1, 1, 1, 1, 1 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.BoxBufferGeometry( 1, 1, 1, 1, 1, 1 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Box';
|
|
mesh.name = 'Box';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -96,8 +66,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/circle' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/circle' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new CircleBufferGeometry( 1, 8, 0, Math.PI * 2 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.CircleBufferGeometry( 1, 8, 0, Math.PI * 2 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Circle';
|
|
mesh.name = 'Circle';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -112,8 +82,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/cylinder' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/cylinder' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new CylinderBufferGeometry( 1, 1, 1, 8, 1, false, 0, Math.PI * 2 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.CylinderBufferGeometry( 1, 1, 1, 8, 1, false, 0, Math.PI * 2 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Cylinder';
|
|
mesh.name = 'Cylinder';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -128,8 +98,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/dodecahedron' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/dodecahedron' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new DodecahedronBufferGeometry( 1, 0 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.DodecahedronBufferGeometry( 1, 0 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Dodecahedron';
|
|
mesh.name = 'Dodecahedron';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -144,8 +114,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/icosahedron' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/icosahedron' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new IcosahedronBufferGeometry( 1, 0 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.IcosahedronBufferGeometry( 1, 0 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Icosahedron';
|
|
mesh.name = 'Icosahedron';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -161,21 +131,21 @@ var MenubarAdd = function ( editor ) {
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
var points = [
|
|
var points = [
|
|
- new Vector2( 0, 0 ),
|
|
|
|
- new Vector2( 0.4, 0 ),
|
|
|
|
- new Vector2( 0.35, 0.05 ),
|
|
|
|
- new Vector2( 0.1, 0.075 ),
|
|
|
|
- new Vector2( 0.08, 0.1 ),
|
|
|
|
- new Vector2( 0.08, 0.4 ),
|
|
|
|
- new Vector2( 0.1, 0.42 ),
|
|
|
|
- new Vector2( 0.14, 0.48 ),
|
|
|
|
- new Vector2( 0.2, 0.5 ),
|
|
|
|
- new Vector2( 0.25, 0.54 ),
|
|
|
|
- new Vector2( 0.3, 1.2 )
|
|
|
|
|
|
+ new THREE.Vector2( 0, 0 ),
|
|
|
|
+ new THREE.Vector2( 0.4, 0 ),
|
|
|
|
+ new THREE.Vector2( 0.35, 0.05 ),
|
|
|
|
+ new THREE.Vector2( 0.1, 0.075 ),
|
|
|
|
+ new THREE.Vector2( 0.08, 0.1 ),
|
|
|
|
+ new THREE.Vector2( 0.08, 0.4 ),
|
|
|
|
+ new THREE.Vector2( 0.1, 0.42 ),
|
|
|
|
+ new THREE.Vector2( 0.14, 0.48 ),
|
|
|
|
+ new THREE.Vector2( 0.2, 0.5 ),
|
|
|
|
+ new THREE.Vector2( 0.25, 0.54 ),
|
|
|
|
+ new THREE.Vector2( 0.3, 1.2 )
|
|
];
|
|
];
|
|
|
|
|
|
- var geometry = new LatheBufferGeometry( points, 12, 0, Math.PI * 2 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial( { side: DoubleSide } ) );
|
|
|
|
|
|
+ var geometry = new THREE.LatheBufferGeometry( points, 12, 0, Math.PI * 2 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial( { side: THREE.DoubleSide } ) );
|
|
mesh.name = 'Lathe';
|
|
mesh.name = 'Lathe';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -190,8 +160,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/octahedron' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/octahedron' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new OctahedronBufferGeometry( 1, 0 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.OctahedronBufferGeometry( 1, 0 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Octahedron';
|
|
mesh.name = 'Octahedron';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -206,9 +176,9 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/plane' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/plane' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new PlaneBufferGeometry( 1, 1, 1, 1 );
|
|
|
|
- var material = new MeshStandardMaterial();
|
|
|
|
- var mesh = new Mesh( geometry, material );
|
|
|
|
|
|
+ var geometry = new THREE.PlaneBufferGeometry( 1, 1, 1, 1 );
|
|
|
|
+ var material = new THREE.MeshStandardMaterial();
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, material );
|
|
mesh.name = 'Plane';
|
|
mesh.name = 'Plane';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -223,8 +193,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/ring' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/ring' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new RingBufferGeometry( 0.5, 1, 8, 1, 0, Math.PI * 2 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.RingBufferGeometry( 0.5, 1, 8, 1, 0, Math.PI * 2 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Ring';
|
|
mesh.name = 'Ring';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -239,8 +209,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/sphere' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/sphere' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new SphereBufferGeometry( 1, 8, 6, 0, Math.PI * 2, 0, Math.PI );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.SphereBufferGeometry( 1, 8, 6, 0, Math.PI * 2, 0, Math.PI );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Sphere';
|
|
mesh.name = 'Sphere';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -255,7 +225,7 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/sprite' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/sprite' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var sprite = new Sprite( new SpriteMaterial() );
|
|
|
|
|
|
+ var sprite = new THREE.Sprite( new THREE.SpriteMaterial() );
|
|
sprite.name = 'Sprite';
|
|
sprite.name = 'Sprite';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, sprite ) );
|
|
editor.execute( new AddObjectCommand( editor, sprite ) );
|
|
@@ -270,8 +240,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/tetrahedron' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/tetrahedron' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new TetrahedronBufferGeometry( 1, 0 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.TetrahedronBufferGeometry( 1, 0 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Tetrahedron';
|
|
mesh.name = 'Tetrahedron';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -286,8 +256,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/torus' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/torus' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new TorusBufferGeometry( 1, 0.4, 8, 6, Math.PI * 2 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.TorusBufferGeometry( 1, 0.4, 8, 6, Math.PI * 2 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Torus';
|
|
mesh.name = 'Torus';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -302,8 +272,8 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/torusknot' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/torusknot' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var geometry = new TorusKnotBufferGeometry( 1, 0.4, 64, 8, 2, 3 );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.TorusKnotBufferGeometry( 1, 0.4, 64, 8, 2, 3 );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'TorusKnot';
|
|
mesh.name = 'TorusKnot';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -318,15 +288,15 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/tube' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/tube' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var path = new CatmullRomCurve3( [
|
|
|
|
- new Vector3( 2, 2, - 2 ),
|
|
|
|
- new Vector3( 2, - 2, - 0.6666666666666667 ),
|
|
|
|
- new Vector3( - 2, - 2, 0.6666666666666667 ),
|
|
|
|
- new Vector3( - 2, 2, 2 )
|
|
|
|
|
|
+ var path = new THREE.CatmullRomCurve3( [
|
|
|
|
+ new THREE.Vector3( 2, 2, - 2 ),
|
|
|
|
+ new THREE.Vector3( 2, - 2, - 0.6666666666666667 ),
|
|
|
|
+ new THREE.Vector3( - 2, - 2, 0.6666666666666667 ),
|
|
|
|
+ new THREE.Vector3( - 2, 2, 2 )
|
|
] );
|
|
] );
|
|
|
|
|
|
- var geometry = new TubeBufferGeometry( path, 64, 1, 8, false );
|
|
|
|
- var mesh = new Mesh( geometry, new MeshStandardMaterial() );
|
|
|
|
|
|
+ var geometry = new THREE.TubeBufferGeometry( path, 64, 1, 8, false );
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
|
|
mesh.name = 'Tube';
|
|
mesh.name = 'Tube';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
editor.execute( new AddObjectCommand( editor, mesh ) );
|
|
@@ -350,10 +320,10 @@ var MenubarAdd = function ( editor ) {
|
|
var fitLid = false;
|
|
var fitLid = false;
|
|
var blinnScale = true;
|
|
var blinnScale = true;
|
|
|
|
|
|
- var material = new MeshStandardMaterial();
|
|
|
|
|
|
+ var material = new THREE.MeshStandardMaterial();
|
|
|
|
|
|
var geometry = new TeapotBufferGeometry( size, segments, bottom, lid, body, fitLid, blinnScale );
|
|
var geometry = new TeapotBufferGeometry( size, segments, bottom, lid, body, fitLid, blinnScale );
|
|
- var mesh = new Mesh( geometry, material );
|
|
|
|
|
|
+ var mesh = new THREE.Mesh( geometry, material );
|
|
mesh.name = 'Teapot';
|
|
mesh.name = 'Teapot';
|
|
|
|
|
|
editor.addObject( mesh );
|
|
editor.addObject( mesh );
|
|
@@ -376,7 +346,7 @@ var MenubarAdd = function ( editor ) {
|
|
|
|
|
|
var color = 0x222222;
|
|
var color = 0x222222;
|
|
|
|
|
|
- var light = new AmbientLight( color );
|
|
|
|
|
|
+ var light = new THREE.AmbientLight( color );
|
|
light.name = 'AmbientLight';
|
|
light.name = 'AmbientLight';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, light ) );
|
|
editor.execute( new AddObjectCommand( editor, light ) );
|
|
@@ -394,7 +364,7 @@ var MenubarAdd = function ( editor ) {
|
|
var color = 0xffffff;
|
|
var color = 0xffffff;
|
|
var intensity = 1;
|
|
var intensity = 1;
|
|
|
|
|
|
- var light = new DirectionalLight( color, intensity );
|
|
|
|
|
|
+ var light = new THREE.DirectionalLight( color, intensity );
|
|
light.name = 'DirectionalLight';
|
|
light.name = 'DirectionalLight';
|
|
light.target.name = 'DirectionalLight Target';
|
|
light.target.name = 'DirectionalLight Target';
|
|
|
|
|
|
@@ -416,7 +386,7 @@ var MenubarAdd = function ( editor ) {
|
|
var groundColor = 0xffaa00;
|
|
var groundColor = 0xffaa00;
|
|
var intensity = 1;
|
|
var intensity = 1;
|
|
|
|
|
|
- var light = new HemisphereLight( skyColor, groundColor, intensity );
|
|
|
|
|
|
+ var light = new THREE.HemisphereLight( skyColor, groundColor, intensity );
|
|
light.name = 'HemisphereLight';
|
|
light.name = 'HemisphereLight';
|
|
|
|
|
|
light.position.set( 0, 10, 0 );
|
|
light.position.set( 0, 10, 0 );
|
|
@@ -437,7 +407,7 @@ var MenubarAdd = function ( editor ) {
|
|
var intensity = 1;
|
|
var intensity = 1;
|
|
var distance = 0;
|
|
var distance = 0;
|
|
|
|
|
|
- var light = new PointLight( color, intensity, distance );
|
|
|
|
|
|
+ var light = new THREE.PointLight( color, intensity, distance );
|
|
light.name = 'PointLight';
|
|
light.name = 'PointLight';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, light ) );
|
|
editor.execute( new AddObjectCommand( editor, light ) );
|
|
@@ -458,7 +428,7 @@ var MenubarAdd = function ( editor ) {
|
|
var angle = Math.PI * 0.1;
|
|
var angle = Math.PI * 0.1;
|
|
var penumbra = 0;
|
|
var penumbra = 0;
|
|
|
|
|
|
- var light = new SpotLight( color, intensity, distance, angle, penumbra );
|
|
|
|
|
|
+ var light = new THREE.SpotLight( color, intensity, distance, angle, penumbra );
|
|
light.name = 'SpotLight';
|
|
light.name = 'SpotLight';
|
|
light.target.name = 'SpotLight Target';
|
|
light.target.name = 'SpotLight Target';
|
|
|
|
|
|
@@ -480,7 +450,7 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/orthographiccamera' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/orthographiccamera' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var camera = new OrthographicCamera();
|
|
|
|
|
|
+ var camera = new THREE.OrthographicCamera();
|
|
camera.name = 'OrthographicCamera';
|
|
camera.name = 'OrthographicCamera';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, camera ) );
|
|
editor.execute( new AddObjectCommand( editor, camera ) );
|
|
@@ -495,7 +465,7 @@ var MenubarAdd = function ( editor ) {
|
|
option.setTextContent( strings.getKey( 'menubar/add/perspectivecamera' ) );
|
|
option.setTextContent( strings.getKey( 'menubar/add/perspectivecamera' ) );
|
|
option.onClick( function () {
|
|
option.onClick( function () {
|
|
|
|
|
|
- var camera = new PerspectiveCamera();
|
|
|
|
|
|
+ var camera = new THREE.PerspectiveCamera();
|
|
camera.name = 'PerspectiveCamera';
|
|
camera.name = 'PerspectiveCamera';
|
|
|
|
|
|
editor.execute( new AddObjectCommand( editor, camera ) );
|
|
editor.execute( new AddObjectCommand( editor, camera ) );
|