---++!! !ParaEngine Extension %TOC{title="Contents:"}% %STARTINCLUDE% ---++ an extension library to all ParaEngine namespaces | *Title* | an extension library to all ParaEngine namespaces | | *Author(s)* | LiXizhi | | *Date* | 2006/11/12 | | *File* | script/ide/ParaEngineExtension.lua | ---+++ Description %T% __Sample Code__ <verbatim> NPL.load("(gl)script/ide/ParaEngineExtension.lua"); </verbatim> ---+++ Member Functions ---++++ !ParaScene.GetCharacter it first searches the global object, if not found, it will search the OPC list. always check if the object is valid() upon receive. __syntax__ <verbatim>function ParaScene.GetCharacter(charName)</verbatim> __parameters__ | *charName* | | ---++++ !ParaScene.CaptureSceneState capture the current scene state to be restored later on. e.g. local state = ParaScene.CaptureSceneState() -- change scene state and render ... ParaScene.RestoreSceneState(state); -- options: a table or nil. if nil, it will capture everything. * _return_ ____ : return the captured scene state __syntax__ <verbatim>function ParaScene.CaptureSceneState(options)</verbatim> __parameters__ | *options* | | | *return* | return the captured scene state | ---++++ !ParaScene.RestoreSceneState restore scene state __syntax__ <verbatim>function ParaScene.RestoreSceneState(state)</verbatim> __parameters__ | *state* | | ---++++ !ParaCamera.SetLookAtPos set the look at position of the camera. It uses an invisible avatar as the camera look at position. after calling this function, please call ParaCamera.SetEyePos(facing, height, angle) to change the camera eye position. __syntax__ <verbatim>function ParaCamera.SetLookAtPos(x, y, z)</verbatim> __parameters__ | *x* | | | *y* | | | *z* | | ---++++ !ParaCamera.GetEyePos it returns polar coordinate system. * _return_ __camobjDist__ :, LifeupAngle, CameraRotY __syntax__ <verbatim>function ParaCamera.GetEyePos()</verbatim> __parameters__ | *return* | , LifeupAngle, CameraRotY | ---++++ !ParaCamera.GetDummyObject create/get the dummy camera object for the camera look position. __syntax__ <verbatim>function ParaCamera.GetDummyObject()</verbatim> ---++++ !ParaCamera.SetEyePos set the camera eye position by camera object distance, life up angle and rotation around the y axis. One must call ParaCamera.SetLookAtPos() before calling this function. e.g.ParaCamera.SetEyePos(5, 1.3, 0.4); __syntax__ <verbatim>function ParaCamera.SetEyePos(camobjDist, LifeupAngle, CameraRotY)</verbatim> __parameters__ | *camobjDist* | | | *LifeupAngle* | | | *CameraRotY* | | ---++++ !ParaAsset.ClearTextureCache clear all cached textures. __syntax__ <verbatim>function ParaAsset.ClearTextureCache()</verbatim> ---++++ !ParaAsset.SyncRemoteTexture [[ This function is only used internally. It is called automatically when the ParaEngine Core detects that a texture is a remote texture. * _note_ ____ : One shall never call this function explicitly. In scripting interface, we can call ParaAsset.LoadRemoteTexture() instead Load a texture from remote file. It first checks if the file is available from the local texture cache, if yes, it will immediately use the local copy, before refreshing from the network. In either case, a thread is used to synchronize with the remote server. The only exception is that the filename contains a CRC32 parameter, where the remote sync is skipped if CRC match. ]] __syntax__ <verbatim>function ParaAsset.SyncRemoteTexture(FileUrl)</verbatim> __parameters__ | *FileUrl* | | ---++++ !ParaAsset.LoadRemoteTexture [[ Load a remote texture explicitly. This function differs from the original ParaAsset.LoadTexture() that it allows you to specify a loadingtexture to display while the texture is being downloaded. * _param_ __filename__ : http texture note3: crc32 code can be appended to file name, so that the same file does not need to be downloaded multiple times if local and server version match. such as "http://www.paraengine.com/images/index_12.png?CRC32=0". * _param_ __loadingtexture__ : while filename is being downloaded, this texture will be used. * _return_ ____ : texture is returned. ]] __syntax__ <verbatim>function ParaAsset.LoadRemoteTexture(filename, loadingtexture)</verbatim> __parameters__ | *filename* | http texture note3: crc32 code can be appended to file name, so that the same file does not need to be downloaded multiple times if local and server version match. such as "http://www.paraengine.com/images/index_12.png?CRC32=0". | | *loadingtexture* | | | *return* | texture is returned. ]] | %STOPINCLUDE%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2008-02-29
-
LiXizhi
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback