Skip to content

Commit d03de9c

Browse files
committed
Fix orbitControl example
1 parent 73ca383 commit d03de9c

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

src/data/examples/en/20_3D/07_orbit_control.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
* @arialabel Users can click on the screen and drag to move themselves around a 3D space. It consists of a white background with columns of purple cubes and green pyramids arched in curves.
44
* @description Orbit control allows you to drag and move around the world.
55
*/
6+
let cam;
67
function setup() {
78
createCanvas(710, 400, WEBGL);
9+
cam = createCamera();
10+
cam.setPosition(0, 0, 0);
811
}
912

1013
function draw() {
@@ -15,7 +18,6 @@ function draw() {
1518
orbitControl();
1619

1720
normalMaterial();
18-
translate(0, 0, -600);
1921
for (let i = 0; i <= 12; i++) {
2022
for (let j = 0; j <= 12; j++) {
2123
push();

src/data/examples/es/20_3D/07_orbit_control.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
* @name Control de órbita
33
* @description El control de órbita te permite arrastrar y mover alrededor del mundo.
44
*/
5+
let cam;
56
function setup() {
67
createCanvas(710, 400, WEBGL);
8+
cam = createCamera();
9+
cam.setPosition(0, 0, 0);
710
}
811

912
function draw() {
@@ -14,7 +17,6 @@ function draw() {
1417
orbitControl();
1518

1619
normalMaterial();
17-
translate(0, 0, -600);
1820
for (let i = 0; i <= 12; i++) {
1921
for (let j = 0; j <= 12; j++) {
2022
push();

src/data/examples/hi/20_3D/07_orbit_control.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
* @name कक्षा नियंत्रण
33
* @description कक्षा नियंत्रण आपको दुनिया भर में खींचने और स्थानांतरित करने की अनुमति देता है।
44
*/
5+
let cam;
56
function setup() {
67
createCanvas(710, 400, WEBGL);
8+
cam = createCamera();
9+
cam.setPosition(0, 0, 0);
710
}
811

912
function draw() {
@@ -14,7 +17,6 @@ function draw() {
1417
orbitControl();
1518

1619
normalMaterial();
17-
translate(0, 0, -600);
1820
for (let i = 0; i <= 12; i++) {
1921
for (let j = 0; j <= 12; j++) {
2022
push();

src/data/examples/ko/20_3D/07_orbit_control.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
* @name 궤도 제어
33
* @description 궤도 제어(Orbit Control)를 사용해 월드를 드래그하거나 움직일 수 있습니다.
44
*/
5+
let cam;
56
function setup() {
67
createCanvas(710, 400, WEBGL);
8+
cam = createCamera();
9+
cam.setPosition(0, 0, 0);
710
}
811

912
function draw() {
@@ -14,7 +17,6 @@ function draw() {
1417
orbitControl();
1518

1619
normalMaterial();
17-
translate(0, 0, -600);
1820
for (let i = 0; i <= 12; i++) {
1921
for (let j = 0; j <= 12; j++) {
2022
push();

src/data/examples/zh-Hans/20_3D/07_orbit_control.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
* @name Orbit Control
33
* @description Orbit control allows you to drag and move around the world.
44
*/
5+
let cam;
56
function setup() {
67
createCanvas(710, 400, WEBGL);
8+
cam = createCamera();
9+
cam.setPosition(0, 0, 0);
710
}
811

912
function draw() {
@@ -14,7 +17,6 @@ function draw() {
1417
orbitControl();
1518

1619
normalMaterial();
17-
translate(0, 0, -600);
1820
for (let i = 0; i <= 12; i++) {
1921
for (let j = 0; j <= 12; j++) {
2022
push();

0 commit comments

Comments
 (0)