TWidget


Croquet-Teapot

Comment:

TWidget is primarily used to load meshes that may be used as frames in TButtons. It sets up a number of properties such as initial materials and texture modes.

Hierarchy:

ProtoObject
Object
TObject
TFrame
TWidget

Summary:

methods:

instance class
no messages
instance creation

Detail:

instance methods:

class methods:

instance creation
createNewWithUrl: url fileName: fName scale: scl


	| tframe |
	tframe _ (CroquetData loadURL: url reuseExisting: false).
	tframe ifNil:[
		tframe _ (TLoad3DSMax new initializeWithFileName: 
			(FileDirectory pathFrom: fName) scale: scl) frame.
		tframe boundsDepth: 1.
		tframe initBounds.
		TExporter export: tframe asBinary:url.
		tframe do:[ :tf |
			tf isMesh ifTrue:[ tf materialList do:[ :ml |
				ml ambientColor: #(0.2 0.5 1.0 0.8) asFloatArray.
				ml diffuseColor:#(0.2 0.5 1.0 0.8) asFloatArray.
				ml textureMode: GLModulate.
				].
			tf checkAlpha.
			].
		].
	].
	^ tframe.

^top


- made by Dandelion -