3D Lingo Dictionary > T-Z > textureRepeatList |
![]() ![]() ![]() |
textureRepeatList
Syntax
shaderReference.textureRepeatList[textureLayerIndex
] member(whichCastmember
).shader(whichShader
).textureRepeatList[textureLayerIndex
] member(whichCastmember
).shader[shaderListIndex
].textureRepeatList[textureLayerIndex
] member(whichCastmember
).model(whichModel
).shader.textureRepeatList[textureLayerIndex
] member(whichCastmember
).model(whichModel
).shaderList[shaderListIndex
]. textureRepeatList[textureLayerIndex
]
Description
3D standard shader property; allows you to get or set the texture clamping behavior of any texture layer. When TRUE
, the default, the texture in textureLayerIndex
can be tiled (repeated) several times across model surfaces. This can be accomplished by setting shaderReference.textureTransform[textureLayerIndex].scale
to be less than 1 in x or y. When this value is set to FALSE, the texture will apply to a smaller portion of model surfaces, rather than tile across those surfaces, when the shaderReference.textureTransform[textureLayerIndex].scale
is less than 1 in x or y. Think of it as shrinking the source image within the frame of the original image and filling in black around the gap. Similarly, if shaderReference.textureTransform[textureLayerIndex].scale
is set to be greater than 1 in x or y, the image will be cropped as the border of the texture is extended past the texture coordinate range.
Example
The following code will textureMap a sphere entirely with a granite texture repeated 4 times across the surface, and a logo image which covers just 1/4 of the surface.
m = member(2).model("mySphere") f = member(2).newTexture("granite", #fromCastmember, member("granite")) g = member(2).newTexture("logo", #fromCastmember, member("logo")) s = member(2).newShader("s", #standard) s.textureList[1] = g s.textureList[2] = f s.textureRepeatList[2] = false s.textureRepeatList[1] = true s.textureTransformList[1].scale(0.5,0.5,1.0) s.textureTransformList[2].scale(0.5,0.5,1.0) s.textureModeList[2] = #wrapPlanar s.blendFunctionList[2] = #add m.shaderList = s
![]() ![]() ![]() |