Nikky
04/04/2022, 5:26 PMCompositionLocal LocalDensity not present
my main function is
fun main() {
renderComposable(rootElementId = "root") {
console.log("rendering root element")
Text("Test")
}
}
and the index.html looks like so
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pentagame</title>
<!-- <script src="skiko.js"> </script>-->
</head>
<body>
<div id="root"></div>
<!-- <canvas id="ComposeTarget" width="1024" height="720"></canvas>-->
<script src="app.js"></script>
</body>
</html>
Oliver.O
04/05/2022, 5:58 PMrenderComposable
invocation in this snippet?
fun main() {
document.addEventListener("DOMContentLoaded", {
// renderComposable
})
}
Norbi
04/09/2022, 7:46 AMNikky
04/11/2022, 10:15 AMdarkmoon_uk
04/25/2022, 11:04 AMLocalDensity
and two other Local
requirements that arose; like this:
fun main() {
initLogTags()
renderComposable(rootElementId = ROOT_DIV_ID) {
CompositionLocalProvider(
LocalDensity provides Density(1.0f),
LocalLayoutDirection provides LayoutDirection.Ltr,
LocalViewConfiguration provides JsViewConfiguration(Density(1.0f))
) {
...
}
}
}
This resulted in the browser logging, what I interpreted as, an end to the fun:
Uncaught ReferenceError: org_jetbrains_skia_Paint__1nMake is not defined
at Paint_init_$Init$_0 (Paint.kt?3f47:25:27)
at Paint_init_$Create$_0 (kotlin_org_jetbrains_skiko_skiko.js:10592:12)
at SkiaBackedPaint_init_$Init$ (SkiaBackedPaint.skiko.kt?31e6:33:61)
at SkiaBackedPaint_init_$Create$ (kotlin_androidx_compose_ui_ui_graphics.js:14627:12)
at Paint_0 (SkiaBackedPaint.skiko.kt?31e6:25:29)
at new Companion_22 (Standard.kt?e25e:158:799)
at Companion_getInstance_42 (kotlin_androidx_compose_ui_ui.js:21756:7)
at new InnerPlaceable (InnerPlaceable.kt?ef35:32:1)
at LayoutNode (LayoutNode.kt?c856:570:62)
at LayoutNode_init_$Init$ (LayoutNode.kt?c856:68:10)
darkmoon_uk
04/25/2022, 11:04 AMdarkmoon_uk
04/25/2022, 11:35 AMText
or a Surface
either.