ChangeTexture Plugin - DMS2 - Aug 99 - by Sébastien DENEUX ------------------------ this module allow to change dynamically the texture of a material - locally on a client only - globaly and persistently on all clients you specify objects in the anchors or in the links (you cannot specify more than one object in an anchor) Optional parameter(s) : - texturesList : list of textures - loop : if textureLists loops (default value is 0) - maxTextureFileSize : maximum size in bytes of the textures that can be uploaded on the server (default value = 20480 bytes) - timeoutUploadingFile : maximum time in seconds to upload a texture file on the server (default value = 120 seconds) - transitionType : type of transition beetween textures (nothing by default, you can put random, alpha, slide) - param0 : if transitionType = random -> size of the bloc for transition beetween textures (value must be beetween 2 and 8, default value is 8) else nothing - transitionLength : length of the transition animation (by default 2000 ms) - keepDynamicChanges : to apply the last texture and the last position in colors list when restarting the server (default value = 0) if you change the textures list and then restart the server, keepDynamicChanges will have no effect if the texture file does not exist on server or is not in a valid format, keepDynamicChanges will have no effect as well - iniPos : to apply this texture at startup (when keepDynamicChanges=0 or when keepDynamicChanges=1 and no texture has changed) (position in list begins at 0) - wSize : width of the bitmap (default value = 128) - hSize : heigth of the bitmap (default value = 128) Note : if the bitmap is smaller or bigger, it will automatically be stretched Example : texturesList logo.bmp logo1.bmp pub2.bmp pub3.jpg pub4.jpg iniPos 0 loop 1 maxTextureFileSize 30720 timeoutUploadingFile 120 transitionType random wSize 64 hSize 64 1) Local actions on local client only : the following actions are defined only if texturesList exists for nextTexture and prevTexture, the action depends of the state of the loop parameter - setRandom : apply a random texture between the textures of the texturesList - nextTexture : apply the next texture of the list - prevTexture : apply the previous texture of the list - setTexturePosInTexturesList : set the texture in the texturesList at the position specified in the parameter of the action (texturesList begins at pos 0) 2) Global actions on all clients : - setRandomS : apply a random texture (between the textures of the texturesList) the following actions are defined only if texturesList exists for nextTextureS and prevTextureS, the action depends of the state of the loop parameter - nextTextureS : apply the next texture of the list - prevTextureS : apply the previous texture of the list - setTexturePosInTexturesListS : set the texture in the texturesList at the position specified in the parameter of the action (texturesList begins at pos 0) - showChgTextureInterfaceS : this opens a window on the client allowing him to choose a texture. The texture choosen by the client will be automatically uploaded on the server and then downloaded on all clients. If the texture is not valid (invalid format, size > maxTextureFileSize, if timeout has occured (>timeoutUploadingFile), or if another client is already uploading a texture file on the server for the same instance of the plugin, a dialog box is displayed on the client to inform him. Events : (instName).beginList (instName).endList (instName).beginListS (instName).endListS