Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79
oZone3D.Net - Demoniak3D Developer Guide




GeeXLab
Current version: 0.45.1
>GeeXLab homepage

FurMark
Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage


Blogs
>JeGX's HackLab

Geeks3D's Articles
>GPU Memory Speed Demystified

>Multi-Threading Programming Resources

>GeForce and Radeon OpenCL Overview

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

TessMark
Current version: 0.3.0
>TessMark homepage

ShaderToyMark
Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Download
>Libraries and Plugins
>Demos
>Online Help - Reference Guide
>Codes Samples
 
oZone3D.Net - Demoniak3D Developer Guide


» Back To Index

The <script> node

Function

The script node makes it possible to load an external script within the main XML script. This external script can be written in various languages. But currently, only scripting based on the LUA scripting language is supported. Please refer to the Demoniak3D/LUA API section for more information on the available functionalities.

LUA scripts loaded this way are autonomous and can have several operating modes (run_mode).
<script
	name=""
	filename=""
	active="TRUE"
	run_mode="EXECUTE_EACH_FRAME" 
	run_in_new_thread="FALSE" />
	
	<raw_data>
		<![CDATA[
		
		]]>
	</raw_data>
</script>

script element

script is the xml tag that defines a script node.

Attributes:
  • name - [STR127] - name of the node. This name will make it possible to refer this node throughout the XML script.

  • filename - [STR255] - location of the file of script relative to thw XML script.

  • active - [BOOLEAN] - enables (TRUE) or disables (FALSE) the script execution.

  • run_mode - [ENUM] - specifies the working mode of the script:
    • INIT: scripts before this run mode are executed once t the end of the scene tree compilation process. It is redommended to create only one script of this kind per scene. This type of script cannot be started in a new OS thread.
    • EXECUTE_ONCE: theses scripts are run once before rendering the first frame and can be started in a new OS thread.
    • EXECUTE_EACH_FRAME: the script is run at each frame (synchronous). This kind of script cannot be started in a new OS thread. It is useful for animations - valeur par défaut
    • ASYNCHRONOUS: the script is run in an asynchronous manner. It can be started, for example, by a hotkey. This type of script can be started in a new OS thread.


  • run_in_new_thread - [BOOLEAN] - allows to run a script in an OS thread different from the main thread of Hyperion. Use with full knowledge of the facts!
  • group - [STR127] - name of the group in which to add the current node. A group makes it possible to control the behavior of several objects in a single way.

raw_data element

raw_data allows to integrate the source code of a script directly in the XML code without requiring an external file.
Example
<script name="updateScene" run_mode="EXECUTE_EACH_FRAME" >
	<raw_data><![CDATA[	 
	x, y, z = HYP_GetCameraPosition("Main_Camera");
	HYP_SetShaderProgram_Constant_3f("waterShader", "view_position", x, y, z );
	t = HYP_GetElapsedTime()*0.001;
	HYP_SetShaderProgram_Constant_1f("waterShader", "time_0_X", t );
   	]]></raw_data>
</script> 


GeeXLab demos


GLSL - Mesh exploder


PhysX 3 cloth demo


Normal visualizer with GS


Compute Shaders test on Radeon


Raymarching in GLSL



Misc
>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0019879341125488 seconds.