home *** CD-ROM | disk | FTP | other *** search
- property poSkyBox, pMFront, pMBack, pMLeft, pMRight, pMUp, pMDown, pFrontOrientation, pBackOrientation, pLeftOrientation, pRightOrientation, pUpOrientation, pDownOrientation
- global w3d
-
- on beginSprite me
- me.createSkyBox()
- end
-
- on enterFrame me
- poSkyBox.update()
- end
-
- on createSkyBox me
- poSkyBox = script("[P] Skybox").new(w3d, "Skybox", 1)
- me.SetUpFace(#front)
- me.SetUpFace(#back)
- me.SetUpFace(#left)
- me.SetUpFace(#right)
- me.SetUpFace(#up)
- me.SetUpFace(#down)
- poSkyBox.SetSize(100000.0)
- poSkyBox.build()
- end
-
- on SetUpFace me, tFace
- tOrientation = me.GetOrientation(tFace)
- case tFace of
- #front:
- poSkyBox.SetFace(#front, pMFront, tOrientation)
- #back:
- poSkyBox.SetFace(#back, pMBack, tOrientation)
- #left:
- poSkyBox.SetFace(#left, pMLeft, tOrientation)
- #right:
- poSkyBox.SetFace(#right, pMRight, tOrientation)
- #up:
- poSkyBox.SetFace(#up, pMUp, tOrientation)
- #down:
- poSkyBox.SetFace(#down, pMDown, tOrientation)
- end case
- end
-
- on GetOrientation me, tFace
- case tFace of
- #front:
- tOrientation = pFrontOrientation
- #back:
- tOrientation = pBackOrientation
- #left:
- tOrientation = pLeftOrientation
- #right:
- tOrientation = pRightOrientation
- #up:
- tOrientation = pUpOrientation
- #down:
- tOrientation = pDownOrientation
- end case
- case tOrientation of
- "None":
- tNewOrientation = VOID
- "Flip horizontally":
- tNewOrientation = #fliphorizontal
- "Flip vertically":
- tNewOrientation = #flipvertical
- "Rotate clockwise 90 degrees":
- tNewOrientation = #rotatecw
- "Rotate counter-clockwise 90 degrees":
- tNewOrientation = #rotateccw
- "Rotate 180 degrees":
- tNewOrientation = [#fliphorizontal, #flipvertical]
- end case
- return tNewOrientation
- end
-
- on getPropertyDescriptionList me
- tlData = [:]
- tlMRange = []
- repeat with a = 1 to the number of castLibs
- repeat with b = 1 to the number of castMembers of castLib a
- if member(b, a).type = #bitmap then
- tlMRange.add(member(b, a))
- end if
- end repeat
- end repeat
- tMDefault = tlMRange[1]
- tlOrientations = ["None", "Flip horizontally", "Flip vertically", "Rotate clockwise 90 degrees", "Rotate counter-clockwise 90 degrees", "Rotate 180 degrees"]
- tCR = RETURN & "--------------------"
- tlData[#pMFront] = [#format: #member, #default: tMDefault, #range: tlMRange, #comment: "Choose FRONT image"]
- tlData[#pFrontOrientation] = [#format: #string, #default: "None", #range: tlOrientations, #comment: "Choose FRONT orientation" & tCR]
- tlData[#pMBack] = [#format: #member, #default: tMDefault, #range: tlMRange, #comment: "Choose BACK image"]
- tlData[#pBackOrientation] = [#format: #string, #default: "None", #range: tlOrientations, #comment: "Choose BACK orientation" & tCR]
- tlData[#pMLeft] = [#format: #member, #default: tMDefault, #range: tlMRange, #comment: "Choose LEFT image"]
- tlData[#pLeftOrientation] = [#format: #string, #default: "None", #range: tlOrientations, #comment: "Choose LEFT orientation" & tCR]
- tlData[#pMRight] = [#format: #member, #default: tMDefault, #range: tlMRange, #comment: "Choose RIGHT image"]
- tlData[#pRightOrientation] = [#format: #string, #default: "None", #range: tlOrientations, #comment: "Choose RIGHT orientation" & tCR]
- tlData[#pMUp] = [#format: #member, #default: tMDefault, #range: tlMRange, #comment: "Choose UP image"]
- tlData[#pUpOrientation] = [#format: #string, #default: "None", #range: tlOrientations, #comment: "Choose UP orientation" & tCR]
- tlData[#pMDown] = [#format: #member, #default: tMDefault, #range: tlMRange, #comment: "Choose DOWN image"]
- tlData[#pDownOrientation] = [#format: #string, #default: "None", #range: tlOrientations, #comment: "Choose DOWN orientation" & tCR]
- tlData[#pFOVStart] = [#format: #float, #default: 75, 3: 0, #range: [#min: 1.0, #max: 160.0], #comment: "Choose start FIELD OF VIEW"]
- tlData[#pFOVMin] = [#format: #float, #default: 10.0, #range: [#min: 1.0, #max: 160.0], #comment: "Choose minimum FIELD OF VIEW"]
- tlData[#pFOVMax] = [#format: #float, #default: 160.0, #range: [#min: 1.0, #max: 160.0], #comment: "Choose maximum FIELD OF VIEW" & tCR]
- tlData[#pRotateSpeed] = [#format: #float, #default: 5.0, #range: [#min: 1.0, #max: 10.0], #comment: "Choose ROTATION SPEED (1.0 = slow, 10 = fast)"]
- tlData[#pZoomSpeed] = [#format: #float, #default: 3.0, #range: [#min: 1.0, #max: 10.0], #comment: "Choose ZOOM SPEED (1.0 = slow, 10 = fast)"]
- return tlData
- end
-