diff --git a/.idea/modules/kudens.iml b/.idea/modules/kudens.iml
index 8d44250..b18b3e9 100644
--- a/.idea/modules/kudens.iml
+++ b/.idea/modules/kudens.iml
@@ -11,11 +11,15 @@
+
+
+
diff --git a/.idea/modules/kudens_main.iml b/.idea/modules/kudens_main.iml
index c3ecc55..4be1719 100644
--- a/.idea/modules/kudens_main.iml
+++ b/.idea/modules/kudens_main.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,10 +53,11 @@
+
-
-
+
+
diff --git a/.idea/modules/kudens.iml b/.idea/modules/kudens.iml
index 8d44250..b18b3e9 100644
--- a/.idea/modules/kudens.iml
+++ b/.idea/modules/kudens.iml
@@ -11,11 +11,15 @@
+
+
+
+
diff --git a/.idea/modules/kudens_main.iml b/.idea/modules/kudens_main.iml
index c3ecc55..4be1719 100644
--- a/.idea/modules/kudens_main.iml
+++ b/.idea/modules/kudens_main.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,10 +53,11 @@
+
-
-
+
+
diff --git a/.idea/modules/kudens_test.iml b/.idea/modules/kudens_test.iml
index 79fcb71..bd2968e 100644
--- a/.idea/modules/kudens_test.iml
+++ b/.idea/modules/kudens_test.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,6 +53,7 @@
+
diff --git a/.idea/modules/kudens.iml b/.idea/modules/kudens.iml
index 8d44250..b18b3e9 100644
--- a/.idea/modules/kudens.iml
+++ b/.idea/modules/kudens.iml
@@ -11,11 +11,15 @@
+
+
+
+
diff --git a/.idea/modules/kudens_main.iml b/.idea/modules/kudens_main.iml
index c3ecc55..4be1719 100644
--- a/.idea/modules/kudens_main.iml
+++ b/.idea/modules/kudens_main.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,10 +53,11 @@
+
-
-
+
+
diff --git a/.idea/modules/kudens_test.iml b/.idea/modules/kudens_test.iml
index 79fcb71..bd2968e 100644
--- a/.idea/modules/kudens_test.iml
+++ b/.idea/modules/kudens_test.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,6 +53,7 @@
+
diff --git a/build.gradle b/build.gradle
index 9ac93c9..e2af200 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@
}
buildscript {
- ext.kotlin_version = '1.1.0-beta-38'
+ ext.kotlin_version = '1.1.0-rc-91'
repositories {
maven {
url "http://nexus.astraeus.nl/nexus/content/groups/public"
@@ -36,17 +36,6 @@
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
}
-/*
-task jarSources(type:Jar){
- from sourceSets.main.allSource
-
- classifier = 'source'
-}
-
-artifacts {
- compile jarSources
-}*/
-
compileKotlin2Js {
kotlinOptions.metaInfo = true
@@ -56,38 +45,6 @@
compileKotlin2Js.kotlinOptions.verbose = true
}
-def outDir = "${buildDir}/kotlinjs/"
-
-jar {
- from outDir
- include "**/*.js"
-
- manifest {
- attributes(
- "Kotlin-JS-Module-Name": "lib-kudens"
- )
- }
-}
-
-jar.dependsOn(compileKotlin2Js)
-
-/*
-build.doLast {
- configurations.compile.each { File file ->
- copy {
- includeEmptyDirs = false
-
- from zipTree(file.absolutePath)
- into "${projectDir}/web"
- include { fileTreeElement ->
- def path = fileTreeElement.path
- path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
- }
- }
- }
-}
-*/
-
uploadArchives {
repositories {
mavenDeployer {
diff --git a/.idea/modules/kudens.iml b/.idea/modules/kudens.iml
index 8d44250..b18b3e9 100644
--- a/.idea/modules/kudens.iml
+++ b/.idea/modules/kudens.iml
@@ -11,11 +11,15 @@
+
+
+
+
diff --git a/.idea/modules/kudens_main.iml b/.idea/modules/kudens_main.iml
index c3ecc55..4be1719 100644
--- a/.idea/modules/kudens_main.iml
+++ b/.idea/modules/kudens_main.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,10 +53,11 @@
+
-
-
+
+
diff --git a/.idea/modules/kudens_test.iml b/.idea/modules/kudens_test.iml
index 79fcb71..bd2968e 100644
--- a/.idea/modules/kudens_test.iml
+++ b/.idea/modules/kudens_test.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,6 +53,7 @@
+
diff --git a/build.gradle b/build.gradle
index 9ac93c9..e2af200 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@
}
buildscript {
- ext.kotlin_version = '1.1.0-beta-38'
+ ext.kotlin_version = '1.1.0-rc-91'
repositories {
maven {
url "http://nexus.astraeus.nl/nexus/content/groups/public"
@@ -36,17 +36,6 @@
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
}
-/*
-task jarSources(type:Jar){
- from sourceSets.main.allSource
-
- classifier = 'source'
-}
-
-artifacts {
- compile jarSources
-}*/
-
compileKotlin2Js {
kotlinOptions.metaInfo = true
@@ -56,38 +45,6 @@
compileKotlin2Js.kotlinOptions.verbose = true
}
-def outDir = "${buildDir}/kotlinjs/"
-
-jar {
- from outDir
- include "**/*.js"
-
- manifest {
- attributes(
- "Kotlin-JS-Module-Name": "lib-kudens"
- )
- }
-}
-
-jar.dependsOn(compileKotlin2Js)
-
-/*
-build.doLast {
- configurations.compile.each { File file ->
- copy {
- includeEmptyDirs = false
-
- from zipTree(file.absolutePath)
- into "${projectDir}/web"
- include { fileTreeElement ->
- def path = fileTreeElement.path
- path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
- }
- }
- }
-}
-*/
-
uploadArchives {
repositories {
mavenDeployer {
diff --git a/src/main/kotlin/com/persesgames/input/Keys.kt b/src/main/kotlin/com/persesgames/input/Keys.kt
index 29ff96a..652f32d 100644
--- a/src/main/kotlin/com/persesgames/input/Keys.kt
+++ b/src/main/kotlin/com/persesgames/input/Keys.kt
@@ -55,31 +55,31 @@
init {
val body = document.body
if (body != null) {
- body.on("keydown", true) {
+ body.onkeydown = {
Keys.keyDown(it)
}
- body.on("keyup", true) {
+ body.onkeyup = {
Keys.keyUp(it)
}
- body.on("keypress", true) {
+ body.onkeypress = {
Keys.keyPress(it)
}
- body.on("click", true) {
+ body.onclick = {
Keys.mouseClick(it)
}
- body.on("mousedown", true) {
+ body.onmousedown = {
Keys.mouseMove(it)
}
- body.on("mouseup", true) {
+ body.onmouseup = {
Keys.mouseMove(it)
}
- body.on("mousemove", true) {
+ body.onmousemove = {
Keys.mouseMove(it)
}
} else {
diff --git a/.idea/modules/kudens.iml b/.idea/modules/kudens.iml
index 8d44250..b18b3e9 100644
--- a/.idea/modules/kudens.iml
+++ b/.idea/modules/kudens.iml
@@ -11,11 +11,15 @@
+
+
+
+
diff --git a/.idea/modules/kudens_main.iml b/.idea/modules/kudens_main.iml
index c3ecc55..4be1719 100644
--- a/.idea/modules/kudens_main.iml
+++ b/.idea/modules/kudens_main.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,10 +53,11 @@
+
-
-
+
+
diff --git a/.idea/modules/kudens_test.iml b/.idea/modules/kudens_test.iml
index 79fcb71..bd2968e 100644
--- a/.idea/modules/kudens_test.iml
+++ b/.idea/modules/kudens_test.iml
@@ -25,6 +25,9 @@
+
+
+
@@ -50,6 +53,7 @@
+
diff --git a/build.gradle b/build.gradle
index 9ac93c9..e2af200 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@
}
buildscript {
- ext.kotlin_version = '1.1.0-beta-38'
+ ext.kotlin_version = '1.1.0-rc-91'
repositories {
maven {
url "http://nexus.astraeus.nl/nexus/content/groups/public"
@@ -36,17 +36,6 @@
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
}
-/*
-task jarSources(type:Jar){
- from sourceSets.main.allSource
-
- classifier = 'source'
-}
-
-artifacts {
- compile jarSources
-}*/
-
compileKotlin2Js {
kotlinOptions.metaInfo = true
@@ -56,38 +45,6 @@
compileKotlin2Js.kotlinOptions.verbose = true
}
-def outDir = "${buildDir}/kotlinjs/"
-
-jar {
- from outDir
- include "**/*.js"
-
- manifest {
- attributes(
- "Kotlin-JS-Module-Name": "lib-kudens"
- )
- }
-}
-
-jar.dependsOn(compileKotlin2Js)
-
-/*
-build.doLast {
- configurations.compile.each { File file ->
- copy {
- includeEmptyDirs = false
-
- from zipTree(file.absolutePath)
- into "${projectDir}/web"
- include { fileTreeElement ->
- def path = fileTreeElement.path
- path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
- }
- }
- }
-}
-*/
-
uploadArchives {
repositories {
mavenDeployer {
diff --git a/src/main/kotlin/com/persesgames/input/Keys.kt b/src/main/kotlin/com/persesgames/input/Keys.kt
index 29ff96a..652f32d 100644
--- a/src/main/kotlin/com/persesgames/input/Keys.kt
+++ b/src/main/kotlin/com/persesgames/input/Keys.kt
@@ -55,31 +55,31 @@
init {
val body = document.body
if (body != null) {
- body.on("keydown", true) {
+ body.onkeydown = {
Keys.keyDown(it)
}
- body.on("keyup", true) {
+ body.onkeyup = {
Keys.keyUp(it)
}
- body.on("keypress", true) {
+ body.onkeypress = {
Keys.keyPress(it)
}
- body.on("click", true) {
+ body.onclick = {
Keys.mouseClick(it)
}
- body.on("mousedown", true) {
+ body.onmousedown = {
Keys.mouseMove(it)
}
- body.on("mouseup", true) {
+ body.onmouseup = {
Keys.mouseMove(it)
}
- body.on("mousemove", true) {
+ body.onmousemove = {
Keys.mouseMove(it)
}
} else {
diff --git a/src/main/kotlin/com/persesgames/sound/Music.kt b/src/main/kotlin/com/persesgames/sound/Music.kt
index be30ae3..432bc6c 100644
--- a/src/main/kotlin/com/persesgames/sound/Music.kt
+++ b/src/main/kotlin/com/persesgames/sound/Music.kt
@@ -28,7 +28,7 @@
audio.volume = volume
audio.play()
- audio.on("ended", true, {
+ audio.onended = {
if (looping) {
audio.currentTime = 0.0
audio.play()
@@ -37,7 +37,7 @@
audio.remove()
playing.remove(audio)
}
- })
+ }
return audio
}