≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
sprite sheet
Posted by:
(you are not logged in)
Enter the missing letter in: "Internationa?"
(you are not logged in)
Text:
[quote][b][/b] wrote: Robo, there nothing to sell, in "before first drawing do something" execute js: [code] function shader(x,y,x1,y1){ ccbSetSceneNodeProperty(ccbGetCurrentNode(),"Visible",true); var vertexShader = "float4x4 mWorldViewProj; \n" + "float4x4 mInvWorld; \n" + "float4x4 mTransWorld; \n" + "struct VS_OUTPUT \n" + "{ \n" + " float4 Position : POSITION; \n" + " float4 Diffuse : COLOR0; \n" + " float2 TexCoord : TEXCOORD0; \n" + "}; \n" + "VS_OUTPUT main ( in float4 vPosition : POSITION, \n" + " in float3 vNormal : NORMAL, \n" + " float2 texCoord : TEXCOORD0 ) \n" + "{ \n" + " VS_OUTPUT Output; \n" + " Output.Position = mul(vPosition, mWorldViewProj); \n" + " Output.Diffuse = float4(1.0, 1.0, 1.0, 1.0); \n" + " Output.TexCoord = texCoord; \n" + " return Output; \n" + "} "; var fragmentShader = "struct PS_OUTPUT \n" + "{ \n" + " float4 RGBColor : COLOR0; \n" + "}; \n" + "sampler2D tex0; \n" + "PS_OUTPUT main( float2 TexCoord : TEXCOORD0, \n" + " float4 Position : POSITION, \n" + " float4 Diffuse : COLOR0 ) \n" + "{ \n" + " PS_OUTPUT Output; \n" + " TexCoord.y = (TexCoord.y+"+y1+")/"+y+"; \n"+ " TexCoord.x = (TexCoord.x+"+x1+")/"+x+"; \n"+ " float4 col = tex2D( tex0, TexCoord); \n" + " Output.RGBColor = Diffuse * col; \n" + " Output.RGBColor *= 1.0; \n" + " return Output; \n" + "}"; var newMaterial = ccbCreateMaterial(vertexShader, fragmentShader, 0, null); ccbSetSceneNodeMaterialProperty(ccbGetCurrentNode(), 0, "Type", newMaterial); } [/code] and call shader(x_length,y_length,x_frame,y_frame) inside of "every few seconds do something" (x_frame and y_frame is yor frame so you can call this part of image in any way you want)[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact