{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2023-07-20T06:12:13.305060400Z", "start_time": "2023-07-20T06:12:13.011273800Z" } }, "outputs": [], "source": [ "@file:Repository(\"*mavenLocal\")\n", "@file:Repository(\"https://repo.kotlin.link\")\n", "@file:Repository(\"https://maven.pkg.jetbrains.space/spc/p/sci/dev\")\n", "@file:DependsOn(\"space.kscience:visionforge-jupyter-common-jvm:0.3.0-dev-11\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false }, "ExecuteTime": { "end_time": "2023-07-20T06:12:19.603077Z", "start_time": "2023-07-20T06:12:19.419504300Z" } }, "outputs": [ { "data": { "text/html": "

Starting VisionForge server on http://localhost:7777

\n" }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "vf.startServer()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false }, "ExecuteTime": { "end_time": "2023-07-20T06:12:21.490069100Z", "start_time": "2023-07-20T06:12:20.694188600Z" } }, "outputs": [ { "data": { "text/html": "
\n

AAA

\n
\n \n
\n
\n \n
\n
\n\n" }, "execution_count": 4, "metadata": { "text/html": { "isolated": true } }, "output_type": "execute_result" } ], "source": [ "vf.page {\n", " h1 { +\"AAA\" }\n", " vision {\n", " solid {\n", " ambientLight()\n", " box(100, 100, 200)\n", "\n", " sphere(100) {\n", " x = 300\n", " }\n", " }\n", " }\n", "\n", " vision {\n", " plotly {\n", " scatter {\n", " x(1, 2, 3, 1)\n", " y(1, 2, 3, 4)\n", " }\n", " }\n", " }\n", "}" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [], "source": [ "vf.stopServer()" ] }, { "cell_type": "code", "execution_count": null, "outputs": [], "source": [], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "ktnbPluginMetadata": { "isAddProjectLibrariesToClasspath": false }, "language_info": { "codemirror_mode": "text/x-kotlin", "file_extension": ".kt", "mimetype": "text/x-kotlin", "name": "kotlin", "nbconvert_exporter": "", "pygments_lexer": "kotlin", "version": "1.8.20" } }, "nbformat": 4, "nbformat_minor": 4 }