-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
src/textures: move to es6 classes #20009
src/textures: move to es6 classes #20009
Conversation
conflicts resolved |
There seem to be linter issues on this one. |
Thanks for fixing the linter errors. |
oops. |
this.encoding = encoding; | ||
this.offset = new Vector2( 0, 0 ); | ||
this.repeat = new Vector2( 1, 1 ); | ||
this.center = new Vector2( 0, 0 ); | ||
this.rotation = 0; | ||
|
||
this.version = 0; | ||
this.onUpdate = null; | ||
this.matrixAutoUpdate = true; | ||
this.matrix = new Matrix3(); | ||
|
||
} | ||
// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap. | ||
// | ||
// Also changing the encoding after already used by a Material will not automatically make the Material | ||
// update. You need to explicitly call Material.needsUpdate to trigger it to recompile. | ||
this.encoding = encoding; | ||
|
||
Texture.DEFAULT_IMAGE = undefined; | ||
Texture.DEFAULT_MAPPING = UVMapping; | ||
this.generateMipmaps = true; | ||
this.premultiplyAlpha = false; | ||
this.flipY = true; | ||
this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml) | ||
|
||
Texture.prototype = Object.assign( Object.create( EventDispatcher.prototype ), { | ||
// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap. | ||
// | ||
// Also changing the encoding after already used by a Material will not automatically make the Material | ||
// update. You need to explicitly call Material.needsUpdate to trigger it to recompile. | ||
this.encoding = encoding !== undefined ? encoding : LinearEncoding; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something change here...
// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap. | ||
// | ||
// Also changing the encoding after already used by a Material will not automatically make the Material | ||
// update. You need to explicitly call Material.needsUpdate to trigger it to recompile. | ||
this.encoding = encoding; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part seems to be duplicated.
Some minor things. I'll merge and clean that up. |
Thanks! |
thank you 👍 |
Looks like the class properties introduced in this PR broke all examples in Safari. |
No description provided.