|
@@ -53,6 +53,18 @@ class CSS3DSprite extends CSS3DObject {
|
|
|
|
|
|
super( element );
|
|
|
|
|
|
+ this.rotation2D = 0;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ copy( source, recursive ) {
|
|
|
+
|
|
|
+ super.copy( source, recursive );
|
|
|
+
|
|
|
+ this.rotation2D = source.rotation2D;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -62,6 +74,7 @@ CSS3DSprite.prototype.isCSS3DSprite = true;
|
|
|
//
|
|
|
|
|
|
const _matrix = new Matrix4();
|
|
|
+const _matrix2 = new Matrix4();
|
|
|
|
|
|
class CSS3DRenderer {
|
|
|
|
|
@@ -226,6 +239,9 @@ class CSS3DRenderer {
|
|
|
|
|
|
_matrix.copy( camera.matrixWorldInverse );
|
|
|
_matrix.transpose();
|
|
|
+
|
|
|
+ if ( object.rotation2D !== 0 ) _matrix.multiply( _matrix2.makeRotationZ( object.rotation2D ) );
|
|
|
+
|
|
|
_matrix.copyPosition( object.matrixWorld );
|
|
|
_matrix.scale( object.scale );
|
|
|
|