Scaler (of Code)

class Scaler

Defined in Scaler.sc.

Scaler lets you scale down the size of a view as it recedes into the distance.

It is generally used as part of a setScale call on a Prop or one of its subclasses:

(send gEgo:setScale(Scaler frontSize backSize frontY backY))

Subclasses: ScaleTo.

Properties

Inherited from Code:

Property Description
name  

Defined in Scaler:

Property Description
client  
frontY  
backY  
frontSize  
backSize  
slopeNum  
slopeDen  
const  

Methods

init(theClient theFrontSize theBackSize theFrontY theBackY)
Parameters:
  • theClient (heapPtr) – The object on which to apply the Scaler.
  • theFrontSize (number) – The scale of the object (in percentage) when it’s at theFrontY.
  • theBackSize (number) – The scale of the object (in percentage) when it’s at theBackY.
  • theFrontY (number) – The largest (closest) y coordinate for the Scaler.
  • theBackY (number) – The smallest (furthest) y coordinate for the Scaler.
doit()