
What is an "horizon"?
It's a virtual box having a landscape inside. It can be used in Croquet to make your space more beatiful.
It doesn't need to be "realistic":
How to use an "horizont" in your space?
We are presenting here, at this lesson, 17 "horizons" created by a famous digital artist from UK, our dear friend "Scented Nectar" (a nick name, of course...). I hope that, in the future, many other artists will create other "horizons" for the use of the "croqueteers".
An "horizon" has 5 .JPG files that you need to download. By example:
After this you need to create a folder: C:\Croquet\Content\horizon1 - or equivalent for your system - and download this .ASE file in it:
You need to create for it a subfolder: Textures, and copy to it the .JPG files downloaded but changing their names to: lt.jpg, ft.jpg, rt.jpg, bk.jpg and up.jpg
Create a new Class: Horizon1, like ever
TGroup subclass: #Horizon1 instanceVariableNames: 'inControl tframe ' classVariableNames: '' poolDictionaries: '' category: 'MyCroquet'.
It needs to have the usual "3 basic methods".
And the "initialize" method, that will be:
initialize
super initialize.
tframe := (TLoad3DSMax new initializeWithFileName:
(FileDirectory pathFrom:
{FileDirectory default pathName. 'Content'. 'horizon1'. 'horizon70.ase'})
scale: 0.1 shadeAngle: 90.1 textureMode: GLReplace) frame.
tframe collapse.
tframe boundsDepth: 3.
tframe initBounds.
self addChild: tframe.
tframe objectOwner: self.
inControl := false.
Why is not the name of the folder, the same of that of the file?
Why is not the name of the folder, the same of that of the file?
OK. OK. I will not do it again...
You don't need to use any other method.
The method of the Private Class can be:
initializeDefaultSpace | space base hZ | "Create a new space" space := TSpace new. "Make a light" self makeLight: space. base:=BasePlate70x3x70 new. space addChild:base. hZ:=Horizon1 new. space addChild:hZ. hZ translationX: 0 y: 0 z: 0. ^space.
In the "real life" you will have some 3D windows and Portals in the space. The access to 3D windows having projects and Portals to other spaces is the reason of Croquet to exist, like you learned at the "Basic Tutorial for Beginners. Croquet is not a game engine...
Here you can see, and download, itens of the "Scented Nectar collection" (Thanks, dear SN! Don't smoke too much...):
If you like, you can download all the collection ziped (6Mb):
PREVIOUS LESSON NEXT LESSON T. CONTENTS HOMEPAGE
