chore: migrate examples from orbit-camera script to ESM CameraControls - #9234
Draft
kpal81xd wants to merge 1 commit into
Draft
chore: migrate examples from orbit-camera script to ESM CameraControls#9234kpal81xd wants to merge 1 commit into
kpal81xd wants to merge 1 commit into
Conversation
Build size reportThis PR does not change the size of the minified bundles.
|
kpal81xd
force-pushed
the
chore/examples-camera-controls
branch
from
August 27, 2026 13:33
788d033 to
7c49e0d
Compare
Contributor
|
Make sure those are manually tested, at least the paint and editor - both gaussian splatting examples, those were bit more tricky. |
kpal81xd
force-pushed
the
chore/examples-camera-controls
branch
from
August 27, 2026 13:38
7c49e0d to
4982561
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates the remaining 79 examples from the legacy UMD
orbit-camera.jsscript to the ESMCameraControlsscript (playcanvas/scripts/esm/camera-controls.mjs).Standard swap =
orbitCamera+...InputMouse/Touchreplaced by a singleCameraControls(enableFly: false);distanceMin/distanceMax→zoomRange,pitchAngle*→pitchRange,focusEntity/lookAt→focusPoint. Framing corrected =CameraControlshas noframeOnStartauto-fit, so the camera position + focus point were set explicitly to reproduce the original view.Each example was rendered headlessly (WebGL2) and compared side-by-side against its original orbit-camera version.
compute/indirect-dispatchcompute/particlesorbitCamera.focusEntity=s1→cameraControls.focusPoint=s1.getPosition()compute/vertex-updategaussian-splatting/simplereset(yaw,pitch,distance)→ computed camera position around pivotgaussian-splatting/simple-glbreset(yaw,pitch,distance)→ computed camera position around pivotgaussian-splatting/simple-on-demandreset(yaw,pitch,distance)→ computed camera position around pivotgaussian-splatting/simple-spzreset(yaw,pitch,distance)→ computed camera position around pivotgaussian-splatting/spherical-harmonicsreset(yaw,pitch,distance)→ computed camera position around pivotgaussian-splatting/multi-splatreset(yaw,pitch,distance)→ computed camera position around pivotgaussian-splatting/multi-viewgaussian-splatting/shadowsgaussian-splatting/xr-viewsgaussian-splatting/flipbooklookAtgaussian-splatting/viewerframeOnStartdropped, focusPoint = computed model centregaussian-splatting/global-sortingresetAndLookAtPoint(pos,target)→reset(target,pos)gaussian-splatting/shadow-softresetAndLookAtPoint→resetgaussian-splatting/pickingresetAndLookAtPoint→reset; ortho toggle left intactgaussian-splatting-legacy/pickingresetAndLookAtPoint→reset; ortho toggle left intactgaussian-splatting/paintresetAndLookAtPoint→reset; RMB-paint input gate viacameraControls.enabledgaussian-splatting/editorresetAndLookAtPoint→reset; gizmo input gate viacameraControls.enabledgaussian-splatting/cropreset()azimuth advance)gaussian-splatting/revealgaussian-splatting/shader-effectsgaussian-splatting/shader-dissolvegaussian-splatting/shader-ringsreset(yaw,pitch,dist)→ computed posegaussian-splatting/glass-refractiongaussian-splatting/procedural-meshresetgraphics/clustered-area-lightsgraphics/clustered-light-cookiesgraphics/clustered-lightinglookAtgraphics/clustered-spot-shadowsgraphics/dithered-transparencygraphics/instancing-glbgraphics/light-physical-unitszoomRangefrom distanceMin/Maxgraphics/lights-baked-a-ographics/particles-snowgraphics/reflection-boxcubemap-rendererscript left intactgraphics/render-to-texturegraphics/shadow-catcherlookAtgraphics/multi-viewgraphics/taaframeOnStartdropped, focusPoint = housegraphics/asset-viewerfocusEntityreassignment →focusPointgraphics/particles-meshorbitCamera.pivotPoint→focusPointgraphics/ambient-occlusionssaopost-effect script left intactgraphics/outlines-coloredgraphics/post-processinggraphics/depth-of-fieldgraphics/clustered-omni-shadowsgraphics/custom-compose-shadergraphics/lightsgraphics/lights-bakedgraphics/skygraphics/shadow-cascadesgraphics/shadow-softgraphics/volumetric-foggraphics/volumetric-fog-local-lightsmaterials/anisotropy-lampyaw/distance→ computed camera positionmaterials/normals-and-tangentsyaw/distance→ computed camera positionmaterials/transmission-roughnessyaw/distance→ computed camera positionmaterials/dispersionzoomRangefrom distanceMaxmaterials/lit-materialzoomRangefrom distanceMin/Maxmaterials/anisotropy-discmaterials/anisotropy-rotationmaterials/anisotropy-strengthmaterials/clear-coatshaders/shader-material-shadowsshaders/texture-arrayshaders/shader-hatchshaders/ground-fogtest/opacityzoomRangefrom distanceMin/Maxtest/texture-ktx2-cubemaptest/xr-viewstest/taa-alphatest/global-shader-propertiestest/primitive-modeyaw/distance→ computed camera positiontest/contact-hardening-shadowsoccluder+ first-frame distance viaresettest/speculartest/attenuationyaw/distance→ computed camera positionuser-interface/world-uiChecklist