Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: set rotation directly #25151

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/jsm/loaders/ColladaLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Color,
DirectionalLight,
DoubleSide,
Euler,
FileLoader,
Float32BufferAttribute,
FrontSide,
Expand Down Expand Up @@ -4095,7 +4094,7 @@ class ColladaLoader extends Loader {
if ( asset.upAxis === 'Z_UP' ) {

console.warn( 'THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289.' );
scene.quaternion.setFromEuler( new Euler( - Math.PI / 2, 0, 0 ) );
scene.rotation.set( - Math.PI / 2, 0, 0 );

}

Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/loaders/GCodeLoader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
BufferGeometry,
Euler,
FileLoader,
Float32BufferAttribute,
Group,
Expand Down Expand Up @@ -251,7 +250,7 @@ class GCodeLoader extends Loader {

}

object.quaternion.setFromEuler( new Euler( - Math.PI / 2, 0, 0 ) );
object.rotation.set( - Math.PI / 2, 0, 0 );

return object;

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_loader_3mf_materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
const loader = new ThreeMFLoader( manager );
loader.load( './models/3mf/truck.3mf', function ( object ) {

object.quaternion.setFromEuler( new THREE.Euler( - Math.PI / 2, 0, 0 ) ); // z-up conversion
object.rotation.set( - Math.PI / 2, 0, 0 ); // z-up conversion

object.traverse( function ( child ) {

Expand Down