Математика |
scale (3D)Usagemember( Description3D property; allows you to get or set the scale value used by a specific overlay or backdrop in the referenced camera’s list of overlays or backdrops to display. The width and height of the backdrop or overlay are multiplied by the scale value.The default value for this property is 1.0. ExampleThis statement doubles the size of a backdrop: sprite(25).camera.backdrop[1].scale = 2.0
scale (command)Usagemember( Description3D transform command; applies a scaling after the current positional,
rotational, and scale offsets held by a referenced node’s transform or the
directly referenced transform. The scaling must be specified as either a set of
three scalings along the corresponding axes or as a single scaling to be applied
uniformly along all axes. You can specify the individual scalings using the
A node can be a camera, group, light or model object. Using the
The scaling values provided must be greater than zero. Parameters
ExampleThis example first displays the put member("Scene").model("Moon").transform.scale -- vector( 1.0000, 1.0000, 1.0000) member("Scene").model("Moon").scale(2.0,1.0,0.5) put member("Scene").model("Moon").transform.scale -- vector( 2.0000, 1.0000, 0.5000) This statement scales the model named Pluto uniformly along all three axes by
member("Scene").model("Pluto").scale(0.5) This statement scales the model named Oval in a nonuniform manner, scaling it along its z-axis but not its x- or y-axes. member("Scene").model("Pluto").scale(0.0, 0.0, 0.5) preScale()Usage
Description3D transform command; applies a scale prior to the existing positional, rotational, and scaling effects of the given transform.
Parameters
ExampleLine 1 of the following Lingo creates a duplicate of Moon1’s transform. Remember that access to a model’s transform property is by reference. Line 2 applies a scale to that transform prior to any existing
positional or rotational effects of that transform. Assume that the transform
represents the positional offset and rotational orbit of Moon1 relative to its
parent planet. Lets also assume Moon2’s parent is the same as Moon1’s. If we
used Line 3 applies an additional 180° rotation about the x-axis of
the planet. This will put Moon2 on the opposite side of Moon1’s orbit. Using
Line 4 assigns this new transform to Moon2. t = member("scene").model("Moon1").transform.duplicate() t.preScale(2,2,2) t.rotate(180,0,0) member("scene").model("Moon2").transform = t
scale (transform)Usagemember( Description3D property; allows you to get or set the scaling component of a transform. A
transform defines a scale, position and rotation within a given frame of
reference. The A node can be a camera, group, light or model object. This command does not
have any visual effect on lights or cameras as they do not contain geometry.
Setting the ExampleThis statement sets the member("Scene").model("Moon").transform.scale = vector(2,5,3) scale (backdrop and overlay)Usagemember( Description3D property; allows you to get or set the scale value used by a specific overlay or backdrop in the referenced camera’s list of overlays or backdrops to display. The width and height of the backdrop or overlay are multiplied by the scale value.The default value for this property is 1.0. ExampleThis statement doubles the size of a backdrop: sprite(25).camera.backdrop[1].scale = 2.0 scale (Member)Usage-- Lingo syntax DescriptionCast member property and sprite property; controls the scaling of a QuickTime, vector shape, or Flash movie sprite. For QuickTime, this property does not scale the sprite’s bounding rectangle or the sprite’s controller. Instead, it scales the image around the image’s center point within the bounding rectangle. The scaling is specified as a Director list containing two percentages stored as float-point values: [ The When the sprite’s This property can be tested and set. The default value is [1.0000,1.0000]. For Flash movie or vector shape cast members, the scale is a floating-point
value. The movie is scaled from its origin point, as specified by its
Note: This property must be set to the default value if the scaleMode property is set to #autoSize; otherwise the sprite does not display correctly. ExampleThis handler accepts a reference to a Flash movie sprite as a parameter, reduces the movie’s scale to 0% (so it disappears), and then scales it up again in 5% increments until it is full size (100%) again: -- Lingo syntax on scaleMovie whichSprite sprite(whichSprite).scale = 0 _movie.updatestage() repeat with i = 1 to 20 sprite(whichSprite).scale = i * 5 _movie.updatestage() end repeat end // JavaScript syntax function scaleMovie(whichSprite) { sprite(whichSprite).scale = 0; _movie.updatestage(); var i = 1; while (i < 21) { sprite(whichSprite).scale = i * 5; _movie.updatestage(); i++; } } scaleModeUsage-- Lingo syntax DescriptionCast member property and sprite property; controls the way a Flash movie or
vector shape is scaled within a sprite’s bounding rectangle. When you scale a
Flash movie sprite by setting its
This property can be tested and set. ExampleThe following sprite script checks the Stage color of the Director movie and,
if the Stage color is indexed to position 0 in the current palette, the script
sets the -- Lingo syntax property spriteNum on beginsprite me if _movie.stage.bgColor = 0 then sprite(spriteNum).scaleMode = #showAll else sprite(spriteNum).scaleMode = #noBorder end if end // JavaScript syntax function beginsprite() { var stgClr = _movie.stage.bgColor; if (stgClr = 0) { sprite(this.spriteNum).scaleMode = symbol("showAll"); } else { sprite(this.spriteNum).scaleMode = symbol("noBorder"); } }
|