Skip to content

Commit 4e71c53

Browse files
author
Snirozu
committed
fix typos, add missing functions and fix searching for shader functions
1 parent 4aa2274 commit 4e71c53

File tree

6 files changed

+48
-10
lines changed

6 files changed

+48
-10
lines changed

js/selector.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,26 @@ function createSidebarContent(prefix) {
257257
'callOnLuas': 'script.html',
258258
'runHaxeCode': 'script.html',
259259
'runHaxeFunction': 'script.html',
260+
'addHaxeLibrary': 'script.html',
261+
'close': 'script.html',
262+
263+
// Shaders
264+
'initLuaShader': 'shaders.html',
265+
'setSpriteShader': 'shaders.html',
266+
'removeSpriteShader': 'shaders.html',
267+
'getShaderBool': 'shaders.html',
268+
'getShaderBoolArray': 'shaders.html',
269+
'getShaderInt': 'shaders.html',
270+
'getShaderIntArray': 'shaders.html',
271+
'getShaderFloat': 'shaders.html',
272+
'getShaderFloatArray': 'shaders.html',
273+
'setShaderBool': 'shaders.html',
274+
'setShaderBoolArray': 'shaders.html',
275+
'setShaderInt': 'shaders.html',
276+
'setShaderIntArray': 'shaders.html',
277+
'setShaderFloat': 'shaders.html',
278+
'setShaderFloatArray': 'shaders.html',
279+
'setShaderSampler2D': 'shaders.html',
260280

261281
// Uncategorized
262282
'FlxColor': 'uncategorized.html',

pages/reflection.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ <h4>Examples:</h4>
258258

259259
<h2 id="addToGroup">addToGroup</h2>
260260
<p class="methodbox">addToGroup(<span class="variablemarkup">group</span>:String, <span class="variablemarkup">tag</span>:String, <span class="isoptional">?</span><span class="variablemarkup">index</span>:Int = -1):Void</p>
261-
<p>Adds the object to a group.<p>
261+
<p>Adds an object to a group.<p>
262262
<ul>
263263
<li><b><span class="variablemarkup">group</span></b> - Variable name of the FlxTypedGroup/FlxSpriteGroup/Array.
264264
<li><b><span class="variablemarkup">tag</span></b> - Variable name of the instance or Lua Object nametag.</li>
@@ -276,7 +276,7 @@ <h2 id="removeFromGroup">removeFromGroup</h2>
276276
<span class="isoptional">?</span><span class="variablemarkup">index</span>:Int = -1,
277277
<span class="isoptional">?</span><span class="variablemarkup">tag</span>:String = null,
278278
<span class="isoptional">?</span><span class="variablemarkup">destroy</span>:Bool = true):Void</p>
279-
<p>Adds the object to a group.<p>
279+
<p>Removes an object from a group.<p>
280280
<ul>
281281
<li><b><span class="variablemarkup">group</span></b> - Variable name of the FlxTypedGroup/FlxSpriteGroup/Array.
282282
<li><b><span class="variablemarkup">index</span> (Optional)</b> - Position in the group, ignored if "tag" is not null, defaults to -1.</li>

pages/script.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ <h2 id="runHaxeCode">runHaxeCode</h2>
240240
<p class="methodbox">runHaxeCode(<span class="variablemarkup">codeToRun</span>:String,
241241
<span class="isoptional">?</span><span class="variablemarkup">varsToBring</span>:Any = null,
242242
<span class="isoptional">?</span><span class="variablemarkup">funcToRun</span>:String = null,
243-
<span class="isoptional">?</span><span class="variablemarkup">funcArgs</span>:Array&lt;Dynamic&gt; = null):Void</p>
243+
<span class="isoptional">?</span><span class="variablemarkup">funcArgs</span>:Array&lt;Dynamic&gt; = null):Dynamic</p>
244244
<p>Runs HScript code inside a Lua Script by initializing a HScript Interpreter for the Lua Script.</p>
245245
<ul>
246246
<li><b><span class="variablemarkup">codeToRun</span></b> - Variable name to save.</li>
@@ -258,7 +258,7 @@ <h4>Examples:</h4>
258258

259259
<h2 id="runHaxeFunction">runHaxeFunction</h2>
260260
<p class="methodbox">runHaxeFunction(<span class="variablemarkup">funcToRun</span>:String = null,
261-
<span class="isoptional">?</span><span class="variablemarkup">funcArgs</span>:Array&lt;Dynamic&gt; = null):Void</p>
261+
<span class="isoptional">?</span><span class="variablemarkup">funcArgs</span>:Array&lt;Dynamic&gt; = null):Dynamic</p>
262262
<p>Calls a function inside a code ran previously with <a href="#runHaxeCode">"runHaxeCode"</a>.</p>
263263
<ul>
264264
<li><b><span class="variablemarkup">funcToRun</span></b> - Function to run.</li>
@@ -268,5 +268,23 @@ <h4>Examples:</h4>
268268
<ul class="methoddiv">
269269
<li class="exampleitem"><span class="methodexample">runHaxeFunction('myFunction', {1, 999})</span> - Will call <span class="methodexample">function myFunction(1, 999)</span> in the Haxe Code.</li>
270270
</ul>
271+
272+
<h2 id="addHaxeLibrary">addHaxeLibrary</h2>
273+
<p class="methodbox">addHaxeLibrary(<span class="variablemarkup">libName</span>:String,
274+
<span class="isoptional">?</span><span class="variablemarkup">libPackage</span>:String = ''):Void</p>
275+
<p>Imports a Haxe class to the HScript interpreter.</p>
276+
<ul>
277+
<li><b><span class="variablemarkup">libName</span></b> - Class name.</li>
278+
<li><b><span class="variablemarkup">libPackage</span> (Optional)</b> - The package path of the class.</li>
279+
</ul>
280+
<h4>Examples:</h4>
281+
<ul class="methoddiv">
282+
<li class="exampleitem"><span class="methodexample">addHaxeLibrary('StringTools')</span> - Imports "StringTools" class.</li>
283+
<li class="exampleitem"><span class="methodexample">addHaxeLibrary('FlxMath', 'flixel.math')</span> - Imports "flixel.math.FlxMath" class.</li>
284+
</ul>
285+
286+
<h2 id="close">close</h2>
287+
<p class="methodbox">close():Bool</p>
288+
<p>Stops this script.</p>
271289
</body>
272290
</html>

pages/shaders.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ <h2 id="setShaderFloatArray">setShaderFloatArray</h2>
212212
</ul>
213213
<hr>
214214

215-
<h2 id="setShaderFloat">setShaderSampler2D</h2>
216-
<p class="methodbox">setShaderFloat(<span class="variablemarkup">tag</span>:String, <span class="variablemarkup">prop</span>:String, <span class="variablemarkup">bitmapPath</span>:Float):Bool</p>
215+
<h2 id="setShaderSampler2D">setShaderSampler2D</h2>
216+
<p class="methodbox">setShaderSampler2D(<span class="variablemarkup">tag</span>:String, <span class="variablemarkup">prop</span>:String, <span class="variablemarkup">bitmapPath</span>:Float):Bool</p>
217217
<p>Imports a Bitmap to an "uniform sampler2D" shader variable.
218218
<br>Returns "true" if the operation was successful.</p>
219219
<ul>

pages/sound.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ <h2 id="setSoundPitch">setSoundPitch</h2>
195195
<p>Sets a Lua Sound's pitch shift.</p>
196196
<ul>
197197
<li><b><span class="variablemarkup">tag</span></b> - Lua Sound nametag, use "null" for the Music from <a href="#playMusic">"playMusic"</a>.</li>
198-
<li><b><span class="variablemarkup">value</span></b> - Time to set it to, in milliseconds.</li>
198+
<li><b><span class="variablemarkup">value</span></b> - Pitch to set it to.</li>
199199
<li><b><span class="variablemarkup">doPause (Optional)</span></b> - Pauses and resumes sound while changing pitch, might be needed to update the Pitch properly unless the sound is already paused.</li>
200200
</ul>
201201
</body>

pages/tween.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ <h2 id="noteTweenDirection">noteTweenDirection</h2>
242242
<ul>
243243
<li><b><span class="variablemarkup">twnTag</span></b> - Tween tag for the "onTweenCompleted" function, it should be unique or it will overwrite the previous one with the same name.</li>
244244
<li><b><span class="variablemarkup">note</span></b> - Strum Note ID (0-3 = Opponent, 4-7 = Player).</li>
245-
<li><b><span class="variablemarkup">value</span></b> - Target value at the end of the tween, ranges from 0 to 1.</li>
245+
<li><b><span class="variablemarkup">value</span></b> - Target value at the end of the tween, in degrees.</li>
246246
<li><b><span class="variablemarkup">duration</span></b> - Tween duration.</li>
247247
<li><b><span class="variablemarkup">ease</span> (Optional)</b> - <a href="https://api.haxeflixel.com/flixel/tweens/FlxEase.html">Tween ease</a>, defaults to "linear".</li>
248248
</ul>
249249
<h4>Examples:</h4>
250250
<ul class="methoddiv">
251-
<li class="exampleitem"><span class="methodexample">noteTweenAlpha('mySpriteTween', 2, 180, 0.5, 'quadOut')</span> - Makes notes come sideways from the Opponent's Up note.</li>
252-
<li class="exampleitem"><span class="methodexample">noteTweenAlpha('mySpriteTween', 7, 0, 0.5, 'quadOut')</span> - Makes notes come sideways from the Player's Right note.</li>
251+
<li class="exampleitem"><span class="methodexample">noteTweenDirection('mySpriteTween', 2, 180, 0.5, 'quadOut')</span> - Makes notes come sideways from the Opponent's Up note.</li>
252+
<li class="exampleitem"><span class="methodexample">noteTweenDirection('mySpriteTween', 7, 0, 0.5, 'quadOut')</span> - Makes notes come sideways from the Player's Right note.</li>
253253
</ul>
254254
<hr>
255255

0 commit comments

Comments
 (0)