Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf889c70

Browse files
committed
moved camera.lookAt func call out of animate loop for better fps
1 parent1155d1b commitf889c70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎pyscriptjs/examples/webgl/raycaster/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
uSpeed =0.1
159159

160160
time =0.0003;
161+
camera.lookAt(scene.position)
161162

162163
whileTrue:
163164
time =performance.now()*0.0003;
@@ -186,7 +187,6 @@
186187
modularGruop.rotation.y-=((mouse.x*4)+modularGruop.rotation.y)*uSpeed;
187188
modularGruop.rotation.x-=((-mouse.y*4)+modularGruop.rotation.x)*uSpeed;
188189

189-
camera.lookAt(scene.position)
190190
renderer.render(scene,camera)
191191
awaitasyncio.sleep(0.02)
192192

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp