| a1.destroy() | a1.lookAt(0, 0, 0) | ||
| a1.lookTarget(obj1) | a1.moveForward(1.0) | ||
| a1.moveForward(1.0, true) //Space.World or Space.Self | a1.moveRight(1.0) | ||
| a1.moveRight(1.0, true) //Space.World or Space.Self | a1.moveRotation(0, 0, 0) //for gigidbody | ||
| a1.movePosition(0, 0, 0) //for gigidbody | a1.moveTo(0, 0, 0) | ||
| a1.rotate(0, 1, 0) | a1.rotate(0, 1, 0, false) //Space.World or Space.Self | ||
| a1.rotateAround(0, 0, 0, "x", 30) | a1.setActive(false) | ||
| a1.setAmbientColor(255, 255, 255, 255) | a1.setCenterOfMass(0, 0, 0) | ||
| a1.setColor(255, 255, 255) | a1.setColor(255, 255, 255, 255) | ||
| a1.setDisable() | a1.setEnable() | ||
| a1.setOrientation(0, 0, 0) | a1.setPosition(0, 0, 0) | ||
| a1.setScale(2) | a1.setScale(2, 2, 2) | ||
| t1.setText("Hello") | t1.setTexture("http://www.sample.com/img1.png") | ||
| t1.setTextureOffset(0.1, 0.1) | t1.setTextureTiling(10, 10) | ||
| a1.setVisible(false) | a1.smoothMoveTo(10, 0, 0) | ||
| a1.translate(1) | a1.translate(1, 0, 0) | ||
| a1.translate(1, 0, 0, "true") //Space.World | |||
| Vector3 v3 = a1.backward | Vector3 v3 = a1.down | ||
| Vector3 v3 = a1.forward | Vector3 v3 = a1.left | ||
| Vector3 v3 = a1.orientation | str = a1.orientationString | ||
| Vector3 v3 = a1.position | str = a1.positionString | ||
| Vector3 v3 = a1.right | Vector3 v3 = a1.up | ||
| Vector3 v3 = a1.velocity | str = a1.velocityString |
| Camera.disableJoystick() | Camera.enablejoystick() | ||
| Camera.lookAt(0, 0, 0) | Camera.lookTarget(obj1) | ||
| Camera.moveForward(1.0) | Camera.moveForward(1.0, true) //Space.World or Space.Self | ||
| Camera.moveRight(1.0) | Camera.moveRight(1.0, true) //Space.World or Space.Self | ||
| Camera.moveTo(0, 0, 0) | Camera.rotate(0, 1, 0) | ||
| Camera.rotate(0, 1, 0, false) //Space.World or Space.Self | Camera.rotateAround(0, 0, 0, "x", 30) | ||
| Camera.setOrientation(0, 0, 0) | Camera.setPosition(0, 0, 0) | ||
| Camera.translate(1) | Camera.translate(1, 0, 0) | ||
| Camera.translate(1, 0, 0, "true") //Space.World | |||
| Vector3 v3 = Camera.backward | Vector3 v3 = Camera.direction | ||
| str = Camera.directionString | Vector3 v3 = Camera.down | ||
| Vector3 v3 = Camera.focusPosition | str = Camera.focusPositionString | ||
| Vector3 v3 = Camera.forward | Vector3 v3 = Camera.gyroOrientation | ||
| Vector3 v3 = Camera.gyroDelta | Vector3 v3 = Camera.left | ||
| Vector2 v2 = Camera.leftJoystick | bool b = Camera.leftJoystickPressed | ||
| bool b = Camera.leftJoystickClick | bool b = Camera.leftButtonPressed | ||
| bool b = Camera.leftButtonClick | Vector3 v3 = Camera.orientation | ||
| str = Camera.orientationString | Vector3 v3 = Camera.position | ||
| str = Camera.positionString | Vector3 v3 = Camera.right | ||
| v2 = Camera.rightJoystick | bool b = Camera.rightJoystickPressed | ||
| bool b = Camera.rightJoystickClick | bool b = Camera.rightButtonPressed | ||
| bool b = Camera.rightButtonClick | Vector3 v3 = Camera.up | ||
| float v = cam1.brightness() | Vector3 v = cam1.avgColor() | ||
| float v = cam1.minBrightness() | float v = cam1.maxBrightness() | ||
| float v = cam1.meanX() | float v = cam1.meanY() | ||
| int v = cam1.filteredCount() | float v = cam1.filteredValue() | ||
| setCameraBgColor(120) | setCameraBgColor(120, 120, 120) |
| null | char | sbyte | byte | short | ||
| ushort | int | uint | long | ulong | ||
| float | double | decimal | datetime | string | ||
| guid | bool | object | var | Vector3 | ||
| unsigned | hashtable | dictionary | arraylist | queue | ||
| stack | random | stringbuilder | bitmap |
| char[] | sbyte[] | byte[] | short[] | ushort[] | ||
| int[] | uint[] | long[] | ulong[] | float[] | ||
| double[] | decimal[] | string[] | bool[] | Vector2[] | ||
| Vector3[] | Vector4[] |   |   |   |
| char a[10] | sbyte a[10] | byte a[10] | short a[10] | ushort a[10] | ||
| int a[10] | uint a[10] | long a[10] | ulong a[10] | float a[10] | ||
| double a[10] | decimal a[10] | string a[10] | bool a[10] | Vector2 a[10] | ||
| Vector3 a[10] | Vector4 a[10] |   |   |   |
|
int arr[10] arr[0] = 1 arr[1] = 2 |
| float a = map(a, 0, 100, -50, 50) | float t = millis() | float p = pi() | ||
| float r = toRadian(d) | float d = toDegree(c) | float c = sin(r) | ||
| float c = cos(r) | float c = tan(r) | float c = asin(r) | ||
| float c = acos(r) | float c = atan(r) | float c = atan2(x, y) | ||
| float n = sqrt(m) | float n = sign(m) | float a = abs(m) | ||
| float p = pow(x, y) | float m = min(x, y) | float m = max(x, y) | ||
| float n = round(x) | float p = ceiling(x) | float p = floor(x) | ||
| float p = exp(x) | float p = log(x) | float p = log10(x) | ||
| float p = sinh(x) | float p = cosh(x) | float p = tanh(x) | ||
| float p = truncate(x) | float n = dist(x1, y1, x2, y2) | float n = dist(x1, y1, z1, x2, y2, z2) | ||
| float p = pingPong() | float p = pingPong(len) | float p = pingPong(t, len) |
| Vector3[] arr = getCirclePoints(count, radius) |
| float a = random() | int a = random(10) | int a = random(1, 11) |
| float a = random() 은 0.0 ~ 1.0 사이의 실수값을 생성함 | ||
| int a = random(10) 은 0 ~ 9 사이의 정수값을 생성함 | ||
| int a = random(1, 11) 은 1 ~ 10 사이의 정수값을 생성함 |
| float t = Time.time | float t = Time.deltaTime | float t = Time.fixedDeltaTime | int c = Time.frameCount | ||
| float t = Time.systemTime |
| string s = toString(3.14) | bool b = toBool("true") | ||
| float f = toFloat("3.14") | double d = toDouble("3.14") | ||
| byte b = toByte(200) | short s = toShort("100") | ||
| int i = toInt("100") | long l = toLong("100") | ||
| char c = toChar(100) | DateTime c = toDatetime("2021-10-01 13:40:01") | ||
| byte[] b = getBytes("hello") | string b = getString(buf) | ||
| char[] b = toChars("hello") |
| bool b = isNull(a) | bool b = isNullOrEmpty(a) | bool b = exists(a) |
| bool b = isNullOrEmpty(a) | string s = toLower("Hello") | string s = toUpper("Hello") | ||
| bool b = equals(a, b) | bool b = isLower("hello") | bool b = isUpper("HELLO") | ||
| bool b = isNum("123") | bool b = isLetter("abc123") | bool b = isAlpha("abc") | ||
| bool b = isDigit("123") | string[] r = s.Split(",") | string[] r = split("1,2,3", ",") | ||
| float[] r = splitValues("1,2,3", ",") | string w = wordWrap(s, 20) | |||
| string s = s.subStr(5) | string s = s.subStr(0, 5) | char[] r = s.toChars() | ||
| string r = s.toLower() | string r = s.toUpper() | int a = str.indexOf("hello") | ||
| string s = s.replace("aaa", "bbb") | int n = str.length | string s = newline(s) |
| s = File.readString("a") | string[] arr = File.readAllLines("a") | ||
| s = File.readInt("a") | int[] arr = File.readIntLines("a") | ||
| s = File.readFloat("a") | float[] arr = File.readFloatLines("a") | ||
| File.writeString("a", "Hello") | File.writeAllLines("a", arr)) | ||
| File.writeInt("a", 123) | File.writeIntLines("a", arr) | ||
| File.writeFloat("a", 1.23) | File.writeFloatLines("a", arr) | ||
| File.appendString("a", "Hello")) | File.appendLine("a", "Hello")) | ||
| File.appendLines("a", arr)) | File.appendInt("a", 123)) | ||
| File.appendIntLine("a", 123)) | File.appendIntLines("a", arr)) | ||
| File.appendFloat("a", 1.23)) | File.appendFloatLine("a", 1.23)) | ||
| File.appendFloatLines("a", arr)) | s = File.exists("a.txt") | ||
| File.delete("a.txt") | File.copy("a", "b")) | ||
| File.concat("a", "b", "c") | File.newLine("a") |
| s = File.readString("a.txt") | s = File.readString("C:/Temp/a.txt") | ||
| string[] s = File.readAllLines("a.txt") | s = File.readInt("a.txt") | ||
| s = File.readFloat("a.txt") | File.writeString("a.txt", "Hello") | ||
| File.writeString("C:/Temp/a.txt", "Hello")) | File.writeAllLines("C:/Temp/a.txt", a)) | ||
| File.copy("a.txt", "C:/Temp/a.txt")) | File.concat("a.txt", "b.txt", "c.txt") | ||
| File.newLine("a.txt") |
| File.readString("a")과 File.readText("a")는 동일 함수임 | ||
| File.writeString("a", 123)과 File.writeText("a", 123)는 동일 함수임 | ||
| File.appendString("a", 123)과 File.appendText("a", 123)는 동일 함수임 |
| bool b = isNull(s) | bool b = isNullOrEmpty(s) | bool b = exists(s) | ||
| string s = arrayToStr(a) | string s = listToStr(a) | string s = getString(v) | ||
| DateTime t = now() | bool b = isKorean(string s) | bool b = isHan(string s) | ||
| float v = magnitude(v) | Vector3 v = normalize(v) | float v = distance(v1, v2) | ||
| float v = angle(v1, v2) | byte[] n = getBytes(s) | s = bytesToHex(buf) | ||
| char[] n = getChars(v) | n = combineArrays(a1, a2) |
| arrayToStr(), listToStr() : 배열이나 리시트를 하나의 문자열로 변환하는 함수 |
| Application.openURL("http://www.google.com") | Application.openURL("file://C:/Temp") | ||
| Application.openPath() | string s = application.Path | ||
| Application.clearCache() | Application.quit() |
| Player.setString("a", "Hello") | Player.setInt("a", 123) | Player.setFloat("a", 123.56) | ||
| string s = Player.getString("a") | int a = Player.getInt("a") | float f = Player.getFloat("a") | ||
| string s = Player.path() |
| Vector2 v2 = Vector2.fromString("1, 1") | float x = v2.x | ||
| float y = v2.y | float a = Vector2.angle(v1, v2) | ||
| float a = Vector2.signedAngle(v1, v2) | Vector2 v = Vector2.dot(v1, v2) | ||
| float d = Vector2.distance(v1, v2) | float m = Vector2.sqrtMagnitude(v) | ||
| Vector2 v2 = Vector2.fromValue(1, 1) | Vector2 d = Vector2.difference(v1, v2) | ||
| Vector2 v2 = Vector2.fromValue(1, 1) | float v = Vector2.signedAngle(v1, v2) |
| Vector3 v3 = Vector3.fromString("1, 1, 1") | string str = v3.toString() | ||
| float x = v3.x | float y = v3.y | ||
| float z = v3.z | float a = Vector3.angle(v1, v2) | ||
| float a = Vector3.signedAngle(v1, v2, v3) | Vector3 v = Vector3.dot(v1, v2) | ||
| Vector3 v = Vector3.cross(v1, v2) | float d = Vector3.distance(v1, v2) | ||
| Vector3 v = Vector3.normalize(v) | float m = Vector3.sqrtMagnitude(v) | ||
| float m = Vector3.magnitude(v) | Vector3 v3 = Vector3.fromValue(1, 1, 1) | ||
| Vector3 d = Vector3.difference(v1, v2) |
| Vector4 v4 = Vector4.fromString("1, 1, 1, 0") | float x = v4.x | ||
| float y = v4.y | float z = v4.z | ||
| float w = v4.w | Vector4 v4 = Vector4.fromValue(1, 1, 1, 1) | ||
| Vector4 v4 = Vector4.fromValue(1, 1, 1, 1) | Vector4 d = Vector4.difference(v1, v2) |
| int a = random() //0 ~ 1.0 | int a = random(256) //0 ~ 255 | ||
| int a = random(50, 256) //50 ~ 255 |
| float[] s = a.sensors() | Color[] c = a.colors() | ||
| float s = a.sensor1() | float s = a.sensor2() | ||
| float s = a.sensor3() | float s = a.sensor4() | ||
| float s = a.sensor5() | float s = a.sensor6() | ||
| Color c = a.color1() | Color c = a.color2() | ||
| Color c = a.color3() | Color c = a.color4() | ||
| Color c = a.color5() | Color c = a.color6() | ||
| float v = a.colorScore1("Black") | float v = a.colorScore2("Black") | ||
| float v = a.colorScore3("Black") | float v = a.colorScore4("Black") | ||
| float v = a.colorScore5("Black") | float v = a.colorScore6("Black") | ||
| float[] v = a.colorScores("Black") |
|
colorScores 함수는 컬러 센서에서 사용자가 지정한 색상값의 강도를 0.0 ~ 1.0 사이의 값으로 검출한 값임 colorScores 에서의 사용 가능 색상값 |
||
| "Red", "Orange", "Yellow", "Green", "Cyan", "Blue", "Violet", "Magenta", "White", "Black", "Gray" |
| float[] v = c1.inputs() | float[] v = c1.outputs() | ||
| float[] v = c1.loss() | string s = arrayToStr(v) |
| inputs() : 인공신경망 및 자율주행 신경망 모델의 입력값 | ||
| outputs() : 인공신경망 및 자율주행 신경망 모델의 출력값 | ||
| loss() : 인공신경망 및 자율주행 신경망 학습시 손실값 | ||
| arrayToStr() : 배열값을 하나의 문자열로 변환하는 함수 |
| light1.setIntensity(2.0) | light1.setRange(100) | ||
| light1.setSpotAngle(45) | light1.setLightColor(r, g, b) | ||
| float v = light1.intensity() | float v = light1.range() | ||
| setAmbient(150) | setAmbient(200, 100, 100) | ||
| setAmbientColor(200, 100, 100) | Color c = ambient() |
| string s = txt1.text() | button1.setPosition(100, 100) | ||
| button1.setPositionRatio(0.2, 0.2) | button1.setSize(100, 100) | ||
| button1.setSizeRatio(0.2, 0.2) | label1.setText("Hello") | ||
| label1.setTextColor(255, 255, 255, 255) | label1.setTextSize(24) | ||
| label1.setTextSizeRatio(0.05) | label1.setVisible(false) | ||
| float v = sd1.value() |
| joint1.setAngularPosition(0, 30, 0) | joint1.setAngularVelocity(0, 100, 0) | ||
| joint1.setLinearPosition(10, 0, 0) | joint1.setLinearVelocity(10, 0, 0) | ||
| joint1.setMotorPower(power) | joint1.setMotorPower(power, power_scale) | ||
| joint1.setMotorPower(power, power_scale, "x") | joint1.setTargetPosition(10) | ||
| joint1.setTargetVelocity(100) | |||
| Vector3 v3 = joint1.angularPosition | Vector3 v3 = joint1.angularVelocity | ||
| Vector3 v3 = joint1.linearPosition | Vector3 v3 = joint1.linearVelocity |
| float red = myColor.r | float green = myColor.g | ||
| float blue = myColor.b | float alpha = myColor.a |
| int w = Screen.width | int h = Screen.height |
| serialOpen("COM3") | serialOpen("COM3", 115200) | ||
| string p = serialOpen("COM3", 115200) | bool b = isSerialOpened() | ||
| string[] n = serialNames() | printSerialNames() | ||
| serialClose() | serialPrint("123") | ||
| serialPrintLn("123") | serialWrite(200) | ||
| serialWrite(200, 255) | serialWriteBytes(byte[] buf) | ||
| int a = serialRead() | byte[] b = serialReadBytes() | ||
| byte[] b = serialReadBytesUntil(';') | string s = serialReadLine() | ||
| string s = serialReadString() | string s = serialReadStringUntil(';') | ||
| float[] v = serialGetValues() | string[] s = serialGetStrings() | ||
| serialVariables() | int a = serialBytesToRead() |
| 시리얼 통신 스크립트 |
p = serialOpen("COM3")
println(p)
delay(100)
d13 = 0
void loop()
{
serialVariables()
println(d2)
serialPrint("@d13=")
serialPrint(d13)
serialPrint(";")
delay(100)
}
AddJoystick
/OnRightButtonClick:f1
/OnLeftButtonClick:f2
void f1()
{
d13 = 1
}
void f2()
{
d13 = 0
}
|
| 아두이노 스크립트 |
void setup()
{
SerialBegin(115200)
}
void loop()
{
int try_cnt = 0;
while (Serial.available())
{
String r0 = Serial.readStringUntil('@');
String r1 = Serial.readStringUntil('=');
String r2 = Serial.readStringUntil(';');
if (r1 == "d13")
{
if (r2 == "0")
digitalWrite(13, LOW);
else if (r2 == "1")
digitalWrite(13, HIGH);
}
}
d2 = digitalRead(2)
Serial.print("d2=");
Serial.print(d2);
Serial.print(";");
delay(100);
}
|