ranger-compiler 2.1.70 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +103 -0
- package/README.md +956 -133
- package/{compiler/Lang.clj → dist/Lang.rgr} +2345 -75
- package/dist/README.md +116 -0
- package/dist/{bin/api.d.ts → api.d.ts} +430 -154
- package/dist/api.js +34345 -0
- package/{lib/Ajax.clj → dist/lib/Ajax.rgr} +1 -1
- package/{lib/CmdParams.clj → dist/lib/CmdParams.rgr} +72 -72
- package/{lib/Crypto.clj → dist/lib/Crypto.rgr} +1 -1
- package/{lib/DOMLib.clj → dist/lib/DOMLib.rgr} +2 -2
- package/{lib/Engine3D.clj → dist/lib/Engine3D.rgr} +1 -1
- package/{lib/ImmutableVector.clj → dist/lib/ImmutableVector.rgr} +364 -364
- package/{lib/IndexedDB.clj → dist/lib/IndexedDB.rgr} +1 -1
- package/{lib/JSON.clj → dist/lib/JSON.rgr} +105 -2
- package/{lib/JinxProcess.clj → dist/lib/JinxProcess.rgr} +3 -3
- package/{lib/Storage.clj → dist/lib/Storage.rgr} +1 -1
- package/{lib/Timers.clj → dist/lib/Timers.rgr} +176 -170
- package/{lib/ViewLib.clj → dist/lib/ViewLib.rgr} +1 -1
- package/dist/lib/lib/ACEEditor.rgr +5 -0
- package/dist/lib/lib/Ajax.rgr +196 -0
- package/dist/lib/lib/CmdParams.rgr +72 -0
- package/dist/lib/lib/Crypto.rgr +90 -0
- package/dist/lib/lib/DOMLib.rgr +307 -0
- package/{examples/3D/Engine3D.clj → dist/lib/lib/Engine3D.rgr} +870 -857
- package/dist/lib/lib/ImmutableVector.rgr +364 -0
- package/dist/lib/lib/IndexedDB.rgr +32 -0
- package/{compiler/JSON.clj → dist/lib/lib/JSON.rgr} +106 -3
- package/dist/lib/lib/JinxProcess.rgr +838 -0
- package/dist/lib/lib/SQL.rgr +44 -0
- package/dist/lib/lib/ServiceLib.rgr +9 -0
- package/dist/lib/lib/Storage.rgr +89 -0
- package/dist/lib/lib/Time.rgr +75 -0
- package/dist/lib/lib/Timers.rgr +176 -0
- package/dist/lib/lib/TypedArrays.rgr +14 -0
- package/dist/lib/lib/ViewLib.rgr +851 -0
- package/dist/lib/lib/WebLib.rgr +47 -0
- package/dist/lib/lib/WebServerLib.rgr +137 -0
- package/{lib/ranger-dir.clj → dist/lib/lib/ranger-dir.rgr} +1 -1
- package/{compiler/stdlib.clj → dist/lib/lib/stdlib.rgr} +42 -19
- package/{lib/stdops.clj → dist/lib/lib/stdops.rgr} +1 -1
- package/dist/lib/ranger-dir.rgr +175 -0
- package/{lib/stdlib.clj → dist/lib/stdlib.rgr} +2 -2
- package/dist/lib/stdops.rgr +168 -0
- package/dist/package.json +47 -0
- package/{compiler/bin/output.js → dist/rgrc.js} +15377 -7936
- package/dist/stdops.rgr +168 -0
- package/package.json +196 -39
- package/adventofcode/day1/bin/LambdaSignature1.java +0 -3
- package/adventofcode/day1/bin/LambdaSignature2.java +0 -3
- package/adventofcode/day1/bin/LambdaSignature3.java +0 -3
- package/adventofcode/day1/bin/day1.cpp +0 -124
- package/adventofcode/day1/bin/day1.go +0 -75
- package/adventofcode/day1/bin/day1.js +0 -45
- package/adventofcode/day1/bin/day1.php +0 -46
- package/adventofcode/day1/bin/day1.scala +0 -48
- package/adventofcode/day1/bin/day1.swift +0 -48
- package/adventofcode/day1/bin/day1_part2.cpp +0 -180
- package/adventofcode/day1/bin/day1_part2.go +0 -123
- package/adventofcode/day1/bin/day1_part2.js +0 -76
- package/adventofcode/day1/bin/day1_part2.php +0 -88
- package/adventofcode/day1/bin/day1_part2.scala +0 -81
- package/adventofcode/day1/bin/day1_part2.swift +0 -91
- package/adventofcode/day1/bin/day_one.java +0 -38
- package/adventofcode/day1/bin/day_one_part_two.java +0 -57
- package/adventofcode/day1/bin/operatorsOf.java +0 -37
- package/adventofcode/day1/bin/operatorsOf_5.java +0 -10
- package/adventofcode/day1/bin/operatorsOfboolean_5.java +0 -10
- package/adventofcode/day1/bin/variant.hpp +0 -2416
- package/adventofcode/day1/compile.bat +0 -7
- package/adventofcode/day1/compile2.bat +0 -7
- package/adventofcode/day1/day1.clj +0 -19
- package/adventofcode/day1/day1_part2.clj +0 -43
- package/adventofcode/day1/input1.txt +0 -1
- package/adventofcode/day2/bin/LambdaSignature1.class +0 -0
- package/adventofcode/day2/bin/LambdaSignature1.java +0 -3
- package/adventofcode/day2/bin/LambdaSignature2.class +0 -0
- package/adventofcode/day2/bin/LambdaSignature2.java +0 -3
- package/adventofcode/day2/bin/day2.cpp +0 -133
- package/adventofcode/day2/bin/day2.go +0 -85
- package/adventofcode/day2/bin/day2.js +0 -45
- package/adventofcode/day2/bin/day2.php +0 -59
- package/adventofcode/day2/bin/day2.scala +0 -54
- package/adventofcode/day2/bin/day2.swift +0 -62
- package/adventofcode/day2/bin/day2_part2.cpp +0 -150
- package/adventofcode/day2/bin/day2_part2.go +0 -101
- package/adventofcode/day2/bin/day2_part2.js +0 -54
- package/adventofcode/day2/bin/day2_part2.php +0 -80
- package/adventofcode/day2/bin/day2_part2.scala +0 -68
- package/adventofcode/day2/bin/day2_part2.swift +0 -82
- package/adventofcode/day2/bin/day_two.java +0 -61
- package/adventofcode/day2/bin/day_two_part_two$1$1$1.class +0 -0
- package/adventofcode/day2/bin/day_two_part_two$1$1.class +0 -0
- package/adventofcode/day2/bin/day_two_part_two$1.class +0 -0
- package/adventofcode/day2/bin/day_two_part_two.class +0 -0
- package/adventofcode/day2/bin/day_two_part_two.java +0 -80
- package/adventofcode/day2/bin/operatorsOf.class +0 -0
- package/adventofcode/day2/bin/operatorsOf.java +0 -18
- package/adventofcode/day2/bin/variant.hpp +0 -2416
- package/adventofcode/day2/compile.bat +0 -7
- package/adventofcode/day2/compile2.bat +0 -7
- package/adventofcode/day2/day2.clj +0 -60
- package/adventofcode/day2/day2_part2.clj +0 -69
- package/adventofcode/day2/input1.txt +0 -1
- package/adventofcode/day3/bin/Grid.java +0 -92
- package/adventofcode/day3/bin/GridRow.java +0 -5
- package/adventofcode/day3/bin/LambdaSignature1.java +0 -3
- package/adventofcode/day3/bin/LambdaSignature2.java +0 -3
- package/adventofcode/day3/bin/LambdaSignature3.java +0 -3
- package/adventofcode/day3/bin/day3.cpp +0 -64
- package/adventofcode/day3/bin/day3.go +0 -55
- package/adventofcode/day3/bin/day3.js +0 -42
- package/adventofcode/day3/bin/day3.php +0 -41
- package/adventofcode/day3/bin/day3.scala +0 -52
- package/adventofcode/day3/bin/day3.swift +0 -43
- package/adventofcode/day3/bin/day3_part2.cpp +0 -216
- package/adventofcode/day3/bin/day3_part2.go +0 -188
- package/adventofcode/day3/bin/day3_part2.js +0 -123
- package/adventofcode/day3/bin/day3_part2.php +0 -135
- package/adventofcode/day3/bin/day3_part2.swift +0 -131
- package/adventofcode/day3/bin/day_three_part_two.java +0 -43
- package/adventofcode/day3/bin/day_two.java +0 -42
- package/adventofcode/day3/bin/operatorsOf.java +0 -14
- package/adventofcode/day3/bin/variant.hpp +0 -2416
- package/adventofcode/day3/compile.bat +0 -7
- package/adventofcode/day3/compile2.bat +0 -7
- package/adventofcode/day3/day3.clj +0 -42
- package/adventofcode/day3/day3_part2.clj +0 -112
- package/adventofcode/day4/bin/LambdaSignature1.java +0 -3
- package/adventofcode/day4/bin/day4.cpp +0 -118
- package/adventofcode/day4/bin/day4.go +0 -75
- package/adventofcode/day4/bin/day4.js +0 -40
- package/adventofcode/day4/bin/day4.php +0 -52
- package/adventofcode/day4/bin/day4.scala +0 -47
- package/adventofcode/day4/bin/day4.swift +0 -56
- package/adventofcode/day4/bin/day4_part2.go +0 -129
- package/adventofcode/day4/bin/day4_part2.js +0 -72
- package/adventofcode/day4/bin/day_four.java +0 -41
- package/adventofcode/day4/bin/inputData.java +0 -7
- package/adventofcode/day4/bin/operatorsOf.java +0 -11
- package/adventofcode/day4/bin/variant.hpp +0 -2416
- package/adventofcode/day4/compile.bat +0 -7
- package/adventofcode/day4/compile2.bat +0 -7
- package/adventofcode/day4/day4.clj +0 -32
- package/adventofcode/day4/day4_part2.clj +0 -44
- package/adventofcode/day4/input.clj +0 -519
- package/adventofcode/day4/input.txt +0 -512
- package/bin/api.ts +0 -24471
- package/bin/compiler.ts +0 -24482
- package/bin/output.js +0 -23819
- package/compiler/ColorConsole.clj +0 -22
- package/compiler/ContextOperators.clj +0 -75
- package/compiler/FlowEnterVarDef.clj +0 -223
- package/compiler/InputFileSystem.clj +0 -276
- package/compiler/RangerDocs.clj +0 -7
- package/compiler/TFactory.clj +0 -146
- package/compiler/TFiles.clj +0 -23
- package/compiler/TFlow.clj +0 -39
- package/compiler/TNodeFactory.clj +0 -84
- package/compiler/TTypes.clj +0 -188
- package/compiler/VirtualCompiler.clj +0 -807
- package/compiler/bin/ng_Compiler.js +0 -23779
- package/compiler/commonmark_plugin.clj +0 -359
- package/compiler/feat2.bat +0 -2
- package/compiler/feats.bat +0 -9
- package/compiler/feature_tests.clj +0 -192
- package/compiler/index.js +0 -2
- package/compiler/issue_57.clj +0 -25
- package/compiler/makefile_plugin.clj +0 -135
- package/compiler/markdown_plugin.clj +0 -386
- package/compiler/maven_plugin.clj +0 -162
- package/compiler/ng_AndroidPageWriter.clj +0 -299
- package/compiler/ng_CodeNode.clj +0 -756
- package/compiler/ng_CodeNodeCompilerExtensions.clj +0 -839
- package/compiler/ng_Compiler.clj +0 -49
- package/compiler/ng_CompilerGeneric.clj +0 -260
- package/compiler/ng_CompilerOrig.clj +0 -854
- package/compiler/ng_DictNode.clj +0 -346
- package/compiler/ng_DictNode2.clj +0 -316
- package/compiler/ng_Execute.clj +0 -138
- package/compiler/ng_Execute1.clj +0 -129
- package/compiler/ng_FlowWork.clj +0 -3951
- package/compiler/ng_LiveCompiler.clj +0 -1109
- package/compiler/ng_RagnerJavaScriptClassWriter.clj +0 -402
- package/compiler/ng_RangerActiveOperators.clj +0 -86
- package/compiler/ng_RangerAppClassDesc.clj +0 -400
- package/compiler/ng_RangerAppEnums.clj +0 -86
- package/compiler/ng_RangerAppFunctionDesc.clj +0 -127
- package/compiler/ng_RangerAppMessages.clj +0 -15
- package/compiler/ng_RangerAppOperatorDesc.clj +0 -20
- package/compiler/ng_RangerAppParamDesc.clj +0 -388
- package/compiler/ng_RangerAppWriterContext.clj +0 -1793
- package/compiler/ng_RangerArgMatch.clj +0 -638
- package/compiler/ng_RangerCSharpClassWriter.clj +0 -484
- package/compiler/ng_RangerCppClassWriter.clj +0 -1023
- package/compiler/ng_RangerDocGenerator.clj +0 -305
- package/compiler/ng_RangerFlowParser.clj +0 -4992
- package/compiler/ng_RangerFlowParserOrig.clj +0 -4002
- package/compiler/ng_RangerGenericClassWriter.clj +0 -573
- package/compiler/ng_RangerGolangClassWriter.clj +0 -1766
- package/compiler/ng_RangerImmutableExtension.clj +0 -77
- package/compiler/ng_RangerJava7ClassWriter.clj +0 -961
- package/compiler/ng_RangerJavaScriptClassWriter.clj +0 -1040
- package/compiler/ng_RangerKotlinClassWriter.clj +0 -372
- package/compiler/ng_RangerLanguageWriters.clj +0 -14
- package/compiler/ng_RangerLispParser.clj +0 -873
- package/compiler/ng_RangerPHPClassWriter.clj +0 -643
- package/compiler/ng_RangerPlugin.clj +0 -41
- package/compiler/ng_RangerRangerClassWriter.clj +0 -357
- package/compiler/ng_RangerRustClassWriter.clj +0 -420
- package/compiler/ng_RangerScalaClassWriter.clj +0 -818
- package/compiler/ng_RangerSerializeClass.clj +0 -502
- package/compiler/ng_RangerServiceBuilder.clj +0 -63
- package/compiler/ng_RangerSwift3ClassWriter.clj +0 -809
- package/compiler/ng_RangerSwiftClassWriter.clj +0 -0
- package/compiler/ng_RangerTypeClass.clj +0 -45
- package/compiler/ng_SourceParser.clj +0 -241
- package/compiler/ng_SourceParser2.clj +0 -214
- package/compiler/ng_WebPageWriter.clj +0 -39
- package/compiler/ng_jsonParser.clj +0 -340
- package/compiler/ng_p_test.clj +0 -1711
- package/compiler/ng_parser.clj +0 -911
- package/compiler/ng_parser2.clj +0 -735
- package/compiler/ng_parser2_backup.clj +0 -1679
- package/compiler/ng_parser_backup.clj +0 -886
- package/compiler/ng_parser_ok.clj +0 -1718
- package/compiler/ng_parser_ok2.clj +0 -1717
- package/compiler/ng_parser_std_match.clj +0 -687
- package/compiler/ng_parser_std_match2.clj +0 -1012
- package/compiler/ng_parser_v2.clj +0 -1251
- package/compiler/ng_ui.clj +0 -403
- package/compiler/ng_ui_test.clj +0 -18
- package/compiler/ng_writer.clj +0 -338
- package/compiler/ng_xmlParser.clj +0 -472
- package/compiler/ng_xmlParser2.clj +0 -317
- package/compiler/ng_xmlParser3.clj +0 -251
- package/compiler/opdoc.bat +0 -4
- package/compiler/operators.md +0 -290
- package/compiler/p.bat +0 -4
- package/compiler/package.json +0 -10
- package/compiler/pcmd.bat +0 -4
- package/compiler/pcmd2.bat +0 -3
- package/compiler/plaintext_plugin.clj +0 -69
- package/compiler/plugin.bat +0 -19
- package/compiler/plugin2.bat +0 -4
- package/compiler/plugin_app.bat +0 -3
- package/compiler/plugin_apps.clj +0 -27
- package/compiler/plugins.bat +0 -10
- package/compiler/reveal_plugin.clj +0 -409
- package/compiler/simplePlugin.clj +0 -780
- package/compiler/t.bat +0 -3
- package/compiler/test_any.clj +0 -43
- package/compiler/test_call.clj +0 -141
- package/compiler/test_chain.clj +0 -79
- package/compiler/test_json.clj +0 -10
- package/compiler/test_lambda.clj +0 -153
- package/compiler/test_pcmd.clj +0 -32
- package/compiler/test_pcmd2.clj +0 -29
- package/compiler/test_plugin.clj +0 -237
- package/compiler/test_readfile.clj +0 -13
- package/compiler/test_reveal.clj +0 -19
- package/compiler/test_slides.clj +0 -312
- package/compiler/test_types.clj +0 -143
- package/compiler/test_types2.clj +0 -49
- package/compiler/test_types3.clj +0 -53
- package/compiler/test_var.clj +0 -40
- package/compiler/tonpm.bat +0 -14
- package/compiler/tonpm2.bat +0 -12
- package/compiler/ui_plugin.clj +0 -507
- package/compiler/ui_plugin2.clj +0 -427
- package/compiler/update-git.bat +0 -3
- package/compiler/vcomp.bat +0 -4
- package/compiler/viewbuilder_Android.clj +0 -176
- package/compiler/viewbuilder_Web.clj +0 -105
- package/dist/bin/api.js +0 -32422
- package/dist/bin/compiler.d.ts +0 -1638
- package/dist/bin/compiler.js +0 -32444
- package/examples/3D/bin/test_3d.js +0 -329
- package/examples/3D/test_3d.clj +0 -385
- package/examples/EVGColor/EVGColor.clj +0 -310
- package/examples/EVGColor/EVGColorContext.clj +0 -176
- package/examples/EVGColor/bin/EVGColor.js +0 -286
- package/examples/EVGColor/bin/minimized.js +0 -286
- package/examples/SVGPath/SVGPath.clj +0 -625
- package/examples/SVGPath/Vec2.clj +0 -103
- package/examples/SVGPath/bin/SVGPath.cpp +0 -887
- package/examples/SVGPath/bin/SVGPath.js +0 -682
- package/examples/SVGPath/bin/SVGPath.ts +0 -711
- package/examples/SVGPath/bin/minimized.js +0 -578
- package/examples/SVGPath/bin/variant.hpp +0 -2416
- package/examples/minification/Vec2.clj +0 -103
- package/examples/minification/bin/minified.js +0 -44
- package/examples/minification/bin/test.js +0 -117
- package/examples/minification/test.clj +0 -13
- package/fiddle/VirtualCompiler.js +0 -23495
- package/fiddle/browser_editor.js +0 -13240
- package/fiddle/compileEnv.js +0 -1
- package/fiddle/compileEnv.json +0 -1
- package/fiddle/lang_data.js +0 -1
- package/index.html +0 -18
- package/native/httpd/HttpTester.clj +0 -33
- package/native/httpd/RangerWebService.clj +0 -81
- package/operators.md +0 -290
- package/tsconfig.json +0 -29
- package/versions/cpp/compiler.cpp +0 -15032
- package/versions/es6/compiler.js +0 -12860
- package/versions/go/compiler.go +0 -21338
- package/versions/java/AfterCodeNode.java +0 -4
- package/versions/java/ClassJoinPoint.java +0 -6
- package/versions/java/CodeFile.java +0 -42
- package/versions/java/CodeFileSystem.java +0 -72
- package/versions/java/CodeNode.java +0 -807
- package/versions/java/CodeSlice.java +0 -13
- package/versions/java/CodeWriter.java +0 -185
- package/versions/java/ColorConsole.java +0 -8
- package/versions/java/CompilerInterface.java +0 -213
- package/versions/java/DictNode.java +0 -353
- package/versions/java/LiveCompiler.java +0 -772
- package/versions/java/NodeEvalState.java +0 -24
- package/versions/java/OpFindResult.java +0 -6
- package/versions/java/RangerAppArrayValue.java +0 -7
- package/versions/java/RangerAppClassDesc.java +0 -217
- package/versions/java/RangerAppEnum.java +0 -14
- package/versions/java/RangerAppFunctionDesc.java +0 -20
- package/versions/java/RangerAppHashValue.java +0 -11
- package/versions/java/RangerAppInterfaceImpl.java +0 -6
- package/versions/java/RangerAppMethodVariants.java +0 -6
- package/versions/java/RangerAppParamDesc.java +0 -321
- package/versions/java/RangerAppTodo.java +0 -6
- package/versions/java/RangerAppValue.java +0 -10
- package/versions/java/RangerAppWriterContext.java +0 -800
- package/versions/java/RangerArgMatch.java +0 -317
- package/versions/java/RangerBackReference.java +0 -7
- package/versions/java/RangerCSharpClassWriter.java +0 -287
- package/versions/java/RangerCompilerMessage.java +0 -9
- package/versions/java/RangerCppClassWriter.java +0 -725
- package/versions/java/RangerFlowParser.java +0 -2142
- package/versions/java/RangerGenericClassWriter.java +0 -367
- package/versions/java/RangerGolangClassWriter.java +0 -1379
- package/versions/java/RangerJava7ClassWriter.java +0 -652
- package/versions/java/RangerJavaScriptClassWriter.java +0 -305
- package/versions/java/RangerKotlinClassWriter.java +0 -380
- package/versions/java/RangerLispParser.java +0 -845
- package/versions/java/RangerNodeValue.java +0 -9
- package/versions/java/RangerPHPClassWriter.java +0 -527
- package/versions/java/RangerParamEventHandler.java +0 -6
- package/versions/java/RangerParamEventList.java +0 -5
- package/versions/java/RangerParamEventMap.java +0 -27
- package/versions/java/RangerRangerClassWriter.java +0 -268
- package/versions/java/RangerRefForce.java +0 -7
- package/versions/java/RangerScalaClassWriter.java +0 -365
- package/versions/java/RangerSerializeClass.java +0 -148
- package/versions/java/RangerSwift3ClassWriter.java +0 -548
- package/versions/java/RangerTypeClass.java +0 -17
- package/versions/java/SourceCode.java +0 -65
- package/versions/php/compiler.php +0 -13830
- package/versions/swift3/compiler.swift +0 -12542
- /package/{lib/ACEEditor.clj → dist/lib/ACEEditor.rgr} +0 -0
- /package/{lib/SQL.clj → dist/lib/SQL.rgr} +0 -0
- /package/{lib/ServiceLib.clj → dist/lib/ServiceLib.rgr} +0 -0
- /package/{lib/Time.clj → dist/lib/Time.rgr} +0 -0
- /package/{lib/TypedArrays.clj → dist/lib/TypedArrays.rgr} +0 -0
- /package/{lib/WebLib.clj → dist/lib/WebLib.rgr} +0 -0
- /package/{lib/WebServerLib.clj → dist/lib/WebServerLib.rgr} +0 -0
|
@@ -1,857 +1,870 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
systemclass Vector3 {
|
|
4
|
-
es6 BABYLON.Vector3
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
systemclass Canvas3D {
|
|
8
|
-
es6 HTMLElement
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
systemclass Engine3D {
|
|
12
|
-
es6 BABYLON.Engine
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
systemclass Scene3D {
|
|
16
|
-
es6 BABYLON.Scene
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
systemclass Camera3D {
|
|
20
|
-
es6 BABYLON.FreeCamera
|
|
21
|
-
}
|
|
22
|
-
systemclass Light3D {
|
|
23
|
-
es6 Object
|
|
24
|
-
}
|
|
25
|
-
systemclass Object3D {
|
|
26
|
-
es6 Object
|
|
27
|
-
}
|
|
28
|
-
systemclass PickResult3D {
|
|
29
|
-
es6 Object
|
|
30
|
-
}
|
|
31
|
-
systemclass CanvasClick {
|
|
32
|
-
es6 Object
|
|
33
|
-
}
|
|
34
|
-
systemclass ImportResult3D {
|
|
35
|
-
es6 Object
|
|
36
|
-
}
|
|
37
|
-
systemclass AssetLoader3D {
|
|
38
|
-
es6 Object
|
|
39
|
-
}
|
|
40
|
-
systemclass LoadTask3D {
|
|
41
|
-
es6 Object
|
|
42
|
-
}
|
|
43
|
-
systemclass LoadTaskEvent3D {
|
|
44
|
-
es6 Object
|
|
45
|
-
}
|
|
46
|
-
systemclass Material3D {
|
|
47
|
-
es6 Object
|
|
48
|
-
}
|
|
49
|
-
systemclass Texture3D {
|
|
50
|
-
es6 Object
|
|
51
|
-
}
|
|
52
|
-
systemclass Quaternion3D {
|
|
53
|
-
es6 Object
|
|
54
|
-
}
|
|
55
|
-
systemclass PhysicsObject3D {
|
|
56
|
-
es6 Object
|
|
57
|
-
}
|
|
58
|
-
systemclass PhysicsShape3D {
|
|
59
|
-
es6 Object
|
|
60
|
-
}
|
|
61
|
-
systemclass PhysicsOptions3D {
|
|
62
|
-
es6 Object
|
|
63
|
-
}
|
|
64
|
-
systemclass HighlightLayer3D {
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
systemclass Vector4 {
|
|
68
|
-
es6 BABYLON.Vector4
|
|
69
|
-
}
|
|
70
|
-
systemclass FaceUV {
|
|
71
|
-
es6 BABYLON.Vector4
|
|
72
|
-
}
|
|
73
|
-
systemclass Matrix3D {
|
|
74
|
-
es6 BABYLON.Matrix
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
systemunion AnyLight3D (Light3D HemisphericLight3D)
|
|
79
|
-
|
|
80
|
-
operators {
|
|
81
|
-
|
|
82
|
-
; generic math ops
|
|
83
|
-
|
|
84
|
-
near _:boolean (value:double compareTo:double delta:double) {
|
|
85
|
-
templates {
|
|
86
|
-
* @macro(true) ( '( (fabs ( ' (e 1) ' - ' (e 2) ') ) < ' (e 3) ' ) ' )
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
content_ready _:void ( code:block) {
|
|
92
|
-
templates {
|
|
93
|
-
es6 (`window.addEventListener('DOMContentLoaded', function() {` nl I (block 1) i nl `})` nl)
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
renderLoop _:void ( en:Engine3D cb:(_:void ()) ) {
|
|
98
|
-
templates {
|
|
99
|
-
es6 ( (e 1) '.runRenderLoop(()=>{' nl I '(' (e 2) ') () ' i nl ' });' nl )
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
vec _:Vector4 ( x:double y:double z:double w:double ) {
|
|
104
|
-
templates {
|
|
105
|
-
es6 ('new BABYLON.Vector4(' (e 1) ', ' (e 2) ',' (e 3) ',' (e 4) ')')
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
vec3 _:Vector3 ( x:double y:double z:double ) {
|
|
110
|
-
templates {
|
|
111
|
-
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ',' (e 3) ')')
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
vec3 _:Vector3 ( x:int y:int z:int ) {
|
|
116
|
-
templates {
|
|
117
|
-
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ', ' (e 3) ')')
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
vec _:Vector3 ( x:double y:double z:double ) {
|
|
122
|
-
templates {
|
|
123
|
-
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ',' (e 3) ')')
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
vec _:Vector3 ( x:int y:int z:int ) {
|
|
128
|
-
templates {
|
|
129
|
-
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ', ' (e 3) ')')
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
; color
|
|
134
|
-
color _:Color3 ( r:double g:double b:double ) {
|
|
135
|
-
templates {
|
|
136
|
-
es6 ('new BABYLON.Color3(' (e 1) ', ' (e 2) ', ' (e 3) ')')
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
; setting color
|
|
141
|
-
setDiffuse _:void (o:Material3D color:Color3 ) {
|
|
142
|
-
templates {
|
|
143
|
-
es6 ( (e 1) '.diffuseColor = ' (e 2))
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
setSpecular _:void (o:Material3D color:Color3 ) {
|
|
147
|
-
templates {
|
|
148
|
-
es6 ( (e 1) '.specularColor = ' (e 2))
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
setEmissive _:void (o:Material3D color:Color3 ) {
|
|
152
|
-
templates {
|
|
153
|
-
es6 ( (e 1) '.emissiveColor = ' (e 2))
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
setAmbitent _:void (o:Material3D color:Color3 ) {
|
|
157
|
-
templates {
|
|
158
|
-
es6 ( (e 1) '.ambientColor = ' (e 2))
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
setAlpha _:void (o:Material3D alpha:double) {
|
|
163
|
-
templates {
|
|
164
|
-
es6 ( (e 1) '.alpha = ' (e 2))
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
setAlpha _:void (o:Texture3D alpha:bolean) {
|
|
169
|
-
templates {
|
|
170
|
-
es6 ( (e 1) '.hasAlpha = ' (e 2))
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
; Interesting ideas:
|
|
175
|
-
; https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
176
|
-
; https://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
177
|
-
; physics engine rules...
|
|
178
|
-
; https://doc.babylonjs.com/how_to/using_the_physics_engine
|
|
179
|
-
|
|
180
|
-
enablePhysics _:void (scene:Scene3D) {
|
|
181
|
-
templates {
|
|
182
|
-
es6 ( (e 1) '.enablePhysics()')
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
physicsOptions _:PhysicsOptions3D () {
|
|
187
|
-
templates {
|
|
188
|
-
es6 ('{}')
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
mass _:void (o:PhysicsOptions3D value:double) {
|
|
192
|
-
templates {
|
|
193
|
-
es6 ( (e 1) '.mass = ' (e 2))
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
friction _:void (o:PhysicsOptions3D value:double) {
|
|
197
|
-
templates {
|
|
198
|
-
es6 ( (e 1) '.friction = ' (e 2))
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
restitution _:void (o:PhysicsOptions3D value:double) {
|
|
202
|
-
templates {
|
|
203
|
-
es6 ( (e 1) '.restitution = ' (e 2))
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
physicsBox _:PhysicsShape3D () {
|
|
208
|
-
templates {
|
|
209
|
-
es6 ('BABYLON.PhysicsImpostor.BoxImpostor')
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
physicsSphere _:PhysicsShape3D () {
|
|
213
|
-
templates {
|
|
214
|
-
es6 ('BABYLON.PhysicsImpostor.SphereImpostor')
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
physicsPlane _:PhysicsShape3D () {
|
|
218
|
-
templates {
|
|
219
|
-
es6 ('BABYLON.PhysicsImpostor.PlaneImpostor')
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
physicsMesh _:PhysicsShape3D () {
|
|
223
|
-
templates {
|
|
224
|
-
es6 ('BABYLON.PhysicsImpostor.MeshImpostor')
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
physicsCylinder _:PhysicsShape3D () {
|
|
228
|
-
templates {
|
|
229
|
-
es6 ('BABYLON.PhysicsImpostor.CylinderImpostor')
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
physics _:PhysicsObject3D (scene:Scene3D obj:Object3D shape:PhysicsShape3D options:PhysicsOptions3D ) {
|
|
234
|
-
templates {
|
|
235
|
-
es6 ( 'new BABYLON.PhysicsImpostor(' (e 2) ', '( e 3) ', ' (e 4) ', ' (e 1) ')')
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
setPhysics _:void (obj:Object3D shape:PhysicsObject3D) {
|
|
240
|
-
templates {
|
|
241
|
-
es6 ( (e 1) '.physicsImpostor = ' (e 2))
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
; impostor.applyImpulse(new BABYLON.Vector3(10, 10, 0), sphere.getAbsolutePosition());
|
|
246
|
-
impulse _:void (o:PhysicsObject3D forceVector:Vector3 forcePosition:Vector3) {
|
|
247
|
-
templates {
|
|
248
|
-
es6 ( (e 1) '.applyImpulse(' (e 2) ', ' (e 3) ' ) ' )
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
; lights
|
|
253
|
-
|
|
254
|
-
newSpotLight _:Light3D (scene:Scene3D start:Vector3 end:Vector3 angle:double distance:double name:string) {
|
|
255
|
-
templates {
|
|
256
|
-
es6 ('new BABYLON.SpotLight(' (e 6) ',' (e 2) ',' (e 3) ',' (e 4) ',' (e 5) ',' (e 1) ')')
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
newDirectionalLight _:Light3D (scene:Scene3D direction:Vector3 name:string) {
|
|
260
|
-
templates {
|
|
261
|
-
es6 ('new BABYLON.DirectionalLight(' (e 3) ',' (e 2) ',' (e 1) ')')
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
setDiffuse _:void (o:Light3D color:Color3 ) {
|
|
266
|
-
templates {
|
|
267
|
-
es6 ( (e 1) '.diffuse = ' (e 2))
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
setSpecular _:void (o:Light3D color:Color3 ) {
|
|
271
|
-
templates {
|
|
272
|
-
es6 ( (e 1) '.specular = ' (e 2))
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
setGround _:void (o:HemisphericLight3D color:Color3 ) {
|
|
276
|
-
templates {
|
|
277
|
-
es6 ( (e 1) '.groundColor = ' (e 2))
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
intensity _:void (l:Light3D amount:double) {
|
|
282
|
-
templates {
|
|
283
|
-
es6 ( (e 1) '.intensity = ' (e 2))
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
range _:void (l:Light3D range:double) {
|
|
288
|
-
templates {
|
|
289
|
-
es6 ( (e 1) '.range = ' (e 2))
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
enableFor _void ( l:Light3D list:[Object3D]) {
|
|
294
|
-
templates {
|
|
295
|
-
es6 ( (e 1) '.excludedMeshes = ' (e 2))
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
disableFor _void ( l:Light3D list:[Object3D]) {
|
|
299
|
-
templates {
|
|
300
|
-
es6 ( (e 1) '.includedOnlyMeshes = ' (e 2))
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
; vector math ops
|
|
310
|
-
|
|
311
|
-
catmull _:Vector3 ( t:double v1:Vector3 v2:Vector3 v3:Vector3 v4:Vector3 ) {
|
|
312
|
-
templates {
|
|
313
|
-
es6 ( 'BABYLON.Vector3.CatmullRom(' (e 2) ', ' (e 3) ', ' (e 4) ', ' (e 5) ', ' (e 1) ') ' )
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
- _:Vector3 ( v1:Vector3 other:Vector3 ) {
|
|
318
|
-
templates {
|
|
319
|
-
es6 ( (e 1) '.subtract(' (e 2) ')')
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
* _:Vector3 ( v1:Vector3 n:double) {
|
|
324
|
-
templates {
|
|
325
|
-
es6 ( (e 1) '.scale(' (e 2) ')')
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
* _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
330
|
-
templates {
|
|
331
|
-
es6 ( (e 1) '.mutiply(' (e 2) ')')
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
+ _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
336
|
-
templates {
|
|
337
|
-
es6 ( (e 1) '.add(' (e 2) ')')
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
dot _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
342
|
-
templates {
|
|
343
|
-
es6 ( (e 1) '.Dot(' (e 2) ')')
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
cross _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
348
|
-
templates {
|
|
349
|
-
es6 ( (e 1) '.Cross(' (e 2) ')')
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
distance _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
354
|
-
templates {
|
|
355
|
-
es6 ( (e 1) '.Distance(' (e 2) ')')
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
== _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
361
|
-
templates {
|
|
362
|
-
es6 ( (e 1) '.equals(' (e 2) ')')
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
clone _:Vector3 ( v1:Vector3 ) {
|
|
367
|
-
templates {
|
|
368
|
-
es6 ( (e 1) '.clone()')
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
normalize _:Vector3 ( v1:Vector3 ) {
|
|
373
|
-
templates {
|
|
374
|
-
es6 ( (e 1) '.normalize()')
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
; Matrix operators
|
|
379
|
-
toArray _:[double] ( o:Matrix3D ) {
|
|
380
|
-
templates {
|
|
381
|
-
es6 ( (e 1) '.toArray()')
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
invert _:Matrix3D ( o:Matrix3D ) {
|
|
386
|
-
templates {
|
|
387
|
-
es6 ( (e 1) '.invert()')
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
add _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
392
|
-
templates {
|
|
393
|
-
es6 ( (e 1) '.add(' (e 2) ')')
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
+ _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
398
|
-
templates {
|
|
399
|
-
es6 ( (e 1) '.add(' (e 2) ')')
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
setTranslate _:Matrix3D ( o:Matrix3D v:Vector3 ) {
|
|
404
|
-
templates {
|
|
405
|
-
es6 ( (e 1) '.setTranslation(' (e 2) ')')
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
getTranslate _:Vector3 ( o:Matrix3D ) {
|
|
410
|
-
templates {
|
|
411
|
-
es6 ( (e 1) '.getTranslation()')
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
resetRotateAndScale _:Matrix3D ( o:Matrix3D ) {
|
|
416
|
-
templates {
|
|
417
|
-
es6 ( (e 1) '.removeRotationAndScaling()')
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
* _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
422
|
-
templates {
|
|
423
|
-
es6 ( (e 1) '.mutiply(' (e 2) ')')
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
copyFrom _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
428
|
-
templates {
|
|
429
|
-
es6 ( (e 1) '.copyFrom(' (e 2) ')')
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
== _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
434
|
-
templates {
|
|
435
|
-
es6 ( (e 1) '.equals(' (e 2) ')')
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
clone _:Matrix3D ( o:Matrix3D ) {
|
|
440
|
-
templates {
|
|
441
|
-
es6 ( (e 1) '.clone()')
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
identity_matrix _:Matrix3D ( ) {
|
|
446
|
-
templates {
|
|
447
|
-
es6 ( 'BABYLON.Matrix.Identity()')
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
getRow _:Vector4 ( o:Matrix3D index:int ) {
|
|
453
|
-
templates {
|
|
454
|
-
es6 ( (e 1) '.getRow(' (e 2) ')')
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
cell _:double (o:Matrix3D row:int col:int) {
|
|
459
|
-
templates {
|
|
460
|
-
es6 ( (e 1) '.m[' (e 2) ' * 4 + ' (e 3) ']')
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
newCamera _:Camera3D ( scene:Scene3D position:Vector3 name:string) {
|
|
470
|
-
templates {
|
|
471
|
-
es6 ('new BABYLON.FreeCamera(' (e 3) ', ' (e 2)', ' (e 1)')')
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
newHemisphericLight _:HemisphericLight3D ( scene:Scene3D position:Vector3 name:string) {
|
|
476
|
-
templates {
|
|
477
|
-
es6 ('new BABYLON.HemisphericLight(' (e 3) ', ' (e 2)', ' (e 1)')')
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
; standard object types
|
|
482
|
-
|
|
483
|
-
newSphere _:Object3D ( scene:Scene3D width:double height:double name:string) {
|
|
484
|
-
templates {
|
|
485
|
-
es6 ('new BABYLON.Mesh.CreateSphere(' (e 4) ', ' (e 2) ', ' (e 3)', ' (e 1)')')
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
tube _:Object3D ( scene:Scene3D path:[Vector3] radiusFn:(_:double (i:int distance:double)) ) {
|
|
490
|
-
templates {
|
|
491
|
-
es6 ('BABYLON.MeshBuilder.CreateTube("tube", {path: ' (e 2)', radiusFunction:'(e 3)', cap:BABYLON.Mesh.CAP_ALL}, ' (e 1) ')')
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
box _:Object3D ( scene:Scene3D size:double name:string) {
|
|
496
|
-
templates {
|
|
497
|
-
es6 ('BABYLON.Mesh.CreateBox(' (e 3)', ' (e 2) ', ' (e 1) ')')
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
box _:Object3D ( scene:Scene3D width:double height:double depth:double name:string) {
|
|
502
|
-
templates {
|
|
503
|
-
es6 ('BABYLON.MeshBuilder.CreateBox(' (e 5)', {width:' (e 2) ', height:' (e 3) ', depth:'(e 4)'}, ' (e 1) ')')
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
box _:Object3D ( scene:Scene3D width:double height:double depth:double faces:[Vector4] name:string) {
|
|
508
|
-
templates {
|
|
509
|
-
es6 ('BABYLON.MeshBuilder.CreateBox(' (e 6)', {width:' (e 2) ', height:' (e 3) ', depth:'(e 4)', faceUV:'(e 5)'}, ' (e 1) ')')
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
merge _:Object3D ( meshes:[Object3D]) {
|
|
514
|
-
templates {
|
|
515
|
-
es6 ( 'BABYLON.Mesh.MergeMeshes(' (e 1) ')')
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
render _:void (s:Scene3D) {
|
|
521
|
-
templates {
|
|
522
|
-
es6 ((e 1)'.render()')
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
; object routines
|
|
527
|
-
|
|
528
|
-
getQuat _:Quaternion3D (o:Object3D) {
|
|
529
|
-
templates {
|
|
530
|
-
es6 ( (e 1 ) '.rotation.toQuaternion()')
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
wireframe _:void (o:Object3D is:boolean) {
|
|
535
|
-
templates {
|
|
536
|
-
es6 ( (e 1) '.wireframe = ' (e 2))
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
getAbsolutePosition _:Vector3 (obj:Object3D) {
|
|
541
|
-
templates {
|
|
542
|
-
es6 ( (e 1) '.getAbsolutePosition()')
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
setPosition _:void (obj:Object3D v:Vector3) {
|
|
547
|
-
templates {
|
|
548
|
-
es6 ( (e 1) '.position = ' (e 2))
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
getPosition _:Vector3 (obj:Object3D) {
|
|
553
|
-
templates {
|
|
554
|
-
es6 ( (e 1) '.position')
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
translate _:void ( obj:Object3D vector:Vector3 ) {
|
|
559
|
-
templates {
|
|
560
|
-
es6 ( (e 1) '.translate(' (e 2) ', 1, BABYLON.Space.WORLD ) ' )
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
x _:double ( v:Vector3 ) {
|
|
565
|
-
templates {
|
|
566
|
-
es6 ( (e 1) '.x')
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
y _:double ( v:Vector3 ) {
|
|
571
|
-
templates {
|
|
572
|
-
es6 ( (e 1) '.y')
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
z _:double ( v:Vector3 ) {
|
|
577
|
-
templates {
|
|
578
|
-
es6 ( (e 1) '.z')
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
parent _@(optional):Object3D (o:Object3D) {
|
|
583
|
-
templates {
|
|
584
|
-
es6 ( (e 1 ) '.parent')
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
clone _:Object3D (o:Object3D name:string) {
|
|
589
|
-
templates {
|
|
590
|
-
es6 ( (e 1 ) '.clone(' (e 2) ')')
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
setX _:void ( cam:Camera3D x:double) {
|
|
595
|
-
templates {
|
|
596
|
-
es6 ( (e 1 ) '.position.x = ' (e 2))
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
setY _:void ( cam:Camera3D y:double) {
|
|
601
|
-
templates {
|
|
602
|
-
es6 ( (e 1 ) '.position.y = ' (e 2))
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
setZ _:void ( cam:Camera3D z:double) {
|
|
607
|
-
templates {
|
|
608
|
-
es6 ( (e 1 ) '.position.z = ' (e 2))
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
setZ _:void ( cam:Object3D z:double) {
|
|
613
|
-
templates {
|
|
614
|
-
es6 ( (e 1 ) '.position.z = ' (e 2))
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
scale _:void ( o:Object3D v:Vector3) {
|
|
619
|
-
templates {
|
|
620
|
-
es6 ( (e 1 ) '.scaling = ' (e 2))
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
position _:void ( o:Object3D v:Vector3) {
|
|
625
|
-
templates {
|
|
626
|
-
es6 ( (e 1 ) '.position = ' (e 2))
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
; new BABYLON.Quaternion.RotationAxis
|
|
631
|
-
quat _:Quaternion3D ( v:Vector3 rotation:double) {
|
|
632
|
-
templates {
|
|
633
|
-
es6 ('new BABYLON.Quaternion.RotationAxis(' (e 1) ', ' (e 2) ')')
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
getWorldMatrix _:Matrix3D ( o:Object3D ) {
|
|
638
|
-
templates {
|
|
639
|
-
es6 ( (e 1) '.getWorldMatrix()')
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
setRotation _:void (o:Object3D q:Quaternion3D) {
|
|
644
|
-
templates {
|
|
645
|
-
es6 ( (e 1) '.rotationQuaternion = ' (e 2))
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
setMaterial _:void ( o:Object3D m:Material3D) {
|
|
650
|
-
templates {
|
|
651
|
-
es6 ( (e 1 ) '.material = ' (e 2))
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
uScale _:void (m:Texture3D val:double) {
|
|
656
|
-
templates {
|
|
657
|
-
es6 ( (e 1) '.uScale = ' (e 2))
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
vScale _:void (m:Texture3D val:double) {
|
|
662
|
-
templates {
|
|
663
|
-
es6 ( (e 1) '.vScale = ' (e 2))
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
onClick _:void (c:Canvas3D cb:(_:void (ev:CanvasClick)) ) {
|
|
669
|
-
templates {
|
|
670
|
-
es6 ( (e 1) '.addEventListener("click", (e)=>{ (' (e 2) ')(e) } ) ' nl )
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
getX _:double (ev:CanvasClick) {
|
|
674
|
-
templates {
|
|
675
|
-
es6 ( (e 1) '.clientX')
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
getY _:double (ev:CanvasClick) {
|
|
679
|
-
templates {
|
|
680
|
-
es6 ( (e 1) '.clientY')
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
setData _:void (o:Object3D data:Any) {
|
|
684
|
-
templates {
|
|
685
|
-
es6 ( (e 1) '.data = ' (e 2))
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
getData _@(optional):Any (o:Object3D) {
|
|
689
|
-
templates {
|
|
690
|
-
es6 ( (e 1) '.data')
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
getPointerX _:double ( s:Scene3D) {
|
|
694
|
-
templates {
|
|
695
|
-
es6 ( (e 1) '.pointerX')
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
getPointerY _:double ( s:Scene3D) {
|
|
699
|
-
templates {
|
|
700
|
-
es6 ( (e 1) '.pointerY')
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
pick _:PickResult3D (s:Scene3D x:double y:double) {
|
|
704
|
-
templates {
|
|
705
|
-
es6 ( (e 1) '.pick(' (e 2) ', ' (e 3) ')')
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
hitPoint _@(optional):Vector3 ( p:PickResult3D ) {
|
|
709
|
-
templates {
|
|
710
|
-
es6 ( (e 1) '.pickedPoint')
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
hitObject _@(optional):Object3D ( p:PickResult3D ) {
|
|
714
|
-
templates {
|
|
715
|
-
es6 ( (e 1) '.pickedMesh')
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
setTarget _:void ( cam:Camera3D position:Vector3) {
|
|
720
|
-
templates {
|
|
721
|
-
es6 ((e 1) '.setTarget(' (e 2)')')
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
setMouseControl _:void ( cam:Camera3D canv:Canvas3D ) {
|
|
726
|
-
templates {
|
|
727
|
-
es6 ((e 1) '.attachControl(' (e 2)', false)')
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
getMainCanvas _:Canvas3D ( canvasID:string ) {
|
|
732
|
-
templates {
|
|
733
|
-
es6 (`document.getElementById(` (e 1) `)`)
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
createEngine3D _:Engine3D (c:Canvas3D) {
|
|
737
|
-
templates {
|
|
738
|
-
es6 ('new BABYLON.Engine(' (e 1) ', true, {stencil: true})')
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
createScene _:Scene3D (c:Engine3D) {
|
|
742
|
-
templates {
|
|
743
|
-
es6 ('new BABYLON.Scene(' (e 1) ')')
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
getObjects _:[Object3D] (r:ImportResult3D) {
|
|
748
|
-
templates {
|
|
749
|
-
es6 ('_newMeshes')
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
assetLoader _:AssetLoader3D (scene:Scene3D) {
|
|
754
|
-
templates {
|
|
755
|
-
es6 ('new BABYLON.AssetsManager(' (e 1) ')')
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
meshLoader _:LoadTask3D (loader:AssetLoader3D name:string url:string objName:string) {
|
|
760
|
-
templates {
|
|
761
|
-
es6 ( (e 1) '.addMeshTask(' (e 2)', "", '(e 3)', ' (e 4) ')')
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
templates {
|
|
766
|
-
es6 ( (e 1) '.
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
}
|
|
857
|
-
}
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
systemclass Vector3 {
|
|
4
|
+
es6 BABYLON.Vector3
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
systemclass Canvas3D {
|
|
8
|
+
es6 HTMLElement
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
systemclass Engine3D {
|
|
12
|
+
es6 BABYLON.Engine
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
systemclass Scene3D {
|
|
16
|
+
es6 BABYLON.Scene
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
systemclass Camera3D {
|
|
20
|
+
es6 BABYLON.FreeCamera
|
|
21
|
+
}
|
|
22
|
+
systemclass Light3D {
|
|
23
|
+
es6 Object
|
|
24
|
+
}
|
|
25
|
+
systemclass Object3D {
|
|
26
|
+
es6 Object
|
|
27
|
+
}
|
|
28
|
+
systemclass PickResult3D {
|
|
29
|
+
es6 Object
|
|
30
|
+
}
|
|
31
|
+
systemclass CanvasClick {
|
|
32
|
+
es6 Object
|
|
33
|
+
}
|
|
34
|
+
systemclass ImportResult3D {
|
|
35
|
+
es6 Object
|
|
36
|
+
}
|
|
37
|
+
systemclass AssetLoader3D {
|
|
38
|
+
es6 Object
|
|
39
|
+
}
|
|
40
|
+
systemclass LoadTask3D {
|
|
41
|
+
es6 Object
|
|
42
|
+
}
|
|
43
|
+
systemclass LoadTaskEvent3D {
|
|
44
|
+
es6 Object
|
|
45
|
+
}
|
|
46
|
+
systemclass Material3D {
|
|
47
|
+
es6 Object
|
|
48
|
+
}
|
|
49
|
+
systemclass Texture3D {
|
|
50
|
+
es6 Object
|
|
51
|
+
}
|
|
52
|
+
systemclass Quaternion3D {
|
|
53
|
+
es6 Object
|
|
54
|
+
}
|
|
55
|
+
systemclass PhysicsObject3D {
|
|
56
|
+
es6 Object
|
|
57
|
+
}
|
|
58
|
+
systemclass PhysicsShape3D {
|
|
59
|
+
es6 Object
|
|
60
|
+
}
|
|
61
|
+
systemclass PhysicsOptions3D {
|
|
62
|
+
es6 Object
|
|
63
|
+
}
|
|
64
|
+
systemclass HighlightLayer3D {
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
systemclass Vector4 {
|
|
68
|
+
es6 BABYLON.Vector4
|
|
69
|
+
}
|
|
70
|
+
systemclass FaceUV {
|
|
71
|
+
es6 BABYLON.Vector4
|
|
72
|
+
}
|
|
73
|
+
systemclass Matrix3D {
|
|
74
|
+
es6 BABYLON.Matrix
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
systemunion AnyLight3D (Light3D HemisphericLight3D)
|
|
79
|
+
|
|
80
|
+
operators {
|
|
81
|
+
|
|
82
|
+
; generic math ops
|
|
83
|
+
|
|
84
|
+
near _:boolean (value:double compareTo:double delta:double) {
|
|
85
|
+
templates {
|
|
86
|
+
* @macro(true) ( '( (fabs ( ' (e 1) ' - ' (e 2) ') ) < ' (e 3) ' ) ' )
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
content_ready _:void ( code:block) {
|
|
92
|
+
templates {
|
|
93
|
+
es6 (`window.addEventListener('DOMContentLoaded', function() {` nl I (block 1) i nl `})` nl)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
renderLoop _:void ( en:Engine3D cb:(_:void ()) ) {
|
|
98
|
+
templates {
|
|
99
|
+
es6 ( (e 1) '.runRenderLoop(()=>{' nl I '(' (e 2) ') () ' i nl ' });' nl )
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
vec _:Vector4 ( x:double y:double z:double w:double ) {
|
|
104
|
+
templates {
|
|
105
|
+
es6 ('new BABYLON.Vector4(' (e 1) ', ' (e 2) ',' (e 3) ',' (e 4) ')')
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
vec3 _:Vector3 ( x:double y:double z:double ) {
|
|
110
|
+
templates {
|
|
111
|
+
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ',' (e 3) ')')
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
vec3 _:Vector3 ( x:int y:int z:int ) {
|
|
116
|
+
templates {
|
|
117
|
+
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ', ' (e 3) ')')
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
vec _:Vector3 ( x:double y:double z:double ) {
|
|
122
|
+
templates {
|
|
123
|
+
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ',' (e 3) ')')
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
vec _:Vector3 ( x:int y:int z:int ) {
|
|
128
|
+
templates {
|
|
129
|
+
es6 ('new BABYLON.Vector3(' (e 1) ', ' (e 2) ', ' (e 3) ')')
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
; color
|
|
134
|
+
color _:Color3 ( r:double g:double b:double ) {
|
|
135
|
+
templates {
|
|
136
|
+
es6 ('new BABYLON.Color3(' (e 1) ', ' (e 2) ', ' (e 3) ')')
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
; setting color
|
|
141
|
+
setDiffuse _:void (o:Material3D color:Color3 ) {
|
|
142
|
+
templates {
|
|
143
|
+
es6 ( (e 1) '.diffuseColor = ' (e 2))
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
setSpecular _:void (o:Material3D color:Color3 ) {
|
|
147
|
+
templates {
|
|
148
|
+
es6 ( (e 1) '.specularColor = ' (e 2))
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
setEmissive _:void (o:Material3D color:Color3 ) {
|
|
152
|
+
templates {
|
|
153
|
+
es6 ( (e 1) '.emissiveColor = ' (e 2))
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
setAmbitent _:void (o:Material3D color:Color3 ) {
|
|
157
|
+
templates {
|
|
158
|
+
es6 ( (e 1) '.ambientColor = ' (e 2))
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
setAlpha _:void (o:Material3D alpha:double) {
|
|
163
|
+
templates {
|
|
164
|
+
es6 ( (e 1) '.alpha = ' (e 2))
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
setAlpha _:void (o:Texture3D alpha:bolean) {
|
|
169
|
+
templates {
|
|
170
|
+
es6 ( (e 1) '.hasAlpha = ' (e 2))
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
; Interesting ideas:
|
|
175
|
+
; https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
176
|
+
; https://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
177
|
+
; physics engine rules...
|
|
178
|
+
; https://doc.babylonjs.com/how_to/using_the_physics_engine
|
|
179
|
+
|
|
180
|
+
enablePhysics _:void (scene:Scene3D) {
|
|
181
|
+
templates {
|
|
182
|
+
es6 ( (e 1) '.enablePhysics()')
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
physicsOptions _:PhysicsOptions3D () {
|
|
187
|
+
templates {
|
|
188
|
+
es6 ('{}')
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
mass _:void (o:PhysicsOptions3D value:double) {
|
|
192
|
+
templates {
|
|
193
|
+
es6 ( (e 1) '.mass = ' (e 2))
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
friction _:void (o:PhysicsOptions3D value:double) {
|
|
197
|
+
templates {
|
|
198
|
+
es6 ( (e 1) '.friction = ' (e 2))
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
restitution _:void (o:PhysicsOptions3D value:double) {
|
|
202
|
+
templates {
|
|
203
|
+
es6 ( (e 1) '.restitution = ' (e 2))
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
physicsBox _:PhysicsShape3D () {
|
|
208
|
+
templates {
|
|
209
|
+
es6 ('BABYLON.PhysicsImpostor.BoxImpostor')
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
physicsSphere _:PhysicsShape3D () {
|
|
213
|
+
templates {
|
|
214
|
+
es6 ('BABYLON.PhysicsImpostor.SphereImpostor')
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
physicsPlane _:PhysicsShape3D () {
|
|
218
|
+
templates {
|
|
219
|
+
es6 ('BABYLON.PhysicsImpostor.PlaneImpostor')
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
physicsMesh _:PhysicsShape3D () {
|
|
223
|
+
templates {
|
|
224
|
+
es6 ('BABYLON.PhysicsImpostor.MeshImpostor')
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
physicsCylinder _:PhysicsShape3D () {
|
|
228
|
+
templates {
|
|
229
|
+
es6 ('BABYLON.PhysicsImpostor.CylinderImpostor')
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
physics _:PhysicsObject3D (scene:Scene3D obj:Object3D shape:PhysicsShape3D options:PhysicsOptions3D ) {
|
|
234
|
+
templates {
|
|
235
|
+
es6 ( 'new BABYLON.PhysicsImpostor(' (e 2) ', '( e 3) ', ' (e 4) ', ' (e 1) ')')
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
setPhysics _:void (obj:Object3D shape:PhysicsObject3D) {
|
|
240
|
+
templates {
|
|
241
|
+
es6 ( (e 1) '.physicsImpostor = ' (e 2))
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
; impostor.applyImpulse(new BABYLON.Vector3(10, 10, 0), sphere.getAbsolutePosition());
|
|
246
|
+
impulse _:void (o:PhysicsObject3D forceVector:Vector3 forcePosition:Vector3) {
|
|
247
|
+
templates {
|
|
248
|
+
es6 ( (e 1) '.applyImpulse(' (e 2) ', ' (e 3) ' ) ' )
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
; lights
|
|
253
|
+
|
|
254
|
+
newSpotLight _:Light3D (scene:Scene3D start:Vector3 end:Vector3 angle:double distance:double name:string) {
|
|
255
|
+
templates {
|
|
256
|
+
es6 ('new BABYLON.SpotLight(' (e 6) ',' (e 2) ',' (e 3) ',' (e 4) ',' (e 5) ',' (e 1) ')')
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
newDirectionalLight _:Light3D (scene:Scene3D direction:Vector3 name:string) {
|
|
260
|
+
templates {
|
|
261
|
+
es6 ('new BABYLON.DirectionalLight(' (e 3) ',' (e 2) ',' (e 1) ')')
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
setDiffuse _:void (o:Light3D color:Color3 ) {
|
|
266
|
+
templates {
|
|
267
|
+
es6 ( (e 1) '.diffuse = ' (e 2))
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
setSpecular _:void (o:Light3D color:Color3 ) {
|
|
271
|
+
templates {
|
|
272
|
+
es6 ( (e 1) '.specular = ' (e 2))
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
setGround _:void (o:HemisphericLight3D color:Color3 ) {
|
|
276
|
+
templates {
|
|
277
|
+
es6 ( (e 1) '.groundColor = ' (e 2))
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
intensity _:void (l:Light3D amount:double) {
|
|
282
|
+
templates {
|
|
283
|
+
es6 ( (e 1) '.intensity = ' (e 2))
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
range _:void (l:Light3D range:double) {
|
|
288
|
+
templates {
|
|
289
|
+
es6 ( (e 1) '.range = ' (e 2))
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
enableFor _void ( l:Light3D list:[Object3D]) {
|
|
294
|
+
templates {
|
|
295
|
+
es6 ( (e 1) '.excludedMeshes = ' (e 2))
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
disableFor _void ( l:Light3D list:[Object3D]) {
|
|
299
|
+
templates {
|
|
300
|
+
es6 ( (e 1) '.includedOnlyMeshes = ' (e 2))
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
; vector math ops
|
|
310
|
+
|
|
311
|
+
catmull _:Vector3 ( t:double v1:Vector3 v2:Vector3 v3:Vector3 v4:Vector3 ) {
|
|
312
|
+
templates {
|
|
313
|
+
es6 ( 'BABYLON.Vector3.CatmullRom(' (e 2) ', ' (e 3) ', ' (e 4) ', ' (e 5) ', ' (e 1) ') ' )
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
- _:Vector3 ( v1:Vector3 other:Vector3 ) {
|
|
318
|
+
templates {
|
|
319
|
+
es6 ( (e 1) '.subtract(' (e 2) ')')
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
* _:Vector3 ( v1:Vector3 n:double) {
|
|
324
|
+
templates {
|
|
325
|
+
es6 ( (e 1) '.scale(' (e 2) ')')
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
* _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
330
|
+
templates {
|
|
331
|
+
es6 ( (e 1) '.mutiply(' (e 2) ')')
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
+ _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
336
|
+
templates {
|
|
337
|
+
es6 ( (e 1) '.add(' (e 2) ')')
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
dot _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
342
|
+
templates {
|
|
343
|
+
es6 ( (e 1) '.Dot(' (e 2) ')')
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
cross _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
348
|
+
templates {
|
|
349
|
+
es6 ( (e 1) '.Cross(' (e 2) ')')
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
distance _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
354
|
+
templates {
|
|
355
|
+
es6 ( (e 1) '.Distance(' (e 2) ')')
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
== _:Vector3 ( v1:Vector3 v2:Vector3) {
|
|
361
|
+
templates {
|
|
362
|
+
es6 ( (e 1) '.equals(' (e 2) ')')
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
clone _:Vector3 ( v1:Vector3 ) {
|
|
367
|
+
templates {
|
|
368
|
+
es6 ( (e 1) '.clone()')
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
normalize _:Vector3 ( v1:Vector3 ) {
|
|
373
|
+
templates {
|
|
374
|
+
es6 ( (e 1) '.normalize()')
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
; Matrix operators
|
|
379
|
+
toArray _:[double] ( o:Matrix3D ) {
|
|
380
|
+
templates {
|
|
381
|
+
es6 ( (e 1) '.toArray()')
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
invert _:Matrix3D ( o:Matrix3D ) {
|
|
386
|
+
templates {
|
|
387
|
+
es6 ( (e 1) '.invert()')
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
add _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
392
|
+
templates {
|
|
393
|
+
es6 ( (e 1) '.add(' (e 2) ')')
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
+ _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
398
|
+
templates {
|
|
399
|
+
es6 ( (e 1) '.add(' (e 2) ')')
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
setTranslate _:Matrix3D ( o:Matrix3D v:Vector3 ) {
|
|
404
|
+
templates {
|
|
405
|
+
es6 ( (e 1) '.setTranslation(' (e 2) ')')
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
getTranslate _:Vector3 ( o:Matrix3D ) {
|
|
410
|
+
templates {
|
|
411
|
+
es6 ( (e 1) '.getTranslation()')
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
resetRotateAndScale _:Matrix3D ( o:Matrix3D ) {
|
|
416
|
+
templates {
|
|
417
|
+
es6 ( (e 1) '.removeRotationAndScaling()')
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
* _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
422
|
+
templates {
|
|
423
|
+
es6 ( (e 1) '.mutiply(' (e 2) ')')
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
copyFrom _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
428
|
+
templates {
|
|
429
|
+
es6 ( (e 1) '.copyFrom(' (e 2) ')')
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
== _:Matrix3D ( o:Matrix3D other:Matrix3D ) {
|
|
434
|
+
templates {
|
|
435
|
+
es6 ( (e 1) '.equals(' (e 2) ')')
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
clone _:Matrix3D ( o:Matrix3D ) {
|
|
440
|
+
templates {
|
|
441
|
+
es6 ( (e 1) '.clone()')
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
identity_matrix _:Matrix3D ( ) {
|
|
446
|
+
templates {
|
|
447
|
+
es6 ( 'BABYLON.Matrix.Identity()')
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
getRow _:Vector4 ( o:Matrix3D index:int ) {
|
|
453
|
+
templates {
|
|
454
|
+
es6 ( (e 1) '.getRow(' (e 2) ')')
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
cell _:double (o:Matrix3D row:int col:int) {
|
|
459
|
+
templates {
|
|
460
|
+
es6 ( (e 1) '.m[' (e 2) ' * 4 + ' (e 3) ']')
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
newCamera _:Camera3D ( scene:Scene3D position:Vector3 name:string) {
|
|
470
|
+
templates {
|
|
471
|
+
es6 ('new BABYLON.FreeCamera(' (e 3) ', ' (e 2)', ' (e 1)')')
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
newHemisphericLight _:HemisphericLight3D ( scene:Scene3D position:Vector3 name:string) {
|
|
476
|
+
templates {
|
|
477
|
+
es6 ('new BABYLON.HemisphericLight(' (e 3) ', ' (e 2)', ' (e 1)')')
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
; standard object types
|
|
482
|
+
|
|
483
|
+
newSphere _:Object3D ( scene:Scene3D width:double height:double name:string) {
|
|
484
|
+
templates {
|
|
485
|
+
es6 ('new BABYLON.Mesh.CreateSphere(' (e 4) ', ' (e 2) ', ' (e 3)', ' (e 1)')')
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
tube _:Object3D ( scene:Scene3D path:[Vector3] radiusFn:(_:double (i:int distance:double)) ) {
|
|
490
|
+
templates {
|
|
491
|
+
es6 ('BABYLON.MeshBuilder.CreateTube("tube", {path: ' (e 2)', radiusFunction:'(e 3)', cap:BABYLON.Mesh.CAP_ALL}, ' (e 1) ')')
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
box _:Object3D ( scene:Scene3D size:double name:string) {
|
|
496
|
+
templates {
|
|
497
|
+
es6 ('BABYLON.Mesh.CreateBox(' (e 3)', ' (e 2) ', ' (e 1) ')')
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
box _:Object3D ( scene:Scene3D width:double height:double depth:double name:string) {
|
|
502
|
+
templates {
|
|
503
|
+
es6 ('BABYLON.MeshBuilder.CreateBox(' (e 5)', {width:' (e 2) ', height:' (e 3) ', depth:'(e 4)'}, ' (e 1) ')')
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
box _:Object3D ( scene:Scene3D width:double height:double depth:double faces:[Vector4] name:string) {
|
|
508
|
+
templates {
|
|
509
|
+
es6 ('BABYLON.MeshBuilder.CreateBox(' (e 6)', {width:' (e 2) ', height:' (e 3) ', depth:'(e 4)', faceUV:'(e 5)'}, ' (e 1) ')')
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
merge _:Object3D ( meshes:[Object3D]) {
|
|
514
|
+
templates {
|
|
515
|
+
es6 ( 'BABYLON.Mesh.MergeMeshes(' (e 1) ')')
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
render _:void (s:Scene3D) {
|
|
521
|
+
templates {
|
|
522
|
+
es6 ((e 1)'.render()')
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
; object routines
|
|
527
|
+
|
|
528
|
+
getQuat _:Quaternion3D (o:Object3D) {
|
|
529
|
+
templates {
|
|
530
|
+
es6 ( (e 1 ) '.rotation.toQuaternion()')
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
wireframe _:void (o:Object3D is:boolean) {
|
|
535
|
+
templates {
|
|
536
|
+
es6 ( (e 1) '.wireframe = ' (e 2))
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
getAbsolutePosition _:Vector3 (obj:Object3D) {
|
|
541
|
+
templates {
|
|
542
|
+
es6 ( (e 1) '.getAbsolutePosition()')
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
setPosition _:void (obj:Object3D v:Vector3) {
|
|
547
|
+
templates {
|
|
548
|
+
es6 ( (e 1) '.position = ' (e 2))
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
getPosition _:Vector3 (obj:Object3D) {
|
|
553
|
+
templates {
|
|
554
|
+
es6 ( (e 1) '.position')
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
translate _:void ( obj:Object3D vector:Vector3 ) {
|
|
559
|
+
templates {
|
|
560
|
+
es6 ( (e 1) '.translate(' (e 2) ', 1, BABYLON.Space.WORLD ) ' )
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
x _:double ( v:Vector3 ) {
|
|
565
|
+
templates {
|
|
566
|
+
es6 ( (e 1) '.x')
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
y _:double ( v:Vector3 ) {
|
|
571
|
+
templates {
|
|
572
|
+
es6 ( (e 1) '.y')
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
z _:double ( v:Vector3 ) {
|
|
577
|
+
templates {
|
|
578
|
+
es6 ( (e 1) '.z')
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
parent _@(optional):Object3D (o:Object3D) {
|
|
583
|
+
templates {
|
|
584
|
+
es6 ( (e 1 ) '.parent')
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
clone _:Object3D (o:Object3D name:string) {
|
|
589
|
+
templates {
|
|
590
|
+
es6 ( (e 1 ) '.clone(' (e 2) ')')
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
setX _:void ( cam:Camera3D x:double) {
|
|
595
|
+
templates {
|
|
596
|
+
es6 ( (e 1 ) '.position.x = ' (e 2))
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
setY _:void ( cam:Camera3D y:double) {
|
|
601
|
+
templates {
|
|
602
|
+
es6 ( (e 1 ) '.position.y = ' (e 2))
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
setZ _:void ( cam:Camera3D z:double) {
|
|
607
|
+
templates {
|
|
608
|
+
es6 ( (e 1 ) '.position.z = ' (e 2))
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
setZ _:void ( cam:Object3D z:double) {
|
|
613
|
+
templates {
|
|
614
|
+
es6 ( (e 1 ) '.position.z = ' (e 2))
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
scale _:void ( o:Object3D v:Vector3) {
|
|
619
|
+
templates {
|
|
620
|
+
es6 ( (e 1 ) '.scaling = ' (e 2))
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
position _:void ( o:Object3D v:Vector3) {
|
|
625
|
+
templates {
|
|
626
|
+
es6 ( (e 1 ) '.position = ' (e 2))
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
; new BABYLON.Quaternion.RotationAxis
|
|
631
|
+
quat _:Quaternion3D ( v:Vector3 rotation:double) {
|
|
632
|
+
templates {
|
|
633
|
+
es6 ('new BABYLON.Quaternion.RotationAxis(' (e 1) ', ' (e 2) ')')
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
getWorldMatrix _:Matrix3D ( o:Object3D ) {
|
|
638
|
+
templates {
|
|
639
|
+
es6 ( (e 1) '.getWorldMatrix()')
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
setRotation _:void (o:Object3D q:Quaternion3D) {
|
|
644
|
+
templates {
|
|
645
|
+
es6 ( (e 1) '.rotationQuaternion = ' (e 2))
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
setMaterial _:void ( o:Object3D m:Material3D) {
|
|
650
|
+
templates {
|
|
651
|
+
es6 ( (e 1 ) '.material = ' (e 2))
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
uScale _:void (m:Texture3D val:double) {
|
|
656
|
+
templates {
|
|
657
|
+
es6 ( (e 1) '.uScale = ' (e 2))
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
vScale _:void (m:Texture3D val:double) {
|
|
662
|
+
templates {
|
|
663
|
+
es6 ( (e 1) '.vScale = ' (e 2))
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
onClick _:void (c:Canvas3D cb:(_:void (ev:CanvasClick)) ) {
|
|
669
|
+
templates {
|
|
670
|
+
es6 ( (e 1) '.addEventListener("click", (e)=>{ (' (e 2) ')(e) } ) ' nl )
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
getX _:double (ev:CanvasClick) {
|
|
674
|
+
templates {
|
|
675
|
+
es6 ( (e 1) '.clientX')
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
getY _:double (ev:CanvasClick) {
|
|
679
|
+
templates {
|
|
680
|
+
es6 ( (e 1) '.clientY')
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
setData _:void (o:Object3D data:Any) {
|
|
684
|
+
templates {
|
|
685
|
+
es6 ( (e 1) '.data = ' (e 2))
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
getData _@(optional):Any (o:Object3D) {
|
|
689
|
+
templates {
|
|
690
|
+
es6 ( (e 1) '.data')
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
getPointerX _:double ( s:Scene3D) {
|
|
694
|
+
templates {
|
|
695
|
+
es6 ( (e 1) '.pointerX')
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
getPointerY _:double ( s:Scene3D) {
|
|
699
|
+
templates {
|
|
700
|
+
es6 ( (e 1) '.pointerY')
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
pick _:PickResult3D (s:Scene3D x:double y:double) {
|
|
704
|
+
templates {
|
|
705
|
+
es6 ( (e 1) '.pick(' (e 2) ', ' (e 3) ')')
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
hitPoint _@(optional):Vector3 ( p:PickResult3D ) {
|
|
709
|
+
templates {
|
|
710
|
+
es6 ( (e 1) '.pickedPoint')
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
hitObject _@(optional):Object3D ( p:PickResult3D ) {
|
|
714
|
+
templates {
|
|
715
|
+
es6 ( (e 1) '.pickedMesh')
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
setTarget _:void ( cam:Camera3D position:Vector3) {
|
|
720
|
+
templates {
|
|
721
|
+
es6 ((e 1) '.setTarget(' (e 2)')')
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
setMouseControl _:void ( cam:Camera3D canv:Canvas3D ) {
|
|
726
|
+
templates {
|
|
727
|
+
es6 ((e 1) '.attachControl(' (e 2)', false)')
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
getMainCanvas _:Canvas3D ( canvasID:string ) {
|
|
732
|
+
templates {
|
|
733
|
+
es6 (`document.getElementById(` (e 1) `)`)
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
createEngine3D _:Engine3D (c:Canvas3D) {
|
|
737
|
+
templates {
|
|
738
|
+
es6 ('new BABYLON.Engine(' (e 1) ', true, {stencil: true})')
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
createScene _:Scene3D (c:Engine3D) {
|
|
742
|
+
templates {
|
|
743
|
+
es6 ('new BABYLON.Scene(' (e 1) ')')
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
getObjects _:[Object3D] (r:ImportResult3D) {
|
|
748
|
+
templates {
|
|
749
|
+
es6 ('_newMeshes')
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
assetLoader _:AssetLoader3D (scene:Scene3D) {
|
|
754
|
+
templates {
|
|
755
|
+
es6 ('new BABYLON.AssetsManager(' (e 1) ')')
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
meshLoader _:LoadTask3D (loader:AssetLoader3D name:string url:string objName:string) {
|
|
760
|
+
templates {
|
|
761
|
+
es6 ( (e 1) '.addMeshTask(' (e 2)', "", '(e 3)', ' (e 4) ')')
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
getObjects _:[Object3D] ( ev:LoadTaskEvent3D) {
|
|
765
|
+
templates {
|
|
766
|
+
es6 ( (e 1) '.loadedMeshes')
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
textureLoader _:LoadTask3D (loader:AssetLoader3D name:string url:string ) {
|
|
771
|
+
templates {
|
|
772
|
+
es6 ( (e 1) '.addTextureTask(' (e 2)', '(e 3)')')
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
createMaterial _:Material3D (scene:Scene3D name:string) {
|
|
777
|
+
templates {
|
|
778
|
+
es6 ('new BABYLON.StandardMaterial(' (e 2) ', ' (e 1) ')')
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
; new BABYLON.WoodProceduralTexture("texture", 1024, scene);
|
|
782
|
+
grassTexture _:Texture3D (scene:Scene3D grassColor:Color3 groundColor:Color3 size:int) {
|
|
783
|
+
templates {
|
|
784
|
+
es6 ('( (c,g)=>{ var t = new BABYLON.GrassProceduralTexture( "grass" , ' (e 4) ', ' (e 1) ');t.grassColor = c; t.groundColor=g; return t;})(' (e 2) ', ' (e 3) ')')
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
woodTexture _:Texture3D (scene:Scene3D grassColor:Color3 scale:int size:int) {
|
|
789
|
+
templates {
|
|
790
|
+
es6 ('( (c,g)=>{ var t = new BABYLON.WoodProceduralTexture( "grass" , ' (e 4) ', ' (e 1) ');t.woodColor = c; t.ampScale=g; return t;})(' (e 2) ', ' (e 3) ')')
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
createTexture _:Texture3D (scene:Scene3D imageName:string ) {
|
|
795
|
+
templates {
|
|
796
|
+
es6 ('new BABYLON.Texture(' (e 2) ', ' (e 1) ')')
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
setTexture _:void (m:Material3D text:Texture3D) {
|
|
800
|
+
templates {
|
|
801
|
+
es6 ( (e 1) '.diffuseTexture = ' (e 2))
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
setNormalMap _:void (m:Material3D text:Texture3D) {
|
|
805
|
+
templates {
|
|
806
|
+
es6 ( (e 1) '.bumpTexture = ' (e 2) )
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
highlight _:HighlightLayer3D (s:Scene3D name:string) {
|
|
811
|
+
templates {
|
|
812
|
+
es6 ('new BABYLON.HighlightLayer(' (e 2) ', ' (e 1) ')')
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
outerGlow _:void (hl:HighlightLayer3D value:boolean) {
|
|
816
|
+
templates {
|
|
817
|
+
es6 ( (e 1) '.outerGlow = ' (e 2))
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
innerGlow _:void (hl:HighlightLayer3D value:boolean) {
|
|
821
|
+
templates {
|
|
822
|
+
es6 ( (e 1) '.innerGlow = ' (e 2))
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
add _:void ( hl:HighlightLayer3D o:Object3D color:Color3) {
|
|
827
|
+
templates {
|
|
828
|
+
es6 ( (e 1) '.addMesh(' (e 2) ', ' (e 3) ')' )
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
remove _:void ( hl:HighlightLayer3D o:Object3D ) {
|
|
833
|
+
templates {
|
|
834
|
+
es6 ( (e 1) '.removeMesh(' (e 2) ')' )
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
start _:AssetLoader3D (loader:AssetLoader3D) {
|
|
839
|
+
templates {
|
|
840
|
+
es6 ( (e 1) '.load()')
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
onReady _:void (task:LoadTask3D cb:(_:void ( event:LoadTaskEvent3D ))) {
|
|
845
|
+
templates {
|
|
846
|
+
es6 ( (e 1) '.onSuccess = (_task)=> {' nl I '(' (e 2) ')(_task)' nl I '}' nl )
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
load _@(async):void (loader:AssetLoader3D) {
|
|
851
|
+
templates {
|
|
852
|
+
es6 (`await (new Promise(resolve => {
|
|
853
|
+
` (e 1) `.onFinish = (_task)=> {
|
|
854
|
+
resolve()
|
|
855
|
+
};
|
|
856
|
+
` (e 1)`.load() }))`)
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
listenToResize _:void (c:Engine3D) {
|
|
862
|
+
templates {
|
|
863
|
+
es6 (`
|
|
864
|
+
window.addEventListener('resize', function() {
|
|
865
|
+
` (e 1)`.resize();
|
|
866
|
+
})
|
|
867
|
+
` nl)
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|