1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > AfterImageNode - Three.js Docs</ title >
6+ < meta name ="viewport " content ="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0 ">
7+ < script src ="../scripts/highlight.min.js "> </ script >
8+ < link type ="text/css " rel ="stylesheet " href ="../styles/highlight-three.css ">
9+ < link type ="text/css " rel ="stylesheet " href ="../styles/page.css ">
10+ </ head >
11+ < body >
12+ < p class ="inheritance " translate ="no "> < a href ="EventDispatcher.html "> EventDispatcher</ a > → < a href ="Node.html "> Node</ a > → < a href ="TempNode.html "> TempNode</ a > → </ p >
13+ < h1 translate ="no "> AfterImageNode</ h1 >
14+ < section >
15+ < header >
16+ < div class ="class-description "> < p > Post processing node for creating an after image effect.</ p > </ div >
17+ </ header >
18+ < article >
19+ < h2 class ="subsection-title "> Import</ h2 >
20+ < p > < span translate ="no "> AfterImageNode</ span > is an addon, and must be imported explicitly, see < a href ="https://threejs.org/manual/#en/installation " target ="_blank "> Installation#Addons</ a > .</ p >
21+ < pre > < code class ="language-js "> import { afterImage } from 'three/addons/tsl/display/AfterImageNode.js';</ code > </ pre >
22+ < div class ="container-overview ">
23+ < h2 > Constructor</ h2 >
24+ < h3 class ="name name-method " id ="AfterImageNode " translate ="no "> new < a href ="#AfterImageNode "> AfterImageNode</ a > < span class ="signature "> ( textureNode : < span class ="param-type "> TextureNode</ span > , damp : < span class ="param-type "> Node.<float> </ span > )</ span > </ h3 >
25+ < div class ="method ">
26+ < div class ="description ">
27+ < p > Constructs a new after image node.</ p >
28+ </ div >
29+ < table class ="params ">
30+ < tbody >
31+ < tr >
32+ < td class ="name "> < code > textureNode</ code > </ td >
33+ < td class ="description last "> < p > The texture node that represents the input of the effect.</ p > </ td >
34+ </ tr >
35+ < tr >
36+ < td class ="name "> < code > damp</ code > </ td >
37+ < td class ="description last "> < p > The damping intensity. A higher value means a stronger after image effect.< br /> Default is < code > 0.96</ code > .</ p > </ td >
38+ </ tr >
39+ </ tbody >
40+ </ table >
41+ </ div >
42+ </ div >
43+ < h2 class ="subsection-title "> Properties</ h2 >
44+ < div class ="member ">
45+ < h3 class ="name " id ="damp " translate ="no "> .< a href ="#damp "> damp</ a > < span class ="type-signature "> : < a href ="Node.html "> Node</ a > .<float> </ span > </ h3 >
46+ < div class ="description ">
47+ < p > How quickly the after-image fades. A higher value means the after-image
48+ persists longer, while a lower value means it fades faster. Should be in
49+ the range < code > [0, 1]</ code > .</ p >
50+ </ div >
51+ </ div >
52+ < div class ="member ">
53+ < h3 class ="name " id ="textureNode " translate ="no "> .< a href ="#textureNode "> textureNode</ a > < span class ="type-signature "> : < a href ="TextureNode.html "> TextureNode</ a > </ span > </ h3 >
54+ < div class ="description ">
55+ < p > The texture node that represents the input of the effect.</ p >
56+ </ div >
57+ </ div >
58+ < div class ="member ">
59+ < h3 class ="name " id ="textureNodeOld " translate ="no "> .< a href ="#textureNodeOld "> textureNodeOld</ a > < span class ="type-signature "> : < a href ="TextureNode.html "> TextureNode</ a > </ span > </ h3 >
60+ < div class ="description ">
61+ < p > The texture represents the pervious frame.</ p >
62+ </ div >
63+ </ div >
64+ < div class ="member ">
65+ < h3 class ="name " id ="updateBeforeType " translate ="no "> .< a href ="#updateBeforeType "> updateBeforeType</ a > < span class ="type-signature "> : string</ span > </ h3 >
66+ < div class ="description ">
67+ < p > The < code > updateBeforeType</ code > is set to < code > NodeUpdateType.FRAME</ code > since the node renders
68+ its effect once per frame in < code > updateBefore()</ code > .< br /> Default is < code > 'frame'</ code > .</ p >
69+ </ div >
70+ < dl class ="details ">
71+ < dt class ="tag-overrides "> < strong > Overrides:</ strong > < a href ="TempNode.html#updateBeforeType "> TempNode#updateBeforeType</ a > </ dt >
72+ </ dl >
73+ </ div >
74+ < h2 class ="subsection-title "> Methods</ h2 >
75+ < h3 class ="name name-method " id ="dispose " translate ="no "> .< a href ="#dispose "> dispose</ a > < span class ="signature "> ()</ span > </ h3 >
76+ < div class ="method ">
77+ < div class ="description ">
78+ < p > Frees internal resources. This method should be called
79+ when the effect is no longer required.</ p >
80+ </ div >
81+ < dl class ="details ">
82+ < dt class ="tag-overrides "> < strong > Overrides:</ strong > < a href ="TempNode.html#dispose "> TempNode#dispose</ a > </ dt >
83+ </ dl >
84+ </ div >
85+ < h3 class ="name name-method " id ="getTextureNode " translate ="no "> .< a href ="#getTextureNode "> getTextureNode</ a > < span class ="signature "> ()</ span > < span class ="type-signature "> : < a href ="PassTextureNode.html "> PassTextureNode</ a > </ span > </ h3 >
86+ < div class ="method ">
87+ < div class ="description ">
88+ < p > Returns the result of the effect as a texture node.</ p >
89+ </ div >
90+ < dl class ="details ">
91+ < dt class ="tag-returns "> < strong > Returns:</ strong > A texture node that represents the result of the effect.</ dt >
92+ </ dl >
93+ </ div >
94+ < h3 class ="name name-method " id ="setSize " translate ="no "> .< a href ="#setSize "> setSize</ a > < span class ="signature "> ( width : < span class ="param-type "> number</ span > , height : < span class ="param-type "> number</ span > )</ span > </ h3 >
95+ < div class ="method ">
96+ < div class ="description ">
97+ < p > Sets the size of the effect.</ p >
98+ </ div >
99+ < table class ="params ">
100+ < tbody >
101+ < tr >
102+ < td class ="name "> < code > width</ code > </ td >
103+ < td class ="description last "> < p > The width of the effect.</ p > </ td >
104+ </ tr >
105+ < tr >
106+ < td class ="name "> < code > height</ code > </ td >
107+ < td class ="description last "> < p > The height of the effect.</ p > </ td >
108+ </ tr >
109+ </ tbody >
110+ </ table >
111+ </ div >
112+ < h3 class ="name name-method " id ="setup " translate ="no "> .< a href ="#setup "> setup</ a > < span class ="signature "> ( builder : < span class ="param-type "> NodeBuilder</ span > )</ span > < span class ="type-signature "> : < a href ="PassTextureNode.html "> PassTextureNode</ a > </ span > </ h3 >
113+ < div class ="method ">
114+ < div class ="description ">
115+ < p > This method is used to setup the effect's TSL code.</ p >
116+ </ div >
117+ < table class ="params ">
118+ < tbody >
119+ < tr >
120+ < td class ="name "> < code > builder</ code > </ td >
121+ < td class ="description last "> < p > The current node builder.</ p > </ td >
122+ </ tr >
123+ </ tbody >
124+ </ table >
125+ < dl class ="details ">
126+ < dt class ="tag-overrides "> < strong > Overrides:</ strong > < a href ="TempNode.html#setup "> TempNode#setup</ a > </ dt >
127+ </ dl >
128+ < dl class ="details ">
129+ < dt class ="tag-returns "> < strong > Returns:</ strong > </ dt >
130+ </ dl >
131+ </ div >
132+ < h3 class ="name name-method " id ="updateBefore " translate ="no "> .< a href ="#updateBefore "> updateBefore</ a > < span class ="signature "> ( frame : < span class ="param-type "> NodeFrame</ span > )</ span > </ h3 >
133+ < div class ="method ">
134+ < div class ="description ">
135+ < p > This method is used to render the effect once per frame.</ p >
136+ </ div >
137+ < table class ="params ">
138+ < tbody >
139+ < tr >
140+ < td class ="name "> < code > frame</ code > </ td >
141+ < td class ="description last "> < p > The current node frame.</ p > </ td >
142+ </ tr >
143+ </ tbody >
144+ </ table >
145+ < dl class ="details ">
146+ < dt class ="tag-overrides "> < strong > Overrides:</ strong > < a href ="TempNode.html#updateBefore "> TempNode#updateBefore</ a > </ dt >
147+ </ dl >
148+ </ div >
149+ < h2 class ="subsection-title "> Source</ h2 >
150+ < p >
151+ < a href ="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/AfterImageNode.js " target ="_blank " rel ="noopener " translate ="no "> examples/jsm/tsl/display/AfterImageNode.js</ a >
152+ </ p >
153+ </ article >
154+ </ section >
155+ < script src ="../scripts/linenumber.js "> </ script >
156+ < script src ="../scripts/page.js "> </ script >
157+ </ body >
158+ </ html >
0 commit comments