Skip to content

Commit

Permalink
transformRootInstance/filterRootInstance docs, see #366
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jul 24, 2024
1 parent c4c3183 commit 9805a61
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
4 changes: 3 additions & 1 deletion js/display/BackboneDrawable.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class BackboneDrawable extends Drawable {
*
* @param {Display} display
* @param {Instance} backboneInstance
* @param {Instance} transformRootInstance
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {number} renderer
* @param {boolean} isDisplayRoot
*/
Expand Down
16 changes: 12 additions & 4 deletions js/display/CanvasBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ class CanvasBlock extends FittedBlock {
*
* @param {Display} display
* @param {number} renderer - See Renderer.js for more information
* @param {Instance} transformRootInstance
* @param {Instance} filterRootInstance
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {Instance} filterRootInstance - All filters (visibility/opacity/filters) of this instance and its ancestors
* will already have been applied. This block will only be responsible for
* applying filters of this instance's descendants.
*/
constructor( display, renderer, transformRootInstance, filterRootInstance ) {
super();
Expand All @@ -35,8 +39,12 @@ class CanvasBlock extends FittedBlock {
*
* @param {Display} display
* @param {number} renderer
* @param {Instance} transformRootInstance
* @param {Instance} filterRootInstance
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {Instance} filterRootInstance - All filters (visibility/opacity/filters) of this instance and its ancestors
* will already have been applied. This block will only be responsible for
* applying filters of this instance's descendants.
*/
initialize( display, renderer, transformRootInstance, filterRootInstance ) {
super.initialize( display, renderer, transformRootInstance, FittedBlock.COMMON_ANCESTOR );
Expand Down
4 changes: 3 additions & 1 deletion js/display/FittedBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class FittedBlock extends Block {
*
* @param {Display} display
* @param {number} renderer
* @param {Instance} transformRootInstance
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {FittedBlock.Fit} preferredFit
* @returns {FittedBlock} - For chaining
*/
Expand Down
16 changes: 12 additions & 4 deletions js/display/SVGBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ class SVGBlock extends FittedBlock {
*
* @param {Display} display - the scenery Display this SVGBlock will appear in
* @param {number} renderer - the bitmask for the renderer, see Renderer.js
* @param {Instance} transformRootInstance - TODO: Documentation https://github.com/phetsims/scenery/issues/1581
* @param {Instance} filterRootInstance - TODO: Documentation
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {Instance} filterRootInstance - All filters (visibility/opacity/filters) of this instance and its ancestors
* will already have been applied. This block will only be responsible for
* applying filters of this instance's descendants.
*/
constructor( display, renderer, transformRootInstance, filterRootInstance ) {
super();
Expand All @@ -31,8 +35,12 @@ class SVGBlock extends FittedBlock {
*
* @param {Display} display - the scenery Display this SVGBlock will appear in
* @param {number} renderer - the bitmask for the renderer, see Renderer.js
* @param {Instance} transformRootInstance - TODO: Documentation https://github.com/phetsims/scenery/issues/1581
* @param {Instance} filterRootInstance - TODO: Documentation
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {Instance} filterRootInstance - All filters (visibility/opacity/filters) of this instance and its ancestors
* will already have been applied. This block will only be responsible for
* applying filters of this instance's descendants.
* @returns {FittedBlock}
*/
initialize( display, renderer, transformRootInstance, filterRootInstance ) {
Expand Down
16 changes: 12 additions & 4 deletions js/display/WebGLBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ class WebGLBlock extends FittedBlock {
*
* @param {Display} display
* @param {number} renderer
* @param {Instance} transformRootInstance
* @param {Instance} filterRootInstance
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {Instance} filterRootInstance - All filters (visibility/opacity/filters) of this instance and its ancestors
* will already have been applied. This block will only be responsible for
* applying filters of this instance's descendants.
*/
constructor( display, renderer, transformRootInstance, filterRootInstance ) {
super();
Expand All @@ -34,8 +38,12 @@ class WebGLBlock extends FittedBlock {
*
* @param {Display} display
* @param {number} renderer
* @param {Instance} transformRootInstance
* @param {Instance} filterRootInstance
* @param {Instance} transformRootInstance - All transforms of this instance and its ancestors will already have been
* applied. This block will only be responsible for applying transforms of
* this instance's descendants.
* @param {Instance} filterRootInstance - All filters (visibility/opacity/filters) of this instance and its ancestors
* will already have been applied. This block will only be responsible for
* applying filters of this instance's descendants.
* @returns {WebGLBlock} - For chaining
*/
initialize( display, renderer, transformRootInstance, filterRootInstance ) {
Expand Down

0 comments on commit 9805a61

Please sign in to comment.